tags:

views:

26

answers:

1

Hi i've made a php webservice that returns some xml which is transformed into html by an XML file i have . But i want to be able to click on each returned item to get more details about that item. <a href="item.php?id=<?php echo $itemid"?>"> <?php echo $itemname"?> </a> Recently i did the same thing but in PHP, ive tried to use this in XSLT but it doesn't work.

+3  A: 

Use xsl:attribute:

<a>
   <xsl:attribute name="href">item.php?id=<xsl:value-of select="ItemId" /></xsl:attribute>
   <xsl:value-of select="ItemName" />
</a>

Alternatively, the shorter form:

<a href="item.php?id={ItemId}"><xsl:value-of select="ItemName" /></a>

Should also work

LorenVS