On 08/06/2010 23:52, Imsieke, Gerrit, le-tex wrote:
If you want to treat the first / last text nodes of article-title, no
matter how deep they are nested in other elements:
<xsl:template match="article-title//text()[
generate-id() eq (
for $t in ancestor::article-title//text()
return generate-id($t)
)[last()]
]"
you don't need to compare id strings in xpath2 as you can use is
<xsl:template match="article-title//text()[
. is(ancestor::article-title//text())[last()]
]"
which is a long way of writing
<xsl:template match="article-title/descendant::text()[last()]"/>
except you can't use descendant axis in a pattern: grrr
except the plan is you can in xslt 2.1: yay!
http://www.w3.org/TR/2010/WD-xslt-21-20100511/Overview-diff.html#NT-PatternAxis
except there are too many changes to call this 2.1, should be 1.0, 5th
edition: booo
http://www.w3.org/Bugs/Public/show_bug.cgi?id=9715
David
--~------------------------------------------------------------------
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>
--~--