|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl/xml question
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






