Subject: [xsl] Re: Re:XSL for element containing mixed content. From: "Yang" <sfyang@xxxxxxxxxxxxx> Date: Mon, 10 Sep 2001 17:23:12 +0800 |
Hi, Sandeep, Following xslt is a workable solution, hopefully the gurus in the list could provide you better solution. Please note I am using msxml 3 by using < xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> I move the html and body element into the top template instead of in each template. Using node select , it can catch the correct element occuring sequence inside of each templates. ** xslt ** <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html><body> <xsl:apply-templates/> </body></html> </xsl:template> <xsl:template match="directory"> <br/><xsl:apply-templates select="node()"/><br/> </xsl:template> <xsl:template match="subdirectory"> <font color="red"> <br/><xsl:apply-templates select="node()"/><br/> </font> </xsl:template> <xsl:template match="file"> <font color="blue"> <br/><xsl:value-of select="."/></font><br/> </xsl:template> </xsl:stylesheet> Hope it can give some help. Cheers! Sun-Fu Yang sfyang@xxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re:pass value between xml and, Yang | Thread | [xsl] org.apache.xml.utils.DefaultE, ASTI Legaspi, Calen |
[xsl] RE: XPath 2.0: Collection-Val, Michael Kay | Date | [xsl] org.apache.xml.utils.DefaultE, ASTI Legaspi, Calen |
Month |