Subject: [xsl] Unique IDs? From: Sven Waibel <sven.waibel@xxxxxxxx> Date: Wed, 23 Mar 2005 09:38:15 +0100 |
Good morning! in my xsl: <xsl:key name="ids" match="tc/pc/*[@id]" use="concat(../../@id,@id)" /> <xsl:template match="pc"> <xsl:apply-templates select="*[@id and generate-id(.)= generate-id(key('ids', concat(../../@id,@id)))]" /> </xsl:template> <xsl:template match="tc/pc/*[@id]"> <fo:block><xsl:value-of select="@name" /></fo:block> </xsl:template> my xml: <tc id="123"> <pc> <status id="1" name="Status 1"/> <status id="2" name="Status 2"/> <status id="1" name="Status 1"/> </pc> <pc> <status id="5" name="Status 5"/> <status id="1" name="Status 1"/> </pc> <pc> <status id="1" name="Status 1"/> </pc> </tc> The current output looks as followed: "pc1" Status 1 Status 2 "pc2" Status 5 "pc3" The output should look as followed: "pc1" Status 1 Status 2 "pc2" Status 5 Status 1 "pc3" Status 1 Status No. must not exist more than one in one "pc". What's wrong with my Stylesheet? Thanks Best regards Sven
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] RE: Aleph, was [xsl] decorat, Pawson, David | Thread | RE: [xsl] Unique IDs?, Michael Kay |
[xsl] RE: Aleph, was [xsl] decorat, Pawson, David | Date | [xsl] Unique IDs? No.2, Sven Waibel |
Month |