This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: few question regarding the use of id generation
- From: "Joerg Heinicke" <joerg dot heinicke at gmx dot de>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 6 Feb 2002 01:24:12 +0100
- Subject: Re: [xsl] few question regarding the use of id generation
- References: <F259wPiyAphwFutJLto0000e784@hotmail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi William,
you can use the grouping via Muenchian Method too (see the list today).
Group your c by it's values:
<xsl:key name="c-values" match="c" use="text()"/>
<xsl:template match="/">
<xsl:apply-templates select="descendant::c[count( . | key('c-values',
text())[1] = 1]"/>
</xsl:template>
<xsl:template match="c">
<!-- Now you have unique <c>s or you can create an id. -->
</xsl:template>
Regards,
Joerg
----- Original Message -----
From: "林 子芯" <minikittygo@hotmail.com>
To: <xsl-list@lists.mulberrytech.com>
Sent: Tuesday, February 05, 2002 7:32 PM
Subject: RE: [xsl] few question regarding the use of id generation
> I here to thank Andrew and Joerg for the advice, however, going back to my
> first question i was hoping to generate the an unique id for the same c
> elements (when i said the same, i mean the value within the c element are
> identical, not the location of the c element i.e.
> <b>
> <c id="NA12">1</c>
> </b>
> <d>
> <c id="NA12">1</c>
> </d>
> <e>
> < id="NBS3">2</c>
> </e>
> this is need as i could create a table that will only display the item
with
> the given ID.
>
> i was wondering is there are ways to do so?
>
> whilst i am it, can i just asked when i need to perform a merge operation,
> do i have to re-enter the xml tags? is all the tags in the xml are strip?
> if yes, is there are ways to overcome this?
>
> thanks for the advice
>
> Regards
> William
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list