|
Subject: Re: [xsl] Re-insert IDs and RIDs From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Mon, 20 Oct 2008 08:14:43 -0400 |
Have anybody any idea about how to re-insert IDs and RIDs as shown in the following example by xslt 2.0.
<!--map attributes-->
<xsl:template match="@rid | @id">
<xsl:attribute name="{name(.)}">
<xsl:for-each select="key('ids',.)">
<xsl:text/>x<xsl:number/>
</xsl:for-each>
</xsl:attribute>
</xsl:template><!--map elements--> <xsl:template match="p"> <para><xsl:apply-templates select="@*|node()"/></para> </xsl:template>
<xsl:template match="keys"> <items><xsl:apply-templates select="@*|node()"/></items> </xsl:template>
<xsl:template match="key"> <item><xsl:apply-templates select="@*|node()"/></item> </xsl:template>
<xsl:template match="anchor"> <x><xsl:apply-templates select="@*|node()"/></x> </xsl:template>
<!--identity for all other nodes-->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>-- Upcoming XSLT/XSL-FO hands-on courses: Wellington, NZ 2009-01 Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video sample lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg Video course overview: http://www.youtube.com/watch?v=VTiodiij6gE G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Re-insert IDs and RIDs, J. S. Rawat | Thread | Re: [xsl] Re-insert IDs and RIDs, J. S. Rawat |
| [xsl] Re-insert IDs and RIDs, J. S. Rawat | Date | [xsl] Copy excluding some children, Giacomo |
| Month |