Y
Yereth Jansen
Hi everyone,
I have a question about an xslt document I'm producing. Hope I'm in the
right group for that, but I didn't find any other relevant groups on my
news-server.
I had a piece of code:
<xsl:template match="key">
<xsl:element name="{.}">
<xsl:value-of select="following-sibling::integer
following-sibling::string"/>
<xsl:apply-templates select="dict"/>
</xsl:element>
</xsl:template>
Which worked fine, but the "name" attribute of element can contain spaces..
Which is obviously a problem. I wanted to fix this by using the function:
translate({.}," ","_"), but I don't know if I'm using the '{.}' correctly
and I somehow can't get it in the "name" argument without the 'compiler'
complaining.
Can anyone help me with how to translate the spaces to underscores here?
Thanks in advance,
Yereth
I have a question about an xslt document I'm producing. Hope I'm in the
right group for that, but I didn't find any other relevant groups on my
news-server.
I had a piece of code:
<xsl:template match="key">
<xsl:element name="{.}">
<xsl:value-of select="following-sibling::integer
following-sibling::string"/>
<xsl:apply-templates select="dict"/>
</xsl:element>
</xsl:template>
Which worked fine, but the "name" attribute of element can contain spaces..
Which is obviously a problem. I wanted to fix this by using the function:
translate({.}," ","_"), but I don't know if I'm using the '{.}' correctly
and I somehow can't get it in the "name" argument without the 'compiler'
complaining.
Can anyone help me with how to translate the spaces to underscores here?
Thanks in advance,
Yereth