Lists Home |
Date Index |
I'm trying to validate an xml file against a schema that references W3C
reserved attributes, like xml:base or xml:lang. I'm using the DOMParser.parse
() method to parse the file. The problem is that Xerces seems to be unaware
of these reserved attributes and tries to resolve the references to them, and
so I get the following error message :
[ERROR]: src-resolve: Cannot resolve the name 'xml:base' to a(n) 'attribute
declaration' component. line: 74, col: 36
Despite this error, calling the DOMParser.getDocument() method after the
parse returns a Document object. This is confusing. If there were errors in
the parse then why should this method return anything else than null? Even
when the xml file contains elements that aren't declared in the schema,
Xerces doesn't report them and the DOMParser.getDocument() still returns a
Document object, as if everything was OK. Apparently Xerces stops validating
the document after encountering the initial xml:base error.
The schema I'm using is the IMS Content Packaging Specification schema which
can be found at
The xml:base reference in the schema is :
<xsd:attributeGroup name = "attr.base">
<xsd:attribute ref = "xml:base"/>
at line 73.
I would really appreciate some help.
P.S. I'm using Xerces 2.6.0