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

RE: problem with xsl:if

Subject: RE: problem with xsl:if
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Fri, 15 Nov 2002 13:25:41 -0000
cadreemploi
<xsl:if test="../codenet = ../following-sibling::agent/codenet">

the problem with position() is that the context inside a predicate is
different from the context outside the predicate.  xx[position()] is
short for xx[position()=position()] which is the same as xx[true()] (or
just xx). xx[position()+1] is short for xx[position()=position()+1]
which is the same as xx[false()].

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Yann Verlynde
> Sent: 15 November 2002 09:52
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  problem with xsl:if
> 
> 
> Hello,
> 
> How can I do to compare the 2 values codenet in a xsl:if
> 
> I tried: <xsl:if test="../codenet[position()] = 
> ../codenet[position()+1]"> but it doesn't work
> 
>  <agent id="013">
>   <datenaissance>27/02/1967</datenaissance>
>   <sexe>M</sexe>
>   <cadreemploi>emploi3</cadreemploi>
>   <codenet>3</codenet>
>   <specialite>specialite3</specialite>
>   <discipline>discipline3</discipline>
>   <datedebut>3/01/1977</datedebut>
>  </agent>
>  <agent id="014">
>   <datenaissance>27/02/1977</datenaissance>
>   <sexe>F</sexe>
>   <cadreemploi>emploi4</cadreemploi>
>   <codenet>4</codenet>
>   <specialite>specialite4</specialite>
>   <discipline>discipline4</discipline>
>   <datedebut>4/01/1977</datedebut>
>  </agent>
> 
> Thanks in advance
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.