P
Peter Rohleder
Hi,
I'm using a style-sheet where I make use of the
XPATH-"following-sibling"-expression.
The part which makes problems looks similar to the following code:
---------------------------
<xsl:for-each select="headdata/extension/person">
<xsl:choose>
<xsl:when test="(position()) mod 3 = 1">
<tr>
<td>
<!-- Part 1 works -->
<xsl:text disable-output-escaping="yes">more info::</xsl:text>
<xsl:value-of select="funktion"/>
<!-- Part 2 works -->
<xsl:call-template name="handlePerson">
<xsl:with-param name="persondata" select="."/>
</xsl:call-template>
</td>
<td>
<!-- Part 3 works -->
<xsl:text disable-output-escaping="yes">more info:</xsl:text>
<xsl:value-of select="following-sibling::*[1]/funktion"/>
<!-- Part 4 doens'nt work-->
<xsl:call-template name="handlePerson">
<xsl:with-param name="persondata"
select="following-sibling::*[1]"/>
</xsl:call-template>
</td>
(...)
-----------------------------
I'm in the process of selecting a couple of persons and I want to give
the selected person to a sub-template which should do some processing.
I can access subfields (using following-sibling-expression) of the
current node (see Part 1).
I can access the current node and give it as parameter to the template
"handlePerson" and it works(see Part 2).
I can access subfields of the next sibling (see Part 3) and it works.
But I cannot give the next sibling as parameter to the template
"handlePerson" (see Part 4).
When giving the "following-sibling::*[1]" as parameter to the template
"handlePerson" it always processes the current node; the same with all
other following siblings.
Does anybody have an idea what might be wrong?
Thanks in advance
Peter Rohleder
I'm using a style-sheet where I make use of the
XPATH-"following-sibling"-expression.
The part which makes problems looks similar to the following code:
---------------------------
<xsl:for-each select="headdata/extension/person">
<xsl:choose>
<xsl:when test="(position()) mod 3 = 1">
<tr>
<td>
<!-- Part 1 works -->
<xsl:text disable-output-escaping="yes">more info::</xsl:text>
<xsl:value-of select="funktion"/>
<!-- Part 2 works -->
<xsl:call-template name="handlePerson">
<xsl:with-param name="persondata" select="."/>
</xsl:call-template>
</td>
<td>
<!-- Part 3 works -->
<xsl:text disable-output-escaping="yes">more info:</xsl:text>
<xsl:value-of select="following-sibling::*[1]/funktion"/>
<!-- Part 4 doens'nt work-->
<xsl:call-template name="handlePerson">
<xsl:with-param name="persondata"
select="following-sibling::*[1]"/>
</xsl:call-template>
</td>
(...)
-----------------------------
I'm in the process of selecting a couple of persons and I want to give
the selected person to a sub-template which should do some processing.
I can access subfields (using following-sibling-expression) of the
current node (see Part 1).
I can access the current node and give it as parameter to the template
"handlePerson" and it works(see Part 2).
I can access subfields of the next sibling (see Part 3) and it works.
But I cannot give the next sibling as parameter to the template
"handlePerson" (see Part 4).
When giving the "following-sibling::*[1]" as parameter to the template
"handlePerson" it always processes the current node; the same with all
other following siblings.
Does anybody have an idea what might be wrong?
Thanks in advance
Peter Rohleder