Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mailto in XML table

Status
Not open for further replies.

michel392

Programmer
Dec 17, 2001
54
BR
Instead of putting an information in a cell of a XML data table, I want to put an a link to an e-mail, like this

PRODUCT.XML data:

<product>
<ProductName>Chocolate XYZ</productName>
<ProductMaker>Chocolatier</productMaker>
</product>




In the product maker item, I'd like to give acess to the product maker's site, like

<ProductMaker><A HREF="mailto:marketing@chocolatier.com">
Chocolatier</A></productMaker>

I use it in my data file PRODUCT.XML, which is read by PRODUCT.HTM file, but it doesn't appear any link in the page.

Is it possible ?

Thanks,
Michel


 
Yes, use copy-of instead of value-of.

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
 
<xsl:stylesheet version="1.0" 
     xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform">[/URL]

<xsl:output method="html"/>

<xsl:template match="/">
     <xsl:apply-templates select="/product/ProductMaker"/>
</xsl:template>

<xsl:template match="/product/ProductMaker">
     <xsl:copy-of select="."/>
</xsl:template>

</xsl:stylesheet>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top