Subject: Fwd: [xsl] instance-of schema-element From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx> Date: Fri, 14 Mar 2008 22:04:07 +0530 |
On Fri, Mar 14, 2008 at 7:58 PM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote: > If I've got a variable $foo which contains the element <foo/>, if I do: > > <xsl:if test="$foo instance of schema-element(foo)"> > > ...does that mean $foo is validated at that point? I think ... Schema type annotation will be attached to the element node, <foo/> only if the document is validated before XSLT processes it (for e.g., with -val:strict Saxon option). After the XSLT process is invoked with -val:strict option, then the test, <xsl:if test="$foo instance of schema-element(foo)"> would check if the type attached to the node (denoted by $foo) is same as Schema type 'foo'. The Schema needs to be imported into the stylesheet with xsl:import-schema instruction for schema-element(foo) to work. -- Regards, Mukul Gandhi
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] instance-of schema-elemen, Andrew Welch | Thread | [xsl] XSLT collection function to g, Arno H.P. Reuser |
RE: [xsl] Slow XSLT, Michael Kay | Date | Re: [xsl] instance-of schema-elemen, John Snelson |
Month |