This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: How would you add depth to this flat XML source?
- To: Jeni dot Tennison at epistemics dot co dot uk
- Subject: Re: How would you add depth to this flat XML source?
- From: "Eric G. Bosch" <eric at datafax dot com>
- Date: Fri, 26 May 2000 10:35:27 -0400 (EDT)
- Cc: XSL-List at mulberrytech dot com
- Reply-To: xsl-list at mulberrytech dot com
Jeni,
Thank You very much for the feedback. Your solution works like a charm. I am
now happily adding depth to many large, flat documents.
Also, thanks for taking the time to explain your response in such detail. That
was definitely a great learning exercise for me and hopefully other list readers
as well.
My own solution, which was failing, tracked yours exactly until this bit:
> From: Jeni Tennison <Jeni.Tennison@epistemics.co.uk>
>
> Now we get into a bit of a murky area that I got confused by myself
> recently. We want to make sure that the *node* that is 'the first
> preceding-sibling that is a firstitem' is the same as the *node* that is
> 'the current node'. There are two ways of doing that:
>
> a. generate a unique identifier for the two nodes and compare them:
>
> generate-id(preceding-sibling::firstitem[1]) = generate-id(current())
This addition turned out to be the glue that made it work! I should have known
from all of the recent generate-id() traffic on the list that it would figure
into the solution somehow!
Thanks again,
Eric
----------
Eric Bosch
Clinical DataFax Systems Inc.
Voice: 905.522.3282.x223
Fax: 905.522.7284
Email: eric@datafax.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list