[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Validating against schema subset

Subject: Re: Validating against schema subset
From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx>
Date: 08 Nov 2005 07:15:06 +0000
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.