OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Section Orientation

First, your new template is not working because you aren't understanding how XSL templates and parameters work.  You can't reset a global parameter from within a template.  The effect of your template is as follows:
1. When a sect1 with attribute @orient='l' is encountered, set a local parameter named 'page.orientation'.
2. When the template is finished, the parameter goes out of scope, and no further processing is done on the sect1.
You have overridden the default processing for sect1 when that attribute is set, so that is why the section disappears.  In general, when you want to extend the processing done for a match, you would use xsl:apply-imports to apply the standard DocBook templates to the sect1.  But the parameter setting will have no effect, because the page orientation is set when a page sequence in FO is started, but a sect1 does not start a page sequence.
Unfortunately, switching orientation in the middle of a page sequence is not a standard feature in XSL-FO.  It can be done, but, you will need to apply Ken Holman's brilliant Page Sequence Master Interleave (PSMI) solution:
Bob Stayton
Sagehill Enterprises
DocBook Consulting
----- Original Message -----
Sent: Wednesday, March 10, 2004 8:02 AM
Subject: Re: [docbook-apps] Section Orientation

As a follow up to the email this morning, I think I am a bit closer to getting this working, but I am failing at the last hurdle.
I have added an attribute to the <sect1> tag in my XML that says orient='l' or 'p'.  I then have a custom XSL in my FO directory that has:
<xsl:template match="sect1[@orient = 'l']">
    <xsl:param name="page.orientation" select="landscape"/>
However whilst this template match is being picked up, this section is not displayed on the final PDF.  The document only has the title page and TOC.
Can anyone give me any pointers for this one please?
Thanks, Russell
----- Original Message -----
Sent: Wednesday, March 10, 2004 11:36 AM
Subject: [docbook-apps] Section Orientation

Good morning list,
Although I know how to set the orientation for the whole document which is rendered from a DocBook, I wondered if there was a way to specify there orientation that is required in a section.
I have a system that produces reports from a variety of data sources and some of that data would be better displayed on a landscape orientation whereas the rest of the document would be best in portrait.

Does anyone now of a way of doing this?

Thanks in advance.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]