| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package XML::Schematron; |
|
2
|
1
|
|
|
1
|
|
1352
|
use Moose; |
|
|
1
|
|
|
|
|
466811
|
|
|
|
1
|
|
|
|
|
7
|
|
|
3
|
1
|
|
|
1
|
|
8633
|
use namespace::autoclean; |
|
|
1
|
|
|
|
|
8162
|
|
|
|
1
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
|
|
with 'MooseX::Traits'; |
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
77
|
use Moose::Util::TypeConstraints; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
8
|
|
|
7
|
1
|
|
|
1
|
|
2859
|
use XML::Schematron::Test; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
46
|
|
|
8
|
1
|
|
|
1
|
|
749
|
use Check::ISA; |
|
|
1
|
|
|
|
|
2011
|
|
|
|
1
|
|
|
|
|
7
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
508
|
use vars qw/$VERSION/; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
273
|
|
|
11
|
|
|
|
|
|
|
$VERSION = '1.11'; |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has '+_trait_namespace' => ( default => 'XML::Schematron' ); |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has tests => ( |
|
18
|
|
|
|
|
|
|
traits => ['Array'], |
|
19
|
|
|
|
|
|
|
is => 'rw', |
|
20
|
|
|
|
|
|
|
isa => 'ArrayRef[XML::Schematron::Test]', |
|
21
|
|
|
|
|
|
|
default => sub { [] }, |
|
22
|
|
|
|
|
|
|
handles => { |
|
23
|
|
|
|
|
|
|
_add_test => 'push', |
|
24
|
|
|
|
|
|
|
all_tests => 'elements', |
|
25
|
|
|
|
|
|
|
} |
|
26
|
|
|
|
|
|
|
); |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub add_test { |
|
30
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
31
|
0
|
|
|
|
|
|
my $ref = shift; |
|
32
|
|
|
|
|
|
|
|
|
33
|
0
|
0
|
|
|
|
|
if ( obj($ref, 'XML::Schematron::Test') ) { |
|
34
|
0
|
|
|
|
|
|
$self->_add_test( $ref ); |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
else { |
|
37
|
0
|
|
|
|
|
|
$self->_add_test( XML::Schematron::Test->new( %{$ref} ) ); |
|
|
0
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub add_tests { |
|
42
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
43
|
0
|
|
|
|
|
|
my @tests = @_; |
|
44
|
0
|
|
|
|
|
|
foreach my $test (@tests) { |
|
45
|
0
|
|
|
|
|
|
$self->add_test( $test ); |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 NAME |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
XML::Schematron - Perl implementation of the Schematron. |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This package should not be used directly. Use one of the subclasses instead. |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This is the superclass for the XML::Schematron::* modules. |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Please run perldoc L<XML::Schematron::XPath>, or perldoc L<XML::Schematron::LibXSLT> for examples and complete documentation. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 AUTHOR |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Kip Hampton, khampton@totalcinema.com |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Copyright (c) 2000-2010 Kip Hampton. All rights reserved. This program is free software; you can redistribute it and/or modify it |
|
76
|
|
|
|
|
|
|
under the same terms as Perl itself. |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
For information about Schematron, sample schemas, and tutorials to help you write your own schmemas, please visit the |
|
81
|
|
|
|
|
|
|
Schematron homepage at: L<https://www.schematron.com/> |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=cut |