xsl-list
[Top] [All Lists]

Re: [xsl] Converting XHTML to FO using XHTML2FO.xsl

2006-10-19 12:44:42

  match="br[ancestor::p or ancestor::li][position()=last()]"

That would match a br under a p or li that's the last br of its parent
(not the last br in the p or li). I think the OP wanted

*[self::p or self::li]/decendant::br[last()]

that would select the right elements but isn't a legal pattern, using //
instead of descendant:: would be a pattern but suffer from the same
problem as the quoted expression, 

one way to do this as a pattern would be



match="key('b',generate-id(ancestor::*[self::p or
self::li][1]))[last()])"
<xsl:key name="b" match="br[ancestor::p or ancestor::li]"
use="generate-id(ancestor::*[self::p or self::li][1])"/>

<xsl:template
match="br[generate-id()=generate-id(key('b',generate-id(ancestor::*[self::p
or self::li][1]))[last()])]">


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

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