You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Sevel, Valerie" <Va...@ba-dsg.com> on 2000/08/18 23:58:05 UTC

XML Schema + SAX

I did some tests with some samples from XERCES.
I tested with SAX2Count class and with Personal.xsd and personal-schema.xml.

I am not happy with the result if I use validation.

[Error] Personal-schema.xml:2:18: Attribute "xmlns" must be declared for
element type "personnel".
[Error] Personal-schema.xml:2:33: Element type "personnel" must be declared.
etc....

I already had this kind of problem (using DTD) and I solve it by using
parser.setFeature("http://xml.org/sax/features/namespaces", false);

But If I do that, the result is

[Fatal Error] structures.dtd:14:22: The system identifier must begin with
either a single or double quote character.
java.lang.NullPointerException
	java.lang.Throwable()
	java.lang.Exception()
	java.lang.RuntimeException()
	java.lang.NullPointerException()
	void
org.apache.xerces.validators.schema.XSchemaValidator.loadSchema(org.xml.sax.
InputSource)
	void
org.apache.xerces.validators.schema.XSchemaValidator.loadSchema(org.xml.sax.
InputSource)
	int org.apache.xerces.framework.XMLParser.scanAttValue(int, int)
	boolean
org.apache.xerces.framework.XMLDocumentScanner.scanElement(int)
	boolean
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(bo
olean)
	boolean
org.apache.xerces.framework.XMLDocumentScanner.parseSome(boolean)
	void
org.apache.xerces.framework.XMLParser.parse(org.xml.sax.InputSource)
	void org.apache.xerces.framework.XMLParser.parse(java.lang.String)
	void sax.SAX2Count.print(java.lang.String, java.lang.String,
boolean)
	void sax.SAX2Count.main(java.lang.String [])

What did I wrong?