View Single Post
Old April 13th, 2008, 10:05 AM
RoeZ RoeZ is offline
Authorized User
Join Date: Oct 2007
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts

well, i have this xml file which has the following node inside:

<intro>bla bla bla <link><url>gmail</url><text>Gmail</text></link> bla bla bla</intro>
i read in this file with the following xsl:

<xsl:variable name="" select="document('Translations/Email.xml')"/>
<xsl:variable name="" select="$[lang($language)]" />
i call this 'text' with the following xsl:

<xsl:apply-templates select="$" />
then i have this template which gets aplied:

<xsl:template match="link">
        <xsl:attribute name="href">
            /email/<xsl:value-of select="url"/>/<xsl:value-of select="/source/pictureId"/>/<xsl:value-of select="/source/titleId"/>
        <xsl:value-of select="text"/>
the template does get called, but the 2 values inside (/source/pictureId and /source/titleId) aren't inserted, they are in the input xml though, i know this because when i do this, i get the right value from /source/pictureId:

<xsl:value-of select="/source/pictureId"/>
<xsl:apply-templates select="$" />
so when i do the above, i see the value of /source/pictureId in front of my bla bla text.

Sorry for not posting the code, i didn't thought i had a bug but a silly beginner mistake