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

Re: isXPath1 / isXPath2 -- not(/..)

  • From: David Carlisle <d.p.carlisle@gmail.com>
  • To: Hermann Stamm-Wilbrandt <STAMMW@de.ibm.com>
  • Date: Sat, 19 Dec 2015 17:33:35 +0000

Re:  isXPath1 / isXPath2 -- not(/..)


On 19 December 2015 at 17:22, Hermann Stamm-Wilbrandt <STAMMW@de.ibm.com> wrote:
You are right on "/..", but "(4=5)=/.."  does work as "isXPath1".
DataPower XSLT 1.0 processor agrees with Saxon 6.5.5 XSLT 1.0 processor.
So it seems my understanding that   not(/...)   is equivalent to   (4=5)=/..
is wrong ...
What is the difference?

in xpath 1 not(/..) will coerce /.. from a node set to a boolean by the rule that empty node sets
are false so  it's not(false()) which is true.

false()=/.. or (4=5)=/..
is equality of a boolean against a node set so this will use the existential form and be true just if
some node in the node set has string value  equal to the string value of false(). As the node set is empty
then this is necessarily false (although I note saxon 6 reports true)

David


 

Or maybe both, Saxon 6.5.5 and DataPower processor have a bug?

$ java -jar ~/Desktop/saxon9-0-0-8/saxon9.jar dummy.xml xpv.xsl; echo
true
false

$ java -jar ~/Desktop/saxon6-5-5/saxon.jar dummy.xml xpv.xsl; echo
true
true

$ xj xpv.xsl dummy.xml
true
true
$
$ cat xpv.xsl
<xsl:stylesheet version="2.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
  <xsl:output omit-xml-declaration="yes" />
   
  <xsl:template match="/">
    <xsl:value-of select="not(/..)"/><xsl:text>&#10;</xsl:text>
    <xsl:value-of select="(4=5)=/.."/><xsl:text>&#10;</xsl:text>
  </xsl:template>
 
</xsl:stylesheet>
$


Mit besten Gruessen / Best wishes,


Hermann Stamm-Wilbrandt
Compiler Level 3 support & Fixpack team lead
IBM DataPower Gateways (⬚ᵈᵃᵗᵃ / ⣏⠆⡮⡆⢹⠁⡮⡆⡯⠂⢎⠆⡧⡇⣟⡃⡿⡃)
https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/
https://twitter.com/HermannSW/ https://stamm-wilbrandt.de/GraphvizFiddle/
----------------------------------------------------------------------




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.