Subject: Re: [xsl] URGENT : Algorithm for exclusion elements From: "Nicola Martella" <nmartella@xxxxxxxxxxxxx> Date: Thu, 10 Jul 2003 16:07:24 +0200 |
Thanks Jarno. Your code works and you are been very kind to give me the solution. I'm not an XSLT expertice and now I study your, for me, very interesting code. Grazie e Ciao. Nicola ----- Original Message ----- From: <Jarno.Elovirta@xxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Thursday, July 10, 2003 2:49 PM Subject: RE: [xsl] URGENT : Algorithm for exclusion elements > Hi, > > > I need to show in HTLM the <description> elements of all > > groups but only if > > between an item/type="T" element and another item/type="T" element are > > existing item/type="P" elements. In this way, only the SECOND GROUP > > <description> elements should be processed. The problem is > > that I can know > > that nobody <type>P</type> elements are present only after > > process the group > > (between <type>T</type> elements) and it's too late. > > > > Who can help me for this URGENT problem? > > <xsl:key name="x" match="item[not(type = 'T')]" use="generate-id(preceding-sibling::item[type = 'T'][1])"/> > <xsl:template match="root"> > <xsl:copy> > <xsl:for-each select="item[type = 'T']"> > <xsl:if test="key('x', generate-id(.))[type = 'P']"> > <xsl:apply-templates select=". | key('x', generate-id(.))"/> > </xsl:if> > </xsl:for-each> > </xsl:copy> > </xsl:template> > <xsl:template match="@* | node()"> > <xsl:copy> > <xsl:apply-templates select="@* | node()"/> > </xsl:copy> > </xsl:template> > > Cheers, > > Jarno > > 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] URGENT : Algorithm for ex, Jarno . Elovirta | Thread | [xsl] Counting elements with count(, Rudi Starcevic |
Re: [xsl] Counting elements with co, roman . musil | Date | Re[2]: [xsl] Formatting hyperlinks , Peter Simard |
Month |