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

Re: Weird XPath evaluation differences between Saxon a

Subject: Re: Weird XPath evaluation differences between Saxon and Xalan
From: JBryant@xxxxxxxxx
Date: Thu, 9 Jun 2005 09:50:46 -0500
xsl sibbling
Provided the context is right, that should ensure that the text value of 
the preceding subtree is not the same as the text value of the preceding 
subtree. The context will have to be a node that has the GROUP nodes as 
siblings.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)




Simon OUALID <symon@xxxxxxxxxxx> 
06/09/2005 01:25 AM
Please respond to
xsl-list@xxxxxxxxxxxxxxxxxxxxxx


To
xsl-list@xxxxxxxxxxxxxxxxxxxxxx
cc

Subject
Re:  Weird XPath evaluation differences between Saxon and Xalan






Jay Bryant wrote:

><xsl:for-each select="SOMETHING/NAME">
>  <xsl:value-of select="."/>
></xsl:for-each>
> 
>
Many thanks for all those precisions. I learnt a difference between XSLT 
1.0 and 2.0 ! ;)

And I also learnt that the 2.0 version was only a draft... So I'd prefer 
to do my XPath query with the 1.0 version, but this query was used to 
compare two subtree of a XML file... So how can I get it working in XSLT 
1.0 ?

Can I do something like this ?

<xsl:variable name="lastTree">
  <xsl:for-each select="preceding-sibbling::GROUP[1]/SOMETHING/NAME">
    <xsl:value-of select="."/>
  </xsl:for-each>
</xsl:variable>

<xsl:variable name="currentTree">
  <xsl:for-each select="SOMETHING/NAME">
    <xsl:value-of select="."/>
  </xsl:for-each>
</xsl:variable>

<xsl:if test="$lastTree != $currentTree">
  <!-- Here I put my stuff -->
</xsl:if>

Many thanks for so precise answers. It looks like this list is a great 
place for finding XSLT experts ... :)

Symon

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.