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

RE: Complex recursion in XSLT 1.0

Subject: RE: Complex recursion in XSLT 1.0
From: "Marroc" <marrocdanderfluff@xxxxxxxxxxx>
Date: Mon, 18 Feb 2008 12:30:16 -0000
RE:  Complex recursion in XSLT 1.0
Thanks Florent.

> Could you write a sample of input (i.e. with 2 simple XHTML files) and the
output you would like?

Yes, sorry for the pseudo-code but the transform that nearly worked was 430
lines long.

So, here are two input files for three topics arranged in a tree with 'Copy
of One' below 'One' and no other subtopics:

"toc.htm" - initial
|- One
|- Two

<html>
	<head>
		<title>Contents</title>
	</head>
	<body>
		<h1 class="heading1">Contents</h1>
			<a href="toc15973.htm" target="TOC">
				<img border="0" src="plus.gif"
alt="Expand"/>
			</a>
			<img border="0" src="cbook.gif" vspace="1"
alt=""/>&nbsp;
				<a href="1598.htm">One</a><br/>
			<img border="0" src="topic.gif" vspace="1"
alt=""/>&nbsp;
				<a href="1599.htm">Two</a><br/>
	</body>
</html>

"toc15973.htm" - expanded
|- One
|  |- Copy of One
|- Two

<html>
	<head>
		<title>Contents</title>
	</head>
	<body>
		<h1 class="heading1">Contents</h1>
			<a href="toc.htm" target="TOC">
				<img border="0" src="minus.gif"
alt="Collapse"/>
			</a>
			<img border="0" src="obook.gif" vspace="1"
alt=""/>&nbsp;
				<a
href="1598.htm">One</a><br/>&nbsp;&nbsp;&nbsp;
				<img border="0" src="topic.gif" vspace="1"
alt=""/>&nbsp;
					<a href="1601.htm">Copy of
One</a><br/>
			<img border="0" src="topic.gif" vspace="1"
alt=""/>&nbsp;
				<a href="1599.htm">Two</a><br/>
	</body>
</html>

And the desired result file 'map.map':

<?xml version="1.0" encoding="utf-8"?>
<map:mappings xmlns:map="local">
	<map:relationship topic="1598.htm" toc="toc.htm"/>
	<map:relationship topic="1599.htm" toc="toc.htm"/>
	<map:relationship topic="1601.htm" toc="toc15973.htm"/>
</map:mappings>

Rich

-----Original Message-----
From: Florent Georges [mailto:lists@xxxxxxxxxxxx] 
Sent: 18 February 2008 10:41
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Complex recursion in XSLT 1.0

Marroc wrote:

  Hi

> Basically, I've tried every approach I can think of but each time I 
> find that XSLT 1.0 lacks any kind of 'memory'
> of what it has done. I can't find a way of passing parameters back up 
> the tree to effectively say 'done this one' or stop processing these 
> sub-nodes now.

  I guess that's me, but I have some difficulties both to figure out exactly
what you want from your prose and to read the pseudo-XSLT code.  Could you
write a sample of input (i.e. with 2 simple XHTML files) and the output you
would like?

  Regards,

--drkm























 
____________________________________________________________________________
_
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
http://mail.yahoo.fr

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.