"Amrit" == Amrit Pal Singh <ampsingh(_at_)quark(_dot_)com> writes:
Amrit> Hi, Is it possible to validate a xml against subset of a
Amrit> schema. I'm having a xml file which is going to be part of
Amrit> a bigger xml file. For the bigger xml file, I'm having xml
Amrit> schema to validate against. Before adding my xml file to
Amrit> bigger xml file, I need to validate against particular
Amrit> element definition in the schema file. Is there anyway to
Amrit> do it?
I should think this is possible using schema-aware XSLT 2.0.
A variant on the identity transform. Specify
default_validation="strip" on the xsl:transform/stylesheet element
(this isn't necessary, but it helps to document the purpose of the
transformation, I think).
Then add template rules to match the elements you wish to validate.
The body of the template should be an xsl:copy-of instruction with
validation="strict" spefified.
Untested.
--
Colin Adams
Preston Lancashire
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--