Re: [xsl] Splitting XHTML by elements that have page-breaks

Subject: Re: [xsl] Splitting XHTML by elements that have page-breaks
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Wed, 16 Sep 2009 09:48:32 +0100
> The styles are defined in a separate style.xml file which comes from
> ODT. Style names become CSS classnames in XHTML, so I can check by
> @class value if a style has a page-break:
> document('styles.xml')//style:style[@style:name =
> 'Quote']/style:paragraph-properties/@fo:break-before = 'page'

That would be better as a key lookup:

<xsl:key name="styles-by-name" match="style:style" use="@style:name"/>

with

test="key('styles-by-name', @class,
$styles-doc)/style:paragraph-properties/@fo:break-before = 'page'"

> And here comes the question -- how can I define sibling recursion not
> only on html:h1, but on html:* that have page-breaks? I hope it's
> possible to understand..

Yep, that's easy enough to understand, but without a small sample
input, sample code, and required output all you can really say is
something like:

<xsl:template match="html:*">
  normal behaviour...
</

<xsl:template match="html:*[key('styles-by-name', @class,
$styles-doc)/style:paragraph-properties/@fo:break-before = 'page']"
priority="2">
  sibling recursion...
</



-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

Current Thread