Subject: [xsl] xsl/xml question From: "Wendy Ang" <wendy@xxxxxxxx> Date: Mon, 3 Mar 2003 18:17:20 -0800 |
Dear List, I have the following XML Data format: <ProductList> <Product> <ProductID>111</ProductID> <ProductName>abc</ProductName> ... </Product> </ProductList> and I need to transform it with the corresponding XSL template using the transformNode of MicrosoftXMLDOM the XSL Template goes: <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <table border="2"> <xsl:for-each select="/ProductList/Product"> <tr> <td> Product ID: <xsl:value-of select="ProductID"/><br/> Product Name: <a href="$ProductID"><xsl:value-of select="ProductName"/></a><br/> Product Code: <xsl:value-of select="ProductCode"/><br/> Description: <xsl:value-of select="Description"/><br/> Picture: <xsl:value-of select="Picture"/><br/> <xsl:value-of select="Active"/><br/> <xsl:value-of select="bNew"/><br/> <xsl:value-of select="Special"/><br/> <xsl:value-of select="AllowWriteIn"/><br/> <xsl:value-of select="WriteInText"/><br/> <xsl:value-of select="ListPrice"/><br/> <xsl:value-of select="SellingPrice"/><br/> <xsl:value-of select="PricePerUnit"/><br/> <xsl:value-of select="MemberPrice"/><br/> <xsl:value-of select="ActualCost"/><br/> <xsl:value-of select="VolumePricing"/><br/> <xsl:value-of select="VolumeQuantity"/><br/> <xsl:value-of select="VolumePrice"/><br/> <xsl:value-of select="VolumeEvenQuantity"/><br/> <xsl:value-of select="ApplyQuantitiesOverVolume"/><br/> <xsl:value-of select="SupplierID"/><br/> <xsl:value-of select="ExternalURL"/><br/> <xsl:value-of select="ExtraInfoOffer"/><br/> <xsl:value-of select="ExtraInfoLocation"/><br/> <xsl:value-of select="Status"/><br/></td> </tr> </xsl:for-each> </table> </xsl:template> </xsl:stylesheet> now, if you can see this part: Product Name: <a href="$ProductID"><xsl:value-of select="ProductName"/></a><br/> Product Code: <xsl:value-of select="ProductCode"/><br/> I'm trying to get the value of ProductID and assign it to the "href" attribute of the element <a>... anyone knows how to solve this problem? Thanks in advance :) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] xsl/xml question, Wendy Ang | Thread | Re: [xsl] xsl/xml question, Jarkko Moilanen |
RE: [xsl] tu put one value into the, Lopez, William | Date | RE: [xsl] tu put one value into the, Steve Gold |
Month |