Re: [xsl] Generating multi-level flexible recursive nested lists

Subject: Re: [xsl] Generating multi-level flexible recursive nested lists
From: Devang Patel <devbpatel@xxxxxxxxx>
Date: Tue, 6 Jun 2006 15:04:45 -0700 (PDT)
David,

Thanks for your prompt reply.

Input is the xml file and output will be html file. I
have just copied required part in the forum.

If you see HTML view of my expected output, you will
know what I meant.

<html>
<body>
	<ol>
		<li>
		  ALevel1
	    </li>
		<li>
		  BLevel1
	     </li>
		<ol>
			<li>
			  aLevel2
		    </li>
			<li>
			  bLevel2
			 </li>
		</ol>
		<li>
		  CLevel1
		</li>
		<li>
		  DLevel1
		 </li>
		<ol>
			<li>
			  aLevel2
			</li>
			<li>
			  bLevel2
			 </li>
			<ol>
				<li>
				  iLevel3
				</li>
				<li>
				  iiLevel3
				 </li>
			</ol>
			<li>
			  cLevel2
			 </li>
		</ol>
		<li>
		  ELevel1
		 </li>
	</ol>
</body>
</html>

I did try finding it on your website but couldn't find
it. Just to remind that input xml file can have more
sublevel e.g. level5, level6 and so on.

Thanks again.

Regards,

Dev

- David Carlisle <davidc@xxxxxxxxx> wrote:

> 
> Just to confirm,
> 
> BLevel1
> </li>
> <ol>
> <li>
> aLevel2
> 
> Is that really what you want, with the nested <ol>
> being a sibling of
> the li (rather than a child),more like
> 
> BLevel1
> </li>
> <ol>
> <li>
> aLevel2
> </li>
> ..
> </ol>
> </li>
> 
> The first form isn't valid html, although of course
> xslt doesn't care
> about that and would generate whatevr you ask for.
> 
> This is a more or less standard example of "xslt
> positional grouping" and
> searching teh archives of this list for that should
> lead you to the
> right solution. (Like many grouping problems the
> syntax is a bit clearer
> in xslt2 if that is an option)
> 
> David
> 
>
________________________________________________________________________
> This e-mail has been scanned for all viruses by
> Star. The
> service is powered by MessageLabs. For more
> information on a proactive
> anti-virus service working around the clock, around
> the globe, visit:
> http://www.star.net.uk
>
________________________________________________________________________
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Current Thread