forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: Debugging transformations in Forrest (was Re: problem)
Date Thu, 28 Jul 2005 09:59:55 GMT
HANAX wrote:
> ok, this one solved, I found that one line I changed in .xsl causes it, but i don't understand
why.
> 
> I had
> 
>   <xsl:template match="title">
>     <xsl:text>Section <xsl:value-of select="position()"/>: </xsl:text>
>       <xsl:value-of select="."/>
>     <vxml:break/>
>   </xsl:template>
> 
> and it gaves me that "plaintext" vesion I mentioned.
> When I comment 2nd line, it works but I want to have numbering...
> 
>   <xsl:template match="title">
>    <!-- <xsl:text>Section <xsl:value-of select="position()"/>: </xsl:text>
-->
>       <xsl:value-of select="."/>
>     <vxml:break/>
>   </xsl:template>
> 
> What's wrong with position()? 

I'm not sure why it was causing the effect you had, but in this instance 
position would always give the value 1 since your context node in this 
template is "title". I think you mean to use the position of the section 
that the title belongs to.

Ross

Mime
View raw message