[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: few question regarding the use of id generation
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@xxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, February 05, 2002 7:32 PM Subject: RE: 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
|
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
|