Subject: Re: [xsl] Generating Unique ID From: Steve Rosenberry <Steve.Rosenberry@xxxxxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 06 Dec 2005 10:31:45 -0500 |
http://www.electronicsolutionsco.com/XMLEdit/XSLT/XMLEditBasicForm.xslt http://www.electronicsolutionsco.com/XMLEdit/XSLT/XMLEditBaseElements.xslt
div id="{$div_name}" span id="{$span_name}"
-- Steve Rosenberry Sr. Partner
Electronic Solutions Company -- For the Home of Integration http://ElectronicSolutionsCo.com
Hi Ragulf,
Actualy the HTML page that I am producing has a drilldown facility.
When the page is called for the first time only the level one data is shown with closing folder
picture. When the folder is clicked then the next level data is shown.
To get this working the javascript, that we have, needs IDs like that.
Best Regards.
Arun
From: "Ragulf Pickaxe" <ragulf.pickaxe@xxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Generating Unique ID Date: Tue, 06 Dec 2005 09:35:23 +0100
Hi Arun,
Why do you need the id to contain its parents id as well?
You have a function, generate-id(), which generates a unique id on a node.
If you need an id like what you state, you will need to do something like this (a variation of identity template):
<xsl:template match="*">
<xsl:variable name="special-id">
<xsl:for-each select="ancestor-or-self::*">
<xsl:value-of select="generate-id(.)"/>
</xsl:for-each>
</xsl:variable>
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:attribute name="ID"><xsl:value-of select="$special-id"/></xsl:attribute>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
Is the above what you need?
Regards, Ragulf Pickaxe :-)
_________________________________________________________________ Find det, du sxger pe MSN Sxg http://search.msn.dk
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Generating Unique ID, Arun Sinha | Thread | RE: [xsl] Generating Unique ID, Arun Sinha |
Re: [xsl] How can I create a variab, Ferdinand Soethe | Date | [xsl] wordml to docbook, Silvia Liberto |
Month |