Unique and Key/Keyref
Aaron Dalton <[email protected]>
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
I have a schema (http://abstractgamers.org/xml/iago-report.xsd) that
imposes a couple of unique and key/keyref constraints. I am attempting
to validate an instance document
(http://abstractgamers.org/xml/iago-report-test.xml) but XML::LibXML
refuses to flag the duplicate "iagoid" attribute in the <player>
elements. Does XML::LibXML support unique and key/keyref validation? I
would greatly appreciate any help you could provide.
Many thanks,
Aaron
P.S. Here's the validator code:
#!/usr/bin/perl -w
use XML::LibXML;
my $schema = XML::LibXML::Schema->new(location => 'iago-report.xsd' );
my $parser = XML::LibXML->new;
my $xml = 'iago-report-test.xml';
my $doc = $parser->parse_file( $xml );
eval { $schema->validate( $doc ) };
die $@ if $@;
print "$xml is valid\n";
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs