PDA

View Full Version : linking..


duniyadnd
05-10-2003, 12:32 AM
Trying to create a link via xml/xsl



?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="xslfile.xsl"?>


<SITEREVIEW>

<BasicLinkInformation>
<IDcode>4</IDcode>
<sitename>site_Name</sitename>
<sitelink>http://link</sitelink>
<contact>email@somewhere.com</contact>
<type>Informational</type>
</BasicLinkInformation>
</SITEREVIEW>



How can make a link come out in xsl from "sitelink"??

Thanks
Duniyadnd

mpjbrennan
05-10-2003, 04:27 PM
Try this in your template

<a>
<xsl:attribute name="href"><xsl:value-of select="sitelink" /></xsl:attribute>
<xsl:value-of select="sitelink" />
</a>

duniyadnd
05-12-2003, 11:58 AM
That worked.. thanks..

How can I write it so the end result would be:

<a href="link.html" target="_body">something</a>

mpjbrennan
05-12-2003, 02:29 PM
Use the <xsl:attribute></xsl:attribute> tags to make an attribute with the name ot "target" - but where in your xml is it going to get its value from?

patrick