xsl-list
[Top] [All Lists]

RE: [xsl] nested XML using xslt

2009-07-23 19:06:13
The trick is to make sure that the first list3 gets closed 
after <list4> , and a new <list3> opens after the first closes.

It's too late at night for me to understand your problem, but this sentence
sounds as if you're approaching it from the wrong angle.

Don't think in terms of opening and closing elements. Think in terms of
constructing a tree of nodes. Writing an element is an atomic operation, it
isn't two separate operations to write the start and end tags. Draw the
result tree you want to produce on a scrap of paper - as a tree - and keep
it in front of you while coding; don't think about the serialized XML
output.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 



--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>