4

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.

1 Answer 1

11

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.