|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Validating against schema subset
>>>>> "Amrit" == Amrit Pal Singh <ampsingh@xxxxxxxxx> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








