Subject: [xsl] XSL:TEMPLATES From: "Sachidanandam E.K" <sachiek_sachiek@xxxxxxxxxxx> Date: Thu, 21 Dec 2000 12:21:43 +0530 |
Hi there, I am using a xML string which in turn will be parsed with XSL . I am using XSL templates to display the values. The xml string is below. <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="menu.xsl" ?> <themenu Type="Maim Tree"> <topItemOut> <URL>blank.htm</URL> <ItemName>Menu Leaf One</ItemName> </topItemOut> <topFolderOut Title="One menu" URL="test.htm" Tips="One menu" ID="One"> <sub> <subItemOut Title="Test Main End" URL="test.htm" Tips="Test Main menu"/> </sub> </topFolderOut> <topFolderOut Title="Two Menu" URL="test.htm" Tips="Two Menu" ID="Two"> <sub> <subFolderOut Title="Two Menu Child" URL="test.htm" Tips="Two Menu Child" ID="SubTwo"> <sub> <subItemOut Title="Test Menu Child End" URL="test.htm" Tips="Two Menu Child One End"/> <subItemOut Title="Test Menu Child End" URL="test.htm" Tips="Two Menu Child Two End"/> </sub> </subFolderOut> </sub> </topFolderOut> </themenu> ------------------------------------ And the XSL which I am trying to use is <HTML> <LINK HREF="style1.css" REL="stylesheet" TYPE="text/css"/> <HEAD> <SCRIPT src="menu.js"></SCRIPT> </HEAD> <title>Tree View Test</title> <BODY CLASS="menuBody"> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:user="http://www.w3.org/TR/WD-xsl" xmlns:msxsl="urn:schemas- microsoft-com:xslt" version="1.0"> <output media-type="html"/> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="topFolderOut"> <div CLASS="topFolderOut" TARGET="RIGHT"> <xsl:attribute name="HREF"> <xsl:value-of select="theMenu/topFolderOut/@HREF"/> </xsl:attribute> <xsl:attribute name="TITLE"> <xsl:value-of select="theMenu/topFolderOut/@Title"/> </xsl:attribute> <xsl:value-of select="theMenu/topFolderOut/@Title"/> </div> </xsl:template> </xsl:stylesheet> </BODY> </HTML> --------------------------------- Why the reason which I am trying to use the method is to use xsl:template to match all the various tags . And build the output. But I am struck initially itself. Can any one help me out. I saw a lot of examples. But examples are working fine rather my program. I am looking for reply friends.. Sachi XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] [XSL-FO] column of small , James Robertson | Thread | Re: [xsl] [XSL-FO] column of small , Arved Sandstrom |
Re: [xsl] [XSL-FO] column of small , James Robertson | Date | Re: [xsl] NEWBIE: Instant Saxon and, Mike Brown |
Month |