xsl-list
[Top] [All Lists]

Re: Convert xml to another xml structure.

2005-11-17 00:31:36
I got the following output using that XSL. Here inner
level content is repeated one more time that the
problem.

From what I see, the case is that the third level 3 element is
processed together with the first two - as a child of the first level
2 element.

Hmmmmmm.

That output should not be possible given the XSLT that I gave you.
[generate-id(preceding-sibling::*[(_at_)level=$current-level])=$current-id]
should (as said) ensure that the child element in question would not
be processed at the stage. That is exactly the purpose of this
predicate.

You could try writing the two predicates as one predicate:
[(@level=$current-level+1) and
(generate-id(preceding-sibling::*[(_at_)level=$current-level])=$current-id)]

But this should be the same as the first solution.

Others might have some insight that I am missing.

Regards,
Ragulf Pickaxe :-?

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--