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

Re: xslt 3.0, and use of 'as' attribute with xsl:varia

Subject: Re: xslt 3.0, and use of 'as' attribute with xsl:variable
From: "David Carlisle d.p.carlisle@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 1 Sep 2023 08:52:13 -0000
Re:  xslt 3.0
On Fri, 1 Sept 2023 at 09:13, Mukul Gandhi mukulg@xxxxxxxxxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> Hi Wendell,
> On Thu, Aug 31, 2023 at 7:24b/PM Piez, Wendell A. (Fed)
> wendell.piez@xxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>> My thought is, why not
>> <xsl:variable name="var1" select="4"/>
> I'm currently not writing an XSLT stylesheet for a particular business
> application, i.e, my goal as per this mail thread is, not to have
> <xsl:variable name="var1" .. and a corresponding <xsl:value-of
> select="$var1 + 3"/> to work somehow.
> I'm trying to understand, how an XSLT 3.0/XPath 3.1 implementation should
> function when an XSLT 3.0 instruction xsl:variable has an "as" attribute
> (that refers to a sequence type, for e.g xs:integer).
> As per XSLT 3.0 spec referring about xsl:variable instruction, which says
> "If the as attribute is specified, then the supplied value of the variable
> is converted to the required type, using the function conversion rules.".
> As I've mentioned within another mail on this thread, I think XPath 3.1
> function conversion rules prohibiting a string value '4' to be cast to an
> xs:integer type is not very much right. These XPath 3.1 function conversion
> rules should be consistent with the result of following XPath expression,
> '4' cast as xs:integer.
> Or vice-versa, if these XPath 3.1 function conversion rules are correct,
> then the XPath 3.1 expression '4' cast as xs:integer should raise an
> error.
The rules are a bit arbitrary, but you are calling them xpath 3.1 rules as
if they are new(ish) but this all comes from xpath/xslt 2, and changing the
way type conversion works after decades of use would be problematic.


> --
> Regards,
> Mukul Gandhi
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/2739265> (by
> email <>)

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.