Hello,
I figured out a problem with the SAX2 parser when having the features:
http://xml.org/sax/features/validation
http://apache.org/xml/features/validation/schema
set to true.
I have a schema in which I make a choice. In the first possibility there is
an element which is a restriction of type string and a certain value is
allowed. Let�s say it�s "true".
In the second possibility of the choice there is an element with the same
name. Also a restriction of string but with the only allowed value of "false".
Then there is another element which semantically has to be there because the
value of the first element is false.
XMLSpy does not complain about this construct. And I have to have the
dependency of on elements existence to another elements content.
The SAX parser complains with the following exception while having the
second possibility in the parsed xml:
org.xml.sax.SAXParseException: Datatype error: In element 'anrede' : Value
'false' must be one of [true].
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1204)
at
org.apache.xerces.validators.common.XMLValidator.checkContent(XMLValidator.java:4325)
at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1409)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1149)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1122)
at heregoesmyclass
Any Ideas... is this a bug or a feature? Or didn�t I read the Spec well
enough?
Elmar
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr f�r 1 ct/ Min. surfen!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]