[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Fwd: instance-of schema-element
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
|
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
|