T
Thomas Scheffler
Hi,
I use the Xerces SAXParser to read my documents in Java. For that I
wrote an EntityResolver so that the parse can use a schema to validate
them. Now that is the problem. The parser does never call my
EntityResolver and so gives out an error message
[java] INFO SystemID: ./xyz-01.xml
[java] INFO PublicID: null
[java] ERROR test.xml: line=8 : column=30 : message=cvc-elt.1:
Cannot find the declaration of element 'xyz'.
[java] org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the
declaration of element 'xyz'.
What do I have to do that the parser calls the EntityResolver to get the
InputSource of my schema files?
here are the first ew lines of a xml file sample:
<?xml version="1.0" encoding="iso-8859-1"?>
<xyz
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="xyz-schema.xsd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
label="test">
.....
My search in the net was without a result so this is a rather unusual
error I think. Can anybody help?
Greets
Thomas
I use the Xerces SAXParser to read my documents in Java. For that I
wrote an EntityResolver so that the parse can use a schema to validate
them. Now that is the problem. The parser does never call my
EntityResolver and so gives out an error message
[java] INFO SystemID: ./xyz-01.xml
[java] INFO PublicID: null
[java] ERROR test.xml: line=8 : column=30 : message=cvc-elt.1:
Cannot find the declaration of element 'xyz'.
[java] org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the
declaration of element 'xyz'.
What do I have to do that the parser calls the EntityResolver to get the
InputSource of my schema files?
here are the first ew lines of a xml file sample:
<?xml version="1.0" encoding="iso-8859-1"?>
<xyz
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="xyz-schema.xsd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
label="test">
.....
My search in the net was without a result so this is a rather unusual
error I think. Can anybody help?
Greets
Thomas