Subject: RE: [xsl] problem with xsl:if From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Fri, 15 Nov 2002 13:25:41 -0000 |
<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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] problem with xsl:if, David Carlisle | Thread | [xsl] Immediate Previous Node, Luke Ambrogio |
RE: [xsl] With Saxon7.2, can an ali, Timothy Larson | Date | [xsl] xsl:fo and tables, Johannes . Becker |
Month |