N
Nagi Peters
Hello
I try to tranform a XML Document in php/Sablotron with the following XSL
Stylesheet.
I tried to write "@id='1'" with the variable chapter_id.
So it works:
<xsl:variable name="chapter_id">1</xsl:variable>
<xsl:template match="chapter[@id='1']">
snipp..
</xsl:template>
But with
<xsl:template match="chapter[@id='$chapter_id']">
or
<xsl:template match="chapter[@id=$chapter_id]">
it doesn't.
These way
<xsl:template match="chapter[@id='<xsl:value-of select="$chapter_id"/>']">
and
<xsl:template match="chapter[@id=<xsl:value-of select="$chapter_id"/>]">
it doesn't work either.
How i have to write it that it is correct
Thanks for your help
Nagi
I try to tranform a XML Document in php/Sablotron with the following XSL
Stylesheet.
I tried to write "@id='1'" with the variable chapter_id.
So it works:
<xsl:variable name="chapter_id">1</xsl:variable>
<xsl:template match="chapter[@id='1']">
snipp..
</xsl:template>
But with
<xsl:template match="chapter[@id='$chapter_id']">
or
<xsl:template match="chapter[@id=$chapter_id]">
it doesn't.
These way
<xsl:template match="chapter[@id='<xsl:value-of select="$chapter_id"/>']">
and
<xsl:template match="chapter[@id=<xsl:value-of select="$chapter_id"/>]">
it doesn't work either.
How i have to write it that it is correct
Thanks for your help
Nagi