Creating hrefs with XSL...

liunx

Guest
Greetings!<br />
<br />
I have the following XML code:<br />
<br />
<members><br />
<member><br />
<name>John Doe</name><br />
<url>/organisation/departments/a/ab/abc/john_doe.html</url><br />
<assignments>Intranet</assignments><br />
</member><br />
<br />
And the HTML code I want out of this is:<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"/organisation/departments/a/ab/abc/john_doe.html">John Doe</a><br />
<br />
Does anyone know how to do this with XSL? (I know and use XSL for the entire document, but I do not know how to alter values inside tags this way, as the href tag requires.)<br />
<br />
/Robert<!--content-->Works every time... when I finally get frustrated enough to post the question, moments after, I find the answer:<br />
<br />
<xsl:for-each select="member"><br />
<li /><xsl:element name="a"><xsl:attribute name="href"><xsl:value-of select="url"/></xsl:attribute><xsl:value-of select="name"/></xsl:element><br />
</xsl:for-each><!--content-->
 
Back
Top