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

RE: Urgent : Nested List Help

Subject: RE: Urgent : Nested List Help
From: "Sefa Sevtekin" <sevtekin@xxxxxxxxxxx>
Date: Fri, 04 Feb 2005 18:38:10 +0000
sefa sevtekin
Thank you very much guys!!! It worked.


From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Urgent : Nested List Help
Date: Fri, 4 Feb 2005 09:34:23 -0800 (PST)

Hi Sefa,
  Please try this XSL -

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="html" indent="yes" />

   <xsl:template match="links">
     <html>
       <head>
         <SCRIPT SRC="links.js" LANGUAGE="javascript"
TYPE="text/javascript" />
       </head>
       <body>
         <ul>
           <xsl:apply-templates />
         </ul>
       </body>
     </html>
   </xsl:template>

   <xsl:template match="link">
     <xsl:choose>
       <xsl:when test="*">
         <li>
           <xsl:value-of select="@name" />
           <ul>
             <xsl:apply-templates />
           </ul>
         </li>
       </xsl:when>
       <xsl:otherwise>
         <li>
           <xsl:value-of select="@name" />
         </li>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>

</xsl:stylesheet>

Regards,
Mukul

--- Sefa Sevtekin <sevtekin@xxxxxxxxxxx> wrote:

> Hello Pieter,
>
> Thanks for your reply but unfortunately it doesn't
> help. What I want is the
> XSL that exactly produces this html output:
>
>
> -----------------
>
> <html>
> <head>
> <META http-equiv="Content-Type" content="text/html;
> charset=UTF-8">
> <SCRIPT SRC="links.js" LANGUAGE="javascript"
> TYPE="text/javascript"></SCRIPT>
> </head>
> <body>
> <ul>
> 	<li>1
> 		<ul>
> 			<li>1.1</li>
> 			<li>1.2
> 				<ul>
> 					<li>1.2.1</li>
> 					<li>1.2.2</li>
> 				</ul>
> 			</li>
> 		</ul>
> 	</li>
> 	<li>2
> 		<ul>
> 			<li>2.1
> 				<ul>
> 					<li>2.1.1</li>
> 					<li>2.1.2</li>
> 					<li>2.1.3</li>
> 				</ul>
> 			</li>
> 			<li>2.2
> 				<ul>
> 					<li>2.2.1</li>
> 					<li>2.2.2</li>
> 					<li>2.2.3</li>
> 				</ul>
> 			</li>
> 		   <li>2.3</li>
> 		</ul>
> 	</li>
> 	<li>3</li>
> </ul>
> </body>
> </html>
>
> -------------------------------------------
>
> And here is the XML in case you'd need it;
>
> -----------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?xml-stylesheet type="text/xsl" href="links.xsl"?>
> <links>
>    <link name="1">
> 		<link name="1.1"/>
> 		<link name="1.2">
> 			<link name="1.2.1"/>
> 			<link name="1.2.2"/>
> 		</link>
>    </link>
>    <link name="2">
> 		<link name="2.1">
> 			<link name="2.1.1"/>
> 			<link name="2.1.2"/>
> 			<link name="2.1.3"/>
> 		</link>
> 		<link name="2.2">
> 			<link name="2.2.1"/>
> 			<link name="2.2.2"/>
> 			<link name="2.2.3"/>
> 		</link>
> 		<link name="2.3"/>
>   	</link>
>    <link name="3"/>
> </links>
> -----------------------------------
>
> Thanks in advance for your help,
> Sefa




__________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com

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.