[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] How to check an element's type against an XSD simpleType and skip that element if it does not conform to the simpleType?


Subject: Re: [xsl] How to check an element's type against an XSD simpleType and skip that element if it does not conform to the simpleType?
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Tue, 16 Jul 2013 13:58:00 +0100

> 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.
>

There might be some XSLT processors that assume that if you import a schema
then you want to validate every input document, but there's nothing in the
spec to say that, and certainly in Saxon importing a schema and using it for
input validation are quite orthogonal.

Michael Kay
Saxonica


Current Thread