PROV-ISSUE-480: XSD Validator returns schema parser error when reading prov.xsd [XML Serialization]

PROV-ISSUE-480: XSD Validator returns schema parser error when reading prov.xsd [XML Serialization]

http://www.w3.org/2011/prov/track/issues/480

Raised by: Stephan Zednik
On product: XML Serialization

I tried to validate the following sample xml 

<?xml version="1.0" encoding="UTF-8"?>
<prov:Agent prov:id="ex:e1" xmlns:prov="http://www.w3.org/ns/prov#" xmlns:ex="http://www.example.com/ns/ex/">
 <prov:type>prov:Person</prov:type>
 <ex:name>Alice</ex:name>
 <ex:employee>1234</ex:employee>
</prov:Agent>

against prov.xsd using xmllint and received the following error response 

zednik$ xmllint --noout --schema prov.xsd ../../examples/eg-40-xml-examples-by-term/xml/Agent.xml 
warning: failed to load external entity "xml.xsd"
prov.xsd:32: element import: Schemas parser warning : Element '{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at location 'xml.xsd'. Skipping the import.
prov.xsd:360: element attribute: Schemas parser error : attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does not resolve to a(n) attribute declaration.
WXS schema prov.xsd failed to compile

This does not tell me about the correctness of my example XML file against the schema, but seems to imply there are issues with the schema itself.

I followed this up by trying to use an online XSD Validator to get a second opinion.  I am unsure of what online validators are best so I used one of the top ranked results on Google - http://xsdvalidation.utilities-online.info

Validation of the XSD failed with the message, 'src-resolve: Cannot resolve the name 'xml:lang' to a(n) 'attribute declaration' component.'

I am not very experienced in debugging XML schemas.  Does anyone have any ideas?  Is this an actual issue with the schema or am I just using the wrong tools to validate the XSD?

Received on Wednesday, 15 August 2012 20:08:48 UTC