Subject: Re: [xsl] Wrap HTML headings and following siblings in <section/> From: Jack Bates <ms419@xxxxxxxxxxxxxx> Date: Wed, 7 Apr 2010 14:41:27 -0700 |
On Sat, Mar 27, 2010 at 11:13:25AM -0000, Michael Kay wrote: > > Currently processors choke on the XPath, > > > > (html:h1|html:h2|html:h3|html:h4|html:h5|html:h6)/following-si > bling::node() > > [...] > > Overall, I think this kind of problem is much better tackled using sibling > recursion, where you apply-templates to the first sibling, it does > apply-templates to the next sibling, and so on. Or in 2.0, you can use > <xsl:for-each-group group-starting-with="h1"/>. Thanks a lot Michael, I wrote this working stylesheet using sibling recursion, http://github.com/jablko/manual/blob/master/section.xsl - however it's 430 lines and has six "mode"s, in addition to the "default" mode Can anyone please suggest how I can make this stylesheet more concise? Thanks!
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Optimizing preceding-sibl, Wendell Piez | Thread | [xsl] set union? xslt 2.0, Dave Pawson |
Re: [xsl] Optimizing preceding-sibl, G. Ken Holman | Date | [xsl] set union? xslt 2.0, Dave Pawson |
Month |