[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
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. -- 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
|