|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: problem with xsl:if
<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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








