xsl-list
[Top] [All Lists]

[xsl] targeting the last element in a node or consecutive elements

2007-01-04 07:38:50

I'm trying to use xsl:apply templates to grab the entire content of a
node, except for any PIs that may be at the very end of the node.  I can
see how position()=last() can be used to refer to the very last PI, but
how would I refer to possibly 2 or 3 PIs that are at the end of the node
(not knowing what they are or how many), but still process PIs that are
contained elsewhere in this content?   Is there some syntax that refers
to consecutive elements or refers to an element that is the last one in
a node, not knowing what element it is?

Here is explanation for what I'm trying to do:   

Process all content, unless they are PIs that occur consecutively at the
very end of the node.

Then I have to insert an element, then process these PIs that occur
consecutively at the very end of the node.

I'm having trouble narrowing down my research on this one.  Does anyone
have any ideas?

Thanks,
Emily

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