[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: XSLT for unflattening a tree?


Subject: Re: XSLT for unflattening a tree?
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 07 Apr 2000 13:43:52 +0100

Hello Stu,

Yesterday I answered a post by Ed Nixon (subject line "Re: Creating
additional depth from flat structure using XSLT") which I believe is
essentially your problem, although in your case it's easier to see.
Unfortunately I seem to be suffering terrible network latency and it hasn't
appeared in my inbox yet.

Maybe you've already got it and maybe it'll still turn up. (Who knows when
_this_ message will turn up?) The short answer is that in principle, when
your source is sufficiently regular, it should be possible to do what you
need by selectively processing siblings of the headers inside the
structural elements you want to introduce in their place. This is a good
test of XSL's ability to infer and (re)introduce a structure that is only
implicit in the markup of the source document.

Have fun,
Wendell Piez

At 09:48 AM 4/7/00 +1000, you wrote:
>Hi all,
>
>I've been working with a series of XML documents that effectively represent
>"flattened" trees. Instead of using nested elements for each level of the
tree,
>they use empty header elements that indicate the tree level:
...
>My question is what would be involved in using XSLT to convert that
>structure to a nested element structure:
...

======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords