You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Slava Pestov <sl...@jedit.org> on 2003/01/10 04:14:52 UTC
Validation question
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 <sl...@jedit.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Validation question
Posted by Slava Pestov <sl...@jedit.org>.
On Thu, 2003-01-09 at 22:14, Slava Pestov wrote:
> I am using Xerces 2.
Sorry should've been more specific. It is Xerces 2.2.1.
--
Slava Pestov <sl...@jedit.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org