Re: [xsl] modify the tag name of a given List Node

Subject: Re: [xsl] modify the tag name of a given List Node
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 23 Apr 2010 19:46:10 +0200
Red Light wrote:

<xsl:template match="/rapport">
<!-- here i got my main xsl elements -->
<!-- this doesn't work --> <fo:table-row width="100%" > <fo:table-cell padding="0.1cm">
<fo:block text-align="center" font-size="10.0pt" >
<xsl:when test="(/rapport/content/projectDetails/keyword/keywordDetails/key0)">
<xsl:value-of select="/rapport/content/projectDetails/keyword/keywordDetails/key0"/>


<xsl:template match="keywordDetails">
      <xsl:apply-templates select="key"/>

  <xsl:template match="key">
    <xsl:element name="key{position()}">
      <xsl:copy-of select="node()"/>

if my understanding is write <xsl:copy-of select="node()"/> will replate the node and i should <keywordDetails><key1>.............

now it doesn't work , am i missing something ?

It is not clear to me what you want to achieve and how the FO stuff you have in there relates to the original problem you posted.
Are you trying to do two transformation steps in one stylesheet?
In any case with the templates posted you of course need to ensure that processing reaches the template for keywordDetails, if you have a template matching your root (which match="/rapport" suggests) then you need to use apply-templates in there to ensure processing continues with child nodes or descendant nodes.


	Martin Honnen

Current Thread