[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XSL:TEMPLATES

Subject: XSL:TEMPLATES
From: "Sachidanandam E.K" <sachiek_sachiek@xxxxxxxxxxx>
Date: Thu, 21 Dec 2000 12:21:43 +0530
xsl templates
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.