V
Vital Lobachevsky
Hi!
I'm absolutely newbie with XSLT. Please, help me with this example.
I have simple XML document like this:
<skip />
<aaa>
<link url="url1" />
<link url="url2" />
<skip />
</aaa>
<skip />
that should be transformed to HTML like:
...
<a href="url1">url1</a>
<a href="url2">url2</a>
...
I suppose, it may looks like this:
<skip />
</xsl:template match="aaa">
<xsl:for-each select="link">
<a href="???"><xsl:value-of select="./@url" /></a>
</xsl:for-each>
</xsl:template>
<skip />
with "./@url" value in place of "???". But I can't use XPath inside
html tags. How can I embed xlst element into html tag? If it's
impossible, how to implement this transformation?
TIA,
Vital Lobachevsky
I'm absolutely newbie with XSLT. Please, help me with this example.
I have simple XML document like this:
<skip />
<aaa>
<link url="url1" />
<link url="url2" />
<skip />
</aaa>
<skip />
that should be transformed to HTML like:
...
<a href="url1">url1</a>
<a href="url2">url2</a>
...
I suppose, it may looks like this:
<skip />
</xsl:template match="aaa">
<xsl:for-each select="link">
<a href="???"><xsl:value-of select="./@url" /></a>
</xsl:for-each>
</xsl:template>
<skip />
with "./@url" value in place of "???". But I can't use XPath inside
html tags. How can I embed xlst element into html tag? If it's
impossible, how to implement this transformation?
TIA,
Vital Lobachevsky