xsl-list
[Top] [All Lists]

Fwd: [xsl] instance-of schema-element

2008-03-14 09:34:40
On Fri, Mar 14, 2008 at 7:58 PM, Andrew Welch 
<andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com> 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>