xsl-list
[Top] [All Lists]

RE: testing for string and number in XSLT 2.0 was Re: [xsl] Test For Numeric Values?

2005-04-09 10:59:21
I repeated your experiment with Saxon 8.4, changing only the variable
definition of $y to:

      <xsl:variable name="y" select="data(example/test/text())"/>

and still got:

       $y variable value: 132131
       Test as string:false
       Test as integer:false

It seems to me that the test as xs:string should be positive, because
the typed value of a text node must be by definition xs:string.


No, the typed value of a text node is by definition untypedAtomic - see

http://www.w3.org/TR/xpath20/#id-typed-value

untypedAtomic is a chameleon type that is automatically cast to the type
required by the context where it is used.

Michael Kay
http://www.saxonica.com/



--~------------------------------------------------------------------
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>