hi All,
I have a schema and a XML file and used xmllint to verify that the XML is in
fact confirm to the schema. The rare problem I am running into is that
different version of xmllint will have very different behavior and I am not
certain which version is at fault. Here is an example:
$ /usr/bin/xmllint --version
/usr/bin/xmllint: using libxml version 20620
compiled with: DTDValid FTP HTTP HTML C14N Catalog XPath XPointer
XInclude Iconv Unicode Regexps Automata Schemas Modules
$ /usr/bin/xmllint --noout --schema
http://www.youtube.com/xsd/metadata_0.2.xsd /tmp/test.xml
/tmp/test.xml validates
a new version 20623, however, fails:
$ /usr/bin/xmllint --version
/usr/bin/xmllint: using libxml version 20623
compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP
HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv
ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug
$ /usr/bin/xmllint --noout --schema
http://www.youtube.com/xsd/metadata_0.2.xsd /tmp/test.xml
/tmp/test.xml:18: element keywords: Schemas validity error : Element '{
http://search.yahoo.com/mrss}keywords<http://search.yahoo.com/mrss%7Dkeywords>':
[facet 'pattern'] The value 'London,Sci Fi,Aliens' is not accepted by the
pattern '(.*,){2,}.*'.
/tmp/test.xml:18: element keywords: Schemas validity error : Element '{
http://search.yahoo.com/mrss}keywords<http://search.yahoo.com/mrss%7Dkeywords>':
'London,Sci Fi,Aliens' is not a valid value of the local atomic type.
/tmp/test.xml fails to validate
the test is performed with the same XML and schema and the only different is
the version of xmllint used. Build version 20620 successfully validate the
XML while version 20623 does not.
the sample XML is attached. can someone tell me if this is a bug or not?
thx!
david
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:yt="http://www.youtube.com/schemas/yt/0.2"
xmlns:media="http://search.yahoo.com/mrss"
xsi:noNamespaceSchemaLocation="http://www.youtube.com/xsd/metadata_0.2.xsd">
<channel>
<yt:notification_email>[EMAIL PROTECTED]</yt:notification_email>
<yt:account>
<yt:username>ytuser</yt:username>
<yt:password>qwertyuiop</yt:password>
</yt:account>
<item>
<yt:action>Insert</yt:action>
<media:title>Science Fiction Show: Aliens attack Earth!</media:title>
<media:content url="file://20071010_012052_video.flv" fileSize="9123123">
<media:description type="plain">The Aliens are planning another attack... this time London!</media:description>
<media:keywords>London,Sci Fi,Aliens</media:keywords>
<media:category>Entertainment</media:category>
<media:rating scheme="urn:simple">nonadult</media:rating>
</media:content>
<yt:start_time>2007-10-10T01:20:00Z</yt:start_time>
<yt:language>en</yt:language>
<yt:community>
<yt:allow_comments>always</yt:allow_comments>
<yt:allow_responses>approve</yt:allow_responses>
<yt:allow_ratings>true</yt:allow_ratings>
<yt:allow_embedding>true</yt:allow_embedding>
</yt:community>
<yt:policy>
<yt:commercial>share</yt:commercial>
<yt:ugc>share</yt:ugc>
</yt:policy>
<yt:tv_metadata>
<yt:custom_id>aliens_earth_london_1</yt:custom_id>
<yt:episode_title>Aliens London</yt:episode_title>
</yt:tv_metadata>
</item>
</channel>
</rss>
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml