Did you try setting all 3 features to true?
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
[EMAIL PROTECTED]
Slava Pestov
<[EMAIL PROTECTED]> To: Xerces users <[EMAIL
PROTECTED]>
cc:
01/09/2003 10:14 Subject: Validation question
PM
Please respond to
xerces-j-user
Hi all,
What set of SAX parser features do I need to enable to achieve this
behavior:
1) If no DTD or schema specified, do not validate.
2) If schema specified, validate with schema.
3) If DTD specified, validate with DTD.
Note that enabling these two:
"http://xml.org/sax/features/validation"
"http://apache.org/xml/features/validation/schema"
Results in #2 and #3, but files without either a DTD or schema give
"undeclared element" errors.
On the other hand, if I specify these two:
"http://apache.org/xml/features/validation/dynamic"
"http://apache.org/xml/features/validation/schema"
Then #1 and #2 work, but files with DTDs are not validated.
I am using Xerces 2.
--
Slava Pestov <[EMAIL PROTECTED]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]