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 "Dallaway, Simon" <si...@nz.unisys.com> on 2002/04/15 03:39:35 UTC

Validating XML documents using the Xerces parser

I'm a little confused. I've figured out that in order to make the parser
pick up and use an XSD specified by an xsi:schemaLocation attribute I need
to set the Apache attribute shown in the code fragment below.

      factory.setNamespaceAware(true);
      factory.setValidating(true);
      factory.setAttribute (
"http://apache.org/xml/features/validation/schema", new Boolean (true));

I would have thought that setting both setNamespaceAware & setValidating to
true should be sufficient to achieve this. What am I missing?

regards,
	OSD

Systems Architect
Communications Solutions Program

Unisys

Ph: 	64-4-462 2256
Fax:	64-4-462 2135
Email:	Simon.Dallaway@unisys.com

CAUTION: This e-mail message and accompanying data may contain information
that is confidential. If you are not the intended recipient you are notified
that all content is to be treated as confidential unless otherwise
specified, and is not to be used, copied or forwarded to third parties
without the prior permission of the author. If you have received this e-mail
message in error please delete it and notify me. Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org