| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
<!-- |
|---|
| 3 |
Copyright (c) 2003 David Cramer |
|---|
| 4 |
http://www.thingbag.net/docbook/tabletest/docbook-psmi.xsl |
|---|
| 5 |
--> |
|---|
| 6 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|---|
| 7 |
xmlns:fo="http://www.w3.org/1999/XSL/Format" |
|---|
| 8 |
xmlns:psmi="http://www.CraneSoftwrights.com/resources/psmi" |
|---|
| 9 |
exclude-result-prefixes="psmi" |
|---|
| 10 |
version="1.0"> |
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
<xsl:import href="docbook/fo/docbook.xsl"/> |
|---|
| 14 |
|
|---|
| 15 |
<!-- |
|---|
| 16 |
<xsl:param name="double.sided" select="'1'"/> |
|---|
| 17 |
--> |
|---|
| 18 |
|
|---|
| 19 |
<xsl:template match="*[(@orient='land' or ./processing-instruction('landscape')) and (parent::chapter or parent::article or (parent::appendix and ancestor::book))]" priority="200"> |
|---|
| 20 |
<psmi:page-sequence master-reference="body-landscape"> |
|---|
| 21 |
<fo:flow flow-name="region-body-landscape"> |
|---|
| 22 |
<xsl:apply-imports/> |
|---|
| 23 |
</fo:flow> |
|---|
| 24 |
</psmi:page-sequence> |
|---|
| 25 |
</xsl:template> |
|---|
| 26 |
|
|---|
| 27 |
<xsl:template match="*[(@orient='land' or ./processing-instruction('landscape'))]"> |
|---|
| 28 |
<xsl:message> |
|---|
| 29 |
<xsl:text disable-output-escaping="yes"> |
|---|
| 30 |
Note: psmi not supported elements that are not direct descendants of |
|---|
| 31 |
article, chapter, or appendix. An in this document with orient='land' or |
|---|
| 32 |
<?landscape?> will not be flagged for landscaping through psmi. |
|---|
| 33 |
</xsl:text> |
|---|
| 34 |
</xsl:message> |
|---|
| 35 |
<xsl:apply-imports/> |
|---|
| 36 |
</xsl:template> |
|---|
| 37 |
|
|---|
| 38 |
<xsl:template name="user.pagemasters"> |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
<fo:simple-page-master master-name="body-landscape-odd" |
|---|
| 42 |
page-width="{$page.width}" |
|---|
| 43 |
page-height="{$page.height}" |
|---|
| 44 |
margin-top="{$page.margin.top}" |
|---|
| 45 |
margin-bottom="{$page.margin.bottom}" |
|---|
| 46 |
margin-left="{$page.margin.inner}" |
|---|
| 47 |
margin-right="{$page.margin.outer}"> |
|---|
| 48 |
<fo:region-body |
|---|
| 49 |
region-name="region-body-landscape" |
|---|
| 50 |
margin-bottom="1in" |
|---|
| 51 |
reference-orientation="90" |
|---|
| 52 |
margin-top="1in" |
|---|
| 53 |
column-count="{$column.count.body}"> |
|---|
| 54 |
</fo:region-body> |
|---|
| 55 |
<fo:region-before region-name="xsl-region-before-odd" |
|---|
| 56 |
extent="{$region.before.extent}" |
|---|
| 57 |
display-align="before"/> |
|---|
| 58 |
<fo:region-after region-name="xsl-region-after-odd" |
|---|
| 59 |
extent="{$region.after.extent}" |
|---|
| 60 |
display-align="after"/> |
|---|
| 61 |
</fo:simple-page-master> |
|---|
| 62 |
<fo:simple-page-master master-name="body-landscape-even" |
|---|
| 63 |
page-width="{$page.width}" |
|---|
| 64 |
page-height="{$page.height}" |
|---|
| 65 |
margin-top="{$page.margin.top}" |
|---|
| 66 |
margin-bottom="{$page.margin.bottom}" |
|---|
| 67 |
margin-left="{$page.margin.inner}" |
|---|
| 68 |
margin-right="{$page.margin.outer}"> |
|---|
| 69 |
<fo:region-body |
|---|
| 70 |
region-name="region-body-landscape" |
|---|
| 71 |
margin-bottom="1in" |
|---|
| 72 |
reference-orientation="90" |
|---|
| 73 |
margin-top="1in" |
|---|
| 74 |
column-count="{$column.count.body}"> |
|---|
| 75 |
</fo:region-body> |
|---|
| 76 |
<fo:region-before region-name="xsl-region-before-even" |
|---|
| 77 |
extent="{$region.before.extent}" |
|---|
| 78 |
display-align="before"/> |
|---|
| 79 |
<fo:region-after region-name="xsl-region-after-even" |
|---|
| 80 |
extent="{$region.after.extent}" |
|---|
| 81 |
display-align="after"/> |
|---|
| 82 |
</fo:simple-page-master> |
|---|
| 83 |
|
|---|
| 84 |
<!-- setup for body pages --> |
|---|
| 85 |
<fo:page-sequence-master master-name="body-landscape"> |
|---|
| 86 |
<fo:repeatable-page-master-alternatives> |
|---|
| 87 |
<fo:conditional-page-master-reference master-reference="body-landscape-odd" |
|---|
| 88 |
odd-or-even="odd"/> |
|---|
| 89 |
<fo:conditional-page-master-reference master-reference="body-landscape-even" |
|---|
| 90 |
odd-or-even="even"/> |
|---|
| 91 |
</fo:repeatable-page-master-alternatives> |
|---|
| 92 |
</fo:page-sequence-master> |
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 |
|
|---|
| 96 |
</xsl:template> |
|---|
| 97 |
|
|---|
| 98 |
</xsl:stylesheet> |
|---|