line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::Validator::Schema::AttributeNode; |
2
|
5
|
|
|
5
|
|
27
|
use base 'XML::Validator::Schema::Node'; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
369
|
|
3
|
5
|
|
|
5
|
|
28
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
131
|
|
4
|
5
|
|
|
5
|
|
21
|
use warnings; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
148
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
26
|
use XML::Validator::Schema::Util qw(_attr _err); |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
246
|
|
7
|
5
|
|
|
5
|
|
27
|
use Carp qw(confess); |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
791
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
XML::Validator::Schema::AttributeNode |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 DESCRIPTION |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Temporary node in the schema parse tree to represent an attribute. |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=cut |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub parse { |
20
|
0
|
|
|
0
|
0
|
|
my ($pkg, $data) = @_; |
21
|
0
|
|
|
|
|
|
my $self = $pkg->new(); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# squirl away data for latter use |
24
|
0
|
|
|
|
|
|
$self->{data} = $data; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
return $self; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub compile { |
30
|
0
|
|
|
0
|
0
|
|
my ($self) = shift; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# create a new attribute object and return it |
33
|
0
|
|
|
|
|
|
my $attr = XML::Validator::Schema::Attribute->parse($self->{data}); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# copy in type info if available |
36
|
0
|
0
|
|
|
|
|
$attr->{type} = $self->{type} if $self->{type}; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
return $attr; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |