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

Re: How to check an element's type against an XSD sim

Subject: Re: How to check an element's type against an XSD simpleType and skip that element if it does not conform to the simpleType?
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Tue, 16 Jul 2013 14:49:19 +0200
Re:  How to check an element's type against an XSD  sim
Costello, Roger L. wrote:

If the input hasn't been validated you can just get the text content of
the node and check

<xsl:if test=". castable as bk:ISBN-type">

But **bk:ISBN-type** is a simpleType defined in the XML Schema; so I have to import the XML Schema:


     <xsl:import-schema namespace="http://www.books.org"
         schema-location="BookStore.xsd"/>

But then I am back to the problem of the XSLT processor insisting on validating all of my XML document.

Is there a way to get access to the simpleType, ISBN-type, without importing the XML Schema?

With AltovaXML for instance I think a document is only being validated if it has the xsi:schemaLocation attribute linking to a schema.
For the example I posted where I took your schema I am able to use the schema through xsl:import-schema while not validating the complete input document.


Perhaps Saxon allows a similir configuration.

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.