[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Wrap HTML headings and following siblings in <sec

Subject: Re: Wrap HTML headings and following siblings in <section/>
From: Jack Bates <ms419@xxxxxxxxxxxxxx>
Date: Wed, 7 Apr 2010 14:41:27 -0700
Re:  Wrap HTML headings and following siblings in  <sec
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.