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

Unexpected Result from 'eq' Expression Involving a Nod

Subject: Unexpected Result from 'eq' Expression Involving a Node
From: "Eliot Kimber ekimber@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 May 2018 15:00:40 -0000
 Unexpected Result from 'eq' Expression Involving a Nod
Using latest Saxon in an XSLT 3 transform I have this instruction:

<xsl:message>+ [DEBUG] xs:boolean(@id eq 'x8AC8E061C912') = "{xs:boolean(@id eq 'x8AC8E061C912')}"</xsl:message>

I expected the value of the xs:boolean() to be "true" or "false".

However, the value I get is "" (empty sequence).

If I change "eq" to "=" or if I wrap "@id" in string() then I get the expected true or false result (which also suggests that my understanding of "eq" is not complete).

I don't see anything in the definition of the 'eq' operator or the xs:boolean() function that suggests that it would ever return an empty sequence, so I'm wondering what I'm missing in the spec that allows xs:boolean() to return an empty sequence in this case (or in any case)?

I guess I was also expecting "eq" to imply casting of the left-hand operand to an atomic type which it does not appear to do.

The behavior is the same in XSLT 2 (at least using Saxon), so clearly this is not new with XSLT 3 but I'm still surprised.

Thanks,

Eliot

--
Eliot Kimber
http://contrext.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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