darkmage784
09-02-2005, 08:55 PM
I am learning XML, and I was wondering if it was possible to use <xsl:value-of> to select a URI. e.g.:
<!-- ... -->
<favouriteWebsiteList>
<website>
<address>http://www.codingforums.com</address>
<name>Coding Forums</name>
</website>
<website>
<address>http://www.w3schools.com</address>
<name>W3Schools</name>
</website>
<!-- ... -->
</favouriteWebsiteList>
And use this XSLT to transform it:
<!-- ... -->
<xsl:for-each select="//favouriteWebsiteList/website">
<a href="<xsl:value-of select='address' />"><xsl:value-of select="name" /></a>
</xsl>
I get a "not well formed" error at the red text.
Does anyone know a way to do this?
<!-- ... -->
<favouriteWebsiteList>
<website>
<address>http://www.codingforums.com</address>
<name>Coding Forums</name>
</website>
<website>
<address>http://www.w3schools.com</address>
<name>W3Schools</name>
</website>
<!-- ... -->
</favouriteWebsiteList>
And use this XSLT to transform it:
<!-- ... -->
<xsl:for-each select="//favouriteWebsiteList/website">
<a href="<xsl:value-of select='address' />"><xsl:value-of select="name" /></a>
</xsl>
I get a "not well formed" error at the red text.
Does anyone know a way to do this?