ISSUE-480: XSD Validator returns schema parser error when reading prov.xsd
XSD Validator returns schema parser error when reading prov.xsd
- State:
- CLOSED
- Product:
- XML Serialization
- Raised by:
- Stephan Zednik
- Opened on:
- 2012-08-15
- Description:
- 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? - Related Actions Items:
- No related actions
- Related emails:
- Re: PROV-ISSUE-480: XSD Validator returns schema parser error when reading prov.xsd [XML Serialization] (from l.moreau@ecs.soton.ac.uk on 2012-09-03)
- Re: Notes on PROV-XML schema (from zednis@rpi.edu on 2012-08-19)
- Re: Notes on PROV-XML schema (from reza.bfar@oracle.com on 2012-08-19)
- Re: PROV-ISSUE-480: XSD Validator returns schema parser error when reading prov.xsd [XML Serialization] (from zednis@rpi.edu on 2012-08-15)
- Re: PROV-ISSUE-480: XSD Validator returns schema parser error when reading prov.xsd [XML Serialization] (from zednis@rpi.edu on 2012-08-15)
- Notes on PROV-XML schema (from zednis@rpi.edu on 2012-08-15)
- PROV-ISSUE-480: XSD Validator returns schema parser error when reading prov.xsd [XML Serialization] (from sysbot+tracker@w3.org on 2012-08-15)
Related notes:
I made the following change
https://dvcs.w3.org/hg/prov/rev/954701ee8fe3
based on the information at http://www.w3.org/TR/xml-i18n-bp/#generic-includeinxsd.
The schema now validates as OK using xmllint and the online validator at http://xsdvalidation.utilities-online.info.
Display change log