[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Converting XHTML to FO using XHTML2FO.xsl
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|