OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Indentation using xsl

[ Lists Home | Date Index | Thread Index ]
  • To: List <xsl-list@lists.mulberrytech.com>, xml <xml-dev@lists.xml.org>
  • Subject: Indentation using xsl
  • From: puja thakral <puja_thakral@yahoo.com>
  • Date: Tue, 21 Jun 2005 07:54:13 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=sdNiVAvpm/P0NuarU3bRjFKRPRhFFLzyBF0YhpwLL9juEmhMLczdSdlciKZf5mFnTd/3euFf/dJlu6ygpqZ92xD36bg/bO+2yQHaM7Z4zF9XqnoZrkolgisZKcoyfxa/83TxHtqF/Vp4V2YnyW6strzbgyZq1Jilvk/DlxE8dwc= ;

I'd put a lot of effort solving this problem.Hope someone helps me here....
I've an XML document
   <NAME>About ORSP</NAME>
   <NAME>Funding Sposored Funding</NAME> 
       <LINKNAME>Funding Links</LINKNAME>
My xsl looks like this..
<xsl:for-each select="CATEGORIES/CATEGORY">
    <img src="javascript:void(0);" alt="" width="12" height="11" border="0" title=""/>
    <B CLASS="hi"><xsl:value-of select="NAME"/></B><br/>
       <xsl:for-each select="LINKS/LINK">
      <a href="{LINKURL}" target="_blank"><xsl:value-of select="LINKNAME"/>
Now I know I'm pulling the <NAME> from the xml document.But I want to add indentation to it.Say I want the <NAME> to be indented by one one space in the first CAtegory and I want the <NAME> to be indented by 2 sapces in the second category and so on.Thatswhy I've added  <LEVEL> above that.
This is what I'm thinking
For each level
Loop level
For each level+1
Write <td>
Loop level.
Can I achieve something like this.I'll really appreciate if someone can help me with this.

Do you Yahoo!?
Make Yahoo! your home page


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS