Validation question 2003-01-13 - By sandygao@(protected)
Did you try setting all 3 features to true?
Sandy Gao Software Developer, IBM Canada (1-905) 413-3255 sandygao@(protected)
Slava Pestov <slava@(protected)> To: Xerces users <xerces-j -user@(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 <slava@(protected)>
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|