Subject: Re: [xsl] Re-insert IDs and RIDs From: "J. S. Rawat" <jrawat@xxxxxxxxxxxxxx> Date: Tue, 21 Oct 2008 17:41:18 +0530 |
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 -> |
---|---|---|
Re: [xsl] Re-insert IDs and RIDs, G. Ken Holman | Thread | Re: [xsl] Re-insert IDs and RIDs, J. S. Rawat |
Re: [xsl] FO: gap between cells in , Florent Georges | Date | Re: [xsl] Re-insert IDs and RIDs, J. S. Rawat |
Month |