CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Dec 2007
    Posts
    37

    Help on apply-templates

    Code:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="/">
    	<xsl:apply-templates select="ProductData/Product">
    </xsl:template>
    
    <xsl:template match="ProductData/Product">
    	<font color="green">
    	<LI><xsl:apply-templates/></LI>
    	</font>
    </xsl:template>
    and the XML code is
    Code:
    <?xml version="1.0"?>
    <?xml:stylesheet type="text/xsl" href="Product.xsl"?>
    <ProductData>
    	<Product ProdID="1">
    		<ProductName>Curd Mixer</ProductName>
    		<Price>20</Price>
    	</Product>
    	<Product ProdID="2">
    		<ProductName>Milk Mixer</ProductName>
    		<Price>40</Price>
    	</Product>
    </ProductData>
    and the following error is displayed while opening in IE
    Line: 4
    Char: 3
    Error: End tag 'xsl:template' does not match the start tag 'xsl:apply-templates'.
    Code:0
    URL:file....
    Last edited by srihariacha; July 23rd, 2008 at 12:13 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured