One more "enhancement". I changed the template to match any child of a chapter, 
article or book/appendix that has <?landscape?> or orient='land' (however 
orient='land' is only allowed on tables). This way, if you have a table (or wide 
programlisting) that you want to landscape in the middle of a chapter, you can at 
least put it in a section[parent::chapter] or sect1 with the <?landscape?> pi and have 
the whole section landscaped:

<chapter>
        <title>blah</title>
        Blah de.
        <section>       
                <?landscape?>
                <title>A landscaped section</title>
                        ....

*[(@orient='land' or ./processing-instruction('landscape')) and (parent::chapter or 
parent::article or (parent::appendix and ancestor::book))]"

Not great by any means, but it's something for now. I hard coded the landscaped 
region-body's margin-top and margin-bottom at 1in so that the section heading in the 
docbook xsl's default setting wouldn't intrude into the footer. That should really be 
calculated.

Caveat snarfer,
David

> -----Original Message-----
> From: David Cramer 
> Sent: Thursday, January 16, 2003 3:44 PM
> To: [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: RE: DOCBOOK-APPS: [QUESTION] landscaped table 
> orientation using
> XEP?
> 
> 
> I updated the xsl 
> <http://www.thingbag.net/docbook/tabletest/docbook-psmi.xsl> 
> so it only adds the psmi markup to table[@orient='land' and 
> (parent::chapter or parent::article or (parent::appendix and 
> ancestor::book))] | informaltable[@orient='land' and 
> (parent::chapter or parent::articleor or (parent::appendix 
> and ancestor::book))]. If orient='land' appears on a table in 
> another context, it emits a message that it won't be 
> landscaped by psmi. Looks like your best bet for now is to 
> put landscaped tables in a appendix of a book. 
> 
> David

Reply via email to