CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2010
    Posts
    3

    Complex XML styling with XSL

    i know their is problem in my XSL file can anyone correct my mistake please i really fed up.
    Actually i am styling my xml file via xsl but don't know what is wrong with my xsl file it is not rendering anything.
    Here is my xml file

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <CategorySearch format="Tree" id="601" xmlns="urn:yahoo:prods">
        <Category catalogs="false" id="601" name="Home Page" refinements="false">
            <Category catalogs="false" id="100334923" name="Baby &amp; Nursery" refinements="false">
                <Category catalogs="false" id="100450223" name="Baby Travel &amp; Carriers" refinements="false">
                    <Category catalogs="false" id="100466023" name="Baby Bouncers, Swings &amp; Walkers" refinements="true"/>
                    <Category catalogs="false" id="100450423" name="Baby Car Seats" refinements="true"/>
                    <Category catalogs="false" id="100450623" name="Baby Carriers" refinements="true"/>
                    <Category catalogs="false" id="100450523" name="Baby Travel Cots" refinements="true"/>
                    <Category catalogs="false" id="100450723" name="Pushchair Accessories" refinements="true"/>
    
                    <Category catalogs="false" id="100450323" name="Pushchairs &amp; Strollers" refinements="true"/>
                </Category>
        </Category>
    </CategorySearch>
    here is my xsl code

    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <xsl:stylesheet version="1.0" 
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
        xmlns:msxsl="urn:schemas-microsoft-com:xslt" 
        xmlns:user="urn:comparionsplus-com:xslt"
        xmlns:herbew="urn:herbew:prods">
        <xsl:output method="html"/>
        <xsl:template match="/">
            <html>
                <body>
                    <xsl:apply-templates select="herbew:CategorySearch/herbew:Category"/>
                </body>
            </html>
        </xsl:template>
    	<xsl:template match="herbew:Category/herbew:Category/herbew:Category">
    	<xsl:value-of select="herbew:Category" />
    	</xsl:template>
    </xsl:stylesheet>
    any help will appreciable

  2. #2
    Join Date
    May 2009
    Location
    Bengaluru, India
    Posts
    460

    Re: Complex XML styling with XSL

    Code:
     ["herbew:Category"]
    herbew is not found in the xml file..

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