xsl-list
[Top] [All Lists]

Re: node lists

2004-10-19 05:12:43

this has come up several times in the last day or so (although unless
you know the answer you'd probably not search for the right thing in the
archives:-)

<xsl:variable>
..
</xsl:variable>

makes an rtf corresponding to a document node containing whatever it
contains so

exslt:node-set($items)


_always_ makes a node set consisting of one node (/) which is the parent
of the elements you created

so you want to go



select="exslt:node-set($items)/*

and iterate over the children.

If xslt didn't implictly imply a parent node, the elements wouldn't
share a parent, so they wouldn't be siblings and so you wouldn't be able
to use following-sibling, which is the point of the exercise.

I mention this last point as XSLT2 gives you the option of doing just
that. Time will tell whether the extra flexibility will be really useful
or just some slack rope to accidentally hang yourself on...

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


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