Thank you very much guys!!! It worked.
From: Mukul Gandhi <mukul_gandhi(_at_)yahoo(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] 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(_at_)hotmail(_dot_)com> 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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--