Re: Unique and Key/Keyref

Petr Pajas <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
Hi,

xmllint --noout --schema http://abstractgamers.org/xml/iago-report.xsd \
  http://abstractgamers.org/xml/iago-report-test.xm

validates the document without complaining as well, which means that
this might be a bug or incomplete implementation in libxml2. I suggest
you report this there, see http://xmlsoft.org/bugs.html

Best,

-- Petr

2009/12/5 Aaron Dalton <[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
>
>
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.