W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2002

Re: Schema validation of xml document from within an XSL processor

From: Joseph Kesselman/CAM/Lotus <joseph_kesselman@us.ibm.com>
Date: Wed, 1 May 2002 16:47:49 -0400
To: "Xmlschema-Dev (E-mail)" <xmlschema-dev@w3.org>
Message-ID: <OF265A4A4D.E9AE7C09-ON85256BAC.0071DD40@lotus.com>

On Wednesday, 05/01/2002 at 04:26 EDT, Noah Mendelsohn/Cambridge/IBM wrote:
> How can I get one of the xsl processors, e.g.,  Xalan-J or Saxon, to
> validate the incoming XML document against its referenced XML Schema
> document?

Can't answer for Saxon, but here's a very brief Xalan answer:

At this time, there is no Xalan switch to control schema validation, and it
does not default to being turned on. (That default may change as the Xerces
team continues to improve the performance of the schema validator.)

The recommended solution for now is to build your own instance of the
parser, configure it for schema validation, and pass its output into Xalan
by wrapping it in a SAXSource. Remember to also turn on Namespace support,
and to set the SAX namespace-prefixes feature to true; Xalan currently
requires both.  This solution ought to work for other processors which
support TrAX; something like it can probably be arranged for those who

Yes, it might be nice to have a way to request schema validation when Xalan
instantiates the parser. There has also been a request for better control
over when DTD validation does/doesn't occur. I'll log those as enhancement
requests, so we don't forget to address them.
Received on Wednesday, 1 May 2002 16:51:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:56 UTC