121 |
## no author requirement on conformance in the XML Base specification. |
## no author requirement on conformance in the XML Base specification. |
122 |
}, |
}, |
123 |
id => sub { |
id => sub { |
124 |
my ($self, $attr) = @_; |
my ($self, $attr, $item, $element_state) = @_; |
125 |
my $value = $attr->value; |
my $value = $attr->value; |
126 |
$value =~ s/[\x09\x0A\x0D\x20]+/ /g; |
$value =~ s/[\x09\x0A\x0D\x20]+/ /g; |
127 |
$value =~ s/^\x20//; |
$value =~ s/^\x20//; |
135 |
push @{$self->{id}->{$value}}, $attr; |
push @{$self->{id}->{$value}}, $attr; |
136 |
} else { |
} else { |
137 |
$self->{id}->{$value} = [$attr]; |
$self->{id}->{$value} = [$attr]; |
138 |
|
$self->{id_type}->{$value} = $element_state->{id_type} || ''; |
139 |
} |
} |
140 |
}, |
}, |
141 |
}, |
}, |
559 |
$self->{plus_elements} = {}; |
$self->{plus_elements} = {}; |
560 |
$self->{minus_elements} = {}; |
$self->{minus_elements} = {}; |
561 |
$self->{id} = {}; |
$self->{id} = {}; |
562 |
|
$self->{id_type} = {}; # 'menu' / 'labelable' |
563 |
$self->{form} = {}; |
$self->{form} = {}; |
564 |
$self->{term} = {}; |
$self->{term} = {}; |
565 |
$self->{usemap} = []; |
$self->{usemap} = []; |
567 |
$self->{template} = []; # datatemplate template references |
$self->{template} = []; # datatemplate template references |
568 |
$self->{contextmenu} = []; |
$self->{contextmenu} = []; |
569 |
$self->{map} = {}; |
$self->{map} = {}; |
|
$self->{menu} = {}; |
|
570 |
$self->{has_link_type} = {}; |
$self->{has_link_type} = {}; |
571 |
$self->{flag} = {}; |
$self->{flag} = {}; |
572 |
#$self->{has_uri_attr}; |
#$self->{has_uri_attr}; |
779 |
} |
} |
780 |
|
|
781 |
for (@{$self->{contextmenu}}) { |
for (@{$self->{contextmenu}}) { |
782 |
unless ($self->{menu}->{$_->[0]}) { |
if ($self->{id}->{$_->[0]} and |
783 |
|
$self->{id_type}->{$_->[0]} eq 'menu') { |
784 |
|
# |
785 |
|
} else { |
786 |
$self->{onerror}->(node => $_->[1], type => 'no referenced menu', |
$self->{onerror}->(node => $_->[1], type => 'no referenced menu', |
787 |
level => $self->{level}->{must}); |
level => $self->{level}->{must}); |
788 |
} |
} |
792 |
delete $self->{minus_elements}; |
delete $self->{minus_elements}; |
793 |
delete $self->{onerror}; |
delete $self->{onerror}; |
794 |
delete $self->{id}; |
delete $self->{id}; |
795 |
|
delete $self->{id_type}; |
796 |
delete $self->{form}; |
delete $self->{form}; |
797 |
delete $self->{usemap}; |
delete $self->{usemap}; |
798 |
delete $self->{ref}; |
delete $self->{ref}; |