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

XSLT 2.0 processor signalling error, for type errors

Subject: XSLT 2.0 processor signalling error, for type errors
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Wed, 8 Oct 2008 16:15:21 +0530
 XSLT 2.0 processor signalling error
Hi all,
  I tried following code with Saxon (the, basic version),

<xsl:template match="/">
  <xsl:variable name="temp" as="element()?">

And Saxon doesn't show any error.

But when I write the code as following,

<xsl:template match="/">
  <xsl:variable name="temp" as="element()?">
  <xsl:copy-of select="$temp" />

Saxon displays following error,

XTTE0570: Required item type of value of variable $temp is element();
supplied value has item type text()

In the first case ([1]), though the variable contents do not conform
to the type declaration, no error is signalled.

While in second case ([2]), the error is signalled, as the variable is
copied to the result tree.

Why is the error not signalled in 1st case? Does the XSLT 2.0 spec
says anything about this issue? Or is this behavior Saxon specific
(perhaps, is some kind of optimization)?

Mukul Gandhi

Current Thread


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.
First Name
Last Name
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.