cvs: phpdoc /xsl/docbook/fo ChangeLog admon.xsl autoidx.xsl autotoc.xsl biblio.xsl block.xsl callout.xsl component.xsl division.xsl docbook.xsl
ebnf.xsl fo-patch-for-fop.xsl fo-rtf.xsl fo.xsl footnote.xsl fop.xsl formal.xsl glossary.xsl graphics.xsl index.xsl info.xsl inline.xsl keywords.xsl
lists.xsl math.xsl pagesetup.xsl param.ent param.xml param.xsl param.xweb passivetex.xsl pdf2index pi.xsl profile-docbook.xsl qandaset.xsl
refentry.xsl sections.xsl synop.xsl table.xsl titlepage.templates.xml titlepage.templates.xsl titlepage.xsl toc.xsl verbatim.xsl xep.xsl xref.xsl
| From: | Thomas Schoefbeck | Date: | Sun, 09 Mar 2003 14:54:52 +0000 |
| Subject: | cvs: phpdoc /xsl/docbook/fo ChangeLog admon.xsl autoidx.xsl autotoc.xsl biblio.xsl block.xsl callout.xsl component.xsl division.xsl docbook.xsl ebnf.xsl fo-patch-for-fop.xsl fo-rtf.xsl fo.xsl footnote.xsl fop.xsl formal.xsl glossary.xsl graphics.xsl index.xsl info.xsl inline.xsl keywords.xsl lists.xsl math.xsl pagesetup.xsl param.ent param.xml param.xsl param.xweb passivetex.xsl pdf2index pi.xsl profile-docbook.xsl qandaset.xsl refentry.xsl sections.xsl synop.xsl table.xsl titlepage.templates.xml titlepage.templates.xsl titlepage.xsl toc.xsl verbatim.xsl xep.xsl xref.xsl |
||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969352142@lists.php.net to get a copy of this message | ||
tom Sun Mar 9 09:54:52 2003 EDT
Added files:
/phpdoc/xsl/docbook/fo pdf2index
Modified files:
/phpdoc/xsl/docbook/fo ChangeLog admon.xsl autoidx.xsl autotoc.xsl
biblio.xsl block.xsl callout.xsl
component.xsl division.xsl docbook.xsl
ebnf.xsl fo-patch-for-fop.xsl fo-rtf.xsl
fo.xsl footnote.xsl fop.xsl formal.xsl
glossary.xsl graphics.xsl index.xsl info.xsl
inline.xsl keywords.xsl lists.xsl math.xsl
pagesetup.xsl param.ent param.xml param.xsl
param.xweb passivetex.xsl pi.xsl
profile-docbook.xsl qandaset.xsl
refentry.xsl sections.xsl synop.xsl
table.xsl titlepage.templates.xml
titlepage.templates.xsl titlepage.xsl
toc.xsl verbatim.xsl xep.xsl xref.xsl
Log:
update to docbook-xsl 1.60.1
Index: phpdoc/xsl/docbook/fo/ChangeLog diff -u phpdoc/xsl/docbook/fo/ChangeLog:1.1 phpdoc/xsl/docbook/fo/ChangeLog:1.2 --- phpdoc/xsl/docbook/fo/ChangeLog:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/ChangeLog Sun Mar 9 09:54:48 2003 @@ -1,3 +1,551 @@ +2003-01-23 Norman Walsh <nwalsh@users.sourceforge.net> + + * autotoc.xsl: Fix bugs associated with toc-context parameter in division.toc + + * division.xsl: Generate Part ToCs + + * pagesetup.xsl: Use proportional-column-width() for header/footer tables; suppress relative-align when when using FOP + +2003-01-22 Norman Walsh <nwalsh@users.sourceforge.net> + + * formal.xsl: Handle alignment correctly when screenshot is used in figure + + * xref.xsl: Format chapter and appendix titles consistently in xrefs + +2003-01-21 Norman Walsh <nwalsh@users.sourceforge.net> + + * formal.xsl: Attempt to support multiple tgroups (by making multiple tables and placing them right next to each other) + + * lists.xsl: Bug #653344: Output fo:table-columns in simplelist tables + +2003-01-20 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl, index.xsl: Use titlepage templates for indexdiv title formatting + + * biblio.xsl: Bug #640762: Support new biblioentry elements + + * component.xsl: Use titleabbrev in markers; use titlepage templates for subtitles; delete bogus component.separator template. + + * footnote.xsl: Support {table.}footnote.number.{format,symbols} + + * glossary.xsl: Use titlepage templates for glossdiv formatting; support glossentry.show.acronyms + + * pagesetup.xsl: Suppress draft page-masters when draft.mode=no + + * pagesetup.xsl: Bug #669765: Make blank pages verso not recto + + * param.ent, param.xweb: Support xref.with.number.and.title + + * param.ent, param.xweb: Added {table.}footnote.number.{format,symbols}, glossentry.show.acronym, and ulink.footnote.number.format + + * param.xweb: Fix missing fragref + + * qandaset.xsl: QandASet titles use section.title for convenience. Now they don't output fo:markers for those titles. + + * sections.xsl: Support titleabbrev for running headers/footers; don't force a section ToC for refentrys + + * titlepage.templates.xml: SIGNIFICANT changes to the titlepage template setup. See RELEASE-NOTES. + + * titlepage.xsl: Add property sets for glossdiv, bibliodiv, and indexdiv. Improve formatting of authors. + + * verbatim.xsl: Arrange to use only a single fo:block for shading to avoid a bug in earlier versions of XEP + + * xref.xsl: Improve formatting of ulink footnotes; provide template to override formatting; use ulink.footnote.number.format; support xref to glossentry + + * xref.xsl: Change formatting of URL footnotes + +2003-01-17 Norman Walsh <nwalsh@users.sourceforge.net> + + * lists.xsl: Output IDs for the first-paras in a listitem + + * pagesetup.xsl: Fix bugs in page numbering when double.sided=1 + + * pagesetup.xsl: Remove region-name from region-body on blank pages + + * xref.xsl: Remove duplicated IDs when endterm is used on xref + +2003-01-13 Robert Stayton <bobstayton@users.sourceforge.net> + + * math.xsl: Added @align value to fo:block containing mediaobject in equation. + +2003-01-12 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Make sure that indexdivs are properly scoped. I've done this by adding a test to suppress the division if it contains no terms. It seems like there might be a better way, but I can't see it just at the moment + +2003-01-08 Robert Stayton <bobstayton@users.sourceforge.net> + + * xref.xsl: In olink, use document($target.database.document, /) so the + olink target database location is relative to the document + instead of the stylesheet. + +2003-01-06 Robert Stayton <bobstayton@users.sourceforge.net> + + * autoidx.xsl, index.xsl: Removed the unnecessary generate-index-from-terms template + in favor of generate-index, called with scope parameter. + +2003-01-02 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl, index.xsl: Rework indexing to avoid XSLT limitation/Saxon bug with context dependencies; finish porting Bob's changes from FO to HTML + + * index.xsl, titlepage.templates.xml, titlepage.xsl: Support setindex (there were all sorts of things wrong with it) + +2003-01-01 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl, index.xsl: Make index elements always index the book that contains them (if there is one, otherwise the whole document); setindex always indexes the whole document + + * autotoc.xsl, division.xsl, titlepage.templates.xml, titlepage.xsl: + Support List of Procedures + + * formal.xsl: Support separate property sets for figures, examples, equations, tables, and procedures. This way, they can have different border and other formatting properties. + + * graphics.xsl: Support ignore.image.scaling parameter + + * param.ent, param.xweb: New parameters + + * xref.xsl: Use titleabbrev instead of title in xrefs + +2002-12-31 Norman Walsh <nwalsh@users.sourceforge.net> + + * inline.xsl: Make lineannotations italic + + * pagesetup.xsl: Added blank.page.content template to allow 'This Page Intentionally Left Blank' blank pages. + +2002-12-30 <dcramer@users.sourceforge.net> + + * lists.xsl: Fixed spacing problem where step numbers don't line up with the corresponding text. + +2002-12-28 Norman Walsh <nwalsh@users.sourceforge.net> + + * xref.xsl: Now that xrefstyle is official; make it take priority even when use.role.as.xrefstyle is non-zero. + + * xref.xsl: Make endterm on xref higher priority than xreflabel on the target + +2002-12-24 Robert Stayton <bobstayton@users.sourceforge.net> + + * division.xsl: Fixes bug #655587 to restart page numbering + after a preface. + +2002-12-18 Robert Stayton <bobstayton@users.sourceforge.net> + + * autoidx.xsl: Changed sort to fold uppercase and lowercase together to fix + odd indexdiv sort order. + + * graphics.xsl: Add graphic/@align value to fo:block text-align property + since text-align on external-graphic doesn't seem to work. + +2002-12-17 Robert Stayton <bobstayton@users.sourceforge.net> + + * formal.xsl, graphics.xsl: Changed selection of mediaobject to be more consistent using + a separate select.mediaobject.index template. Also added + text-align to block containing external-graphic in fo output. + +2002-12-17 Jirka Kosek <kosek@users.sourceforge.net> + + * param.xweb: Build fixes. + +2002-12-17 Robert Stayton <bobstayton@users.sourceforge.net> + + * titlepage.templates.xml: Made list.of.tables specifications the same as other list.of.*. + +2002-12-13 Robert Stayton <bobstayton@users.sourceforge.net> + + * glossary.xsl: Handles missing otherterm target in glosssee and glosseealso. + + * inline.xsl: Added the author et al special cases similar to + the HTML inline.xsl templates. + +2002-12-12 Robert Stayton <bobstayton@users.sourceforge.net> + + * autoidx.xsl: An index now contains only indexterms within its scope + (within its parent element). + + * autotoc.xsl, index.xsl: Make sure $generate.index controls whether the index is processed. + + * formal.xsl: Change formal.object template to pass $placement parameter + to formal.object.heading template. + + * lists.xsl: Fixed bug in segmentedlist title when segmentedlist.as.table set. + +2002-12-06 Robert Stayton <bobstayton@users.sourceforge.net> + + * block.xsl: Fixed epigraph template so it processes all of its allowed + children, not just para. + + * graphics.xsl, param.ent, param.xweb: Enabled support for selecting imageobject using the role attribute. + +2002-12-04 Robert Stayton <bobstayton@users.sourceforge.net> + + * autotoc.xsl, component.xsl, sections.xsl: Added empty component.toc.separator and section.toc.separator templates + to provide customization opportunity between toc and first content. + +2002-11-29 Norman Walsh <nwalsh@users.sourceforge.net> + + * pagesetup.xsl: Don't output a footnote-separator for FOP + +2002-11-16 Norman Walsh <nwalsh@users.sourceforge.net> + + * biblio.xsl: Support abstract in bibliomixed + + * biblio.xsl, xref.xsl: Support bibliosource; improve numbered bibliography entries and cross-references to them + + * pagesetup.xsl: Added template to create footnote separator rule (if supported by your favorite FO processor) + + * sections.xsl: Use value-of instead of copy-of for fo:marker because I haven't thought of a better way to avoid footnotes in markers which are illegal + +2002-11-15 Robert Stayton <bobstayton@users.sourceforge.net> + + * admon.xsl: Changed graphical.admonition template from an fo:table + to an fo:list-block, so it works in both FOP and XEP. + + * lists.xsl: Fixed two bugs in longest.term template that prevented proper + calculation of longest term width in variablelist. + +2002-11-15 Norman Walsh <nwalsh@users.sourceforge.net> + + * table.xsl: Add support for xsltproc adjustColumnWidths extension + +2002-11-14 Norman Walsh <nwalsh@users.sourceforge.net> + + * biblio.xsl: Use xreflabel (if it's present) on bibliography entries + + * component.xsl: Don't restart page numbers on the first preface + + * table.xsl: Support entrytbl + +2002-11-08 Robert Stayton <bobstayton@users.sourceforge.net> + + * pagesetup.xsl: Corrected left and right page margins for even page masters: + inner and outer were reversed from what they should have been. + +2002-10-31 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Support spanning index terms (endofrange/startref) + + * lists.xsl: Put para spacing around tabular simplelists + +2002-10-21 Norman Walsh <nwalsh@users.sourceforge.net> + + * glossary.xsl: Bug #577798: glossentry with multiple glossdefs creates broken FO + + * pagesetup.xsl: Updated header/footer properties to avoid missmatched margins caused by title.margin.left + +2002-10-20 Norman Walsh <nwalsh@users.sourceforge.net> + + * inline.xsl: Bug #619474: support errortext element + +2002-10-19 Norman Walsh <nwalsh@users.sourceforge.net> + + * pagesetup.xsl, param.ent, param.xweb: Added property sets to control page header and footer content formatting + +2002-10-18 Robert Stayton <bobstayton@users.sourceforge.net> + + * param.xweb: Corrected the wording describing the placement of + the header and footer in the region-before and + region-after to match the diagram and stylesheet changes. + +2002-10-17 Norman Walsh <nwalsh@users.sourceforge.net> + + * refentry.xsl: Fix bug where refentrys in parts were not in a page sequence + +2002-10-11 Robert Stayton <bobstayton@users.sourceforge.net> + + * inline.xsl: glossterm and firstterm in text now use italicseq + to match the html formatting. + +2002-10-09 Norman Walsh <nwalsh@users.sourceforge.net> + + * table.xsl: Removed debug code. + +2002-10-04 Norman Walsh <nwalsh@users.sourceforge.net> + + * autotoc.xsl, sections.xsl: Support optional title on section ToCs. Optional titles for components, books, and sets will be trickier. + + * formal.xsl, param.ent, param.xweb, table.xsl: Made separate parameters for table frame and table cell border properties + +2002-10-02 Norman Walsh <nwalsh@users.sourceforge.net> + + * lists.xsl: Support continuation of orderedlists and inherited numeration in FO + +2002-10-01 Robert Stayton <bobstayton@users.sourceforge.net> + + * qandaset.xsl, refentry.xsl, sections.xsl: Changed section.level template to return number that matches + the section level (sect1 = 1, etc.), and adjusted templates + that use section.level accordingly to produce same output + as before. + +2002-09-27 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Bug #496294: don't index endofrangeentries. They're no longer indexed, but they aren't handled quite right yet either, they don't generate ranges + + * autotoc.xsl, sections.xsl: Support section ToCs + + * block.xsl, titlepage.xsl: Bug #582192: support revdescription + + * formal.xsl: Bug #497603: fixed and added default.float.class + + * param.ent, param.xweb: Use new parameters + + * synop.xsl: Fix sbr + +2002-09-20 Norman Walsh <nwalsh@users.sourceforge.net> + + * docbook.xsl: Add context to error message about a missing template + + * synop.xsl: Bug #605150: process arg correctly even when it's in a group + +2002-09-19 Robert Stayton <bobstayton@users.sourceforge.net> + + * formal.xsl: Removed 'keep-with-next' from 'formal.title.properties' attribute set now + that the stylesheets support the option of putting such + titles below the object. Now the $placement value determines + if 'keep-with-next' or 'keep-with-previous' is used in the + title block. + +2002-09-19 Norman Walsh <nwalsh@users.sourceforge.net> + + * xref.xsl: Use fo-external-image (badly named) to wrap url() around external-destinations + +2002-09-15 Norman Walsh <nwalsh@users.sourceforge.net> + + * table.xsl: Support a PI to rotate table cells + +2002-09-08 <dcramer@users.sourceforge.net> + + * lists.xsl: Bug #445750: Adding a keep-together and keep-with-next to the block that wraps terms in a varlistentry to keep terms from being orphaned/widowed when variablelists are formatted as blocks. + +2002-09-06 <dcramer@users.sourceforge.net> + + * component.xsl: Changing the mode in the apply-templates from title.markup to object.title.markup so that appendixes in articles can be formatted as specified in the appropriate lang.xml file. + +2002-09-05 Norman Walsh <nwalsh@users.sourceforge.net> + + * division.xsl: Restart all books on page 1 + +2002-09-04 Norman Walsh <nwalsh@users.sourceforge.net> + + * param.ent, param.xweb: Reference the l10n.* parameters + +2002-09-03 Norman Walsh <nwalsh@users.sourceforge.net> + + * graphics.xsl: Support textdata in textobject + + * table.xsl: Make sure row-level colsep and rowsep values are 'inherited' onto missing cells + +2002-09-01 Norman Walsh <nwalsh@users.sourceforge.net> + + * graphics.xsl: Put the url()/no-url() test for external graphics into a named template + + * pagesetup.xsl: Add SVG to the list of XEP graphics formats; use the url()/no-url() named template for draft.watermark.image + +2002-08-28 Norman Walsh <nwalsh@users.sourceforge.net> + + * table.xsl: Make inherited attributes work for 'missing' table cells + +2002-08-26 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Handle endofrange indexterms properly + + * graphics.xsl: Make graphics formats FO-processor aware; support SVG when FOP is being used + + * pdf2index: Support page ranges (generated by startofrang/endofrange index entries) + +2002-08-22 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Fix serious indexing bug that caused many index terms to be missing from the automatically generated index + +2002-08-21 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Support make.index.markup parameter + + * index.xsl: Support make.index.markup parameter and hand-crafted indexes + + * lists.xsl: Attempt to workaround bug in FOP handling of step content + + * param.ent, param.xweb: Remove unused table.entry.padding parameter; add new make.index.markup parameter + + * pdf2index: New file. + +2002-08-20 <dcramer@users.sourceforge.net> + + * block.xsl: Adding missing template for simplemsgentry + +2002-08-11 Robert Stayton <bobstayton@users.sourceforge.net> + + * pagesetup.xsl: Changed running header/footer rule line dimension from 1px to + 0.5pt so passivetex doesn't gack. + +2002-08-08 Robert Stayton <bobstayton@users.sourceforge.net> + + * autotoc.xsl: Fixed toc.line for FOP to align numbers + by adding leader-pattern-width property + as suggested by Nicolas Nieswandt. Was able to remove + the fop.extensions choose/when structure because + it works for all processors. The numbers in fop + align left rather than right, but at least they + line up. + +2002-07-26 Norman Walsh <nwalsh@users.sourceforge.net> + + * pagesetup.xsl: A little more tweaking to make things equivalent to the old scheme + + * pagesetup.xsl: Bob's reworked page header/footer ideas. I think there are still some rough edges. + +2002-07-24 Robert Stayton <bobstayton@users.sourceforge.net> + + * sections.xsl: Moved <fo:marker> for section heading to be first child + of its parent block, per bug #586005 (and the XSL-FO spec). + +2002-07-19 Norman Walsh <nwalsh@users.sourceforge.net> + + * biblio.xsl, param.ent, param.xweb: Support bibliography.numbered + + * inline.xsl, param.ent, param.xweb: Use monospace.properties for inline monospaced items + + * inline.xsl, param.ent, param.xweb: Support menuchoice.menu.separator and menuchoice.separator + + * param.ent, param.xweb, sections.xsl: Support section.title.levelN.properties to remove hard coding of font sizes in section headings + +2002-07-17 Norman Walsh <nwalsh@users.sourceforge.net> + + * biblio.xsl: Add keep to bibliodiv titles--they still need more work + + * pagesetup.xsl: Add a touch of padding between the page-footer rule and the footer text + + * table.xsl: Make header entries bold by default + +2002-07-16 Norman Walsh <nwalsh@users.sourceforge.net> + + * biblio.xsl, component.xsl, division.xsl, glossary.xsl, index.xsl, refentry.xsl, sections.xsl, toc.xsl: + Use basic initial-page-number property instead of extended force-page-count property to get components to start on odd pages in double.sided mode; call format.page.number to set the page number format for all page sequences + + * division.xsl: Don't include equations w/o titles in the LOT for equations + + * pagesetup.xsl: Added foot.empty and page.number.format named templates + +2002-07-15 Norman Walsh <nwalsh@users.sourceforge.net> + + * pagesetup.xsl: Use named-templates for headers/footers to make customization easier + +2002-07-09 Norman Walsh <nwalsh@users.sourceforge.net> + + * biblio.xsl: Don't output square brackets if there's no biblioentry label + + * synop.xsl: Bug #573726: fix cmdsynopsisref formatting + +2002-07-08 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Bug #574841: trim leading and trailing whitespace from primary/secondary/tertiary index terms + + * autoidx.xsl: Bug #574840: fix bug where some symbol index terms got lost + + * block.xsl, param.ent, param.xweb: Add sidebar.properties to control presentation of Sidebar elements + + * graphics.xsl: Work-around bug in xsltproc: explicitly cast scale to a number() before comparing it to 1.0 + +2002-07-07 Norman Walsh <nwalsh@users.sourceforge.net> + + * footnote.xsl, formal.xsl: Fix footnotes in table titles + + * lists.xsl: Fix ugly bug: make sure premables to orderedlist and itemizedlist elements are actually formatted + +2002-07-06 Norman Walsh <nwalsh@users.sourceforge.net> + + * xref.xsl: Added missing parameter to olink.hottext; added missing olink.outline template + +2002-07-06 Robert Stayton <bobstayton@users.sourceforge.net> + + * xref.xsl: Commented out call to olink.outline for old + style olinks, in case Norm wants to add + support for them. + + * xref.xsl: Bug fix: move xsl:param in olink template to be first child. + +2002-07-05 Robert Stayton <bobstayton@users.sourceforge.net> + + * param.ent, param.xweb: Added four parameters to support new stylesheet olink system: + target.database.document.xml + use.local.olink.style.xml + current.docid.xml + olink.doctitle.xml + + * xref.xsl: Modified for the new stylesheet olink system. + Modfified olink template to support the new + targetdoc and targetptr attributes. + Loads target database into keys for fast lookup. + +2002-07-04 Norman Walsh <nwalsh@users.sourceforge.net> + + * block.xsl, xref.xsl: Feature req #525507: support xref to para by using the nearest containing section as the generated text + + * fop.xsl: Patch #530026: suppress whitespace in FOP bookmarks + + * glossary.xsl: Fix page number citation code + +2002-07-03 Norman Walsh <nwalsh@users.sourceforge.net> + + * division.xsl, index.xsl, pagesetup.xsl, param.ent, param.xweb: + More hacking on page headers and footers: added toggles for rules and headers on blank pages + + * docbook.xsl: Feature Req #502932: added root.messages template for user defined messages + + * pagesetup.xsl: Remove silly debugging message + + * xref.xsl: Support insert.xref.page.number parameter + +2002-07-02 Norman Walsh <nwalsh@users.sourceforge.net> + + * component.xsl, division.xsl, index.xsl, pagesetup.xsl, param.ent, param.xweb, sections.xsl: + Completely rewrote pagesetup.xsl: more page models, more logical page margin setup + +2002-06-29 Norman Walsh <nwalsh@users.sourceforge.net> + + * formal.xsl, lists.xsl: Make list/procedure titles use gentext and have consisten formatting + + * table.xsl: Patch #514664: keep-together for table-cell if xep + +2002-06-27 Norman Walsh <nwalsh@users.sourceforge.net> + + * glossary.xsl, param.ent, param.xweb: Make glossary parameters properly documented parameters; support glossary.as.blocks + +2002-06-26 Norman Walsh <nwalsh@users.sourceforge.net> + + * table.xsl: Make sure we don't attempt to set the table width more than once if a table has multiple tgroups + +2002-06-11 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl, fo-patch-for-fop.xsl, fo-rtf.xsl, pagesetup.xsl, titlepage.templates.xml: + Add CVS Ids + + * biblio.xsl: Add spacing before bibliodivs + + * pagesetup.xsl: Put a titlepage at the beginning of the oneside sequence + + * param.ent, param.xweb: Added refentry.title.properties, section.title.properties, and use.role.as.xrefstyle + + * refentry.xsl: Use titlepage system for refentry (refsynopsisdiv, refsect*) titles + + * sections.xsl: Use section.title.properties + + * titlepage.templates.xml: Added refentry titlepage elements; tweaked font sizes and some spacing + + * titlepage.xsl: Fix copyright year formatting; add *.style attribute sets for refentry elements + + * xref.xsl: Experimental support for xrefstyle + +2002-06-09 Norman Walsh <nwalsh@users.sourceforge.net> + + * index.xsl: Fix bug #496453: make sure comments don't contain illegal chars + +2002-06-09 Jirka Kosek <kosek@users.sourceforge.net> + + * lists.xsl: Fixed bug #547163. Paragraph after formal paragraph in listitem gets correct spacing. + + * refentry.xsl: Fixed bug #554159. Added empty template for refentryinfo + +2002-06-03 Jirka Kosek <kosek@users.sourceforge.net> + + * Makefile: Added dependencies for profiling stylesheets + 2002-06-02 Norman Walsh <nwalsh@users.sourceforge.net> * lists.xsl: Support title on step in procedure Index: phpdoc/xsl/docbook/fo/admon.xsl diff -u phpdoc/xsl/docbook/fo/admon.xsl:1.1 phpdoc/xsl/docbook/fo/admon.xsl:1.2 --- phpdoc/xsl/docbook/fo/admon.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/admon.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: admon.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: admon.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -63,38 +63,35 @@ <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="graphic.width"> + <xsl:call-template name="admon.graphic.width"/> + </xsl:variable> <fo:block id="{$id}"> - <fo:table> - <fo:table-body> - <fo:table-row> - <fo:table-cell number-rows-spanned="2"> + <fo:list-block provisional-distance-between-starts="{$graphic.width} + 18pt" + provisional-label-separation="18pt" + xsl:use-attribute-sets="list.block.spacing"> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> <fo:block> - <fo:external-graphic width="auto" height="auto"> + <fo:external-graphic width="auto" height="auto" + content-width="{$graphic.width}" > <xsl:attribute name="src"> <xsl:call-template name="admon.graphic"/> </xsl:attribute> - <xsl:attribute name="content-width"> - <xsl:call-template name="admon.graphic.width"/> - </xsl:attribute> </fo:external-graphic> </fo:block> - </fo:table-cell> - <fo:table-cell> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> <fo:block xsl:use-attribute-sets="admonition.title.properties"> <xsl:apply-templates select="." mode="object.title.markup"/> </fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row> - <fo:table-cell number-columns-spanned="2"> <fo:block xsl:use-attribute-sets="admonition.properties"> <xsl:apply-templates/> </fo:block> - </fo:table-cell> - </fo:table-row> - </fo:table-body> - </fo:table> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> </fo:block> </xsl:template> Index: phpdoc/xsl/docbook/fo/autoidx.xsl diff -u phpdoc/xsl/docbook/fo/autoidx.xsl:1.1 phpdoc/xsl/docbook/fo/autoidx.xsl:1.2 --- phpdoc/xsl/docbook/fo/autoidx.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/autoidx.xsl Sun Mar 9 09:54:48 2003 @@ -4,39 +4,27 @@ <!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'"> <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"> -<!ENTITY primary 'concat(primary/@sortas, primary[not(@sortas)])'> -<!ENTITY secondary 'concat(secondary/@sortas, secondary[not(@sortas)])'> -<!ENTITY tertiary 'concat(tertiary/@sortas, tertiary[not(@sortas)])'> - -<!ENTITY section '(ancestor-or-self::set - |ancestor-or-self::book - |ancestor-or-self::part - |ancestor-or-self::reference - |ancestor-or-self::partintro - |ancestor-or-self::chapter - |ancestor-or-self::appendix - |ancestor-or-self::preface - |ancestor-or-self::section - |ancestor-or-self::sect1 - |ancestor-or-self::sect2 - |ancestor-or-self::sect3 - |ancestor-or-self::sect4 - |ancestor-or-self::sect5 - |ancestor-or-self::refsect1 - |ancestor-or-self::refsect2 - |ancestor-or-self::refsect3 - |ancestor-or-self::simplesect - |ancestor-or-self::bibliography - |ancestor-or-self::glossary - |ancestor-or-self::index)[last()]'> +<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'> +<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'> +<!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'> -<!ENTITY section.id 'generate-id(§ion;)'> <!ENTITY sep '" "'> +<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> +<!-- ******************************************************************** + $Id: autoidx.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + and other information. + + ******************************************************************** --> + <!-- ==================================================================== --> <!-- Derived from Jeni Tennison's work in the HTML case --> @@ -56,17 +44,9 @@ match="indexterm" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> -<xsl:key name="primary-section" - match="indexterm[not(secondary) and not(see)]" - use="concat(&primary;, &sep;, §ion.id;)"/> - -<xsl:key name="secondary-section" - match="indexterm[not(tertiary) and not(see)]" - use="concat(&primary;, &sep;, &secondary;, &sep;, §ion.id;)"/> - -<xsl:key name="tertiary-section" - match="indexterm[not(see)]" - use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, §ion.id;)"/> +<xsl:key name="endofrange" + match="indexterm[@class='endofrange']" + use="@startref"/> <xsl:key name="see-also" match="indexterm[seealso]" @@ -76,77 +56,118 @@ match="indexterm[see]" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see)"/> -<xsl:key name="sections" match="*[@id]" use="@id"/> - <xsl:template name="generate-index"> - <xsl:variable name="terms" select="//indexterm[count(.|key('letter', - translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[1]) = 1]"/> + <xsl:param name="scope" select="(ancestor::book|/)[last()]"/> + + <xsl:variable name="terms" + select="//indexterm[count(.|key('letter', + translate(substring(&primary;, 1, 1), + &lowercase;, + &uppercase;))[&scope;][1]) = 1 + and not(@class = 'endofrange')]"/> + <xsl:variable name="alphabetical" select="$terms[contains(concat(&lowercase;, &uppercase;), substring(&primary;, 1, 1))]"/> + <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;, &uppercase;), substring(&primary;, 1, 1)))]"/> <fo:block> <xsl:if test="$others"> - <fo:block font-size="16pt" - font-weight="bold" - keep-with-next.within-column="always" - space-before="1em"> - <xsl:call-template name="gentext"> - <xsl:with-param name="key" select="'index symbols'"/> - </xsl:call-template> - </fo:block> + <xsl:call-template name="indexdiv.title"> + <xsl:with-param name="titlecontent"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'index symbols'"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + <fo:block> <xsl:apply-templates select="$others[count(.|key('primary', - &primary;)[1]) = 1]" - mode="index-primary"> - <xsl:sort select="&primary;"/> + &primary;)[&scope;][1]) = 1]" + mode="index-symbol-div"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </fo:block> </xsl:if> + <xsl:apply-templates select="$alphabetical[count(.|key('letter', - translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[1]) = 1]" + translate(substring(&primary;, 1, 1), + &lowercase;,&uppercase;))[&scope;][1]) = 1]" mode="index-div"> - <xsl:sort select="&primary;"/> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </fo:block> </xsl:template> <xsl:template match="indexterm" mode="index-div"> - <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> - <fo:block> - <!-- this isn't quite exactly right. ideally all the symbols would --> - <!-- be grouped together. as it stands, they all get separate divs --> - <!-- but at least this test makes sure that they don't all get --> - <!-- separate titles as well. --> - <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)"> - <fo:block font-size="16pt" - font-weight="bold" - keep-with-next.within-column="always" - space-before="1em"> - <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/> - </fo:block> - </xsl:if> + <xsl:param name="scope" select="."/> + + <xsl:variable name="key" + select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> + + <xsl:if test="key('letter', $key)[&scope;] + [count(.|key('primary', &primary;)[&scope;][1]) = 1]"> <fo:block> - <xsl:apply-templates select="key('letter', $key)[count(.|key('primary', &primary;)[1]) = 1]" - mode="index-primary"> - <xsl:sort select="&primary;"/> - </xsl:apply-templates> + <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)"> + <xsl:call-template name="indexdiv.title"> + <xsl:with-param name="titlecontent"> + <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:block> + <xsl:apply-templates select="key('letter', $key)[&scope;] + [count(.|key('primary', &primary;)[&scope;][1])=1]" + mode="index-primary"> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> + </fo:block> </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="indexterm" mode="index-symbol-div"> + <xsl:param name="scope" select="."/> + + <xsl:variable name="key" + select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> + + <fo:block> + <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]" + mode="index-primary"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> </fo:block> </xsl:template> <xsl:template match="indexterm" mode="index-primary"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="&primary;"/> - <xsl:variable name="refs" select="key('primary', $key)"/> + <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> <fo:block> <xsl:value-of select="primary"/> <xsl:variable name="page-number-citations"> - <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section', concat($key, &sep;, §ion.id;))[1])]"> - <xsl:apply-templates select="." mode="reference"/> + <xsl:for-each select="$refs[not(see) and not(seealso)]"> + <xsl:apply-templates select="." mode="reference"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> </xsl:for-each> + + <xsl:if test="$refs[not(secondary)]/*[self::see]"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]" + mode="index-see"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> </xsl:variable> <xsl:choose> @@ -160,36 +181,45 @@ </xsl:otherwise> </xsl:choose> </fo:block> - <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::see or self::seealso]"> + + <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]"> <fo:block start-indent="1pc"> - <fo:block> - <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[1])]" - mode="index-see"> - <xsl:sort select="see"/> - </xsl:apply-templates> - <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[1])]" - mode="index-seealso"> - <xsl:sort select="seealso"/> - </xsl:apply-templates> - <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[1]) = 1]" - mode="index-secondary"> - <xsl:sort select="&secondary;"/> - </xsl:apply-templates> - </fo:block> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" + mode="index-secondary"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-secondary"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/> - <xsl:variable name="refs" select="key('secondary', $key)"/> + <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> <fo:block> <xsl:value-of select="secondary"/> <xsl:variable name="page-number-citations"> - <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section', concat($key, &sep;, §ion.id;))[1])]"> - <xsl:apply-templates select="." mode="reference"/> + <xsl:for-each select="$refs[not(see) and not(seealso)]"> + <xsl:apply-templates select="." mode="reference"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> </xsl:for-each> + + <xsl:if test="$refs[not(tertiary)]/*[self::see]"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]" + mode="index-see"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> </xsl:variable> <xsl:choose> @@ -203,36 +233,44 @@ </xsl:otherwise> </xsl:choose> </fo:block> - <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::see or self::seealso]"> + + <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]"> <fo:block start-indent="2pc"> - <fo:block> - <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[1])]" - mode="index-see"> - <xsl:sort select="see"/> - </xsl:apply-templates> - <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[1])]" - mode="index-seealso"> - <xsl:sort select="seealso"/> - </xsl:apply-templates> - <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[1]) = 1]" - mode="index-tertiary"> - <xsl:sort select="&tertiary;"/> - </xsl:apply-templates> - </fo:block> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" + mode="index-tertiary"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-tertiary"> + <xsl:param name="scope" select="."/> <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> - <xsl:variable name="refs" select="key('tertiary', $key)"/> + <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/> <fo:block> <xsl:value-of select="tertiary"/> <xsl:variable name="page-number-citations"> - <xsl:for-each select="$refs[generate-id() = generate-id(key('tertiary-section', concat($key, &sep;, §ion.id;))[1])]"> - <xsl:apply-templates select="." mode="reference"/> + <xsl:for-each select="$refs[not(see) and not(seealso)]"> + <xsl:apply-templates select="." mode="reference"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> </xsl:for-each> + + <xsl:if test="$refs/see"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]" + mode="index-see"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> </xsl:variable> <xsl:choose> @@ -246,54 +284,65 @@ </xsl:otherwise> </xsl:choose> </fo:block> - <xsl:variable name="see" select="$refs/see | $refs/seealso"/> - <xsl:if test="$see"> + + <xsl:if test="$refs/seealso"> <fo:block> - <fo:block> - <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[1])]" - mode="index-see"> - <xsl:sort select="see"/> - </xsl:apply-templates> - <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[1])]" - mode="index-seealso"> - <xsl:sort select="seealso"/> - </xsl:apply-templates> - </fo:block> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="reference"> + <xsl:param name="scope" select="."/> + <xsl:param name="separator" select="', '"/> + <xsl:if test="$passivetex.extensions = '0'"> - <xsl:text>, </xsl:text> + <xsl:value-of select="$separator"/> </xsl:if> + <xsl:choose> <xsl:when test="@zone and string(@zone)"> <xsl:call-template name="reference"> <xsl:with-param name="zones" select="normalize-space(@zone)"/> + <xsl:with-param name="scope" select="$scope"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <fo:basic-link internal-destination="{$id}"> <fo:page-number-citation ref-id="{$id}"/> </fo:basic-link> + + <xsl:if test="key('endofrange', @id)[&scope;]"> + <xsl:apply-templates select="key('endofrange', @id)[&scope;][last()]" + mode="reference"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="separator" select="'-'"/> + </xsl:apply-templates> + </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="reference"> + <xsl:param name="scope" select="."/> <xsl:param name="zones"/> + <xsl:choose> <xsl:when test="contains($zones, ' ')"> <xsl:variable name="zone" select="substring-before($zones, ' ')"/> - <xsl:variable name="target" select="key('sections', $zone)"/> + <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> <xsl:variable name="id"> <xsl:call-template name="object.id"> - <xsl:with-param name="object" select="$target[1]"/> + <xsl:with-param name="object" select="$target[1]"/> </xsl:call-template> </xsl:variable> @@ -306,11 +355,12 @@ </xsl:if> <xsl:call-template name="reference"> <xsl:with-param name="zones" select="substring-after($zones, ' ')"/> + <xsl:with-param name="scope" select="$scope"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:variable name="zone" select="$zones"/> - <xsl:variable name="target" select="key('sections', $zone)"/> + <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> <xsl:variable name="id"> <xsl:call-template name="object.id"> @@ -326,11 +376,417 @@ </xsl:template> <xsl:template match="indexterm" mode="index-see"> - <fo:block><xsl:value-of select="see"/></fo:block> + <xsl:param name="scope" select="."/> + + <fo:inline> + <xsl:text> (</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'see'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:value-of select="see"/> + <xsl:text>)</xsl:text> + </fo:inline> </xsl:template> <xsl:template match="indexterm" mode="index-seealso"> - <fo:block><xsl:value-of select="seealso"/></fo:block> + <xsl:param name="scope" select="."/> + + <fo:block> + <xsl:text>(</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'seealso'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:value-of select="seealso"/> + <xsl:text>)</xsl:text> + </fo:block> +</xsl:template> + +<!-- ====================================================================== --> + +<xsl:template name="generate-index-markup"> + <xsl:param name="scope" select="(ancestor::book|/)[last()]"/> + + <xsl:variable name="terms" select="$scope//indexterm[count(.|key('letter', + translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[&scope;][1]) = 1]"/> + <xsl:variable name="alphabetical" + select="$terms[contains(concat(&lowercase;, &uppercase;), + substring(&primary;, 1, 1))]"/> + <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;, + &uppercase;), + substring(&primary;, 1, 1)))]"/> + + <xsl:text><index> </xsl:text> + <xsl:if test="$others"> + <xsl:text> <indexdiv> </xsl:text> + <xsl:text><title></xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'index symbols'"/> + </xsl:call-template> + <xsl:text></title> </xsl:text> + <xsl:apply-templates select="$others[count(.|key('primary', + &primary;)[&scope;][1]) = 1]" + mode="index-symbol-div-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:text></indexdiv> </xsl:text> + </xsl:if> + + <xsl:apply-templates select="$alphabetical[count(.|key('letter', + translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[&scope;][1]) = 1]" + mode="index-div-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:text></index> </xsl:text> +</xsl:template> + +<xsl:template match="*" mode="index-markup"> + <xsl:param name="scope" select="."/> + + <xsl:text><</xsl:text> + <xsl:value-of select="name(.)"/> + <xsl:text>> </xsl:text> + <xsl:apply-templates mode="index-markup"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="indexterm" mode="index-div-markup"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> + <xsl:text> <indexdiv> </xsl:text> + <xsl:text><title></xsl:text> + <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/> + <xsl:text></title> </xsl:text> + + <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]" + mode="index-primary-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:text></indexdiv> </xsl:text> +</xsl:template> + +<xsl:template match="indexterm" mode="index-symbol-div-markup"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> + + <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]" + mode="index-primary-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="indexterm" mode="index-primary-markup"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="&primary;"/> + <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> + <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/> + + <xsl:text> <indexentry> </xsl:text> + <xsl:text><primaryie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(primary)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:if test="$pages">,</xsl:if> + <xsl:text> </xsl:text> + + <xsl:for-each select="$pages"> + <xsl:apply-templates select="." mode="reference-markup"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> + </xsl:for-each> + + <xsl:text></primaryie> </xsl:text> + + <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::see or self::seealso]"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]" + mode="index-see-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + + <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" + mode="index-secondary-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> + <xsl:text></indexentry> </xsl:text> +</xsl:template> + +<xsl:template match="indexterm" mode="index-secondary-markup"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/> + <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> + <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/> + + <xsl:text><secondaryie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(secondary)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:if test="$pages">,</xsl:if> + <xsl:text> </xsl:text> + + <xsl:for-each select="$pages"> + <xsl:apply-templates select="." mode="reference-markup"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> + </xsl:for-each> + + <xsl:text></secondaryie> </xsl:text> + + <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::see or self::seealso]"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]" + mode="index-see-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" + mode="index-tertiary-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> +</xsl:template> + +<xsl:template match="indexterm" mode="index-tertiary-markup"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> + <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/> + <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/> + + <xsl:text><tertiaryie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(tertiary)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:if test="$pages">,</xsl:if> + <xsl:text> </xsl:text> + + <xsl:for-each select="$pages"> + <xsl:apply-templates select="." mode="reference-markup"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> + </xsl:for-each> + + <xsl:text></tertiaryie> </xsl:text> + + <xsl:variable name="see" select="$refs/see | $refs/seealso"/> + <xsl:if test="$see"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]" + mode="index-see-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> +</xsl:template> + +<xsl:template match="indexterm" mode="reference-markup"> + <xsl:param name="scope" select="."/> + <xsl:choose> + <xsl:when test="@zone and string(@zone)"> + <xsl:call-template name="reference-markup"> + <xsl:with-param name="zones" select="normalize-space(@zone)"/> + <xsl:with-param name="scope" select="$scope"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + + <xsl:choose> + <xsl:when test="@startref and @class='endofrange'"> + <xsl:text><phrase role="pageno"></xsl:text> + <xsl:text><link linkend="</xsl:text> + <xsl:value-of select="@startref"/> + <xsl:text>"></xsl:text> + <fo:basic-link internal-destination="{@startref}"> + <fo:page-number-citation ref-id="{@startref}"/> + <xsl:text>-</xsl:text> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + <xsl:text></link></xsl:text> + <xsl:text></phrase> </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text><phrase role="pageno"></xsl:text> + <xsl:if test="@id"> + <xsl:text><link linkend="</xsl:text> + <xsl:value-of select="$id"/> + <xsl:text>"></xsl:text> + </xsl:if> + <fo:basic-link internal-destination="{$id}"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + <xsl:if test="@id"> + <xsl:text></link></xsl:text> + </xsl:if> + <xsl:text></phrase> </xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="reference-markup"> + <xsl:param name="scope" select="."/> + <xsl:param name="zones"/> + <xsl:choose> + <xsl:when test="contains($zones, ' ')"> + <xsl:variable name="zone" select="substring-before($zones, ' ')"/> + <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target[1]"/> + </xsl:call-template> + </xsl:variable> + + <xsl:text><phrase fole="pageno"></xsl:text> + <xsl:if test="$target[1]/@id"> + <xsl:text><link linkend="</xsl:text> + <xsl:value-of select="$id"/> + <xsl:text>"></xsl:text> + </xsl:if> + <fo:basic-link internal-destination="{$id}"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + <xsl:if test="$target[1]/@id"> + <xsl:text></link></xsl:text> + </xsl:if> + <xsl:text></phrase> </xsl:text> + + <xsl:call-template name="reference"> + <xsl:with-param name="zones" select="substring-after($zones, ' ')"/> + <xsl:with-param name="scope" select="$scope"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="zone" select="$zones"/> + <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target[1]"/> + </xsl:call-template> + </xsl:variable> + + <xsl:text><phrase role="pageno"></xsl:text> + <xsl:if test="$target[1]/@id"> + <xsl:text><link linkend="</xsl:text> + <xsl:value-of select="$id"/> + <xsl:text>"></xsl:text> + </xsl:if> + <fo:basic-link internal-destination="{$id}"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + <xsl:if test="$target[1]/@id"> + <xsl:text></link></xsl:text> + </xsl:if> + <xsl:text></phrase> </xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="indexterm" mode="index-see-markup"> + <xsl:param name="scope" select="."/> + <fo:block> + <xsl:text><seeie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(see)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:text></seeie> </xsl:text> + </fo:block> +</xsl:template> + +<xsl:template match="indexterm" mode="index-seealso-markup"> + <xsl:param name="scope" select="."/> + <fo:block> + <xsl:text><seealsoie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(seealso)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:text></seealsoie> </xsl:text> + </fo:block> +</xsl:template> + +<xsl:template name="escape-text"> + <xsl:param name="text" select="''"/> + + <xsl:variable name="ltpos" select="substring-before($text, '<')"/> + <xsl:variable name="amppos" select="substring-before($text, '&')"/> + + <xsl:choose> + <xsl:when test="contains($text,'<') and contains($text, '&') + and string-length($ltpos) < string-length($amppos)"> + <xsl:value-of select="$ltpos"/> + <xsl:text>&lt;</xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="substring-after($text, '<')"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="contains($text,'<') and contains($text, '&') + and string-length($amppos) < string-length($ltpos)"> + <xsl:value-of select="$amppos"/> + <xsl:text>&amp;</xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="substring-after($text, '&')"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="contains($text, '<')"> + <xsl:value-of select="$ltpos"/> + <xsl:text>&lt;</xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="substring-after($text, '<')"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="contains($text, '&')"> + <xsl:value-of select="$amppos"/> + <xsl:text>&amp;</xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="substring-after($text, '&')"/> + </xsl:call-template> + </xsl:when> + + <xsl:otherwise> + <xsl:value-of select="$text"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> </xsl:stylesheet> Index: phpdoc/xsl/docbook/fo/autotoc.xsl diff -u phpdoc/xsl/docbook/fo/autotoc.xsl:1.1 phpdoc/xsl/docbook/fo/autotoc.xsl:1.2 --- phpdoc/xsl/docbook/fo/autotoc.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/autotoc.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: autotoc.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: autotoc.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -44,10 +44,6 @@ <xsl:template name="division.toc"> <xsl:param name="toc-context" select="."/> - <xsl:variable name="id"> - <xsl:call-template name="object.id"/> - </xsl:variable> - <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> @@ -55,12 +51,18 @@ </xsl:variable> <xsl:variable name="nodes" - select="part|reference|preface - |chapter|appendix - |article - |bibliography|glossary|index"/> + select="$toc-context/part + |$toc-context/reference + |$toc-context/preface + |$toc-context/chapter + |$toc-context/appendix + |$toc-context/article + |$toc-context/bibliography + |$toc-context/glossary + |$toc-context/index"/> + <xsl:if test="$nodes"> - <fo:block id="toc...{$id}" + <fo:block id="toc...{$cid}" xsl:use-attribute-sets="toc.margin.properties"> <xsl:call-template name="table.of.contents.titlepage"/> <xsl:apply-templates select="$nodes" mode="toc"> @@ -97,6 +99,61 @@ </xsl:if> </xsl:template> +<xsl:template name="component.toc.separator"> + <!-- Customize to output something between + component.toc and first output --> +</xsl:template> + +<xsl:template name="section.toc"> + <xsl:param name="toc-context" select="."/> + <xsl:param name="toc.title.p" select="true()"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="nodes" + select="section|sect1|sect2|sect3|sect4|sect5|refentry + |bridgehead[$bridgehead.in.toc != 0]"/> + + <xsl:variable name="level"> + <xsl:call-template name="section.level"/> + </xsl:variable> + + <xsl:if test="$nodes"> + <fo:block id="toc...{$id}" + xsl:use-attribute-sets="toc.margin.properties"> + + <xsl:if test="$toc.title.p"> + <xsl:call-template name="section.heading"> + <xsl:with-param name="level" select="$level + 1"/> + <xsl:with-param name="title"> + <fo:block space-after="0.5em"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'TableofContents'"/> + </xsl:call-template> + </fo:block> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + + <xsl:apply-templates select="$nodes" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template name="section.toc.separator"> + <!-- Customize to output something between + section.toc and first output --> +</xsl:template> <!-- ==================================================================== --> <xsl:template name="toc.line"> @@ -108,46 +165,30 @@ <xsl:apply-templates select="." mode="label.markup"/> </xsl:variable> - <xsl:choose> - <xsl:when test="$fop.extensions != 0"> - <fo:block text-align="start"> - <fo:basic-link internal-destination="{$id}"> - <fo:inline keep-with-next.within-line="always"> - <xsl:apply-templates select="." mode="object.title.markup"/> - </fo:inline> - <fo:inline keep-together.within-line="always" font-style="italic"> - <xsl:text>        </xsl:text> - <fo:page-number-citation ref-id="{$id}"/> - <xsl:text></xsl:text> - </fo:inline> - </fo:basic-link> - </fo:block> - </xsl:when> - <xsl:otherwise> - <fo:block text-align-last="justify" - end-indent="{$toc.indent.width}pt" - last-line-end-indent="-{$toc.indent.width}pt"> - <fo:inline keep-with-next.within-line="always"> - <fo:basic-link internal-destination="{$id}"> - <xsl:if test="$label != ''"> - <xsl:copy-of select="$label"/> - <xsl:value-of select="$autotoc.label.separator"/> - </xsl:if> - <xsl:apply-templates select="." mode="title.markup"/> - </fo:basic-link> - </fo:inline> - <fo:inline keep-together.within-line="always"> - <xsl:text> </xsl:text> - <fo:leader leader-pattern="dots" - keep-with-next.within-line="always"/> - <xsl:text> </xsl:text> - <fo:basic-link internal-destination="{$id}"> - <fo:page-number-citation ref-id="{$id}"/> - </fo:basic-link> - </fo:inline> - </fo:block> - </xsl:otherwise> - </xsl:choose> + <fo:block text-align-last="justify" + end-indent="{$toc.indent.width}pt" + last-line-end-indent="-{$toc.indent.width}pt"> + <fo:inline keep-with-next.within-line="always"> + <fo:basic-link internal-destination="{$id}"> + <xsl:if test="$label != ''"> + <xsl:copy-of select="$label"/> + <xsl:value-of select="$autotoc.label.separator"/> + </xsl:if> + <xsl:apply-templates select="." mode="title.markup"/> + </fo:basic-link> + </fo:inline> + <fo:inline keep-together.within-line="always"> + <xsl:text> </xsl:text> + <fo:leader leader-pattern="dots" + leader-pattern-width="3pt" + leader-alignment="reference-area" + keep-with-next.within-line="always"/> + <xsl:text> </xsl:text> + <fo:basic-link internal-destination="{$id}"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + </fo:inline> + </fo:block> </xsl:template> <!-- ==================================================================== --> @@ -306,9 +347,12 @@ <xsl:call-template name="toc.line"/> + <xsl:variable name="reldepth" + select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + <xsl:if test="$toc.section.depth > 2 and sect3"> <fo:block id="toc.{$cid}.{$id}" - start-indent="{count(ancestor::*)*$toc.indent.width}pt"> + start-indent="{$reldepth*$toc.indent.width}pt"> <xsl:apply-templates select="sect3" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> @@ -331,9 +375,12 @@ <xsl:call-template name="toc.line"/> + <xsl:variable name="reldepth" + select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + <xsl:if test="$toc.section.depth > 3 and sect4"> <fo:block id="toc.{$cid}.{$id}" - start-indent="{count(ancestor::*)*$toc.indent.width}pt"> + start-indent="{$reldepth*$toc.indent.width}pt"> <xsl:apply-templates select="sect4" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> @@ -356,9 +403,12 @@ <xsl:call-template name="toc.line"/> + <xsl:variable name="reldepth" + select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + <xsl:if test="$toc.section.depth > 4 and sect5"> <fo:block id="toc.{$cid}.{$id}" - start-indent="{count(ancestor::*)*$toc.indent.width}pt"> + start-indent="{$reldepth*$toc.indent.width}pt"> <xsl:apply-templates select="sect5" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> @@ -386,13 +436,15 @@ </xsl:variable> <xsl:variable name="depth" select="count(ancestor::section) + 1"/> + <xsl:variable name="reldepth" + select="count(ancestor::*)-count($toc-context/ancestor::*)"/> <xsl:if test="$toc.section.depth >= $depth"> <xsl:call-template name="toc.line"/> <xsl:if test="$toc.section.depth > $depth and section"> <fo:block id="toc.{$cid}.{$id}" - start-indent="{count(ancestor::*)*$toc.indent.width}pt"> + start-indent="{$reldepth*$toc.indent.width}pt"> <xsl:apply-templates select="section" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> @@ -408,11 +460,10 @@ <xsl:call-template name="toc.line"/> </xsl:template> -<xsl:template match="index" - mode="toc"> +<xsl:template match="index" mode="toc"> <xsl:param name="toc-context" select="."/> - <xsl:if test="* or $generate.index"> + <xsl:if test="* or $generate.index != 0"> <xsl:call-template name="toc.line"/> </xsl:if> </xsl:template> @@ -447,6 +498,9 @@ <xsl:when test="$titles='example'"> <xsl:call-template name="list.of.examples.titlepage"/> </xsl:when> + <xsl:when test="$titles='procedure'"> + <xsl:call-template name="list.of.procedures.titlepage"/> + </xsl:when> <xsl:otherwise> <xsl:call-template name="list.of.unknowns.titlepage"/> </xsl:otherwise> @@ -458,7 +512,7 @@ </xsl:if> </xsl:template> -<xsl:template match="figure|table|example|equation" mode="toc"> +<xsl:template match="figure|table|example|equation|procedure" mode="toc"> <xsl:call-template name="toc.line"/> </xsl:template> Index: phpdoc/xsl/docbook/fo/biblio.xsl diff -u phpdoc/xsl/docbook/fo/biblio.xsl:1.1 phpdoc/xsl/docbook/fo/biblio.xsl:1.2 --- phpdoc/xsl/docbook/fo/biblio.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/biblio.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: biblio.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: biblio.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -32,8 +32,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -50,8 +53,10 @@ </fo:page-sequence> </xsl:when> <xsl:otherwise> - <fo:block id="{$id}"> - <xsl:call-template name="component.separator"/> + <fo:block id="{$id}" + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em"> <xsl:call-template name="bibliography.titlepage"/> <xsl:apply-templates/> </fo:block> @@ -64,37 +69,21 @@ <xsl:template match="bibliography/subtitle"></xsl:template> <xsl:template match="bibliography/titleabbrev"></xsl:template> -<xsl:template match="bibliography/title" mode="component.title.mode"> - <fo:block xsl:use-attribute-sets="component.title.properties"> - <xsl:apply-templates/> - </fo:block> -</xsl:template> - -<xsl:template match="bibliography/subtitle" mode="component.title.mode"> - <fo:block font-size="18pt" font-weight="bold" font-style="italic"> - <xsl:apply-templates/> - </fo:block> -</xsl:template> - <!-- ==================================================================== --> <xsl:template match="bibliodiv"> <fo:block> + <xsl:attribute name="id"> + <xsl:call-template name="object.id"/> + </xsl:attribute> + <xsl:call-template name="bibliodiv.titlepage"/> <xsl:apply-templates/> </fo:block> </xsl:template> -<xsl:template match="bibliodiv/title"> - <xsl:variable name="id"> - <xsl:call-template name="object.id"> - <xsl:with-param name="object" select=".."/> - </xsl:call-template> - </xsl:variable> - <fo:block font-size="16pt" font-weight="bold" - font-family="{$title.font.family}"> - <xsl:apply-templates/> - </fo:block> -</xsl:template> +<xsl:template match="bibliodiv/title"/> +<xsl:template match="bibliodiv/subtitle"/> +<xsl:template match="bibliodiv/titleabbrev"/> <!-- ==================================================================== --> @@ -173,16 +162,30 @@ <xsl:template name="biblioentry.label"> <xsl:param name="node" select="."/> - <xsl:text>[</xsl:text> <xsl:choose> + <xsl:when test="$bibliography.numbered != 0"> + <xsl:text>[</xsl:text> + <xsl:number from="bibliography" count="biblioentry|bibliomixed" + level="any" format="1"/> + <xsl:text>] </xsl:text> + </xsl:when> <xsl:when test="local-name($node/child::*[1]) = 'abbrev'"> + <xsl:text>[</xsl:text> <xsl:apply-templates select="$node/abbrev[1]"/> + <xsl:text>] </xsl:text> </xsl:when> - <xsl:otherwise> + <xsl:when test="$node/@xreflabel"> + <xsl:text>[</xsl:text> + <xsl:value-of select="$node/@xreflabel"/> + <xsl:text>] </xsl:text> + </xsl:when> + <xsl:when test="$node/@id"> + <xsl:text>[</xsl:text> <xsl:value-of select="$node/@id"/> - </xsl:otherwise> + <xsl:text>] </xsl:text> + </xsl:when> + <xsl:otherwise><!-- nop --></xsl:otherwise> </xsl:choose> - <xsl:text>] </xsl:text> </xsl:template> <!-- ==================================================================== --> @@ -200,10 +203,7 @@ </xsl:template> <xsl:template match="abstract" mode="bibliography.mode"> - <fo:inline> - <xsl:apply-templates mode="bibliography.mode"/> - <xsl:value-of select="$biblioentry.item.separator"/> - </fo:inline> + <!-- suppressed --> </xsl:template> <xsl:template match="address" mode="bibliography.mode"> @@ -595,10 +595,9 @@ </xsl:template> <xsl:template match="revhistory" mode="bibliography.mode"> - <fo:inline> - <xsl:apply-templates mode="bibliography.mode"/> - <xsl:value-of select="$biblioentry.item.separator"/> - </fo:inline> + <fo:block> + <xsl:apply-templates select="."/> <!-- use normal mode --> + </fo:block> </xsl:template> <xsl:template match="seriesinfo" mode="bibliography.mode"> @@ -693,6 +692,14 @@ </fo:inline> </xsl:template> +<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource" + mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + <!-- ==================================================================== --> <xsl:template match="*" mode="bibliomixed.mode"> @@ -702,15 +709,21 @@ <xsl:template match="abbrev" mode="bibliomixed.mode"> <xsl:if test="preceding-sibling::*"> <fo:inline> - <xsl:apply-templates mode="bibliography.mode"/> + <xsl:apply-templates mode="bibliomixed.mode"/> </fo:inline> </xsl:if> </xsl:template> <xsl:template match="abstract" mode="bibliomixed.mode"> - <fo:inline> + <fo:block start-indent="1in"> <xsl:apply-templates mode="bibliomixed.mode"/> - </fo:inline> + </fo:block> +</xsl:template> + +<xsl:template match="para" mode="bibliomixed.mode"> + <fo:block> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:block> </xsl:template> <xsl:template match="address" mode="bibliomixed.mode"> @@ -1050,6 +1063,13 @@ </xsl:template> <xsl:template match="volumenum" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource" + mode="bibliomixed.mode"> <fo:inline> <xsl:apply-templates mode="bibliomixed.mode"/> </fo:inline> Index: phpdoc/xsl/docbook/fo/block.xsl diff -u phpdoc/xsl/docbook/fo/block.xsl:1.1 phpdoc/xsl/docbook/fo/block.xsl:1.2 --- phpdoc/xsl/docbook/fo/block.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/block.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: block.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: block.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -25,6 +25,7 @@ <xsl:template match="para"> <fo:block xsl:use-attribute-sets="normal.para.spacing"> + <xsl:call-template name="anchor"/> <xsl:apply-templates/> </fo:block> </xsl:template> @@ -92,7 +93,7 @@ <xsl:template match="epigraph"> <fo:block> <xsl:call-template name="anchor"/> - <xsl:apply-templates select="para"/> + <xsl:apply-templates select="para|simpara|formalpara|literallayout"/> <fo:inline> <xsl:text>--</xsl:text> <xsl:apply-templates select="attribution"/> @@ -107,7 +108,7 @@ <!-- ==================================================================== --> <xsl:template match="sidebar"> - <fo:block> + <fo:block xsl:use-attribute-sets="sidebar.properties"> <xsl:if test="./title"> <fo:block font-weight="bold" keep-with-next.within-column="always" @@ -156,6 +157,10 @@ <xsl:call-template name="block.object"/> </xsl:template> +<xsl:template match="simplemsgentry"> + <xsl:call-template name="block.object"/> +</xsl:template> + <xsl:template match="msg"> <xsl:call-template name="block.object"/> </xsl:template> @@ -258,7 +263,7 @@ <xsl:variable name="revnumber" select=".//revnumber"/> <xsl:variable name="revdate" select=".//date"/> <xsl:variable name="revauthor" select=".//authorinitials"/> - <xsl:variable name="revremark" select=".//revremark"/> + <xsl:variable name="revremark" select=".//revremark|.//revdescription"/> <fo:table-row> <fo:table-cell> <fo:block> @@ -306,6 +311,10 @@ </xsl:template> <xsl:template match="revision/revremark"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="revision/revdescription"> <xsl:apply-templates/> </xsl:template> Index: phpdoc/xsl/docbook/fo/callout.xsl diff -u phpdoc/xsl/docbook/fo/callout.xsl:1.1 phpdoc/xsl/docbook/fo/callout.xsl:1.2 --- phpdoc/xsl/docbook/fo/callout.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/callout.xsl Sun Mar 9 09:54:48 2003 @@ -8,7 +8,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: callout.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: callout.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. Index: phpdoc/xsl/docbook/fo/component.xsl diff -u phpdoc/xsl/docbook/fo/component.xsl:1.1 phpdoc/xsl/docbook/fo/component.xsl:1.2 --- phpdoc/xsl/docbook/fo/component.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/component.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: component.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: component.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -28,16 +28,22 @@ <xsl:with-param name="allow-anchors" select="1"/> </xsl:apply-templates> </xsl:variable> + <xsl:variable name="titleabbrev"> + <xsl:apply-templates select="$node" mode="titleabbrev.markup"/> + </xsl:variable> <xsl:if test="$passivetex.extensions != 0"> <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" fotex-bookmark-level="2" fotex-bookmark-label="{$id}"> - <xsl:value-of select="$title"/> + <xsl:value-of select="$titleabbrev"/> </fotex:bookmark> </xsl:if> <fo:block keep-with-next.within-column="always" + space-before.optimum="{$body.font.master}pt" + space-before.minimum="{$body.font.master * 0.8}pt" + space-before.maximum="{$body.font.master * 1.2}pt" hyphenate="false"> <xsl:if test="$pagewide != 0"> <xsl:attribute name="span">all</xsl:attribute> @@ -46,50 +52,47 @@ </fo:block> </xsl:template> -<xsl:template name="component.subtitle"> - <xsl:param name="node" select="."/> - <xsl:variable name="subtitle"> - <xsl:apply-templates select="$node" mode="subtitle.markup"/> - </xsl:variable> - - <xsl:if test="$subtitle != ''"> - <fo:block font-size="16pt" - font-weight="bold" - font-style="italic" - keep-with-next.within-column="always" - hyphenate="false"> - <xsl:copy-of select="$subtitle"/> - </fo:block> - </xsl:if> -</xsl:template> - -<xsl:template name="component.separator"> -</xsl:template> - <!-- ==================================================================== --> <xsl:template match="dedication" mode="dedication"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"/> </xsl:variable> <fo:page-sequence id="{$id}" hyphenate="{$hyphenate}" - format="i" master-reference="{$master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> - <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> - </xsl:if> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + <xsl:choose> + <xsl:when test="not(preceding::chapter + or preceding::preface + or preceding::appendix + or preceding::article + or preceding::dedication + or parent::part + or parent::reference)"> + <!-- if there is a preceding component or we're in a part, the --> + <!-- page numbering will already be adjusted --> + <xsl:attribute name="initial-page-number">1</xsl:attribute> + </xsl:when> + <xsl:when test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:when> + </xsl:choose> <xsl:apply-templates select="." mode="running.head.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> @@ -113,24 +116,28 @@ <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"/> </xsl:variable> <fo:page-sequence id="{$id}" hyphenate="{$hyphenate}" - format="i" master-reference="{$master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> @@ -152,30 +159,35 @@ <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"/> </xsl:variable> <fo:page-sequence id="{$id}" hyphenate="{$hyphenate}" - format="i" master-reference="{$master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + + <!-- Page numbering for a preface doesn't restart; it continues from the ToC --> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> <fo:flow flow-name="xsl-region-body"> - <xsl:call-template name="component.separator"/> <xsl:call-template name="preface.titlepage"/> <xsl:variable name="toc.params"> @@ -185,6 +197,7 @@ </xsl:variable> <xsl:if test="contains($toc.params, 'toc')"> <xsl:call-template name="component.toc"/> + <xsl:call-template name="component.toc.separator"/> </xsl:if> <xsl:apply-templates/> @@ -197,10 +210,13 @@ <xsl:template match="preface/titleabbrev"></xsl:template> <xsl:template match="preface/subtitle"></xsl:template> +<!-- ==================================================================== --> + <xsl:template match="chapter"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"/> </xsl:variable> @@ -211,25 +227,34 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> - - <!-- if there is a preceding chapter or this chapter appears in a part, the --> - <!-- page numbering will already be adjusted --> - <xsl:if test="not(preceding::chapter) and not(parent::part)"> - <xsl:attribute name="initial-page-number">1</xsl:attribute> - </xsl:if> - <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> - </xsl:if> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + <xsl:choose> + <xsl:when test="not(preceding::chapter + or preceding::appendix + or preceding::article + or preceding::dedication + or parent::part + or parent::reference)"> + <!-- if there is a preceding component or we're in a part, the --> + <!-- page numbering will already be adjusted --> + <xsl:attribute name="initial-page-number">1</xsl:attribute> + </xsl:when> + <xsl:when test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:when> + </xsl:choose> <xsl:apply-templates select="." mode="running.head.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> <fo:flow flow-name="xsl-region-body"> - <xsl:call-template name="component.separator"/> <xsl:call-template name="chapter.titlepage"/> <xsl:variable name="toc.params"> @@ -239,6 +264,7 @@ </xsl:variable> <xsl:if test="contains($toc.params, 'toc')"> <xsl:call-template name="component.toc"/> + <xsl:call-template name="component.toc.separator"/> </xsl:if> <xsl:apply-templates/> </fo:flow> @@ -250,10 +276,13 @@ <xsl:template match="chapter/titleabbrev"></xsl:template> <xsl:template match="chapter/subtitle"></xsl:template> +<!-- ==================================================================== --> + <xsl:template match="appendix"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"/> </xsl:variable> @@ -264,19 +293,34 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> - <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> - </xsl:if> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + <xsl:choose> + <xsl:when test="not(preceding::chapter + or preceding::appendix + or preceding::article + or preceding::dedication + or parent::part + or parent::reference)"> + <!-- if there is a preceding component or we're in a part, the --> + <!-- page numbering will already be adjusted --> + <xsl:attribute name="initial-page-number">1</xsl:attribute> + </xsl:when> + <xsl:when test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:when> + </xsl:choose> <xsl:apply-templates select="." mode="running.head.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> <fo:flow flow-name="xsl-region-body"> - <xsl:call-template name="component.separator"/> <xsl:call-template name="appendix.titlepage"/> <xsl:variable name="toc.params"> @@ -284,8 +328,10 @@ <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> + <xsl:if test="contains($toc.params, 'toc')"> <xsl:call-template name="component.toc"/> + <xsl:call-template name="component.toc.separator"/> </xsl:if> <xsl:apply-templates/> </fo:flow> @@ -299,76 +345,11 @@ <!-- ==================================================================== --> -<xsl:template match="dedication" mode="component.number"> - <xsl:param name="add.space" select="false()"/> -</xsl:template> - -<xsl:template match="preface" mode="component.number"> - <xsl:param name="add.space" select="false()"/> -</xsl:template> - -<xsl:template match="chapter" mode="component.number"> - <xsl:param name="add.space" select="false()"/> - <xsl:choose> - <xsl:when test="@label"> - <xsl:value-of select="@label"/> - <xsl:text>.</xsl:text> - <xsl:if test="$add.space"> - <xsl:call-template name="gentext.space"/> - </xsl:if> - </xsl:when> - <xsl:when test="$chapter.autolabel"> - <xsl:number from="book" count="chapter" format="1."/> - <xsl:if test="$add.space"> - <xsl:call-template name="gentext.space"/> - </xsl:if> - </xsl:when> - <xsl:otherwise></xsl:otherwise> - </xsl:choose> -</xsl:template> - -<xsl:template match="appendix" mode="component.number"> - <xsl:param name="add.space" select="false()"/> - <xsl:choose> - <xsl:when test="@label"> - <xsl:value-of select="@label"/> - <xsl:text>.</xsl:text> - <xsl:if test="$add.space"> - <xsl:call-template name="gentext.space"/> - </xsl:if> - </xsl:when> - <xsl:when test="$chapter.autolabel"> - <xsl:number from="book" count="appendix" format="A."/> - <xsl:if test="$add.space"> - <xsl:call-template name="gentext.space"/> - </xsl:if> - </xsl:when> - <xsl:otherwise></xsl:otherwise> - </xsl:choose> -</xsl:template> - -<xsl:template match="article" mode="component.number"> - <xsl:param name="add.space" select="false()"/> -</xsl:template> - -<xsl:template match="bibliography" mode="component.number"> - <xsl:param name="add.space" select="false()"/> -</xsl:template> - -<xsl:template match="glossary" mode="component.number"> - <xsl:param name="add.space" select="false()"/> -</xsl:template> - -<xsl:template match="index" mode="component.number"> - <xsl:param name="add.space" select="false()"/> -</xsl:template> - -<!-- ==================================================================== --> - <xsl:template match="article"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"/> </xsl:variable> @@ -379,13 +360,30 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> - <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> - </xsl:if> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + <xsl:choose> + <xsl:when test="not(preceding::chapter + or preceding::preface + or preceding::appendix + or preceding::article + or preceding::dedication + or parent::part + or parent::reference)"> + <!-- if there is a preceding component or we're in a part, the --> + <!-- page numbering will already be adjusted --> + <xsl:attribute name="initial-page-number">1</xsl:attribute> + </xsl:when> + <xsl:when test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:when> + </xsl:choose> <xsl:apply-templates select="." mode="running.head.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> @@ -398,8 +396,10 @@ <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> + <xsl:if test="contains($toc.params, 'toc')"> <xsl:call-template name="component.toc"/> + <xsl:call-template name="component.toc.separator"/> </xsl:if> <xsl:apply-templates/> </fo:flow> @@ -420,7 +420,10 @@ <xsl:call-template name="section.heading"> <xsl:with-param name="level" select="2"/> <xsl:with-param name="title"> - <xsl:apply-templates select="." mode="title.markup"/> + <xsl:apply-templates select="." mode="object.title.markup"/> + </xsl:with-param> + <xsl:with-param name="titleabbrev"> + <xsl:apply-templates select="." mode="titleabbrev.markup"/> </xsl:with-param> </xsl:call-template> Index: phpdoc/xsl/docbook/fo/division.xsl diff -u phpdoc/xsl/docbook/fo/division.xsl:1.1 phpdoc/xsl/docbook/fo/division.xsl:1.2 --- phpdoc/xsl/docbook/fo/division.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/division.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: division.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: division.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -43,34 +43,49 @@ <!-- ==================================================================== --> <xsl:template match="set"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <xsl:variable name="preamble" select="*[not(self::book or self::setindex)]"/> + <xsl:variable name="content" select="book|setindex"/> - <xsl:variable name="id"> - <xsl:call-template name="object.id"/> + <xsl:variable name="titlepage-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'titlepage'"/> + </xsl:call-template> </xsl:variable> - <xsl:variable name="master-reference"> - <xsl:call-template name="select.pagemaster"/> + + <xsl:variable name="lot-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'lot'"/> + </xsl:call-template> </xsl:variable> <xsl:if test="$preamble"> <fo:page-sequence id="{$id}" hyphenate="{$hyphenate}" - master-reference="{$master-reference}"> + master-reference="{$titlepage-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="set.titlepage"/> </fo:flow> @@ -82,23 +97,31 @@ <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> + <xsl:if test="contains($toc.params, 'toc')"> <fo:page-sequence hyphenate="{$hyphenate}" format="i" - master-reference="{$master-reference}"> + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="set.toc"/> </fo:flow> @@ -115,36 +138,53 @@ <!-- ==================================================================== --> <xsl:template match="book"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <xsl:variable name="preamble" select="title|subtitle|titleabbrev|bookinfo"/> + <xsl:variable name="content" select="*[not(self::title or self::subtitle or self::titleabbrev or self::bookinfo)]"/> - <xsl:variable name="id"> - <xsl:call-template name="object.id"/> + + <xsl:variable name="titlepage-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'titlepage'"/> + </xsl:call-template> </xsl:variable> - <xsl:variable name="master-reference"> - <xsl:call-template name="select.pagemaster"/> + + <xsl:variable name="lot-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'lot'"/> + </xsl:call-template> </xsl:variable> <xsl:if test="$preamble"> <fo:page-sequence id="{$id}" hyphenate="{$hyphenate}" - master-reference="{$master-reference}"> + master-reference="{$titlepage-master-reference}" + initial-page-number="1"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="book.titlepage"/> </fo:flow> @@ -158,23 +198,33 @@ <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> + <xsl:if test="contains($toc.params, 'toc')"> <fo:page-sequence hyphenate="{$hyphenate}" format="i" - master-reference="{$master-reference}"> + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'TableofContents'"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'TableofContents'"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="division.toc"/> </fo:flow> @@ -184,20 +234,29 @@ <xsl:if test="contains($toc.params,'figure') and .//figure"> <fo:page-sequence hyphenate="{$hyphenate}" format="i" - master-reference="{$master-reference}"> + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofFigures'"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofFigures'"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'figure'"/> @@ -210,20 +269,29 @@ <xsl:if test="contains($toc.params,'table') and .//table"> <fo:page-sequence hyphenate="{$hyphenate}" format="i" - master-reference="{$master-reference}"> + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofTables'"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofTables'"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'table'"/> @@ -236,20 +304,29 @@ <xsl:if test="contains($toc.params,'example') and .//example"> <fo:page-sequence hyphenate="{$hyphenate}" format="i" - master-reference="{$master-reference}"> + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofExamples'"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofExamples'"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'example'"/> @@ -262,123 +339,210 @@ <xsl:if test="contains($toc.params,'equation') and .//equation"> <fo:page-sequence hyphenate="{$hyphenate}" format="i" - master-reference="{$master-reference}"> + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofEquations'"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofEquations'"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'equation'"/> - <xsl:with-param name="nodes" select=".//equation"/> + <xsl:with-param name="nodes" select=".//equation[title]"/> </xsl:call-template> </fo:flow> </fo:page-sequence> </xsl:if> - <xsl:apply-templates select="$content"/> -</xsl:template> - -<xsl:template match="book/bookinfo"></xsl:template> -<xsl:template match="book/title"></xsl:template> -<xsl:template match="book/subtitle"></xsl:template> - -<!-- ==================================================================== --> - -<xsl:template match="part"> - <xsl:if test="not(partintro)"> - <xsl:variable name="id"> - <xsl:call-template name="object.id"/> - </xsl:variable> - <xsl:variable name="master-reference"> - <xsl:call-template name="select.pagemaster"/> - </xsl:variable> - - <fo:page-sequence id="{$id}" - hyphenate="{$hyphenate}" - master-reference="{$master-reference}"> + <xsl:if test="contains($toc.params,'procedure') and .//procedure"> + <fo:page-sequence hyphenate="{$hyphenate}" + format="i" + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> - - <!-- if there is a preceding chapter or part, page numbering will already --> - <!-- be adjusted, otherwise restart the page numbers --> - <xsl:if test="not(preceding::chapter) and not(preceding::part)"> - <xsl:attribute name="initial-page-number">1</xsl:attribute> - </xsl:if> - + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofProcedures'"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofProcedures'"/> </xsl:apply-templates> <fo:flow flow-name="xsl-region-body"> - <xsl:call-template name="part.titlepage"/> + <xsl:call-template name="list.of.titles"> + <xsl:with-param name="titles" select="'procedure'"/> + <xsl:with-param name="nodes" select=".//procedure[title]"/> + </xsl:call-template> </fo:flow> </fo:page-sequence> </xsl:if> + + <xsl:apply-templates select="$content"/> +</xsl:template> + +<xsl:template match="book/bookinfo"></xsl:template> +<xsl:template match="book/title"></xsl:template> +<xsl:template match="book/subtitle"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="part"> + <xsl:if test="not(partintro)"> + <xsl:apply-templates select="." mode="part.titlepage.mode"/> + <xsl:call-template name="generate.part.toc"/> + </xsl:if> <xsl:apply-templates/> </xsl:template> <xsl:template match="part" mode="part.titlepage.mode"> <!-- done this way to force the context node to be the part --> - <xsl:call-template name="part.titlepage"/> -</xsl:template> - -<xsl:template match="part/docinfo|partinfo"></xsl:template> -<xsl:template match="part/title"></xsl:template> -<xsl:template match="part/subtitle"></xsl:template> + <xsl:param name="additional.content"/> -<xsl:template match="part/partintro"> <xsl:variable name="id"> - <xsl:call-template name="object.id"> - <xsl:with-param name="object" select="ancestor::part"/> - </xsl:call-template> + <xsl:call-template name="object.id"/> </xsl:variable> - <xsl:variable name="master-reference"> - <xsl:call-template name="select.pagemaster"/> + + <xsl:variable name="titlepage-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'titlepage'"/> + </xsl:call-template> </xsl:variable> <fo:page-sequence id="{$id}" hyphenate="{$hyphenate}" - master-reference="{$master-reference}"> + master-reference="{$titlepage-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> - <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> - </xsl:if> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + + <xsl:choose> + <xsl:when test="not(preceding::chapter) + and not(preceding::part)"> + <!-- if there is a preceding chapter or part, page numbering will already --> + <!-- be adjusted, otherwise restart the page numbers --> + <xsl:attribute name="initial-page-number">1</xsl:attribute> + </xsl:when> + <xsl:when test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:when> + </xsl:choose> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> </xsl:apply-templates> <fo:flow flow-name="xsl-region-body"> - <xsl:apply-templates select=".." mode="part.titlepage.mode"/> + <xsl:call-template name="part.titlepage"/> + <xsl:copy-of select="$additional.content"/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="part/docinfo|partinfo"></xsl:template> +<xsl:template match="part/title"></xsl:template> +<xsl:template match="part/subtitle"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="generate.part.toc"> + <xsl:param name="part" select="."/> + + <xsl:variable name="lot-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'lot'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="node" select="$part"/> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc')"> + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$lot-master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:if test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:if> + + <xsl:apply-templates select="$part" mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + </xsl:apply-templates> + + <xsl:apply-templates select="$part" mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="division.toc"> + <xsl:with-param name="toc-context" select="$part"/> + </xsl:call-template> + </fo:flow> + </fo:page-sequence> + </xsl:if> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="part/partintro"> + <xsl:apply-templates select=".." mode="part.titlepage.mode"> + <xsl:with-param name="additional.content"> <xsl:if test="title"> <xsl:call-template name="partintro.titlepage"/> </xsl:if> <xsl:apply-templates/> - </fo:flow> - </fo:page-sequence> + </xsl:with-param> + </xsl:apply-templates> + + <xsl:call-template name="generate.part.toc"> + <xsl:with-param name="part" select=".."/> + </xsl:call-template> </xsl:template> <xsl:template match="partintro/title"></xsl:template> Index: phpdoc/xsl/docbook/fo/docbook.xsl diff -u phpdoc/xsl/docbook/fo/docbook.xsl:1.1 phpdoc/xsl/docbook/fo/docbook.xsl:1.2 --- phpdoc/xsl/docbook/fo/docbook.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/docbook.xsl Sun Mar 9 09:54:48 2003 @@ -11,7 +11,7 @@ <xsl:output method="xml" indent="no"/> <!-- ******************************************************************** - $Id: docbook.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: docbook.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -80,7 +80,12 @@ <xsl:template match="*"> <xsl:message> <xsl:value-of select="name(.)"/> - <xsl:text> encountered, but no template matches.</xsl:text> + <xsl:text> encountered</xsl:text> + <xsl:if test="parent::*"> + <xsl:text> in </xsl:text> + <xsl:value-of select="name(parent::*)"/> + </xsl:if> + <xsl:text>, but no template matches.</xsl:text> </xsl:message> <fo:block color="red"> <xsl:text><</xsl:text> @@ -94,19 +99,10 @@ </xsl:template> <xsl:template match="/"> - <xsl:message> - <xsl:text>Making </xsl:text> - <xsl:value-of select="$page.orientation"/> - <xsl:text> pages on </xsl:text> - <xsl:value-of select="$paper.type"/> - <xsl:text> paper (</xsl:text> - <xsl:value-of select="$page.width"/> - <xsl:text>x</xsl:text> - <xsl:value-of select="$page.height"/> - <xsl:text>)</xsl:text> - </xsl:message> + <xsl:call-template name="root.messages"/> <xsl:variable name="document.element" select="*[1]"/> + <xsl:variable name="title"> <xsl:choose> <xsl:when test="$document.element/title[1]"> @@ -177,6 +173,23 @@ </xsl:choose> </fo:root> +</xsl:template> + + +<xsl:template name="root.messages"> + <!-- redefine this any way you'd like to output messages --> + <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE --> + <xsl:message> + <xsl:text>Making </xsl:text> + <xsl:value-of select="$page.orientation"/> + <xsl:text> pages on </xsl:text> + <xsl:value-of select="$paper.type"/> + <xsl:text> paper (</xsl:text> + <xsl:value-of select="$page.width"/> + <xsl:text>x</xsl:text> + <xsl:value-of select="$page.height"/> + <xsl:text>)</xsl:text> + </xsl:message> </xsl:template> <!-- ==================================================================== --> Index: phpdoc/xsl/docbook/fo/ebnf.xsl diff -u phpdoc/xsl/docbook/fo/ebnf.xsl:1.1 phpdoc/xsl/docbook/fo/ebnf.xsl:1.2 --- phpdoc/xsl/docbook/fo/ebnf.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/ebnf.xsl Sun Mar 9 09:54:48 2003 @@ -6,7 +6,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: ebnf.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: ebnf.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -18,7 +18,7 @@ <doc:reference xmlns=""> <referenceinfo> <releaseinfo role="meta"> -$Id: ebnf.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ +$Id: ebnf.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ </releaseinfo> <author><surname>Walsh</surname> <firstname>Norman</firstname></author> Index: phpdoc/xsl/docbook/fo/fo-patch-for-fop.xsl diff -u phpdoc/xsl/docbook/fo/fo-patch-for-fop.xsl:1.1 phpdoc/xsl/docbook/fo/fo-patch-for-fop.xsl:1.2 --- phpdoc/xsl/docbook/fo/fo-patch-for-fop.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/fo-patch-for-fop.xsl Sun Mar 9 09:54:48 2003 @@ -4,6 +4,16 @@ xmlns:fox="http://xml.apache.org/fop/extensions" version="1.0"> +<!-- ******************************************************************** + $Id: fo-patch-for-fop.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + and other information. + + ******************************************************************** --> + <xsl:output method="xml"/> <xsl:template match="*"> Index: phpdoc/xsl/docbook/fo/fo-rtf.xsl diff -u phpdoc/xsl/docbook/fo/fo-rtf.xsl:1.1 phpdoc/xsl/docbook/fo/fo-rtf.xsl:1.2 --- phpdoc/xsl/docbook/fo/fo-rtf.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/fo-rtf.xsl Sun Mar 9 09:54:48 2003 @@ -6,6 +6,16 @@ exclude-result-prefixes="exsl set" version="1.0"> +<!-- ******************************************************************** + $Id: fo-rtf.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + and other information. + + ******************************************************************** --> + <!-- This module contains templates that match against FO nodes. It is used to post-process result tree fragments for some sorts of cleanup. These templates can only ever be fired by a processor that supports Index: phpdoc/xsl/docbook/fo/fo.xsl diff -u phpdoc/xsl/docbook/fo/fo.xsl:1.1 phpdoc/xsl/docbook/fo/fo.xsl:1.2 --- phpdoc/xsl/docbook/fo/fo.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/fo.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: fo.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: fo.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. Index: phpdoc/xsl/docbook/fo/footnote.xsl diff -u phpdoc/xsl/docbook/fo/footnote.xsl:1.1 phpdoc/xsl/docbook/fo/footnote.xsl:1.2 --- phpdoc/xsl/docbook/fo/footnote.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/footnote.xsl Sun Mar 9 09:54:48 2003 @@ -6,7 +6,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: footnote.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: footnote.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -61,13 +61,33 @@ <xsl:template match="footnote" mode="footnote.number"> <xsl:choose> <xsl:when test="ancestor::tgroup"> - <xsl:number level="any" from="tgroup" format="a"/> + <xsl:variable name="tfnum"> + <xsl:number level="any" from="table|informaltable" format="1"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="string-length($table.footnote.number.symbols) >= $tfnum"> + <xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/> + </xsl:when> + <xsl:otherwise> + <xsl:number level="any" from="tgroup" + format="{$table.footnote.number.format}"/> + </xsl:otherwise> + </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:variable name="pfoot" select="preceding::footnote"/> - <xsl:variable name="ptfoot" select="preceding::table//footnote - |preceding::informaltable//footnote"/> - <xsl:number value="count($pfoot) - count($ptfoot) + 1" format="1"/> + <xsl:variable name="ptfoot" select="preceding::tgroup//footnote"/> + <xsl:variable name="fnum" select="count($pfoot) - count($ptfoot) + 1"/> + + <xsl:choose> + <xsl:when test="string-length($footnote.number.symbols) >= $fnum"> + <xsl:value-of select="substring($footnote.number.symbols, $fnum, 1)"/> + </xsl:when> + <xsl:otherwise> + <xsl:number value="$fnum" format="{$footnote.number.format}"/> + </xsl:otherwise> + </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> Index: phpdoc/xsl/docbook/fo/fop.xsl diff -u phpdoc/xsl/docbook/fo/fop.xsl:1.1 phpdoc/xsl/docbook/fo/fop.xsl:1.2 --- phpdoc/xsl/docbook/fo/fop.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/fop.xsl Sun Mar 9 09:54:48 2003 @@ -5,7 +5,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: fop.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: fop.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** (c) Stephane Bline Peregrine Systems 2001 Driver file to allow pdf bookmarking (based on fop implementation). @@ -45,7 +45,7 @@ <xsl:when test="parent::*"> <fox:outline internal-destination="{$id}"> <fox:label> - <xsl:value-of select="translate($bookmark-label, $a-dia, $a-asc)"/> + <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/> </fox:label> <xsl:apply-templates select="*" mode="fop.outline"/> </fox:outline> @@ -53,7 +53,7 @@ <xsl:otherwise> <fox:outline internal-destination="{$id}"> <fox:label> - <xsl:value-of select="translate($bookmark-label, $a-dia, $a-asc)"/> + <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/> </fox:label> </fox:outline> Index: phpdoc/xsl/docbook/fo/formal.xsl diff -u phpdoc/xsl/docbook/fo/formal.xsl:1.1 phpdoc/xsl/docbook/fo/formal.xsl:1.2 --- phpdoc/xsl/docbook/fo/formal.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/formal.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: formal.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: formal.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -20,29 +20,105 @@ <xsl:call-template name="object.id"/> </xsl:variable> - <fo:block id="{$id}" - xsl:use-attribute-sets="formal.object.properties"> + <xsl:variable name="content"> <xsl:if test="$placement = 'before'"> - <xsl:call-template name="formal.object.heading"/> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> </xsl:if> <xsl:apply-templates/> <xsl:if test="$placement != 'before'"> - <xsl:call-template name="formal.object.heading"/> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> </xsl:if> - </fo:block> + </xsl:variable> + + <xsl:choose> + <xsl:when test="local-name(.) = 'figure'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="figure.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:when test="local-name(.) = 'example'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="example.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:when test="local-name(.) = 'equation'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="equation.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:when test="local-name(.) = 'table'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="table.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:when test="local-name(.) = 'procedure'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="procedure.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" + xsl:use-attribute-sets="formal.object.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template name="formal.object.heading"> - <xsl:param name="title"></xsl:param> + <xsl:param name="object" select="."/> + <xsl:param name="placement" select="'before'"/> + <fo:block xsl:use-attribute-sets="formal.title.properties"> - <xsl:apply-templates select="." mode="object.title.markup"/> + <xsl:choose> + <xsl:when test="$placement = 'before'"> + <xsl:attribute + name="keep-with-next.within-column">always</xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute + name="keep-with-previous.within-column">always</xsl:attribute> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates select="$object" mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> </fo:block> </xsl:template> <xsl:template name="informal.object"> - <fo:block> - <xsl:apply-templates/> - </fo:block> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="local-name(.) = 'equation'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="equation.properties"> + <xsl:apply-templates/> + </fo:block> + </xsl:when> + <xsl:when test="local-name(.) = 'procedure'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="procedure.properties"> + <xsl:apply-templates/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}"> + <xsl:apply-templates/> + </fo:block> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template name="semiformal.object"> @@ -76,19 +152,90 @@ </xsl:choose> </xsl:variable> - <!-- FIXME: is this too careless? --> - <xsl:choose> - <xsl:when test=".//imagedata[@align][1]"> - <fo:block text-align="{.//imagedata[@align][1]/@align}"> + <!-- Get align value from internal mediaobject --> + <xsl:variable name="align"> + <xsl:if test="mediaobject|mediaobjectco|screenshot|graphic|graphicco"> + <xsl:variable name="olist" select="mediaobject/imageobject + |mediaobject/imageobjectco + |mediaobject/videoobject + |mediaobject/audioobject + |mediaobject/textobject + + |mediaobjectco/imageobject + |mediaobjectco/imageobjectco + |mediaobjectco/videoobject + |mediaobjectco/audioobject + |mediaobjectco/textobject + + |screenshot/mediaobject/imageobject + |screenshot/mediaobject/imageobjectco + |screenshot/mediaobject/videoobject + |screenshot/mediaobject/audioobject + |screenshot/mediaobject/textobject + + |screenshot/mediaobjectco/imageobject + |screenshot/mediaobjectco/imageobjectco + |screenshot/mediaobjectco/videoobject + |screenshot/mediaobjectco/audioobject + |screenshot/mediaobjectco/textobject + + |graphic + |graphicco/graphic + |screenshot/graphic + |screenshot/graphicco/graphic"/> + + <xsl:variable name="object.index"> + <xsl:call-template name="select.mediaobject.index"> + <xsl:with-param name="olist" select="$olist"/> + <xsl:with-param name="count" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="object" select="$olist[position() = $object.index]"/> + + <xsl:value-of select="$object/imagedata[@align][1]/@align"/> + </xsl:if> + </xsl:variable> + + + <xsl:variable name="figure"> + <xsl:choose> + <xsl:when test="$align != ''"> + <fo:block> + <xsl:attribute name="text-align"> + <xsl:value-of select="$align"/> + </xsl:attribute> + <xsl:call-template name="formal.object"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:otherwise> <xsl:call-template name="formal.object"> <xsl:with-param name="placement" select="$placement"/> </xsl:call-template> - </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="@float and @float != 0"> + <fo:float> + <xsl:attribute name="float"> + <xsl:choose> + <xsl:when test="@float = 1"> + <xsl:value-of select="$default.float.class"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@float"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:copy-of select="$figure"/> + </fo:float> </xsl:when> <xsl:otherwise> - <xsl:call-template name="formal.object"> - <xsl:with-param name="placement" select="$placement"/> - </xsl:call-template> + <xsl:copy-of select="$figure"/> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -110,9 +257,46 @@ </xsl:choose> </xsl:variable> - <xsl:call-template name="formal.object"> - <xsl:with-param name="placement" select="$placement"/> - </xsl:call-template> + <!-- Get align value from internal mediaobject --> + <xsl:variable name="align"> + <xsl:if test="mediaobject"> + <xsl:variable name="olist" select="mediaobject/imageobject + |mediaobject/imageobjectco + |mediaobject/videoobject + |mediaobject/audioobject + |mediaobject/textobject"/> + + <xsl:variable name="object.index"> + <xsl:call-template name="select.mediaobject.index"> + <xsl:with-param name="olist" select="$olist"/> + <xsl:with-param name="count" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="object" select="$olist[position() = $object.index]"/> + + <xsl:value-of select="$object/imagedata[@align][1]/@align"/> + </xsl:if> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$align != ''"> + <fo:block> + <xsl:attribute name="text-align"> + <xsl:value-of select="$align"/> + </xsl:attribute> + <xsl:call-template name="formal.object"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="formal.object"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:template> <xsl:template name="table.frame"> @@ -127,63 +311,113 @@ <xsl:choose> <xsl:when test="$frame='all'"> - <xsl:attribute name="border-left-style">solid</xsl:attribute> - <xsl:attribute name="border-right-style">solid</xsl:attribute> - <xsl:attribute name="border-top-style">solid</xsl:attribute> - <xsl:attribute name="border-bottom-style">solid</xsl:attribute> + <xsl:attribute name="border-left-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-right-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-top-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> <xsl:attribute name="border-left-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> </xsl:attribute> <xsl:attribute name="border-right-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> </xsl:attribute> <xsl:attribute name="border-top-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> </xsl:attribute> <xsl:attribute name="border-bottom-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-left-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-right-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-top-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-color"> + <xsl:value-of select="$table.frame.border.color"/> </xsl:attribute> </xsl:when> <xsl:when test="$frame='bottom'"> <xsl:attribute name="border-left-style">none</xsl:attribute> <xsl:attribute name="border-right-style">none</xsl:attribute> <xsl:attribute name="border-top-style">none</xsl:attribute> - <xsl:attribute name="border-bottom-style">solid</xsl:attribute> + <xsl:attribute name="border-bottom-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> <xsl:attribute name="border-bottom-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-color"> + <xsl:value-of select="$table.frame.border.color"/> </xsl:attribute> </xsl:when> <xsl:when test="$frame='sides'"> - <xsl:attribute name="border-left-style">solid</xsl:attribute> - <xsl:attribute name="border-right-style">solid</xsl:attribute> + <xsl:attribute name="border-left-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-right-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> <xsl:attribute name="border-top-style">none</xsl:attribute> <xsl:attribute name="border-bottom-style">none</xsl:attribute> <xsl:attribute name="border-left-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> </xsl:attribute> <xsl:attribute name="border-right-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-left-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-right-color"> + <xsl:value-of select="$table.frame.border.color"/> </xsl:attribute> </xsl:when> <xsl:when test="$frame='top'"> <xsl:attribute name="border-left-style">none</xsl:attribute> <xsl:attribute name="border-right-style">none</xsl:attribute> - <xsl:attribute name="border-top-style">solid</xsl:attribute> + <xsl:attribute name="border-top-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> <xsl:attribute name="border-bottom-style">none</xsl:attribute> <xsl:attribute name="border-top-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-top-color"> + <xsl:value-of select="$table.frame.border.color"/> </xsl:attribute> </xsl:when> <xsl:when test="$frame='topbot'"> <xsl:attribute name="border-left-style">none</xsl:attribute> <xsl:attribute name="border-right-style">none</xsl:attribute> - <xsl:attribute name="border-top-style">solid</xsl:attribute> - <xsl:attribute name="border-bottom-style">solid</xsl:attribute> + <xsl:attribute name="border-top-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> <xsl:attribute name="border-top-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> </xsl:attribute> <xsl:attribute name="border-bottom-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-top-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-color"> + <xsl:value-of select="$table.frame.border.color"/> </xsl:attribute> </xsl:when> <xsl:when test="$frame='none'"> @@ -226,39 +460,62 @@ </xsl:choose> </xsl:variable> - <xsl:variable name="prop-columns" - select=".//colspec[contains(@colwidth, '*')]"/> - <xsl:variable name="table.content"> <fo:block id="{$id}" - xsl:use-attribute-sets="formal.object.properties" - keep-together.within-column="1"> + xsl:use-attribute-sets="formal.object.properties"> <xsl:if test="$placement = 'before'"> - <xsl:call-template name="formal.object.heading"/> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> </xsl:if> - <fo:table border-collapse="collapse"> - <xsl:call-template name="table.frame"/> - <xsl:if test="count($prop-columns) != 0"> - <xsl:attribute name="table-layout">fixed</xsl:attribute> - </xsl:if> - <xsl:apply-templates select="tgroup"/> - </fo:table> + <xsl:for-each select="tgroup"> + <xsl:variable name="prop-columns" + select=".//colspec[contains(@colwidth, '*')]"/> + <fo:table border-collapse="collapse"> + <xsl:call-template name="table.frame"/> + <xsl:if test="following-sibling::tgroup"> + <xsl:attribute name="border-bottom-width">0pt</xsl:attribute> + <xsl:attribute name="border-bottom-style">none</xsl:attribute> + <xsl:attribute name="padding-bottom">0pt</xsl:attribute> + <xsl:attribute name="margin-bottom">0pt</xsl:attribute> + <xsl:attribute name="space-after">0pt</xsl:attribute> + <xsl:attribute name="space-after.minimum">0pt</xsl:attribute> + <xsl:attribute name="space-after.optimum">0pt</xsl:attribute> + <xsl:attribute name="space-after.maximum">0pt</xsl:attribute> + </xsl:if> + <xsl:if test="preceding-sibling::tgroup"> + <xsl:attribute name="border-top-width">0pt</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="padding-top">0pt</xsl:attribute> + <xsl:attribute name="margin-top">0pt</xsl:attribute> + <xsl:attribute name="space-before">0pt</xsl:attribute> + <xsl:attribute name="space-before.minimum">0pt</xsl:attribute> + <xsl:attribute name="space-before.optimum">0pt</xsl:attribute> + <xsl:attribute name="space-before.maximum">0pt</xsl:attribute> + </xsl:if> + <xsl:if test="count($prop-columns) != 0"> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + </xsl:if> + <xsl:apply-templates select="."/> + </fo:table> + </xsl:for-each> <xsl:if test="$placement != 'before'"> - <xsl:call-template name="formal.object.heading"/> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> </xsl:if> </fo:block> </xsl:variable> <xsl:variable name="footnotes"> - <xsl:if test=".//footnote"> + <xsl:if test="tgroup//footnote"> <fo:block font-family="{$body.font.family}" font-size="{$footnote.font.size}" - keep-together.within-column="1" keep-with-previous="always"> - <xsl:apply-templates select=".//footnote" mode="table.footnote.mode"/> + <xsl:apply-templates select="tgroup//footnote" mode="table.footnote.mode"/> </fo:block> </xsl:if> </xsl:variable> @@ -316,10 +573,14 @@ </xsl:template> <xsl:template match="figure/title"></xsl:template> +<xsl:template match="figure/titleabbrev"></xsl:template> <xsl:template match="table/title"></xsl:template> +<xsl:template match="table/titleabbrev"></xsl:template> <xsl:template match="table/textobject"></xsl:template> <xsl:template match="example/title"></xsl:template> +<xsl:template match="example/titleabbrev"></xsl:template> <xsl:template match="equation/title"></xsl:template> +<xsl:template match="equation/titleabbrev"></xsl:template> <xsl:template match="informalfigure"> <xsl:call-template name="informal.object"/> @@ -333,28 +594,49 @@ <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> - <xsl:variable name="prop-columns" - select=".//colspec[contains(@colwidth, '*')]"/> <xsl:variable name="table.content"> - <fo:table id="{$id}" - border-collapse="collapse" - xsl:use-attribute-sets="informal.object.properties"> - <xsl:call-template name="table.frame"/> - <xsl:if test="count($prop-columns) != 0"> - <xsl:attribute name="table-layout">fixed</xsl:attribute> - </xsl:if> - <xsl:apply-templates select="tgroup"/> - </fo:table> + <xsl:for-each select="tgroup"> + <xsl:variable name="prop-columns" + select=".//colspec[contains(@colwidth, '*')]"/> + <fo:table id="{$id}" + border-collapse="collapse" + xsl:use-attribute-sets="informal.object.properties"> + <xsl:call-template name="table.frame"/> + <xsl:if test="following-sibling::tgroup"> + <xsl:attribute name="border-bottom-width">0pt</xsl:attribute> + <xsl:attribute name="border-bottom-style">none</xsl:attribute> + <xsl:attribute name="padding-bottom">0pt</xsl:attribute> + <xsl:attribute name="margin-bottom">0pt</xsl:attribute> + <xsl:attribute name="space-after">0pt</xsl:attribute> + <xsl:attribute name="space-after.minimum">0pt</xsl:attribute> + <xsl:attribute name="space-after.optimum">0pt</xsl:attribute> + <xsl:attribute name="space-after.maximum">0pt</xsl:attribute> + </xsl:if> + <xsl:if test="preceding-sibling::tgroup"> + <xsl:attribute name="border-top-width">0pt</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="padding-top">0pt</xsl:attribute> + <xsl:attribute name="margin-top">0pt</xsl:attribute> + <xsl:attribute name="space-before">0pt</xsl:attribute> + <xsl:attribute name="space-before.minimum">0pt</xsl:attribute> + <xsl:attribute name="space-before.optimum">0pt</xsl:attribute> + <xsl:attribute name="space-before.maximum">0pt</xsl:attribute> + </xsl:if> + <xsl:if test="count($prop-columns) != 0"> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + </xsl:if> + <xsl:apply-templates select="."/> + </fo:table> + </xsl:for-each> </xsl:variable> <xsl:variable name="footnotes"> - <xsl:if test=".//footnote"> + <xsl:if test="tgroup//footnote"> <fo:block font-family="{$body.font.family}" font-size="{$footnote.font.size}" - keep-together.within-column="1" keep-with-previous="always"> - <xsl:apply-templates select=".//footnote" mode="table.footnote.mode"/> + <xsl:apply-templates select="tgroup//footnote" mode="table.footnote.mode"/> </fo:block> </xsl:if> </xsl:variable> Index: phpdoc/xsl/docbook/fo/glossary.xsl diff -u phpdoc/xsl/docbook/fo/glossary.xsl:1.1 phpdoc/xsl/docbook/fo/glossary.xsl:1.2 --- phpdoc/xsl/docbook/fo/glossary.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/glossary.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: glossary.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: glossary.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -15,56 +15,99 @@ <!-- ==================================================================== --> -<xsl:variable name="glossterm-width">2in</xsl:variable> -<xsl:variable name="glossterm-sep">0.25in</xsl:variable> - -<!-- ==================================================================== --> - <xsl:template match="glossary"> - <xsl:variable name="divs" select="glossdiv"/> - <xsl:variable name="entries" select="glossentry"/> - <xsl:variable name="preamble" - select="*[not(self::title - or self::subtitle - or self::glossdiv - or self::glossentry)]"/> - <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> - <fo:block id="{$id}"> - <xsl:call-template name="component.separator"/> + <xsl:call-template name="make-glossary"/> + </fo:block> +</xsl:template> - <xsl:call-template name="glossary.titlepage"/> +<xsl:template match="glossdiv/title"/> +<xsl:template match="glossdiv/subtitle"/> +<xsl:template match="glossdiv/titleabbrev"/> - <xsl:if test="$preamble"> - <xsl:apply-templates select="$preamble"/> - </xsl:if> +<!-- ==================================================================== --> - <xsl:if test="$divs"> - <xsl:apply-templates select="$divs"/> - </xsl:if> +<xsl:template name="make-glossary"> + <xsl:param name="divs" select="glossdiv"/> + <xsl:param name="entries" select="glossentry"/> + <xsl:param name="preamble" select="*[not(self::title + or self::subtitle + or self::glossdiv + or self::glossentry)]"/> + + <xsl:variable name="presentation"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glossary-presentation'"/> + </xsl:call-template> + </xsl:variable> - <xsl:if test="$entries"> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:apply-templates select="$entries"/> - </fo:list-block> - </xsl:if> - </fo:block> -</xsl:template> + <xsl:variable name="term-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glossterm-width'"/> + </xsl:call-template> + </xsl:variable> -<xsl:template match="book/glossary"> - <xsl:variable name="divs" select="glossdiv"/> - <xsl:variable name="entries" select="glossentry"/> - <xsl:variable name="preamble" - select="*[not(self::title - or self::subtitle - or self::glossdiv - or self::glossentry)]"/> + <xsl:variable name="width"> + <xsl:choose> + <xsl:when test="$term-width = ''"> + <xsl:value-of select="$glossterm.width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$term-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:call-template name="glossary.titlepage"/> + + <xsl:if test="$preamble"> + <xsl:apply-templates select="$preamble"/> + </xsl:if> + <xsl:choose> + <xsl:when test="$presentation = 'list'"> + <xsl:apply-templates select="$divs" mode="glossary.as.list"> + <xsl:with-param name="width" select="$width"/> + </xsl:apply-templates> + <xsl:if test="$entries"> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:apply-templates select="$entries" mode="glossary.as.list"/> + </fo:list-block> + </xsl:if> + </xsl:when> + <xsl:when test="$presentation = 'blocks'"> + <xsl:apply-templates select="$divs" mode="glossary.as.blocks"/> + <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/> + </xsl:when> + <xsl:when test="$glossary.as.blocks != 0"> + <xsl:apply-templates select="$divs" mode="glossary.as.blocks"/> + <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$divs" mode="glossary.as.list"> + <xsl:with-param name="width" select="$width"/> + </xsl:apply-templates> + <xsl:if test="$entries"> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:apply-templates select="$entries" mode="glossary.as.list"/> + </fo:list-block> + </xsl:if> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="book/glossary|/glossary" priority="2"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> @@ -79,8 +122,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -91,23 +137,7 @@ </xsl:apply-templates> <fo:flow flow-name="xsl-region-body"> - <xsl:call-template name="glossary.titlepage"/> - - <xsl:if test="$preamble"> - <xsl:apply-templates select="$preamble"/> - </xsl:if> - - <xsl:if test="$divs"> - <xsl:apply-templates select="$divs"/> - </xsl:if> - - <xsl:if test="$entries"> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:apply-templates select="$entries"/> - </fo:list-block> - </xsl:if> + <xsl:call-template name="make-glossary"/> </fo:flow> </fo:page-sequence> </xsl:template> @@ -117,60 +147,329 @@ <xsl:template match="glossary/subtitle"></xsl:template> <xsl:template match="glossary/titleabbrev"></xsl:template> -<xsl:template match="glossary/title" mode="component.title.mode"> - <fo:block font-size="18pt" - font-weight="bold" - keep-with-next.within-column="always" - hyphenate="false"> - <xsl:apply-templates/> - </fo:block> +<!-- ==================================================================== --> + +<xsl:template match="glosslist"> + <xsl:variable name="presentation"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glosslist-presentation'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="term-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glossterm-width'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="width"> + <xsl:choose> + <xsl:when test="$term-width = ''"> + <xsl:value-of select="$glossterm.width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$term-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$presentation = 'list'"> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:apply-templates mode="glossary.as.list"/> + </fo:list-block> + </xsl:when> + <xsl:when test="$presentation = 'blocks'"> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:when> + <xsl:when test="$glosslist.as.blocks != 0"> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:when> + <xsl:otherwise> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:apply-templates mode="glossary.as.list"/> + </fo:list-block> + </xsl:otherwise> + </xsl:choose> </xsl:template> -<xsl:template match="glossary/subtitle" mode="component.title.mode"> - <fo:block font-size="16pt" - font-weight="bold" - font-style="italic" - keep-with-next.within-column="always" - hyphenate="false"> - <xsl:apply-templates/> +<!-- ==================================================================== --> +<!-- Glossary collection --> + +<xsl:template match="glossary[@role='auto']" priority="2"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + <xsl:if test="$glossary.collection = ''"> + <xsl:message> + <xsl:text>Warning: processing automatic glossary </xsl:text> + <xsl:text>without a glossary.collection file.</xsl:text> + </xsl:message> + </xsl:if> + + <fo:block id="{$id}"> + <xsl:call-template name="make-auto-glossary"/> </fo:block> </xsl:template> -<!-- ==================================================================== --> +<xsl:template name="make-auto-glossary"> + <xsl:param name="collection" select="document($glossary.collection, .)"/> + <xsl:param name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/> + <xsl:param name="preamble" select="*[not(self::title + or self::subtitle + or self::glossdiv + or self::glossentry)]"/> + + <xsl:variable name="presentation"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glossary-presentation'"/> + </xsl:call-template> + </xsl:variable> -<xsl:template match="glosslist"> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:apply-templates/> - </fo:list-block> + <xsl:variable name="term-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glossterm-width'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="width"> + <xsl:choose> + <xsl:when test="$term-width = ''"> + <xsl:value-of select="$glossterm.width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$term-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:if test="$glossary.collection = ''"> + <xsl:message> + <xsl:text>Warning: processing automatic glossary </xsl:text> + <xsl:text>without a glossary.collection file.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:call-template name="glossary.titlepage"/> + + <xsl:if test="$preamble"> + <xsl:apply-templates select="$preamble"/> + </xsl:if> + + <xsl:choose> + <xsl:when test="glossdiv and $collection//glossdiv"> + <xsl:for-each select="$collection//glossdiv"> + <!-- first see if there are any in this div --> + <xsl:variable name="exist.test"> + <xsl:for-each select="glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:value-of select="glossterm"/> + </xsl:if> + </xsl:for-each> + </xsl:variable> + + <xsl:if test="$exist.test != ''"> + <xsl:choose> + <xsl:when test="$presentation = 'list'"> + <xsl:apply-templates select="." mode="auto-glossary-as-list"> + <xsl:with-param name="width" select="$width"/> + <xsl:with-param name="terms" select="$terms"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="$presentation = 'blocks'"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"> + <xsl:with-param name="terms" select="$terms"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="$glossary.as.blocks != 0"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"> + <xsl:with-param name="terms" select="$terms"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="." mode="auto-glossary-as-list"> + <xsl:with-param name="width" select="$width"/> + <xsl:with-param name="terms" select="$terms"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$presentation = 'list'"> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:for-each select="$collection//glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-list"/> + </xsl:if> + </xsl:for-each> + </fo:list-block> + </xsl:when> + <xsl:when test="$presentation = 'blocks'"> + <xsl:for-each select="$collection//glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/> + </xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:when test="$glossary.as.blocks != 0"> + <xsl:for-each select="$collection//glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/> + </xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:for-each select="$collection//glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-list"/> + </xsl:if> + </xsl:for-each> + </fo:list-block> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> </xsl:template> -<!-- ==================================================================== --> +<xsl:template match="book/glossary[@role='auto']|/glossary[@role='auto']" priority="2.5"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <xsl:if test="$glossary.collection = ''"> + <xsl:message> + <xsl:text>Warning: processing automatic glossary </xsl:text> + <xsl:text>without a glossary.collection file.</xsl:text> + </xsl:message> + </xsl:if> + + <fo:page-sequence id="{$id}" + hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + <xsl:if test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:if> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="make-auto-glossary"/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="glossdiv" mode="auto-glossary-as-list"> + <xsl:param name="width" select="$glossterm.width"/> + <xsl:param name="terms" select="."/> -<xsl:template match="glossdiv"> - <xsl:variable name="entries" select="glossentry"/> <xsl:variable name="preamble" select="*[not(self::title or self::subtitle or self::glossentry)]"/> - <xsl:apply-templates select="title|subtitle"/> + <xsl:call-template name="glossdiv.titlepage"/> + <xsl:apply-templates select="$preamble"/> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" + + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" xsl:use-attribute-sets="normal.para.spacing"> - <xsl:apply-templates select="$entries"/> + <xsl:for-each select="glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-list"/> + </xsl:if> + </xsl:for-each> </fo:list-block> </xsl:template> -<xsl:template match="glossdiv/title"> - <fo:block font-size="16pt" font-weight="bold"> - <xsl:apply-templates/> - </fo:block> +<xsl:template match="glossentry" mode="auto-glossary-as-list"> + <xsl:apply-templates select="." mode="glossary.as.list"/> +</xsl:template> + +<xsl:template match="glossdiv" mode="auto-glossary-as-blocks"> + <xsl:param name="terms" select="."/> + + <xsl:variable name="preamble" + select="*[not(self::title + or self::subtitle + or self::glossentry)]"/> + + <xsl:call-template name="glossdiv.titlepage"/> + + <xsl:apply-templates select="$preamble"/> + + <xsl:for-each select="glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/> + </xsl:if> + </xsl:for-each> +</xsl:template> + +<xsl:template match="glossentry" mode="auto-glossary-as-blocks"> + <xsl:apply-templates select="." mode="glossary.as.blocks"/> </xsl:template> <!-- ==================================================================== --> +<!-- Format glossary as a list --> + +<xsl:template match="glossdiv" mode="glossary.as.list"> + <xsl:param name="width" select="$glossterm.width"/> + + <xsl:variable name="entries" select="glossentry"/> + <xsl:variable name="preamble" + select="*[not(self::title + or self::subtitle + or self::glossentry)]"/> + + <xsl:call-template name="glossdiv.titlepage"/> + + <xsl:apply-templates select="$preamble"/> + + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:apply-templates select="$entries" mode="glossary.as.list"/> + </fo:list-block> +</xsl:template> <!-- GlossEntry ::= @@ -180,7 +479,7 @@ (GlossSee | GlossDef+) --> -<xsl:template match="glossentry"> +<xsl:template match="glossentry" mode="glossary.as.list"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> @@ -195,82 +494,133 @@ </xsl:choose> </xsl:with-param> </xsl:call-template> - <xsl:apply-templates/> + + <fo:list-item-label end-indent="label-end()"> + <fo:block> + <xsl:choose> + <xsl:when test="$glossentry.show.acronym = 'primary'"> + <xsl:choose> + <xsl:when test="acronym|abbrev"> + <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.list"/> + <xsl:text> (</xsl:text> + <xsl:apply-templates select="glossterm" mode="glossary.as.list"/> + <xsl:text>)</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossterm" mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:when test="$glossentry.show.acronym = 'yes'"> + <xsl:apply-templates select="glossterm" mode="glossary.as.list"/> + + <xsl:if test="acronym|abbrev"> + <xsl:text> (</xsl:text> + <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.list"/> + <xsl:text>)</xsl:text> + </xsl:if> + </xsl:when> + + <xsl:otherwise> + <xsl:apply-templates select="glossterm" mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates select="indexterm"/> + </fo:block> + </fo:list-item-label> + + <fo:list-item-body start-indent="body-start()"> + <xsl:apply-templates select="glosssee|glossdef" mode="glossary.as.list"/> + </fo:list-item-body> </fo:list-item> </xsl:template> -<xsl:template match="glossentry/glossterm"> - <fo:list-item-label end-indent="label-end()"> - <fo:block> - <xsl:apply-templates/> - </fo:block> - </fo:list-item-label> +<xsl:template match="glossentry/glossterm" mode="glossary.as.list"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::glossterm">, </xsl:if> </xsl:template> -<xsl:template match="glossentry/acronym"> +<xsl:template match="glossentry/acronym" mode="glossary.as.list"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if> </xsl:template> -<xsl:template match="glossentry/abbrev"> +<xsl:template match="glossentry/abbrev" mode="glossary.as.list"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if> </xsl:template> -<xsl:template match="glossentry/revhistory"> +<xsl:template match="glossentry/revhistory" mode="glossary.as.list"> </xsl:template> -<xsl:template match="glossentry/glosssee"> +<xsl:template match="glossentry/glosssee" mode="glossary.as.list"> <xsl:variable name="otherterm" select="@otherterm"/> <xsl:variable name="targets" select="//node()[@id=$otherterm]"/> <xsl:variable name="target" select="$targets[1]"/> - <fo:list-item-body start-indent="body-start()"> + + <fo:block> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'glossary'"/> + <xsl:with-param name="name" select="'see'"/> + </xsl:call-template> + <xsl:choose> + <xsl:when test="$target"> + <xsl:apply-templates select="$target" mode="xref"/> + </xsl:when> + <xsl:when test="$otherterm != '' and not($target)"> + <xsl:message> + <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text> + <xsl:value-of select="$otherterm"/> + </xsl:message> + <xsl:apply-templates mode="glossary.as.list"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + <xsl:text>.</xsl:text> + </fo:block> +</xsl:template> + +<xsl:template match="glossentry/glossdef" mode="glossary.as.list"> + <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/> + <xsl:if test="glossseealso"> <fo:block> <xsl:call-template name="gentext.template"> <xsl:with-param name="context" select="'glossary'"/> - <xsl:with-param name="name" select="'see'"/> + <xsl:with-param name="name" select="'seealso'"/> </xsl:call-template> - <xsl:choose> - <xsl:when test="@otherterm"> - <xsl:apply-templates select="$target" mode="xref"/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates/> - </xsl:otherwise> - </xsl:choose> - <xsl:text>.</xsl:text> + <xsl:apply-templates select="glossseealso" mode="glossary.as.list"/> </fo:block> - </fo:list-item-body> -</xsl:template> - -<xsl:template match="glossentry/glossdef"> - <fo:list-item-body start-indent="body-start()"> - <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/> - <xsl:if test="glossseealso"> - <fo:block> - <xsl:call-template name="gentext.template"> - <xsl:with-param name="context" select="'glossary'"/> - <xsl:with-param name="name" select="'seealso'"/> - </xsl:call-template> - <xsl:apply-templates select="glossseealso"/> - </fo:block> - </xsl:if> - </fo:list-item-body> + </xsl:if> </xsl:template> -<xsl:template match="glossentry/glossdef/para[1]"> +<xsl:template match="glossentry/glossdef/para[1]|glossentry/glossdef/simpara[1]" + mode="glossary.as.list"> <fo:block> <xsl:apply-templates/> </fo:block> </xsl:template> -<xsl:template match="glossseealso"> +<xsl:template match="glossseealso" mode="glossary.as.list"> <xsl:variable name="otherterm" select="@otherterm"/> <xsl:variable name="targets" select="//node()[@id=$otherterm]"/> <xsl:variable name="target" select="$targets[1]"/> <xsl:choose> - <xsl:when test="@otherterm"> + <xsl:when test="$target"> <xsl:apply-templates select="$target" mode="xref"/> </xsl:when> + <xsl:when test="$otherterm != '' and not($target)"> + <xsl:message> + <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text> + <xsl:value-of select="$otherterm"/> + </xsl:message> + <xsl:apply-templates mode="glossary.as.list"/> + </xsl:when> <xsl:otherwise> - <xsl:apply-templates/> + <xsl:apply-templates mode="glossary.as.list"/> </xsl:otherwise> </xsl:choose> @@ -285,216 +635,175 @@ </xsl:template> <!-- ==================================================================== --> +<!-- Format glossary blocks --> -<xsl:template match="glossentry" mode="xref"> - <xsl:apply-templates select="./glossterm[1]" mode="xref"/> -</xsl:template> - -<xsl:template match="glossterm" mode="xref"> - <xsl:variable name="id"> - <xsl:call-template name="object.id"> - <xsl:with-param name="object" select="parent::glossentry"/> - </xsl:call-template> - </xsl:variable> - - <fo:basic-link internal-destination="{$id}" - xsl:use-attribute-sets="xref.properties"> - <xsl:apply-templates/> - <xsl:call-template name="insert.page.citation"> - <xsl:with-param name="id" select="$id"/> - </xsl:call-template> - </fo:basic-link> -</xsl:template> - - -<!-- ==================================================================== --> - -<!-- Glossary collection --> - -<xsl:template match="glossary[@role='auto']" priority="2"> - <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> - <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/> - <xsl:variable name="collection" select="document($glossary.collection, .)"/> - +<xsl:template match="glossdiv" mode="glossary.as.blocks"> + <xsl:variable name="entries" select="glossentry"/> <xsl:variable name="preamble" select="*[not(self::title or self::subtitle - or self::glossdiv or self::glossentry)]"/> - <xsl:if test="$glossary.collection = ''"> - <xsl:message> - <xsl:text>Warning: processing automatic glossary </xsl:text> - <xsl:text>without a glossary.collection file.</xsl:text> - </xsl:message> - </xsl:if> + <xsl:call-template name="glossdiv.titlepage"/> - <fo:block id="{$id}"> - <xsl:call-template name="component.separator"/> + <xsl:apply-templates select="$preamble"/> - <xsl:call-template name="glossary.titlepage"/> + <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/> +</xsl:template> - <xsl:if test="$preamble"> - <xsl:apply-templates select="$preamble"/> - </xsl:if> +<!-- +GlossEntry ::= + GlossTerm, Acronym?, Abbrev?, + (IndexTerm)*, + RevHistory?, + (GlossSee | GlossDef+) +--> + +<xsl:template match="glossentry" mode="glossary.as.blocks"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block xsl:use-attribute-sets="list.block.spacing"> + <xsl:call-template name="anchor"> + <xsl:with-param name="conditional"> + <xsl:choose> + <xsl:when test="$glossterm.auto.link != 0 + or $glossary.collection != ''">0</xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> <xsl:choose> - <xsl:when test="glossdiv and $collection//glossdiv"> - <xsl:for-each select="$collection//glossdiv"> - <!-- first see if there are any in this div --> - <xsl:variable name="exist.test"> - <xsl:for-each select="glossentry"> - <xsl:variable name="cterm" select="glossterm"/> - <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> - <xsl:value-of select="glossterm"/> - </xsl:if> - </xsl:for-each> - </xsl:variable> + <xsl:when test="$glossentry.show.acronym = 'primary'"> + <xsl:choose> + <xsl:when test="acronym|abbrev"> + <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.blocks"/> + <xsl:text> (</xsl:text> + <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/> + <xsl:text>)</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:when test="$glossentry.show.acronym = 'yes'"> + <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/> - <xsl:if test="$exist.test != ''"> - <xsl:apply-templates select="." mode="auto-glossary"> - <xsl:with-param name="terms" select="$terms"/> - </xsl:apply-templates> - </xsl:if> - </xsl:for-each> + <xsl:if test="acronym|abbrev"> + <xsl:text> (</xsl:text> + <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.blocks"/> + <xsl:text>)</xsl:text> + </xsl:if> </xsl:when> + <xsl:otherwise> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:for-each select="$collection//glossentry"> - <xsl:variable name="cterm" select="glossterm"/> - <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> - <xsl:apply-templates select="." mode="auto-glossary"/> - </xsl:if> - </xsl:for-each> - </fo:list-block> + <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/> </xsl:otherwise> </xsl:choose> - </fo:block> -</xsl:template> - -<xsl:template match="book/glossary[@role='auto']" priority="2.5"> - <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> - <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/> - <xsl:variable name="collection" select="document($glossary.collection, .)"/> - <xsl:variable name="preamble" - select="*[not(self::title - or self::subtitle - or self::glossdiv - or self::glossentry)]"/> - - <xsl:variable name="master-reference"> - <xsl:call-template name="select.pagemaster"/> - </xsl:variable> + <xsl:apply-templates select="indexterm"/> + </fo:block> - <xsl:if test="$glossary.collection = ''"> - <xsl:message> - <xsl:text>Warning: processing automatic glossary </xsl:text> - <xsl:text>without a glossary.collection file.</xsl:text> - </xsl:message> - </xsl:if> + <fo:block margin-left="0.25in"> + <xsl:apply-templates select="glosssee|glossdef" mode="glossary.as.blocks"/> + </fo:block> +</xsl:template> - <fo:page-sequence id="{$id}" - hyphenate="{$hyphenate}" - master-reference="{$master-reference}"> - <xsl:attribute name="language"> - <xsl:call-template name="l10n.language"/> - </xsl:attribute> - <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> - </xsl:if> +<xsl:template match="glossentry/glossterm" mode="glossary.as.blocks"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::glossterm">, </xsl:if> +</xsl:template> - <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> - </xsl:apply-templates> - <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> - </xsl:apply-templates> +<xsl:template match="glossentry/acronym" mode="glossary.as.blocks"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if> +</xsl:template> - <fo:flow flow-name="xsl-region-body"> - <fo:block id="{$id}"> - <xsl:call-template name="glossary.titlepage"/> +<xsl:template match="glossentry/abbrev" mode="glossary.as.blocks"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if> +</xsl:template> - <xsl:if test="$preamble"> - <xsl:apply-templates select="$preamble"/> - </xsl:if> +<xsl:template match="glossentry/glosssee" mode="glossary.as.blocks"> + <xsl:variable name="otherterm" select="@otherterm"/> + <xsl:variable name="targets" select="//node()[@id=$otherterm]"/> + <xsl:variable name="target" select="$targets[1]"/> - <xsl:choose> - <xsl:when test="glossdiv and $collection//glossdiv"> - <xsl:for-each select="$collection//glossdiv"> - <!-- first see if there are any in this div --> - <xsl:variable name="exist.test"> - <xsl:for-each select="glossentry"> - <xsl:variable name="cterm" select="glossterm"/> - <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> - <xsl:value-of select="glossterm"/> - </xsl:if> - </xsl:for-each> - </xsl:variable> - - <xsl:if test="$exist.test != ''"> - <xsl:apply-templates select="." mode="auto-glossary"> - <xsl:with-param name="terms" select="$terms"/> - </xsl:apply-templates> - </xsl:if> - </xsl:for-each> - </xsl:when> - <xsl:otherwise> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:for-each select="$collection//glossentry"> - <xsl:variable name="cterm" select="glossterm"/> - <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> - <xsl:apply-templates select="." mode="auto-glossary"/> - </xsl:if> - </xsl:for-each> - </fo:list-block> - </xsl:otherwise> - </xsl:choose> - </fo:block> - </fo:flow> - </fo:page-sequence> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'glossary'"/> + <xsl:with-param name="name" select="'see'"/> + </xsl:call-template> + <xsl:choose> + <xsl:when test="$target"> + <xsl:apply-templates select="$target" mode="xref"/> + </xsl:when> + <xsl:when test="$otherterm != '' and not($target)"> + <xsl:message> + <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text> + <xsl:value-of select="$otherterm"/> + </xsl:message> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + <xsl:text>.</xsl:text> </xsl:template> -<xsl:template match="*" mode="auto-glossary"> - <!-- pop back out to the default mode for most elements --> - <xsl:apply-templates select="."/> +<xsl:template match="glossentry/glossdef" mode="glossary.as.blocks"> + <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/> + <xsl:if test="glossseealso"> + <fo:block> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'glossary'"/> + <xsl:with-param name="name" select="'seealso'"/> + </xsl:call-template> + <xsl:apply-templates select="glossseealso" mode="glossary.as.blocks"/> + </fo:block> + </xsl:if> </xsl:template> -<xsl:template match="glossdiv" mode="auto-glossary"> - <xsl:param name="terms" select="."/> - - <xsl:variable name="preamble" - select="*[not(self::title - or self::subtitle - or self::glossentry)]"/> - - <xsl:apply-templates select="title|subtitle"/> - <xsl:apply-templates select="$preamble"/> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:for-each select="glossentry"> - <xsl:variable name="cterm" select="glossterm"/> - <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> - <xsl:apply-templates select="." mode="auto-glossary"/> - </xsl:if> - </xsl:for-each> - </fo:list-block> +<xsl:template match="glossentry/glossdef/para[1]|glossentry/glossdef/simpara[1]" + mode="glossary.as.blocks"> + <fo:block> + <xsl:apply-templates/> + </fo:block> </xsl:template> -<xsl:template match="glossentry" mode="auto-glossary"> - <xsl:variable name="id"> - <xsl:call-template name="object.id"/> - </xsl:variable> +<xsl:template match="glossseealso" mode="glossary.as.blocks"> + <xsl:variable name="otherterm" select="@otherterm"/> + <xsl:variable name="targets" select="//node()[@id=$otherterm]"/> + <xsl:variable name="target" select="$targets[1]"/> - <fo:list-item id="gl.{$id}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:apply-templates/> - </fo:list-item> + <xsl:choose> + <xsl:when test="$target"> + <xsl:apply-templates select="$target" mode="xref"/> + </xsl:when> + <xsl:when test="$otherterm != '' and not($target)"> + <xsl:message> + <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text> + <xsl:value-of select="$otherterm"/> + </xsl:message> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + + <xsl:choose> + <xsl:when test="position() = last()"> + <xsl:text>.</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>, </xsl:text> + </xsl:otherwise> + </xsl:choose> </xsl:template> <!-- ==================================================================== --> Index: phpdoc/xsl/docbook/fo/graphics.xsl diff -u phpdoc/xsl/docbook/fo/graphics.xsl:1.1 phpdoc/xsl/docbook/fo/graphics.xsl:1.2 --- phpdoc/xsl/docbook/fo/graphics.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/graphics.xsl Sun Mar 9 09:54:48 2003 @@ -10,7 +10,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: graphics.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: graphics.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -26,36 +26,56 @@ <!-- ==================================================================== --> <!-- Graphic format tests for the FO backend --> -<!-- -FIXME: make is.graphic.* work correctly depending on the backend! -<xsl:param name="passivetex.extensions" select="0" doc:type='boolean'/> -<xsl:param name="fop.extensions" select="0" doc:type='boolean'/> ---> +<xsl:param name="graphic.notations"> + <!-- n.b. exactly one leading space, one trailing space, and one inter-word space --> + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0"> + <xsl:text> PNG PDF JPG JPEG linespecific </xsl:text> + </xsl:when> + <xsl:when test="$fop.extensions != 0"> + <xsl:text> SVG PNG PDF JPG JPEG linespecific </xsl:text> + </xsl:when> + <xsl:when test="$arbortext.extensions != 0"> + <xsl:text> PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text> + </xsl:when> + <xsl:when test="$xep.extensions != 0"> + <xsl:text> SVG PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text> PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:param> <xsl:template name="is.graphic.format"> - <xsl:param name="format"></xsl:param> - <xsl:if test="$format = 'PNG' - or $format = 'PDF' - or $format = 'JPG' - or $format = 'JPEG' - or $format = 'linespecific' - or $format = 'GIF' - or $format = 'GIF87a' - or $format = 'GIF89a' - or $format = 'TIFF' - or $format = 'BMP'">1</xsl:if> + <xsl:param name="format"/> + <xsl:if test="contains($graphic.notations, concat(' ',$format,' '))">1</xsl:if> </xsl:template> +<xsl:param name="graphic.extensions"> + <!-- n.b. exactly one leading space, one trailing space, and one inter-word space --> + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0"> + <xsl:text> png pdf jpg jpeg </xsl:text> + </xsl:when> + <xsl:when test="$fop.extensions != 0"> + <xsl:text> svg png pdf jpg jpeg </xsl:text> + </xsl:when> + <xsl:when test="$arbortext.extensions != 0"> + <xsl:text> png pdf jpg jpeg gif tif tiff bmp </xsl:text> + </xsl:when> + <xsl:when test="$xep.extensions != 0"> + <xsl:text> svg png pdf jpg jpeg gif tif tiff bmp </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text> png pdf jpg jpeg gif tif tiff bmp </xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:param> + <xsl:template name="is.graphic.extension"> - <xsl:param name="ext"></xsl:param> - <xsl:if test="$ext = 'png' - or $ext = 'pdf' - or $ext = 'jpeg' - or $ext = 'jpg' - or $ext = 'gif' - or $ext = 'tif' - or $ext = 'tiff' - or $ext = 'bmp'">1</xsl:if> + <xsl:param name="ext"/> + <xsl:if test="contains($graphic.extensions, concat(' ', $ext, ' '))">1</xsl:if> </xsl:template> <!-- ==================================================================== --> @@ -73,123 +93,6 @@ <!-- Override these templates for FO --> <!-- ==================================================================== --> -<xsl:template name="X.process.image"> - <!-- When this template is called, the current node should be --> - <!-- a graphic, inlinegraphic, imagedata, or videodata. All --> - <!-- those elements have the same set of attributes, so we can --> - <!-- handle them all in one place. --> - <xsl:variable name="filename"> - <xsl:choose> - <xsl:when test="local-name(.) = 'graphic' - or local-name(.) = 'inlinegraphic'"> - <!-- handle legacy graphic and inlinegraphic by new template --> - <xsl:call-template name="mediaobject.filename"> - <xsl:with-param name="object" select="."/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <!-- imagedata, videodata, audiodata --> - <xsl:call-template name="mediaobject.filename"> - <xsl:with-param name="object" select=".."/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="scale"> - <xsl:choose> - <xsl:when test="@scale"><xsl:value-of select="@scale"/>%</xsl:when> - <xsl:otherwise>auto</xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="width"> - <xsl:choose> - <xsl:when test="@width"> - <xsl:call-template name="length-spec"> - <xsl:with-param name="length" select="@width"/> - <xsl:with-param name="default.units" select="$default.units"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise>auto</xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="height"> - <xsl:choose> - <xsl:when test="@depth"> - <xsl:call-template name="length-spec"> - <xsl:with-param name="length" select="@depth"/> - <xsl:with-param name="default.units" select="$default.units"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise>auto</xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <!-- DocBook has four attributes related to image size: width, depth, - scalefit, and scale. Width and depth identify the desired dimensions - of the image (what CALS calls the repro area dimensions). Scale - indicates the percentage by which the image should be scaled, and - scalefit indicates whether or not the actual image should be scaled - to fit the specified width and/or depth. It is illogical to specify - both scale and scalefit: scale wins. My thanks to Paul Grosso for - analyzing this situation with me. --> - - <xsl:variable name="scalefit"> - <xsl:choose> - <xsl:when test="@scalefit"> - <xsl:value-of select="@scalefit"/> - </xsl:when> - <xsl:otherwise>0</xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <!-- if scalefit != 0, set both content-height and content-width to - scale-to-fit elseif scale != auto, set both content-height and - content-width to it else set both content-height and - content-width to auto. --> - - <xsl:variable name="content-width"> - <xsl:choose> - <xsl:when test="$scale != 'auto'"> - <xsl:value-of select="$scale"/> - </xsl:when> - <xsl:when test="$scalefit != '0'">scale-to-fit</xsl:when> - <xsl:otherwise>auto</xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="content-height"> - <xsl:choose> - <xsl:when test="$scale != 'auto'"> - <xsl:value-of select="$scale"/> - </xsl:when> - <xsl:when test="$scalefit != '0'">scale-to-fit</xsl:when> - <xsl:otherwise>auto</xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:choose> - <xsl:when test="$passivetex.extensions != 0 - or $fop.extensions != 0 - or $arbortext.extensions != 0"> - <fo:external-graphic src="{$filename}" - width="{$width}" - height="{$height}" - content-width="{$content-width}" - content-height="{$content-height}"/> - </xsl:when> - <xsl:otherwise> - <fo:external-graphic src="url({$filename})" - width="{$width}" - height="{$height}" - content-width="{$content-width}" - content-height="{$content-height}"/> - </xsl:otherwise> - </xsl:choose> -</xsl:template> - <xsl:template name="process.image"> <!-- When this template is called, the current node should be --> <!-- a graphic, inlinegraphic, imagedata, or videodata. All --> @@ -198,6 +101,7 @@ <xsl:variable name="scalefit"> <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">0</xsl:when> <xsl:when test="@contentwidth or @contentdepth">0</xsl:when> <xsl:when test="@scale">0</xsl:when> <xsl:when test="@scalefit"><xsl:value-of select="@scalefit"/></xsl:when> @@ -208,6 +112,7 @@ <xsl:variable name="scale"> <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">0</xsl:when> <xsl:when test="@contentwidth or @contentdepth">1.0</xsl:when> <xsl:when test="@scale"> <xsl:value-of select="@scale div 100.0"/> @@ -244,20 +149,14 @@ <fo:external-graphic> <xsl:attribute name="src"> - <xsl:choose> - <xsl:when test="$passivetex.extensions != 0 - or $fop.extensions != 0 - or $arbortext.extensions != 0"> - <xsl:value-of select="$filename"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="concat('url(', $filename, ')')"/> - </xsl:otherwise> - </xsl:choose> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$filename"/> + </xsl:call-template> </xsl:attribute> <xsl:attribute name="width"> <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when> <xsl:when test="contains(@width,'%')"> <xsl:value-of select="@width"/> </xsl:when> @@ -273,6 +172,7 @@ <xsl:attribute name="height"> <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when> <xsl:when test="contains(@depth,'%')"> <xsl:value-of select="@depth"/> </xsl:when> @@ -288,6 +188,7 @@ <xsl:attribute name="content-width"> <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when> <xsl:when test="contains(@contentwidth,'%')"> <xsl:value-of select="@contentwidth"/> </xsl:when> @@ -297,7 +198,7 @@ <xsl:with-param name="default.units" select="'px'"/> </xsl:call-template> </xsl:when> - <xsl:when test="$scale != 1.0"> + <xsl:when test="number($scale) != 1.0"> <xsl:value-of select="$scale * 100"/> <xsl:text>%</xsl:text> </xsl:when> @@ -307,6 +208,7 @@ <xsl:attribute name="content-height"> <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when> <xsl:when test="contains(@contentdepth,'%')"> <xsl:value-of select="@contentdepth"/> </xsl:when> @@ -316,7 +218,7 @@ <xsl:with-param name="default.units" select="'px'"/> </xsl:call-template> </xsl:when> - <xsl:when test="$scale != 1.0"> + <xsl:when test="number($scale) != 1.0"> <xsl:value-of select="$scale * 100"/> <xsl:text>%</xsl:text> </xsl:when> @@ -358,6 +260,11 @@ </xsl:when> <xsl:otherwise> <fo:block> + <xsl:if test="@align"> + <xsl:attribute name="text-align"> + <xsl:value-of select="@align"/> + </xsl:attribute> + </xsl:if> <xsl:call-template name="process.image"/> </fo:block> </xsl:otherwise> @@ -412,8 +319,32 @@ <!-- ==================================================================== --> <xsl:template match="mediaobject|mediaobjectco"> + + <xsl:variable name="olist" select="imageobject|imageobjectco + |videoobject|audioobject + |textobject"/> + + <xsl:variable name="object.index"> + <xsl:call-template name="select.mediaobject.index"> + <xsl:with-param name="olist" select="$olist"/> + <xsl:with-param name="count" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="object" select="$olist[position() = $object.index]"/> + + <xsl:variable name="align"> + <xsl:value-of select="$object/imagedata[@align][1]/@align"/> + </xsl:variable> + <fo:block> - <xsl:call-template name="select.mediaobject"/> + <xsl:if test="$align != '' "> + <xsl:attribute name="text-align"> + <xsl:value-of select="$align"/> + </xsl:attribute> + </xsl:if> + + <xsl:apply-templates select="$object"/> <xsl:apply-templates select="caption"/> </fo:block> </xsl:template> @@ -430,9 +361,35 @@ </xsl:template> <xsl:template match="imageobject"> - <xsl:apply-templates select="imagedata"/> + <xsl:choose> + <xsl:when test="imagedata"> + <xsl:apply-templates select="imagedata"/> + </xsl:when> + <xsl:otherwise> + <fo:instream-foreign-object> + <xsl:apply-templates mode="copy-all"/> + </fo:instream-foreign-object> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="copy-all"> + <xsl:copy> + <xsl:for-each select="@*"> + <xsl:copy/> + </xsl:for-each> + <xsl:apply-templates mode="copy-all"/> + </xsl:copy> </xsl:template> +<xsl:template match="text()|comment()|processing-instruction()" mode="copy-all"> + <xsl:copy/> +</xsl:template> + +<!-- ==================================================================== --> + <xsl:template match="imagedata"> <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> <xsl:variable name="filename"> @@ -499,12 +456,65 @@ <xsl:apply-templates/> </xsl:template> +<xsl:template match="textdata"> + <xsl:variable name="filename"> + <xsl:choose> + <xsl:when test="@entityref"> + <xsl:value-of select="unparsed-entity-uri(@entityref)"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@fileref"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$use.extensions != '0' + and $textinsert.extension != '0'"> + <xsl:choose> + <xsl:when test="element-available('stext:insertfile')"> + <stext:insertfile href="{$filename}"/> + </xsl:when> + <xsl:when test="element-available('xtext:insertfile')"> + <xtext:insertfile href="{$filename}"/> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>No insertfile extension available.</xsl:text> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" + href="{$filename}"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + <!-- ==================================================================== --> <xsl:template match="caption"> <fo:block> <xsl:apply-templates/> </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="fo-external-image"> + <xsl:param name="filename"/> + + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0 + or $fop.extensions != 0 + or $arbortext.extensions != 0"> + <xsl:value-of select="$filename"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="concat('url(', $filename, ')')"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> </xsl:stylesheet> Index: phpdoc/xsl/docbook/fo/index.xsl diff -u phpdoc/xsl/docbook/fo/index.xsl:1.1 phpdoc/xsl/docbook/fo/index.xsl:1.2 --- phpdoc/xsl/docbook/fo/index.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/index.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: index.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: index.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -20,24 +20,41 @@ <xsl:call-template name="object.id"/> </xsl:variable> - <fo:block id="{$id}"> - <xsl:call-template name="component.separator"/> - <xsl:call-template name="index.titlepage"/> - <xsl:apply-templates/> - <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0"> - <xsl:call-template name="generate-index"/> - </xsl:if> - </fo:block> + <xsl:if test="$generate.index != 0"> + <xsl:choose> + <xsl:when test="$make.index.markup != 0"> + <fo:block> + <xsl:call-template name="generate-index-markup"> + <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}"> + <xsl:call-template name="index.titlepage"/> + <xsl:apply-templates/> + <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0"> + <xsl:call-template name="generate-index"> + <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/> + </xsl:call-template> + </xsl:if> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:if> </xsl:template> -<xsl:template match="book/index"> +<xsl:template match="book/index|part/index"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + + <xsl:if test="$generate.index != 0"> <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"> - <xsl:with-param name="column.count" - select="$column.count.of.index"/> + <xsl:with-param name="pageclass"> + <xsl:if test="$make.index.markup != 0">body</xsl:if> + </xsl:with-param> </xsl:call-template> </xsl:variable> @@ -47,8 +64,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -62,10 +82,99 @@ <xsl:call-template name="index.titlepage"/> <xsl:apply-templates/> <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0"> - <xsl:call-template name="generate-index"/> + + <xsl:choose> + <xsl:when test="$make.index.markup != 0"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + xsl:use-attribute-sets="monospace.verbatim.properties" + linefeed-treatment="preserve"> + <xsl:call-template name="generate-index-markup"> + <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:when test="indexentry|indexdiv/indexentry"> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="generate-index"> + <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </fo:flow> + </fo:page-sequence> + </xsl:if> +</xsl:template> + +<xsl:template match="setindex"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:if test="$generate.index != 0"> + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass"> + <xsl:choose> + <xsl:when test="$make.index.markup != 0">body</xsl:when> + <xsl:otherwise>index</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:variable> + + <fo:page-sequence id="{$id}" + hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + <xsl:if test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:if> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="setindex.titlepage"/> + <xsl:apply-templates/> + <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0"> + + <xsl:choose> + <xsl:when test="$make.index.markup != 0"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + xsl:use-attribute-sets="monospace.verbatim.properties" + linefeed-treatment="preserve"> + <xsl:call-template name="generate-index-markup"> + <xsl:with-param name="scope" select="/"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:when test="indexentry|indexdiv/indexentry"> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="generate-index"> + <xsl:with-param name="scope" select="/"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> </xsl:if> </fo:flow> </fo:page-sequence> + </xsl:if> </xsl:template> <xsl:template match="index/title"></xsl:template> @@ -74,23 +183,42 @@ <!-- ==================================================================== --> -<xsl:template match="indexdiv"> - <fo:block> - <xsl:apply-templates/> +<xsl:template name="indexdiv.title"> + <xsl:param name="title"/> + <xsl:param name="titlecontent"/> + + <fo:block margin-left="{$title.margin.left}" + font-size="14.4pt" + font-family="{$title.font.family}" + font-weight="bold" + keep-with-next.within-column="always" + space-before.optimum="{$body.font.master}pt" + space-before.minimum="{$body.font.master * 0.8}pt" + space-before.maximum="{$body.font.master * 1.2}pt"> + <xsl:choose> + <xsl:when test="$title"> + <xsl:apply-templates select="$title" mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$titlecontent"/> + </xsl:otherwise> + </xsl:choose> </fo:block> </xsl:template> -<xsl:template match="indexdiv/title"> - <xsl:variable name="id"> - <xsl:call-template name="object.id"> - <xsl:with-param name="object" select=".."/> - </xsl:call-template> - </xsl:variable> - <fo:block font-size="16pt" font-weight="bold"> +<xsl:template match="indexdiv"> + <fo:block> + <xsl:call-template name="indexdiv.titlepage"/> <xsl:apply-templates/> </fo:block> </xsl:template> +<xsl:template match="indexdiv/title"/> +<xsl:template match="indexdiv/subtitle"/> +<xsl:template match="indexdiv/titleabbrev"/> + <!-- ==================================================================== --> <xsl:template match="indexterm"> @@ -99,20 +227,100 @@ <xsl:call-template name="object.id"/> </xsl:attribute> <xsl:comment> - <xsl:value-of select="primary"/> - <xsl:if test="secondary"> - <xsl:text>, </xsl:text> - <xsl:value-of select="secondary"/> - </xsl:if> - <xsl:if test="tertiary"> - <xsl:text>, </xsl:text> - <xsl:value-of select="tertiary"/> - </xsl:if> + <xsl:call-template name="comment-escape-string"> + <xsl:with-param name="string"> + <xsl:value-of select="primary"/> + <xsl:if test="secondary"> + <xsl:text>, </xsl:text> + <xsl:value-of select="secondary"/> + </xsl:if> + <xsl:if test="tertiary"> + <xsl:text>, </xsl:text> + <xsl:value-of select="tertiary"/> + </xsl:if> + </xsl:with-param> + </xsl:call-template> </xsl:comment> </fo:wrapper> </xsl:template> +<!-- ==================================================================== --> + <xsl:template match="indexentry"> + <fo:block> + <!-- don't process 'seeie's from here --> + <xsl:apply-templates select="primaryie|secondaryie|tertiaryie|seealsoie"/> + </fo:block> +</xsl:template> + +<xsl:template match="primaryie"> + <fo:block> + <xsl:apply-templates/> + <xsl:if test="following-sibling::seeie"> + <xsl:text> (</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'see'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates select="following-sibling::seeie"/> + <xsl:text>)</xsl:text> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="secondaryie"> + <fo:block start-indent="1pc"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::seeie"> + <xsl:text> (</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'see'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates select="following-sibling::seeie"/> + <xsl:text>)</xsl:text> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="tertiaryie"> + <fo:block start-indent="2pc"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::seeie"> + <xsl:text> (</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'see'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates select="following-sibling::seeie"/> + <xsl:text>)</xsl:text> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="seeie"> + <fo:inline> + <xsl:apply-templates/> + </fo:inline> +</xsl:template> + +<xsl:template match="seealsoie"> + <fo:block> + <xsl:attribute name="start-indent"> + <xsl:choose> + <xsl:when test="preceding-sibling::tertiaryie">3pc</xsl:when> + <xsl:when test="preceding-sibling::secondaryie">2pc</xsl:when> + <xsl:otherwise>1pc</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:text>(</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'seealso'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates/> + <xsl:text>)</xsl:text> + </fo:block> </xsl:template> </xsl:stylesheet> Index: phpdoc/xsl/docbook/fo/info.xsl diff -u phpdoc/xsl/docbook/fo/info.xsl:1.1 phpdoc/xsl/docbook/fo/info.xsl:1.2 --- phpdoc/xsl/docbook/fo/info.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/info.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: info.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: info.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. Index: phpdoc/xsl/docbook/fo/inline.xsl diff -u phpdoc/xsl/docbook/fo/inline.xsl:1.1 phpdoc/xsl/docbook/fo/inline.xsl:1.2 --- phpdoc/xsl/docbook/fo/inline.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/inline.xsl Sun Mar 9 09:54:48 2003 @@ -6,7 +6,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: inline.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: inline.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -88,7 +88,7 @@ <xsl:param name="content"> <xsl:apply-templates/> </xsl:param> - <fo:inline font-family="{$monospace.font.family}"> + <fo:inline xsl:use-attribute-sets="monospace.properties"> <xsl:copy-of select="$content"/> </fo:inline> </xsl:template> @@ -115,7 +115,7 @@ <xsl:param name="content"> <xsl:apply-templates/> </xsl:param> - <fo:inline font-weight="bold" font-family="{$monospace.font.family}"> + <fo:inline font-weight="bold" xsl:use-attribute-sets="monospace.properties"> <xsl:copy-of select="$content"/> </fo:inline> </xsl:template> @@ -124,7 +124,7 @@ <xsl:param name="content"> <xsl:apply-templates/> </xsl:param> - <fo:inline font-style="italic" font-family="{$monospace.font.family}"> + <fo:inline font-style="italic" xsl:use-attribute-sets="monospace.properties"> <xsl:copy-of select="$content"/> </fo:inline> </xsl:template> @@ -148,6 +148,25 @@ </xsl:template> <!-- ==================================================================== --> +<!-- some special cases --> + +<xsl:template match="author"> + <xsl:call-template name="person.name"/> +</xsl:template> + +<xsl:template match="editor"> + <xsl:call-template name="person.name"/> +</xsl:template> + +<xsl:template match="othercredit"> + <xsl:call-template name="person.name"/> +</xsl:template> + +<xsl:template match="authorinitials"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<!-- ==================================================================== --> <xsl:template match="accel"> <xsl:call-template name="inline.charseq"/> @@ -205,6 +224,10 @@ <xsl:call-template name="inline.charseq"/> </xsl:template> +<xsl:template match="errortext"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + <xsl:template match="envar"> <xsl:call-template name="inline.monoseq"/> </xsl:template> @@ -469,7 +492,9 @@ </xsl:template> <xsl:template match="lineannotation"> - <xsl:call-template name="inline.charseq"/> + <fo:inline font-style="italic"> + <xsl:call-template name="inline.charseq"/> + </fo:inline> </xsl:template> <xsl:template match="superscript"> @@ -591,7 +616,7 @@ </xsl:choose> </xsl:when> <xsl:otherwise> - <xsl:call-template name="inline.charseq"/> + <xsl:call-template name="inline.italicseq"/> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -764,9 +789,11 @@ <xsl:choose> <xsl:when test="name($node)='guimenuitem' or name($node)='guisubmenu'"> - <xsl:text>-></xsl:text> + <xsl:value-of select="$menuchoice.menu.separator"/> </xsl:when> - <xsl:otherwise>+</xsl:otherwise> + <xsl:otherwise> + <xsl:value-of select="$menuchoice.separator"/> + </xsl:otherwise> </xsl:choose> <xsl:apply-templates select="$node"/> <xsl:call-template name="process.menuchoice"> Index: phpdoc/xsl/docbook/fo/keywords.xsl diff -u phpdoc/xsl/docbook/fo/keywords.xsl:1.1 phpdoc/xsl/docbook/fo/keywords.xsl:1.2 --- phpdoc/xsl/docbook/fo/keywords.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/keywords.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: keywords.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: keywords.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. Index: phpdoc/xsl/docbook/fo/lists.xsl diff -u phpdoc/xsl/docbook/fo/lists.xsl:1.1 phpdoc/xsl/docbook/fo/lists.xsl:1.2 --- phpdoc/xsl/docbook/fo/lists.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/lists.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: lists.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: lists.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -16,16 +16,35 @@ <!-- ==================================================================== --> <xsl:template match="itemizedlist"> - <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="label-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'label-width'"/> + </xsl:call-template> + </xsl:variable> <xsl:if test="title"> <xsl:apply-templates select="title" mode="list.title.mode"/> </xsl:if> + <xsl:apply-templates select="*[not(self::listitem or self::title)]"/> + <fo:list-block id="{$id}" xsl:use-attribute-sets="list.block.spacing" - provisional-distance-between-starts="1.5em" provisional-label-separation="0.2em"> - <xsl:apply-templates/> + <xsl:attribute name="provisional-distance-between-starts"> + <xsl:choose> + <xsl:when test="$label-width != ''"> + <xsl:value-of select="$label-width"/> + </xsl:when> + <xsl:otherwise>1.5em</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:apply-templates select="listitem"/> </fo:list-block> </xsl:template> @@ -87,22 +106,39 @@ </xsl:template> <xsl:template match="orderedlist"> - <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="label-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'label-width'"/> + </xsl:call-template> + </xsl:variable> <xsl:if test="title"> <xsl:apply-templates select="title" mode="list.title.mode"/> </xsl:if> + <xsl:apply-templates select="*[not(self::listitem or self::title)]"/> + <fo:list-block id="{$id}" xsl:use-attribute-sets="list.block.spacing" - provisional-distance-between-starts="2em" provisional-label-separation="0.2em"> - <xsl:apply-templates/> + <xsl:attribute name="provisional-distance-between-starts"> + <xsl:choose> + <xsl:when test="$label-width != ''"> + <xsl:value-of select="$label-width"/> + </xsl:when> + <xsl:otherwise>2em</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:apply-templates select="listitem"/> </fo:list-block> </xsl:template> -<xsl:template match="orderedlist/listitem"> - <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> - +<xsl:template match="orderedlist/listitem" mode="item-number"> <xsl:variable name="numeration"> <xsl:call-template name="list.numeration"> <xsl:with-param name="node" select="parent::orderedlist"/> @@ -127,17 +163,26 @@ </xsl:choose> </xsl:variable> + <xsl:variable name="item-number"> + <xsl:call-template name="orderedlist-item-number"/> + </xsl:variable> + + <xsl:if test="parent::orderedlist/@inheritnum='inherit' + and ancestor::listitem[parent::orderedlist]"> + <xsl:apply-templates select="ancestor::listitem[parent::orderedlist][1]" + mode="item-number"/> + </xsl:if> + + <xsl:number value="$item-number" format="{$type}"/> +</xsl:template> + +<xsl:template match="orderedlist/listitem"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + <xsl:variable name="item.contents"> <fo:list-item-label end-indent="label-end()"> <fo:block> - <xsl:choose> - <xsl:when test="@override"> - <xsl:number value="@override" format="{$type}"/> - </xsl:when> - <xsl:otherwise> - <xsl:number count="listitem" format="{$type}"/> - </xsl:otherwise> - </xsl:choose> + <xsl:apply-templates select="." mode="item-number"/> </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> @@ -159,14 +204,18 @@ </xsl:choose> </xsl:template> -<xsl:template match="listitem/para[1] - |listitem/simpara[1] - |listitem/formalpara[1] - |callout/para[1] - |callout/simpara[1] - |callout/formalpara[1]" +<xsl:template match="listitem/*[1][local-name()='para' or + local-name()='simpara' or + local-name()='formalpara'] + |step/*[1][local-name()='para' or + local-name()='simpara' or + local-name()='formalpara'] + |callout/*[1][local-name()='para' or + local-name()='simpara' or + local-name()='formalpara']" priority="2"> <fo:block> + <xsl:call-template name="anchor"/> <xsl:apply-templates/> </fo:block> </xsl:template> @@ -275,14 +324,14 @@ <xsl:call-template name="longest.term"> <xsl:with-param name="longest" select="string-length($terms[1])"/> <xsl:with-param name="maxlength" select="$maxlength"/> - <xsl:with-param name="terms" select="terms[position() > 1]"/> + <xsl:with-param name="terms" select="$terms[position() > 1]"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="longest.term"> <xsl:with-param name="longest" select="$longest"/> <xsl:with-param name="maxlength" select="$maxlength"/> - <xsl:with-param name="terms" select="terms[position() > 1]"/> + <xsl:with-param name="terms" select="$terms[position() > 1]"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> @@ -321,7 +370,9 @@ <xsl:template match="varlistentry" mode="vl.as.blocks"> <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> - <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"> + <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing" + keep-together.within-column="always" + keep-with-next.within-column="always"> <xsl:apply-templates select="term"/> </fo:block> @@ -345,17 +396,26 @@ <!-- ==================================================================== --> <xsl:template match="title" mode="list.title.mode"> - <fo:block font-size="12pt" font-weight="bold" - xsl:use-attribute-sets="list.block.spacing"> - <xsl:apply-templates/> - </fo:block> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="object" select=".."/> + </xsl:call-template> </xsl:template> <!-- ==================================================================== --> <xsl:template match="simplelist"> <!-- with no type specified, the default is 'vert' --> - <fo:table> + <fo:table xsl:use-attribute-sets="normal.para.spacing"> + <xsl:call-template name="simplelist.table.columns"> + <xsl:with-param name="cols"> + <xsl:choose> + <xsl:when test="@columns"> + <xsl:value-of select="@columns"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> <fo:table-body> <xsl:call-template name="simplelist.vert"> <xsl:with-param name="cols"> @@ -376,7 +436,17 @@ </xsl:template> <xsl:template match="simplelist[@type='horiz']"> - <fo:table> + <fo:table xsl:use-attribute-sets="normal.para.spacing"> + <xsl:call-template name="simplelist.table.columns"> + <xsl:with-param name="cols"> + <xsl:choose> + <xsl:when test="@columns"> + <xsl:value-of select="@columns"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> <fo:table-body> <xsl:call-template name="simplelist.horiz"> <xsl:with-param name="cols"> @@ -393,7 +463,17 @@ </xsl:template> <xsl:template match="simplelist[@type='vert']"> - <fo:table> + <fo:table xsl:use-attribute-sets="normal.para.spacing"> + <xsl:call-template name="simplelist.table.columns"> + <xsl:with-param name="cols"> + <xsl:choose> + <xsl:when test="@columns"> + <xsl:value-of select="@columns"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> <fo:table-body> <xsl:call-template name="simplelist.vert"> <xsl:with-param name="cols"> @@ -409,6 +489,18 @@ </fo:table> </xsl:template> +<xsl:template name="simplelist.table.columns"> + <xsl:param name="cols" select="1"/> + <xsl:param name="curcol" select="1"/> + <fo:table-column column-number="{$curcol}"/> + <xsl:if test="$curcol < $cols"> + <xsl:call-template name="simplelist.table.columns"> + <xsl:with-param name="cols" select="$cols"/> + <xsl:with-param name="curcol" select="$curcol + 1"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + <xsl:template name="simplelist.horiz"> <xsl:param name="cols">1</xsl:param> <xsl:param name="cell">1</xsl:param> @@ -546,16 +638,9 @@ <fo:block id="{$id}" xsl:use-attribute-sets="list.block.spacing"> <xsl:if test="./title and $placement = 'before'"> - <xsl:choose> - <xsl:when test="$formal.procedures != 0"> - <xsl:call-template name="formal.object.heading"/> - </xsl:when> - <xsl:otherwise> - <fo:block font-weight="bold"> - <xsl:apply-templates select="./title" mode="procedure.title.mode"/> - </fo:block> - </xsl:otherwise> - </xsl:choose> + <!-- n.b. gentext code tests for $formal.procedures and may make an "informal" --> + <!-- heading even though we called formal.object.heading. odd but true. --> + <xsl:call-template name="formal.object.heading"/> </xsl:if> <xsl:apply-templates select="$preamble"/> @@ -567,16 +652,9 @@ </fo:list-block> <xsl:if test="./title and $placement != 'before'"> - <xsl:choose> - <xsl:when test="$formal.procedures != 0"> - <xsl:call-template name="formal.object.heading"/> - </xsl:when> - <xsl:otherwise> - <fo:block font-weight="bold"> - <xsl:apply-templates select="./title" mode="procedure.title.mode"/> - </fo:block> - </xsl:otherwise> - </xsl:choose> + <!-- n.b. gentext code tests for $formal.procedures and may make an "informal" --> + <!-- heading even though we called formal.object.heading. odd but true. --> + <xsl:call-template name="formal.object.heading"/> </xsl:if> </fo:block> </xsl:template> @@ -584,10 +662,6 @@ <xsl:template match="procedure/title"> </xsl:template> -<xsl:template match="procedure/title" mode="procedure.title.mode"> - <xsl:apply-templates/> -</xsl:template> - <xsl:template match="substeps"> <fo:list-block xsl:use-attribute-sets="list.block.spacing" provisional-distance-between-starts="2em" @@ -601,9 +675,9 @@ <xsl:call-template name="object.id"/> </xsl:variable> - <fo:list-item> + <fo:list-item xsl:use-attribute-sets="list.item.spacing"> <fo:list-item-label end-indent="label-end()"> - <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"> + <fo:block id="{$id}"> <!-- dwc: fix for one step procedures. Use a bullet if there's no step 2 --> <xsl:choose> <xsl:when test="count(../step) = 1"> @@ -624,7 +698,7 @@ </xsl:template> <xsl:template match="step/title"> - <fo:block font-weight="bold" xsl:use-attribute-sets="list.item.spacing"> + <fo:block font-weight="bold"> <xsl:apply-templates/> </fo:block> </xsl:template> @@ -657,9 +731,7 @@ </xsl:template> <xsl:template match="segmentedlist/title"> - <fo:block font-weight="bold"> - <xsl:apply-templates/> - </fo:block> + <xsl:apply-templates select="." mode="list.title.mode" /> </xsl:template> <xsl:template match="segtitle"> @@ -695,8 +767,10 @@ </xsl:template> <xsl:template match="segmentedlist" mode="seglist-table"> - <xsl:apply-templates select="title" mode="seglist-table"/> + <xsl:apply-templates select="title" mode="list.title.mode" /> <fo:table> + <fo:table-column column-number="1"/> + <fo:table-column column-number="2"/> <fo:table-header> <fo:table-row> <xsl:apply-templates select="segtitle" mode="seglist-table"/> @@ -736,10 +810,8 @@ <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> <fo:block id="{$id}"> - <xsl:if test="./title"> - <fo:block xsl:use-attribute-sets="formal.title.properties"> - <xsl:apply-templates select="./title" mode="calloutlist.title.mode"/> - </fo:block> + <xsl:if test="title"> + <xsl:apply-templates select="title" mode="list.title.mode"/> </xsl:if> <fo:list-block space-before.optimum="1em" @@ -753,10 +825,6 @@ </xsl:template> <xsl:template match="calloutlist/title"> -</xsl:template> - -<xsl:template match="calloutlist/title" mode="calloutlist.title.mode"> - <xsl:apply-templates/> </xsl:template> <xsl:template match="callout"> Index: phpdoc/xsl/docbook/fo/math.xsl diff -u phpdoc/xsl/docbook/fo/math.xsl:1.1 phpdoc/xsl/docbook/fo/math.xsl:1.2 --- phpdoc/xsl/docbook/fo/math.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/math.xsl Sun Mar 9 09:54:48 2003 @@ -5,7 +5,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: math.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: math.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -43,8 +43,31 @@ <xsl:template match="equation/mediaobject | informalequation/mediaobject"> <xsl:if test="$passivetex.extensions = 0 or $tex.math.in.alt = ''"> + <xsl:variable name="olist" select="imageobject|imageobjectco + |videoobject|audioobject + |textobject"/> + + <xsl:variable name="object.index"> + <xsl:call-template name="select.mediaobject.index"> + <xsl:with-param name="olist" select="$olist"/> + <xsl:with-param name="count" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="object" select="$olist[position() = $object.index]"/> + + <xsl:variable name="align"> + <xsl:value-of select="$object/imagedata[@align][1]/@align"/> + </xsl:variable> + <fo:block> - <xsl:call-template name="select.mediaobject"/> + <xsl:if test="$align != '' "> + <xsl:attribute name="text-align"> + <xsl:value-of select="$align"/> + </xsl:attribute> + </xsl:if> + + <xsl:apply-templates select="$object"/> <xsl:apply-templates select="caption"/> </fo:block> </xsl:if> Index: phpdoc/xsl/docbook/fo/pagesetup.xsl diff -u phpdoc/xsl/docbook/fo/pagesetup.xsl:1.1 phpdoc/xsl/docbook/fo/pagesetup.xsl:1.2 --- phpdoc/xsl/docbook/fo/pagesetup.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/pagesetup.xsl Sun Mar 9 09:54:48 2003 @@ -3,48 +3,64 @@ xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> +<!-- ******************************************************************** + $Id: pagesetup.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + and other information. + + ******************************************************************** --> + <!-- ==================================================================== --> <xsl:template name="setup.pagemasters"> <fo:layout-master-set> - <!-- one sided, single column --> + <!-- blank pages --> <fo:simple-page-master master-name="blank" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" - margin-left="{$page.margin.inner}" - margin-right="{$page.margin.outer}"> - <fo:region-body + margin-left="{$page.margin.outer}" + margin-right="{$page.margin.inner}"> + <fo:region-body display-align="center" margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> + margin-top="{$body.margin.top}"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="region-name">blank-body</xsl:attribute> + </xsl:if> + </fo:region-body> <fo:region-before region-name="xsl-region-before-blank" extent="{$region.before.extent}" - display-align="after"/> + display-align="before"/> <fo:region-after region-name="xsl-region-after-blank" extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- one sided, single column --> - <fo:simple-page-master master-name="simple1" + <!-- title pages --> + <fo:simple-page-master master-name="titlepage-first" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> - <fo:region-body - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> - <fo:region-before extent="{$region.before.extent}" - display-align="after"/> - <fo:region-after extent="{$region.after.extent}" + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.titlepage}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- one sided, single column, draft mode --> - <fo:simple-page-master master-name="draft1" + <fo:simple-page-master master-name="titlepage-odd" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" @@ -52,83 +68,115 @@ margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> <fo:region-body margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"> - <xsl:if test="$draft.watermark.image != '' - and $fop.extensions = 0"> - <xsl:attribute name="background-image"> - <xsl:value-of select="$draft.watermark.image"/> - </xsl:attribute> - <xsl:attribute name="background-attachment">fixed</xsl:attribute> - <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> - <xsl:attribute name="background-position-horizontal">center</xsl:attribute> - <xsl:attribute name="background-position-vertical">center</xsl:attribute> - </xsl:if> + margin-top="{$body.margin.top}" + column-count="{$column.count.titlepage}"> </fo:region-body> - <fo:region-before extent="{$region.before.extent}" - display-align="after"/> - <fo:region-after extent="{$region.after.extent}" + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- for left-hand/even pages in twosided mode, single column --> - <fo:simple-page-master master-name="left1" + <fo:simple-page-master master-name="titlepage-even" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" - margin-left="{$page.margin.outer}" - margin-right="{$page.margin.inner}"> - <fo:region-body - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> - <fo:region-before region-name="xsl-region-before-left" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.titlepage}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" display-align="after"/> - <fo:region-after region-name="xsl-region-after-left" + </fo:simple-page-master> + + <!-- list-of-title pages --> + <fo:simple-page-master master-name="lot-first" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.lot}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- for right-hand/odd pages in twosided mode, single column --> - <fo:simple-page-master master-name="right1" + <fo:simple-page-master master-name="lot-odd" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> - <fo:region-body - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> - <fo:region-before region-name="xsl-region-before-right" + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.lot}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" display-align="after"/> - <fo:region-after region-name="xsl-region-after-right" + </fo:simple-page-master> + + <fo:simple-page-master master-name="lot-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.lot}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- special case of first page in either mode, single column --> - <fo:simple-page-master master-name="first1" + <!-- frontmatter pages --> + <fo:simple-page-master master-name="front-first" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> - <fo:region-body - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.front}"> + </fo:region-body> <fo:region-before region-name="xsl-region-before-first" extent="{$region.before.extent}" - display-align="after"/> + display-align="before"/> <fo:region-after region-name="xsl-region-after-first" extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- for pages in one-side mode, 2 column --> - <fo:simple-page-master master-name="simple2" + <fo:simple-page-master master-name="front-odd" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" @@ -136,149 +184,977 @@ margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> <fo:region-body margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"> - <xsl:attribute name="column-count"> - <!-- FIXME: how bad is this hack? If the overall column.count is 1, - use 2 here. Otherwise, use whatever is specified. This allows - some pages to be 2 column and others to be 1 column. Perhaps - this should always be 2 and if you want a 3 column page, you should - make a new pagemaster? Or maybe if you want to mix single and multi- - column pages, you should write another pagemaster for the ones - you want to be two column... --> - <xsl:choose> - <xsl:when test="$column.count < 2">2</xsl:when> - <xsl:otherwise> - <xsl:value-of select="$column.count"/> - </xsl:otherwise> - </xsl:choose> - </xsl:attribute> + margin-top="{$body.margin.top}" + column-count="{$column.count.front}"> </fo:region-body> - - <fo:region-before extent="{$region.before.extent}" - display-align="after"/> - <fo:region-after extent="{$region.after.extent}" + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- for left-hand/even pages in twosided mode, 2 column --> - <fo:simple-page-master master-name="left2" + <fo:simple-page-master master-name="front-even" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" - margin-left="{$page.margin.outer}" - margin-right="{$page.margin.inner}"> - <fo:region-body - column-count="{$column.count}" - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> - <fo:region-before region-name="xsl-region-before-left" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.front}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" extent="{$region.before.extent}" - display-align="after"/> - <fo:region-after region-name="xsl-region-after-left" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- for right-hand/odd pages in twosided mode, 2 column --> - <fo:simple-page-master master-name="right2" + <!-- body pages --> + <fo:simple-page-master master-name="body-first" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> - <fo:region-body - column-count="{$column.count}" - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> - <fo:region-before region-name="xsl-region-before-right" + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.body}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" extent="{$region.before.extent}" - display-align="after"/> - <fo:region-after region-name="xsl-region-after-right" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" extent="{$region.after.extent}" - display-align="after"/> + display-align="after"/> </fo:simple-page-master> - <!-- special case of first page in either mode --> - <fo:simple-page-master master-name="first2" + <fo:simple-page-master master-name="body-odd" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> - <fo:region-body - column-count="1" - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.body}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="body-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.body}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- backmatter pages --> + <fo:simple-page-master master-name="back-first" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.back}"> + </fo:region-body> <fo:region-before region-name="xsl-region-before-first" extent="{$region.before.extent}" - display-align="after"/> + display-align="before"/> <fo:region-after region-name="xsl-region-after-first" extent="{$region.after.extent}" - display-align="after"/> + display-align="after"/> </fo:simple-page-master> - <!-- setup for title-page, 1 column --> - <fo:page-sequence-master master-name="titlepage1"> - <fo:repeatable-page-master-alternatives> - <fo:conditional-page-master-reference master-reference="first1"/> - </fo:repeatable-page-master-alternatives> - </fo:page-sequence-master> + <fo:simple-page-master master-name="back-odd" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.back}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="back-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.back}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- index pages --> + <fo:simple-page-master master-name="index-first" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.index}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="index-odd" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.index}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="index-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.index}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> - <!-- setup for single-sided, 1 column --> - <fo:page-sequence-master master-name="oneside1"> + <xsl:if test="$draft.mode != 'no'"> + <!-- draft blank pages --> + <fo:simple-page-master master-name="blank-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.outer}" + margin-right="{$page.margin.inner}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-blank" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-blank" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft title pages --> + <fo:simple-page-master master-name="titlepage-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.titlepage}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="titlepage-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.titlepage}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="titlepage-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.titlepage}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft list-of-title pages --> + <fo:simple-page-master master-name="lot-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.lot}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="lot-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.lot}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="lot-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.lot}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft frontmatter pages --> + <fo:simple-page-master master-name="front-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.front}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="front-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.front}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="front-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.front}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft body pages --> + <fo:simple-page-master master-name="body-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.body}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="body-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.body}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="body-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.body}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft backmatter pages --> + <fo:simple-page-master master-name="back-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.back}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="back-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.back}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="back-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.back}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft index pages --> + <fo:simple-page-master master-name="index-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.index}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="index-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.index}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="index-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.index}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + </xsl:if> + + <!-- setup for title page(s) --> + <fo:page-sequence-master master-name="titlepage"> <fo:repeatable-page-master-alternatives> - <fo:conditional-page-master-reference master-reference="simple1"/> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="titlepage-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="titlepage-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="titlepage-even" + odd-or-even="even"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> - <!-- setup for single-sided, 1 column --> - <fo:page-sequence-master master-name="onesidedraft1"> + <!-- setup for lots --> + <fo:page-sequence-master master-name="lot"> <fo:repeatable-page-master-alternatives> - <fo:conditional-page-master-reference master-reference="draft1"/> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="lot-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="lot-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="lot-even" + odd-or-even="even"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> - <!-- setup for double-sided, 1 column --> - <fo:page-sequence-master master-name="twoside1"> + <!-- setup front matter --> + <fo:page-sequence-master master-name="front"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/> - <fo:conditional-page-master-reference master-reference="right1" + <fo:conditional-page-master-reference master-reference="front-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="front-odd" odd-or-even="odd"/> - <fo:conditional-page-master-reference master-reference="left1" + <fo:conditional-page-master-reference master-reference="front-even" odd-or-even="even"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> - <!-- setup for title-page, 2 column --> - <fo:page-sequence-master master-name="titlepage2"> + <!-- setup for body pages --> + <fo:page-sequence-master master-name="body"> <fo:repeatable-page-master-alternatives> - <fo:conditional-page-master-reference master-reference="first2"/> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="body-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="body-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="body-even" + odd-or-even="even"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> - <!-- setup for single-sided, 2 column --> - <fo:page-sequence-master master-name="oneside2"> + <!-- setup back matter --> + <fo:page-sequence-master master-name="back"> <fo:repeatable-page-master-alternatives> - <fo:conditional-page-master-reference master-reference="simple2"/> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="back-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="back-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="back-even" + odd-or-even="even"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> - <!-- setup for double-sided, 2 column --> - <fo:page-sequence-master master-name="twoside2"> + <!-- setup back matter --> + <fo:page-sequence-master master-name="index"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/> - <fo:conditional-page-master-reference master-reference="right2" + <fo:conditional-page-master-reference master-reference="index-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="index-odd" odd-or-even="odd"/> - <fo:conditional-page-master-reference master-reference="left2" + <fo:conditional-page-master-reference master-reference="index-even" odd-or-even="even"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> + <xsl:if test="$draft.mode != 'no'"> + <!-- setup for draft title page(s) --> + <fo:page-sequence-master master-name="titlepage-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="titlepage-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="titlepage-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="titlepage-even-draft" + odd-or-even="even"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup for draft lots --> + <fo:page-sequence-master master-name="lot-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="lot-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="lot-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="lot-even-draft" + odd-or-even="even"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup draft front matter --> + <fo:page-sequence-master master-name="front-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="front-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="front-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="front-even-draft" + odd-or-even="even"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup for draft body pages --> + <fo:page-sequence-master master-name="body-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="body-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="body-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="body-even-draft" + odd-or-even="even"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup draft back matter --> + <fo:page-sequence-master master-name="back-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="back-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="back-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="back-even-draft" + odd-or-even="even"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup draft index pages --> + <fo:page-sequence-master master-name="index-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="index-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="index-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="index-even-draft" + odd-or-even="even"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + </xsl:if> + <xsl:call-template name="user.pagemasters"/> </fo:layout-master-set> @@ -290,231 +1166,532 @@ <!-- ==================================================================== --> -<!-- $double.sided, $column.count, and context --> - <xsl:template name="select.pagemaster"> <xsl:param name="element" select="local-name(.)"/> - <!-- column.count is a param so it can be selected dynamically; see index.xsl --> - <xsl:param name="column.count" select="$column.count"/> + <xsl:param name="pageclass" select="''"/> - <xsl:choose> - <xsl:when test="$double.sided != 0"> - <xsl:choose> - <xsl:when test="$column.count > 1"> - <xsl:call-template name="select.doublesided.multicolumn.pagemaster"> - <xsl:with-param name="element" select="$element"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:call-template name="select.doublesided.pagemaster"> - <xsl:with-param name="element" select="$element"/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </xsl:when> - <xsl:otherwise> - <xsl:choose> - <xsl:when test="$column.count > 1"> - <xsl:call-template name="select.singlesided.multicolumn.pagemaster"> - <xsl:with-param name="element" select="$element"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:call-template name="select.singlesided.pagemaster"> - <xsl:with-param name="element" select="$element"/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </xsl:otherwise> - </xsl:choose> -</xsl:template> + <xsl:variable name="pagemaster"> + <xsl:choose> + <xsl:when test="$pageclass != ''"> + <xsl:value-of select="$pageclass"/> + </xsl:when> + <xsl:when test="$pageclass = 'lot'">lot</xsl:when> + <xsl:when test="$element = 'dedication'">front</xsl:when> + <xsl:when test="$element = 'preface'">front</xsl:when> + <xsl:when test="$element = 'appendix'">back</xsl:when> + <xsl:when test="$element = 'glossary'">back</xsl:when> + <xsl:when test="$element = 'bibliography'">back</xsl:when> + <xsl:when test="$element = 'index'">index</xsl:when> + <xsl:when test="$element = 'colophon'">back</xsl:when> + <xsl:otherwise>body</xsl:otherwise> + </xsl:choose> + + <xsl:choose> + <xsl:when test="$draft.mode = 'yes'"> + <xsl:text>-draft</xsl:text> + </xsl:when> + <xsl:when test="$draft.mode = 'no'"> + <!-- nop --> + </xsl:when> + <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'"> + <xsl:text>-draft</xsl:text> + </xsl:when> + <xsl:otherwise> + <!-- nop --> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> -<xsl:template name="select.doublesided.multicolumn.pagemaster"> - <xsl:param name="element" select="local-name(.)"/> - <xsl:choose> - <xsl:when test="$element='set' or $element='book' or $element='part'"> - <xsl:text>titlepage2</xsl:text> - </xsl:when> - <xsl:otherwise>twoside2</xsl:otherwise> - </xsl:choose> + <xsl:call-template name="select.user.pagemaster"> + <xsl:with-param name="element" select="$element"/> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="default-pagemaster" select="$pagemaster"/> + </xsl:call-template> </xsl:template> -<xsl:template name="select.doublesided.pagemaster"> - <xsl:param name="element" select="local-name(.)"/> - <xsl:choose> - <xsl:when test="$element='set' or $element='book' or $element='part'"> - <xsl:text>titlepage1</xsl:text> - </xsl:when> - <xsl:otherwise>twoside1</xsl:otherwise> - </xsl:choose> +<xsl:template name="select.user.pagemaster"> + <xsl:param name="element"/> + <xsl:param name="pageclass"/> + <xsl:param name="default-pagemaster"/> + + <!-- by default, return the default. But if you've created your own + pagemasters in user.pagemasters, you might want to select one here. --> + <xsl:value-of select="$default-pagemaster"/> </xsl:template> -<xsl:template name="select.singlesided.multicolumn.pagemaster"> - <xsl:param name="element" select="local-name(.)"/> - <xsl:choose> - <xsl:when test="$element='set' or $element='book' or $element='part'"> - <xsl:text>titlepage2</xsl:text> - </xsl:when> - <xsl:otherwise>oneside2</xsl:otherwise> - </xsl:choose> +<!-- ==================================================================== --> + +<xsl:template name="head.sep.rule"> + <xsl:if test="$header.rule != 0"> + <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute> + <xsl:attribute name="border-bottom-style">solid</xsl:attribute> + <xsl:attribute name="border-bottom-color">black</xsl:attribute> + </xsl:if> </xsl:template> -<xsl:template name="select.singlesided.pagemaster"> - <xsl:param name="element" select="local-name(.)"/> - <xsl:choose> - <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'"> - <xsl:text>onesidedraft1</xsl:text> - </xsl:when> - <xsl:when test="$element='set' or $element='book' or $element='part'"> - <xsl:text>titlepage1</xsl:text> - </xsl:when> - <xsl:otherwise>oneside1</xsl:otherwise> - </xsl:choose> +<xsl:template name="foot.sep.rule"> + <xsl:if test="$footer.rule != 0"> + <xsl:attribute name="border-top-width">0.5pt</xsl:attribute> + <xsl:attribute name="border-top-style">solid</xsl:attribute> + <xsl:attribute name="border-top-color">black</xsl:attribute> + </xsl:if> </xsl:template> <!-- ==================================================================== --> <xsl:template match="*" mode="running.head.mode"> <xsl:param name="master-reference" select="'unknown'"/> - <!-- by default, nothing --> + <xsl:param name="gentext-key" select="name(.)"/> + + <!-- remove -draft from reference --> + <xsl:variable name="pageclass"> + <xsl:choose> + <xsl:when test="contains($master-reference, '-draft')"> + <xsl:value-of select="substring-before($master-reference, '-draft')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$master-reference"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <fo:static-content flow-name="xsl-region-before-first"> + <fo:block xsl:use-attribute-sets="header.content.properties"> + <xsl:call-template name="header.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'first'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-before-odd"> + <fo:block xsl:use-attribute-sets="header.content.properties"> + <xsl:call-template name="header.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'odd'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-before-even"> + <fo:block xsl:use-attribute-sets="header.content.properties"> + <xsl:call-template name="header.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'even'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-before-blank"> + <fo:block xsl:use-attribute-sets="header.content.properties"> + <xsl:call-template name="header.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'blank'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <xsl:if test="$fop.extensions = 0"> + <xsl:call-template name="footnote-separator"/> + <xsl:call-template name="blank.page.content"/> + </xsl:if> +</xsl:template> + +<xsl:template name="footnote-separator"> + <fo:static-content flow-name="xsl-footnote-separator"> + <fo:block> + <fo:leader color="black" leader-pattern="rule" leader-length="1in"/> + </fo:block> + </fo:static-content> +</xsl:template> + +<xsl:template name="blank.page.content"> + <fo:static-content flow-name="blank-body"> + <fo:block text-align="center"/> + </fo:static-content> +</xsl:template> + +<xsl:template name="header.table"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="gentext-key" select="''"/> + + <!-- default is a single table style for all headers --> + <!-- Customize it for different page classes or sequence location --> + + <xsl:variable name="candidate"> + <fo:table table-layout="fixed" width="100%"> + <xsl:call-template name="head.sep.rule"/> + <fo:table-column column-number="1" column-width="proportional-column-width(1)"/> + <fo:table-column column-number="2" column-width="proportional-column-width(1)"/> + <fo:table-column column-number="3" column-width="proportional-column-width(1)"/> + <fo:table-body> + <fo:table-row height="14pt"> + <fo:table-cell text-align="left" + display-align="before"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="header.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'left'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="center" + display-align="before"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="header.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'center'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="right" + display-align="before"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="header.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'right'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </xsl:variable> + + <!-- Really output a header? --> <xsl:choose> - <xsl:when test="$master-reference='titlepage1'"> - </xsl:when> - <xsl:when test="$master-reference='oneside1'"> - </xsl:when> - <xsl:when test="$master-reference='twoside1'"> - </xsl:when> - <xsl:when test="$master-reference='titlepage2'"> - </xsl:when> - <xsl:when test="$master-reference='oneside2'"> + <xsl:when test="$pageclass = 'titlepage' and $gentext-key = 'book' + and $sequence='first'"> + <!-- no, book titlepages have no headers at all --> </xsl:when> - <xsl:when test="$master-reference='twoside2'"> + <xsl:when test="$sequence = 'blank' and $headers.on.blank.pages = 0"> + <!-- no output --> </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$candidate"/> + </xsl:otherwise> </xsl:choose> </xsl:template> -<xsl:template match="chapter|appendix" mode="running.head.mode"> - <xsl:param name="master-reference" select="'unknown'"/> - <xsl:variable name="head"> - <fo:block font-size="{$body.font.size}"> - <xsl:apply-templates select="." mode="object.title.markup"/> - </fo:block> - </xsl:variable> +<xsl:template name="header.content"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="position" select="''"/> + <xsl:param name="gentext-key" select="''"/> + +<!-- + <fo:block> + <xsl:value-of select="$pageclass"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$sequence"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$position"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$gentext-key"/> + </fo:block> +--> + + <fo:block> + + <!-- sequence can be odd, even, first, blank --> + <!-- position can be left, center, right --> + <xsl:choose> + <xsl:when test="$sequence = 'blank'"> + <!-- nothing --> + </xsl:when> + + <xsl:when test="$position='left'"> + <!-- Same for odd, even, empty, and blank sequences --> + <xsl:call-template name="draft.text"/> + </xsl:when> + + <xsl:when test="($sequence='odd' or $sequence='even') and $position='center'"> + <xsl:if test="$pageclass != 'titlepage'"> + <xsl:choose> + <xsl:when test="ancestor::book and ($double.sided != 0)"> + <fo:retrieve-marker retrieve-class-name="section.head.marker" + retrieve-position="first-including-carryover" + retrieve-boundary="page-sequence"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="." mode="titleabbrev.markup"/> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </xsl:when> + + <xsl:when test="$position='center'"> + <!-- nothing for empty and blank sequences --> + </xsl:when> + + <xsl:when test="$position='right'"> + <!-- Same for odd, even, empty, and blank sequences --> + <xsl:call-template name="draft.text"/> + </xsl:when> + + <xsl:when test="$sequence = 'first'"> + <!-- nothing for first pages --> + </xsl:when> + + <xsl:when test="$sequence = 'blank'"> + <!-- nothing for blank pages --> + </xsl:when> + </xsl:choose> + </fo:block> +</xsl:template> +<xsl:template name="draft.text"> <xsl:choose> - <xsl:when test="$master-reference='titlepage1'"></xsl:when> - <xsl:when test="$master-reference='oneside1'"> - <fo:static-content flow-name="xsl-region-before"> - <fo:block text-align="center"> - <xsl:copy-of select="$head"/> - </fo:block> - </fo:static-content> + <xsl:when test="$draft.mode = 'yes'"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Draft'"/> + </xsl:call-template> </xsl:when> - <xsl:when test="$master-reference='twoside1'"> - <fo:static-content flow-name="xsl-region-before-left"> - <fo:block text-align="right"> - <xsl:copy-of select="$head"/> - </fo:block> - </fo:static-content> - <fo:static-content flow-name="xsl-region-before-right"> - <fo:block text-align="left"> - <xsl:copy-of select="$head"/> - </fo:block> - </fo:static-content> + <xsl:when test="$draft.mode = 'no'"> + <!-- nop --> </xsl:when> - <xsl:when test="$master-reference='titlepage2'"></xsl:when> - <xsl:when test="$master-reference='oneside2'"> - <fo:static-content flow-name="xsl-region-before"> - <fo:block text-align="center"> - <xsl:copy-of select="$head"/> - </fo:block> - </fo:static-content> - </xsl:when> - <xsl:when test="$master-reference='twoside2'"> - <fo:static-content flow-name="xsl-region-before-left"> - <fo:block text-align="right"> - <xsl:copy-of select="$head"/> - </fo:block> - </fo:static-content> - <fo:static-content flow-name="xsl-region-before-right"> - <fo:block text-align="left"> - <xsl:copy-of select="$head"/> - </fo:block> - </fo:static-content> + <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Draft'"/> + </xsl:call-template> </xsl:when> <xsl:otherwise> - <xsl:message> - <xsl:text>Unexpected master-reference (</xsl:text> - <xsl:value-of select="$master-reference"/> - <xsl:text>) in running.head.mode for </xsl:text> - <xsl:value-of select="name(.)"/> - <xsl:text>. No header generated.</xsl:text> - </xsl:message> + <!-- nop --> </xsl:otherwise> </xsl:choose> </xsl:template> +<!-- ==================================================================== --> + <xsl:template match="*" mode="running.foot.mode"> <xsl:param name="master-reference" select="'unknown'"/> - <xsl:variable name="foot"> - <fo:page-number/> + <xsl:param name="gentext-key" select="name(.)"/> + + <!-- remove -draft from reference --> + <xsl:variable name="pageclass"> + <xsl:choose> + <xsl:when test="contains($master-reference, '-draft')"> + <xsl:value-of select="substring-before($master-reference, '-draft')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$master-reference"/> + </xsl:otherwise> + </xsl:choose> </xsl:variable> - <!-- by default, the page number --> + + <fo:static-content flow-name="xsl-region-after-first"> + <fo:block xsl:use-attribute-sets="footer.content.properties"> + <xsl:call-template name="footer.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'first'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-after-odd"> + <fo:block xsl:use-attribute-sets="footer.content.properties"> + <xsl:call-template name="footer.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'odd'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-after-even"> + <fo:block xsl:use-attribute-sets="footer.content.properties"> + <xsl:call-template name="footer.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'even'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-after-blank"> + <fo:block xsl:use-attribute-sets="footer.content.properties"> + <xsl:call-template name="footer.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'blank'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> +</xsl:template> + +<xsl:template name="footer.table"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="gentext-key" select="''"/> + + <!-- default is a single table style for all footers --> + <!-- Customize it for different page classes or sequence location --> + + <xsl:variable name="candidate"> + <fo:table table-layout="fixed" width="100%"> + <xsl:call-template name="foot.sep.rule"/> + <fo:table-column column-number="1" column-width="proportional-column-width(1)"/> + <fo:table-column column-number="2" column-width="proportional-column-width(1)"/> + <fo:table-column column-number="3" column-width="proportional-column-width(1)"/> + <fo:table-body> + <fo:table-row height="14pt"> + <fo:table-cell text-align="left" + display-align="after"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="footer.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'left'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="center" + display-align="after"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="footer.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'center'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="right" + display-align="after"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="footer.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'right'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </xsl:variable> + + <!-- Really output a footer? --> <xsl:choose> - <xsl:when test="$master-reference='titlepage1'"></xsl:when> - <xsl:when test="$master-reference='oneside1'"> - <fo:static-content flow-name="xsl-region-after"> - <fo:block text-align="center" font-size="{$body.font.size}"> - <xsl:copy-of select="$foot"/> - </fo:block> - </fo:static-content> - </xsl:when> - <xsl:when test="$master-reference='twoside1'"> - <fo:static-content flow-name="xsl-region-after-left"> - <fo:block text-align="left" font-size="{$body.font.size}"> - <xsl:copy-of select="$foot"/> - </fo:block> - </fo:static-content> - <fo:static-content flow-name="xsl-region-after-right"> - <fo:block text-align="right" font-size="{$body.font.size}"> - <xsl:copy-of select="$foot"/> - </fo:block> - </fo:static-content> + <xsl:when test="$pageclass='titlepage' and $gentext-key='book' + and $sequence='first'"> + <!-- no, book titlepages have no footers at all --> </xsl:when> - <xsl:when test="$master-reference='titlepage2'"></xsl:when> - <xsl:when test="$master-reference='oneside2'"> - <fo:static-content flow-name="xsl-after-before"> - <fo:block text-align="center" font-size="{$body.font.size}"> - <xsl:copy-of select="$foot"/> - </fo:block> - </fo:static-content> - </xsl:when> - <xsl:when test="$master-reference='twoside2'"> - <fo:static-content flow-name="xsl-region-after-left"> - <fo:block text-align="left" font-size="{$body.font.size}"> - <xsl:copy-of select="$foot"/> - </fo:block> - </fo:static-content> - <fo:static-content flow-name="xsl-region-after-right"> - <fo:block text-align="right" font-size="{$body.font.size}"> - <xsl:copy-of select="$foot"/> - </fo:block> - </fo:static-content> + <xsl:when test="$sequence = 'blank' and $footers.on.blank.pages = 0"> + <!-- no output --> </xsl:when> <xsl:otherwise> - <xsl:message> - <xsl:text>Unexpected master-reference (</xsl:text> - <xsl:value-of select="$master-reference"/> - <xsl:text>) in running.foot.mode for </xsl:text> - <xsl:value-of select="name(.)"/> - <xsl:text>. No footer generated.</xsl:text> - </xsl:message> + <xsl:copy-of select="$candidate"/> </xsl:otherwise> </xsl:choose> </xsl:template> -<xsl:template match="set|book|part|reference" mode="running.foot.mode"> - <!-- nothing --> +<xsl:template name="footer.content"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="position" select="''"/> + <xsl:param name="gentext-key" select="''"/> + +<!-- + <fo:block> + <xsl:value-of select="$pageclass"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$sequence"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$position"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$gentext-key"/> + </fo:block> +--> + + <fo:block> + <!-- pageclass can be front, body, back --> + <!-- sequence can be odd, even, first, blank --> + <!-- position can be left, center, right --> + <xsl:choose> + <xsl:when test="$pageclass = 'titlepage'"> + <!-- nop; no footer on title pages --> + </xsl:when> + + <xsl:when test="$double.sided != 0 and $sequence = 'even' + and $position='left'"> + <fo:page-number/> + </xsl:when> + + <xsl:when test="$double.sided != 0 and ($sequence = 'odd' or $sequence = 'first') + and $position='right'"> + <fo:page-number/> + </xsl:when> + + <xsl:when test="$double.sided = 0 and $position='center'"> + <fo:page-number/> + </xsl:when> + + <xsl:when test="$sequence='blank'"> + <xsl:choose> + <xsl:when test="$double.sided != 0 and $position = 'left'"> + <fo:page-number/> + </xsl:when> + <xsl:when test="$double.sided = 0 and $position = 'center'"> + <fo:page-number/> + </xsl:when> + <xsl:otherwise> + <!-- nop --> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + + <xsl:otherwise> + <!-- nop --> + </xsl:otherwise> + </xsl:choose> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="page.number.format"> + <xsl:param name="element" select="local-name(.)"/> + + <xsl:choose> + <xsl:when test="$element = 'toc'">i</xsl:when> + <xsl:when test="$element = 'preface'">i</xsl:when> + <xsl:when test="$element = 'dedication'">i</xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> </xsl:template> <!-- ==================================================================== --> Index: phpdoc/xsl/docbook/fo/param.ent diff -u phpdoc/xsl/docbook/fo/param.ent:1.1 phpdoc/xsl/docbook/fo/param.ent:1.2 --- phpdoc/xsl/docbook/fo/param.ent:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/param.ent Sun Mar 9 09:54:48 2003 @@ -27,16 +27,24 @@ <!ENTITY callout.unicode.start.character SYSTEM "../params/callout.unicode.start.character.xml"> <!ENTITY callouts.extension SYSTEM "../params/callouts.extension.xml"> <!ENTITY chapter.autolabel SYSTEM "../params/chapter.autolabel.xml"> -<!ENTITY column.count SYSTEM "../params/column.count.xml"> -<!ENTITY column.count.of.index SYSTEM "../params/column.count.of.index.xml"> +<!ENTITY column.count.back SYSTEM "../params/column.count.back.xml"> +<!ENTITY column.count.body SYSTEM "../params/column.count.body.xml"> +<!ENTITY column.count.front SYSTEM "../params/column.count.front.xml"> +<!ENTITY column.count.index SYSTEM "../params/column.count.index.xml"> +<!ENTITY column.count.lot SYSTEM "../params/column.count.lot.xml"> +<!ENTITY column.count.titlepage SYSTEM "../params/column.count.titlepage.xml"> <!ENTITY compact.list.item.spacing SYSTEM "../params/compact.list.item.spacing.xml"> <!ENTITY component.title.properties SYSTEM "../params/component.title.properties.xml"> +<!ENTITY current.docid SYSTEM "../params/current.docid.xml"> <!ENTITY default.table.width SYSTEM "../params/default.table.width.xml"> <!ENTITY default.units SYSTEM "../params/default.units.xml"> <!ENTITY dingbat.font.family SYSTEM "../params/dingbat.font.family.xml"> <!ENTITY double.sided SYSTEM "../params/double.sided.xml"> +<!ENTITY draft.mode SYSTEM "../params/draft.mode.xml"> <!ENTITY draft.watermark.image SYSTEM "../params/draft.watermark.image.xml"> <!ENTITY firstterm.only.link SYSTEM "../params/firstterm.only.link.xml"> +<!ENTITY footer.rule SYSTEM "../params/footer.rule.xml"> +<!ENTITY footers.on.blank.pages SYSTEM "../params/footers.on.blank.pages.xml"> <!ENTITY footnote.font.size SYSTEM "../params/footnote.font.size.xml"> <!ENTITY fop.extensions SYSTEM "../params/fop.extensions.xml"> <!ENTITY formal.object.properties SYSTEM "../params/formal.object.properties.xml"> @@ -48,9 +56,15 @@ <!ENTITY function.parens SYSTEM "../params/function.parens.xml"> <!ENTITY generate.index SYSTEM "../params/generate.index.xml"> <!ENTITY generate.toc SYSTEM "../params/generate.toc.xml"> +<!ENTITY glossary.as.blocks SYSTEM "../params/glossary.as.blocks.xml"> <!ENTITY glossary.collection SYSTEM "../params/glossary.collection.xml"> +<!ENTITY glosslist.as.blocks SYSTEM "../params/glosslist.as.blocks.xml"> <!ENTITY glossterm.auto.link SYSTEM "../params/glossterm.auto.link.xml"> +<!ENTITY glossterm.separation SYSTEM "../params/glossterm.separation.xml"> +<!ENTITY glossterm.width SYSTEM "../params/glossterm.width.xml"> <!ENTITY graphic.default.extension SYSTEM "../params/graphic.default.extension.xml"> +<!ENTITY header.rule SYSTEM "../params/header.rule.xml"> +<!ENTITY headers.on.blank.pages SYSTEM "../params/headers.on.blank.pages.xml"> <!ENTITY hyphenate SYSTEM "../params/hyphenate.xml"> <!ENTITY informal.object.properties SYSTEM "../params/informal.object.properties.xml"> <!ENTITY insert.xref.page.number SYSTEM "../params/insert.xref.page.number.xml"> @@ -68,6 +82,7 @@ <!ENTITY monospace.verbatim.properties SYSTEM "../params/monospace.verbatim.properties.xml"> <!ENTITY nominal.table.width SYSTEM "../params/nominal.table.width.xml"> <!ENTITY normal.para.spacing SYSTEM "../params/normal.para.spacing.xml"> +<!ENTITY olink.doctitle SYSTEM "../params/olink.doctitle.xml"> <!ENTITY page.height SYSTEM "../params/page.height.xml"> <!ENTITY page.height.portrait SYSTEM "../params/page.height.portrait.xml"> <!ENTITY page.margin.bottom SYSTEM "../params/page.margin.bottom.xml"> @@ -81,9 +96,11 @@ <!ENTITY part.autolabel SYSTEM "../params/part.autolabel.xml"> <!ENTITY passivetex.extensions SYSTEM "../params/passivetex.extensions.xml"> <!ENTITY preface.autolabel SYSTEM "../params/preface.autolabel.xml"> +<!ENTITY preferred.mediaobject.role SYSTEM "../params/preferred.mediaobject.role.xml"> <!ENTITY process.empty.source.toc SYSTEM "../params/process.empty.source.toc.xml"> <!ENTITY process.source.toc SYSTEM "../params/process.source.toc.xml"> <!ENTITY profile.arch SYSTEM "../params/profile.arch.xml"> +<!ENTITY profile.attribute SYSTEM "../params/profile.attribute.xml"> <!ENTITY profile.condition SYSTEM "../params/profile.condition.xml"> <!ENTITY profile.conformance SYSTEM "../params/profile.conformance.xml"> <!ENTITY profile.lang SYSTEM "../params/profile.lang.xml"> @@ -92,16 +109,16 @@ <!ENTITY profile.revisionflag SYSTEM "../params/profile.revisionflag.xml"> <!ENTITY profile.role SYSTEM "../params/profile.role.xml"> <!ENTITY profile.security SYSTEM "../params/profile.security.xml"> +<!ENTITY profile.separator SYSTEM "../params/profile.separator.xml"> <!ENTITY profile.userlevel SYSTEM "../params/profile.userlevel.xml"> -<!ENTITY profile.vendor SYSTEM "../params/profile.vendor.xml"> -<!ENTITY profile.attribute SYSTEM "../params/profile.attribute.xml"> <!ENTITY profile.value SYSTEM "../params/profile.value.xml"> -<!ENTITY profile.separator SYSTEM "../params/profile.separator.xml"> +<!ENTITY profile.vendor SYSTEM "../params/profile.vendor.xml"> <!ENTITY punct.honorific SYSTEM "../params/punct.honorific.xml"> <!ENTITY qanda.inherit.numeration SYSTEM "../params/qanda.inherit.numeration.xml"> <!ENTITY qandadiv.autolabel SYSTEM "../params/qandadiv.autolabel.xml"> <!ENTITY refentry.generate.name SYSTEM "../params/refentry.generate.name.xml"> <!ENTITY refentry.generate.title SYSTEM "../params/refentry.generate.title.xml"> +<!ENTITY refentry.title.properties SYSTEM "../params/refentry.title.properties.xml"> <!ENTITY refentry.xref.manvolnum SYSTEM "../params/refentry.xref.manvolnum.xml"> <!ENTITY region.after.extent SYSTEM "../params/region.after.extent.xml"> <!ENTITY region.before.extent SYSTEM "../params/region.before.extent.xml"> @@ -111,30 +128,71 @@ <!ENTITY sans.font.family SYSTEM "../params/sans.font.family.xml"> <!ENTITY section.autolabel SYSTEM "../params/section.autolabel.xml"> <!ENTITY section.label.includes.component.label SYSTEM "../params/section.label.includes.component.label.xml"> +<!ENTITY section.title.properties SYSTEM "../params/section.title.properties.xml"> <!ENTITY segmentedlist.as.table SYSTEM "../params/segmentedlist.as.table.xml"> <!ENTITY shade.verbatim SYSTEM "../params/shade.verbatim.xml"> <!ENTITY shade.verbatim.style SYSTEM "../params/shade.verbatim.style.xml"> <!ENTITY show.comments SYSTEM "../params/show.comments.xml"> -<!ENTITY table.border.color SYSTEM "../params/table.border.color.xml"> -<!ENTITY table.border.style SYSTEM "../params/table.border.style.xml"> -<!ENTITY table.border.thickness SYSTEM "../params/table.border.thickness.xml"> <!ENTITY table.cell.padding SYSTEM "../params/table.cell.padding.xml"> -<!ENTITY table.entry.padding SYSTEM "../params/table.entry.padding.xml"> <!ENTITY tablecolumns.extension SYSTEM "../params/tablecolumns.extension.xml"> -<!ENTITY textinsert.extension SYSTEM "../params/textinsert.extension.xml"> +<!ENTITY target.database.document SYSTEM "../params/target.database.document.xml"> <!ENTITY tex.math.delims SYSTEM "../params/tex.math.delims.xml"> <!ENTITY tex.math.in.alt SYSTEM "../params/tex.math.in.alt.xml"> +<!ENTITY textinsert.extension SYSTEM "../params/textinsert.extension.xml"> <!ENTITY title.font.family SYSTEM "../params/title.font.family.xml"> <!ENTITY title.margin.left SYSTEM "../params/title.margin.left.xml"> <!ENTITY toc.indent.width SYSTEM "../params/toc.indent.width.xml"> <!ENTITY toc.margin.properties SYSTEM "../params/toc.margin.properties.xml"> <!ENTITY toc.section.depth SYSTEM "../params/toc.section.depth.xml"> -<!ENTITY use.extensions SYSTEM "../params/use.extensions.xml"> -<!ENTITY use.svg SYSTEM "../params/use.svg.xml"> <!ENTITY ulink.footnotes SYSTEM "../params/ulink.footnotes.xml"> <!ENTITY ulink.hyphenate SYSTEM "../params/ulink.hyphenate.xml"> <!ENTITY ulink.show SYSTEM "../params/ulink.show.xml"> +<!ENTITY use.extensions SYSTEM "../params/use.extensions.xml"> +<!ENTITY use.local.olink.style SYSTEM "../params/use.local.olink.style.xml"> +<!ENTITY use.role.as.xrefstyle SYSTEM "../params/use.role.as.xrefstyle.xml"> +<!ENTITY use.role.for.mediaobject SYSTEM "../params/use.role.for.mediaobject.xml"> +<!ENTITY use.svg SYSTEM "../params/use.svg.xml"> <!ENTITY variablelist.as.blocks SYSTEM "../params/variablelist.as.blocks.xml"> <!ENTITY verbatim.properties SYSTEM "../params/verbatim.properties.xml"> <!ENTITY xep.extensions SYSTEM "../params/xep.extensions.xml"> <!ENTITY xref.properties SYSTEM "../params/xref.properties.xml"> +<!ENTITY sidebar.properties SYSTEM "../params/sidebar.properties.xml"> +<!ENTITY menuchoice.separator SYSTEM "../params/menuchoice.separator.xml"> +<!ENTITY menuchoice.menu.separator SYSTEM "../params/menuchoice.menu.separator.xml"> +<!ENTITY bibliography.numbered SYSTEM "../params/bibliography.numbered.xml"> +<!ENTITY section.title.level1.properties SYSTEM "../params/section.title.level1.properties.xml"> +<!ENTITY section.title.level2.properties SYSTEM "../params/section.title.level2.properties.xml"> +<!ENTITY section.title.level3.properties SYSTEM "../params/section.title.level3.properties.xml"> +<!ENTITY section.title.level4.properties SYSTEM "../params/section.title.level4.properties.xml"> +<!ENTITY section.title.level5.properties SYSTEM "../params/section.title.level5.properties.xml"> +<!ENTITY section.title.level6.properties SYSTEM "../params/section.title.level6.properties.xml"> +<!ENTITY monospace.properties SYSTEM "../params/monospace.properties.xml"> +<!ENTITY make.index.markup SYSTEM "../params/make.index.markup.xml"> +<!ENTITY l10n.gentext.language SYSTEM "../params/l10n.gentext.language.xml"> +<!ENTITY l10n.gentext.default.language SYSTEM "../params/l10n.gentext.default.language.xml"> +<!ENTITY l10n.gentext.use.xref.language SYSTEM "../params/l10n.gentext.use.xref.language.xml"> +<!ENTITY default.image.width SYSTEM "../params/default.image.width.xml"> +<!ENTITY default.float.class SYSTEM "../params/default.float.class.xml"> +<!ENTITY bridgehead.in.toc SYSTEM "../params/bridgehead.in.toc.xml"> +<!ENTITY generate.section.toc.level SYSTEM "../params/generate.section.toc.level.xml"> +<!ENTITY table.cell.border.color SYSTEM "../params/table.cell.border.color.xml"> +<!ENTITY table.cell.border.style SYSTEM "../params/table.cell.border.style.xml"> +<!ENTITY table.cell.border.thickness SYSTEM "../params/table.cell.border.thickness.xml"> +<!ENTITY table.frame.border.color SYSTEM "../params/table.frame.border.color.xml"> +<!ENTITY table.frame.border.style SYSTEM "../params/table.frame.border.style.xml"> +<!ENTITY table.frame.border.thickness SYSTEM "../params/table.frame.border.thickness.xml"> +<!ENTITY header.content.properties SYSTEM "../params/header.content.properties.xml"> +<!ENTITY footer.content.properties SYSTEM "../params/footer.content.properties.xml"> +<!ENTITY ignore.image.scaling SYSTEM "../params/ignore.image.scaling.xml"> +<!ENTITY figure.properties SYSTEM "../params/figure.properties.xml"> +<!ENTITY example.properties SYSTEM "../params/example.properties.xml"> +<!ENTITY equation.properties SYSTEM "../params/equation.properties.xml"> +<!ENTITY table.properties SYSTEM "../params/table.properties.xml"> +<!ENTITY procedure.properties SYSTEM "../params/procedure.properties.xml"> +<!ENTITY footnote.number.format SYSTEM "../params/footnote.number.format.xml"> +<!ENTITY table.footnote.number.format SYSTEM "../params/table.footnote.number.format.xml"> +<!ENTITY footnote.number.symbols SYSTEM "../params/footnote.number.symbols.xml"> +<!ENTITY table.footnote.number.symbols SYSTEM "../params/table.footnote.number.symbols.xml"> +<!ENTITY glossentry.show.acronym SYSTEM "../params/glossentry.show.acronym.xml"> +<!ENTITY ulink.footnote.number.format SYSTEM "../params/ulink.footnote.number.format.xml"> +<!ENTITY xref.with.number.and.title SYSTEM "../params/xref.with.number.and.title.xml"> Index: phpdoc/xsl/docbook/fo/param.xml diff -u phpdoc/xsl/docbook/fo/param.xml:1.1 phpdoc/xsl/docbook/fo/param.xml:1.2 --- phpdoc/xsl/docbook/fo/param.xml:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/param.xml Sun Mar 9 09:54:48 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- This file was generated by weave.xsl version 0.00+. Do not edit! --> +<!-- This file was generated by weave.xsl version 1.0. Do not edit! --> <!-- See http://sourceforge.net/projects/docbook/ --> <!DOCTYPE book PUBLIC "-//DocBook Open Repository//DTD DocBook Literate Programming V0.0//EN" "http://docbook.sourceforge.net/release/litprog/current/dtd/ldocbook.dtd"> @@ -7,7 +7,7 @@ <bookinfo> <title>FO Parameter Reference</title> <releaseinfo role="meta"> -$Id: param.xml,v 1.1 2002/08/13 15:45:39 goba Exp $ +$Id: param.xml,v 1.2 2003/03/09 14:54:48 tom Exp $ </releaseinfo> <author> <surname>Walsh</surname> @@ -146,7 +146,7 @@ </refsynopsisdiv> <refsect1><title>Description</title> <para>How do you want admonitions titles styled? </para> -<para>Set the font-size, weight etc to the style required</para> +<para>Set the font-size, weight etc to the style required.</para> </refsect1> </refentry> @@ -162,7 +162,7 @@ </refsynopsisdiv> <refsect1><title>Description</title> <para>How do you want admonitions styled? </para> -<para>Set the font-size, weight etc to the style required</para> +<para>Set the font-size, weight, etc. to the style required</para> </refsect1> </refentry> @@ -510,17 +510,23 @@ <refsynopsisdiv> <src:fragment id="generate.toc.frag"> <xsl:param name="generate.toc"> -/appendix toc -/article toc -book toc,figure,table,example,equation -/chapter toc -part toc -/preface toc +/appendix toc,title +article/appendix nop +/article toc,title +book toc,title,figure,table,example,equation +/chapter toc,title +part toc,title +/preface toc,title qandadiv toc qandaset toc -reference toc +reference toc,title +/sect1 toc +/sect2 toc +/sect3 toc +/sect4 toc +/sect5 toc /section toc -set toc +set toc,title </xsl:param></src:fragment> </refsynopsisdiv> @@ -569,6 +575,11 @@ without a matching value. That'd be just begging the silly little path/value parser to get confused.</para> +<para>Section ToCs are further controlled by the +<parameter moreinfo="none">generate.section.toc.level</parameter> parameter. +For a given section level to have a ToC, it must have both an entry in +<parameter moreinfo="none">generate.toc</parameter> and be within the range enabled by +<parameter moreinfo="none">generate.section.toc.level</parameter>.</para> </refsect1> </refentry> @@ -594,6 +605,74 @@ </refsect1> </refentry> +<refentry id="make.index.markup"> +<refmeta> +<refentrytitle>make.index.markup</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>make.index.markup</refname> +<refpurpose>Generate XML index markup in the index?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="make.index.markup.frag"><xsl:param name="make.index.markup" + select="0"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>This parameter enables a very neat trick for getting properly +merged, collated back-of-the-book indexes. G. Ken Holman suggested +this trick at Extreme Markup Languages 2002 and I'm indebted to him +for it.</para> + +<para>Jeni Tennison's excellent code in +<filename moreinfo="none">autoidx.xsl</filename> does a great job of merging and +sorting <sgmltag>indexterm</sgmltag>s in the document and building a +back-of-the-book index. However, there's one thing that it cannot +reasonably be expected to do: merge page numbers into ranges. (I would +not have thought that it could collate and suppress duplicate page +numbers, but in fact it appears to manage that task somehow.)</para> + +<para>Ken's trick is to produce a document in which the index at the +back of the book is <quote>displayed</quote> in XML. Because the index +is generated by the FO processor, all of the page numbers have been resolved. +It's a bit hard to explain, but what it boils down to is that instead of having +an index at the back of the book that looks like this:</para> + +<blockquote> +<formalpara><title>A</title> +<para>ap1, 1, 2, 3</para> +</formalpara> +</blockquote> + +<para>you get one that looks like this:</para> + +<blockquote> +<programlisting format="linespecific"><indexdiv>A</indexdiv> +<indexentry> +<primaryie>ap1</primaryie>, +<phrase role="pageno">1</phrase>, +<phrase role="pageno">2</phrase>, +<phrase role="pageno">3</phrase> +</indexentry></programlisting> +</blockquote> + +<para>After building a PDF file with this sort of odd-looking index, you can +extract the text from the PDF file and the result is a proper index expressed in +XML.</para> + +<para>Now you have data that's amenable to processing and a simple Perl script +(such as <filename moreinfo="none">fo/pdf2index</filename>) can +merge page ranges and generate a proper index.</para> + +<para>Finally, reformat your original document using this literal index instead of +an automatically generated one and <quote>bingo</quote>!</para> + +</refsect1> +</refentry> + <refentry id="toc.section.depth"> <refmeta> <refentrytitle>toc.section.depth</refentrytitle> @@ -649,7 +728,7 @@ <refentry id="toc.margin.properties"> <refnamediv> <refname>toc.margin.properties</refname> -<refpurpose>FIXME:</refpurpose> +<refpurpose>Margin properties used on Tables of Contents</refpurpose> </refnamediv> <refsynopsisdiv> @@ -662,8 +741,65 @@ <xsl:attribute name="space-after.maximum">2em</xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>FIXME:</para> +<para>This attribute set is used on Tables of Contents. These attributes are set +on the wrapper that surrounds the ToC block, not on each individual lines.</para> +</refsect1> +</refentry> + +<refentry id="bridgehead.in.toc"> +<refmeta> +<refentrytitle>bridgehead.in.toc</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>bridgehead.in.toc</refname> +<refpurpose>Should bridgehead elements appear in the TOC?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="bridgehead.in.toc.frag"><xsl:param name="bridgehead.in.toc" + select="0"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero, bridgeheads appear in the TOC. Note that this option +is not fully supported and may be removed in a future version of the +stylesheets. +</para> + +</refsect1> +</refentry> + +<refentry id="generate.section.toc.level"> +<refmeta> +<refentrytitle>generate.section.toc.level</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>generate.section.toc.level</refname> +<refpurpose>Control depth of TOC generation in sections</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="generate.section.toc.level.frag"><xsl:param name="generate.section.toc.level" + select="0"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The <parameter moreinfo="none">generate.section.toc.level</parameter> parameter +controls the depth of section in which TOCs will be generated. Note +that this is related to, but not the same as +<parameter moreinfo="none">toc.section.depth</parameter>, which controls the depth to +which TOC entries will be generated in a given TOC.</para> +<para>If, for example, <parameter moreinfo="none">generate.section.toc.level</parameter> +is <literal moreinfo="none">3</literal>, TOCs will be generated in first, second, and third +level sections, but not in fourth level sections. +</para> + </refsect1> </refentry> @@ -1410,7 +1546,10 @@ <para>If true (non-zero), a "NAME" section title is output before the list of 'RefName's. This parameter and -<parameter moreinfo="none">refentry.generate.title</parameter> are mutually exclusive. +<parameter moreinfo="none">refentry.generate.title</parameter> are mutually +exclusive. This means that if you change this parameter to zero, you +should set <parameter moreinfo="none">refentry.generate.title</parameter> to 1 unless +you want get quite strange output. </para> </refsect1> @@ -1436,8 +1575,43 @@ <para>If true (non-zero), the reference page title or first name is output before the list of 'RefName's. This parameter and <parameter moreinfo="none">refentry.generate.name</parameter> are mutually exclusive. -</para> +This means that if you change this parameter to 1, you +should set <parameter moreinfo="none">refentry.generate.name</parameter> to 0 unless +you want get quite strange output.</para> + + +</refsect1> +</refentry> + +<refentry id="refentry.title.properties"> +<refmeta> +<refentrytitle>refentry.title.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>refentry.title.properties</refname> +<refpurpose>Title properties for a refentry title</refpurpose> +</refnamediv> +<refsynopsisdiv> +<src:fragment id="refentry.title.properties.frag"><xsl:attribute-set name="refentry.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"/> + </xsl:attribute> + <xsl:attribute name="font-size">18pt</xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="space-after">1em</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> + <xsl:attribute name="space-after.maximum">0.6em</xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>FIXME:</para> </refsect1> </refentry> @@ -1520,45 +1694,90 @@ </refsect1> </refentry> -<refentry id="table.border.thickness"> +<refentry id="table.cell.padding"> <refmeta> -<refentrytitle>table.border.thickness</refentrytitle> +<refentrytitle>table.cell.padding</refentrytitle> <refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>table.border.thickness</refname> +<refname>table.cell.padding</refname> <refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="table.border.thickness.frag"><xsl:param name="table.border.thickness" +<src:fragment id="table.cell.padding.frag"><xsl:attribute-set name="table.cell.padding"> + <xsl:attribute name="padding-left">2pt</xsl:attribute> + <xsl:attribute name="padding-right">2pt</xsl:attribute> + <xsl:attribute name="padding-top">2pt</xsl:attribute> + <xsl:attribute name="padding-bottom">2pt</xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>FIXME:</para> + +</refsect1> +</refentry> + +<refentry id="table.frame.border.thickness"> +<refmeta> +<refentrytitle>table.frame.border.thickness</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>table.frame.border.thickness</refname> +<refpurpose>Specifies the thickness of the frame border</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="table.frame.border.thickness.frag"><xsl:param name="table.frame.border.thickness" select="'0.5pt'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> +<para>Specifies the thickness of the border on the table's frame.</para> + +</refsect1> +</refentry> + +<refentry id="table.frame.border.style"> +<refmeta> +<refentrytitle>table.frame.border.style</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>table.frame.border.style</refname> +<refpurpose/> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="table.frame.border.style.frag"><xsl:param name="table.frame.border.style" + select="'solid'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + <para>FIXME:</para> </refsect1> </refentry> -<refentry id="table.cell.padding"> +<refentry id="table.frame.border.color"> <refmeta> -<refentrytitle>table.cell.padding</refentrytitle> +<refentrytitle>table.frame.border.color</refentrytitle> <refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>table.cell.padding</refname> +<refname>table.frame.border.color</refname> <refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="table.cell.padding.frag"><xsl:attribute-set name="table.cell.padding"> - <xsl:attribute name="padding-left">2pt</xsl:attribute> - <xsl:attribute name="padding-right">2pt</xsl:attribute> - <xsl:attribute name="padding-top">2pt</xsl:attribute> - <xsl:attribute name="padding-bottom">2pt</xsl:attribute> -</xsl:attribute-set></src:fragment> +<src:fragment id="table.frame.border.color.frag"> +<xsl:param name="table.frame.border.color" + select="'black'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> @@ -1568,19 +1787,19 @@ </refsect1> </refentry> -<refentry id="table.border.style"> +<refentry id="table.cell.border.thickness"> <refmeta> -<refentrytitle>table.border.style</refentrytitle> +<refentrytitle>table.cell.border.thickness</refentrytitle> <refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>table.border.style</refname> +<refname>table.cell.border.thickness</refname> <refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="table.border.style.frag"><xsl:param name="table.border.style" - select="'solid'"/></src:fragment> +<src:fragment id="table.cell.border.thickness.frag"><xsl:param name="table.cell.border.thickness" + select="'0.5pt'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> @@ -1590,19 +1809,19 @@ </refsect1> </refentry> -<refentry id="table.border.color"> +<refentry id="table.cell.border.style"> <refmeta> -<refentrytitle>table.border.color</refentrytitle> +<refentrytitle>table.cell.border.style</refentrytitle> <refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>table.border.color</refname> +<refname>table.cell.border.style</refname> <refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="table.border.color.frag"><xsl:param name="table.border.color" - select="'black'"/></src:fragment> +<src:fragment id="table.cell.border.style.frag"><xsl:param name="table.cell.border.style" + select="'solid'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> @@ -1612,19 +1831,20 @@ </refsect1> </refentry> -<refentry id="table.entry.padding"> +<refentry id="table.cell.border.color"> <refmeta> -<refentrytitle>table.entry.padding</refentrytitle> +<refentrytitle>table.cell.border.color</refentrytitle> <refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>table.entry.padding</refname> +<refname>table.cell.border.color</refname> <refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="table.entry.padding.frag"><xsl:param name="table.entry.padding" - select="'2pt'"/></src:fragment> +<src:fragment id="table.cell.border.color.frag"> +<xsl:param name="table.cell.border.color" + select="'black'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> @@ -1636,6 +1856,104 @@ </reference> +<reference><title>Linking</title> +<refentry id="target.database.document"> +<refmeta> +<refentrytitle>target.database.document</refentrytitle> +<refmiscinfo role="type">uri</refmiscinfo> +</refmeta> +<refnamediv> +<refname>target.database.document</refname> +<refpurpose>Name of master database file for resolving +olinks</refpurpose> +</refnamediv> +<refsynopsisdiv> <src:fragment id="target.database.document.frag"><xsl:param name="target.database.document" + select="''"/></src:fragment> +</refsynopsisdiv> +<refsect1> +<title>Description</title> +<para> +To resolve olinks between documents, the stylesheets use +a master database document that identifies the target datafiles for all the documents within the scope +of the olinks. This parameter value is the URI of +the master document to be read during processing to resolve olinks. +The default value is <filename moreinfo="none">olinkdb.xml</filename>.</para> +<para>The data structure of the file is defined in the <filename moreinfo="none">targetdatabase.dtd</filename> DTD. The database file provides the high level elements to record the identifiers, locations, and relationships of documents. The cross reference data for individual documents is generally pulled into the database using system entity references or XIncludes. See also <parameter moreinfo="none">targets.filename</parameter>. + +</para> +</refsect1> +</refentry> + +<refentry id="use.local.olink.style"> +<refmeta> +<refentrytitle>use.local.olink.style</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>use.local.olink.style</refname> +<refpurpose>Process olinks using xref style of current +document</refpurpose> +</refnamediv> +<refsynopsisdiv> <src:fragment id="use.local.olink.style.frag"><xsl:param name="use.local.olink.style" + select="0"/> </src:fragment> +</refsynopsisdiv> +<refsect1> +<title>Description</title> +<para>When cross reference data is collected for use by olinks, the data for each potential target includes one field containing a completely assembled cross reference string, as if it were an xref generated in that document. Other fields record the separate title, number, and element name of each target. When an olink is formed to a target from another document, the olink resolves to that preassembled string by default. If the <parameter moreinfo="none">use.local.olink.style</parameter> parameter is set to non-zero, then instead the cross +reference string is formed again from the target title, number, and +element name, using the stylesheet processing the targeting document. +Then olinks will match the xref style in the targeting document +rather than in the target document. If both documents are processed +with the same stylesheet, then the results will be the same.</para> +</refsect1> +</refentry> + +<refentry id="current.docid"> +<refmeta> +<refentrytitle>current.docid</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>current.docid</refname> +<refpurpose>targetdoc identifier for the document being +processed</refpurpose> +</refnamediv> +<refsynopsisdiv> <src:fragment id="current.docid.frag"><xsl:param name="current.docid" + select="''"/> </src:fragment> +</refsynopsisdiv> +<refsect1> +<title>Description</title> +<para>When olinks between documents are resolved for HTML output, the stylesheet can compute the relative path between the current document and the target document. The stylesheet needs to know the <literal moreinfo="none">targetdoc</literal> identifiers for both documents, as they appear in the <parameter moreinfo="none">target.database.document</parameter> database file. This parameter passes to the stylesheet +the targetdoc identifier of the current document, since that +identifier does not appear in the document itself. </para> +<para>This parameter can also be used for print output. If an olink's <literal moreinfo="none">targetdoc</literal> id differs from the <literal moreinfo="none">current.docid</literal>, then the stylesheet can append the target document's title to the generated olink text. That identifies to the reader that the link is to a different document, not the current document. See also <parameter moreinfo="none">olink.doctitle</parameter> to enable that feature.</para> +</refsect1> +</refentry> + +<refentry id="olink.doctitle"> +<refmeta> +<refentrytitle>olink.doctitle</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>olink.doctitle</refname> +<refpurpose>show the document title for external olinks?</refpurpose> + +</refnamediv> +<refsynopsisdiv> <src:fragment id="olink.doctitle.frag"><xsl:param name="olink.doctitle" + select="0"/> </src:fragment> +</refsynopsisdiv> +<refsect1> +<title>Description</title> +<para>When olinks between documents are resolved for print output, the generated text may not make it clear that the reference is to another document. It is possible for the stylesheets to append the other document's title to external olinks. For this to happen, two parameters must be set. The <parameter moreinfo="none">olink.doctitle</parameter> parameter should be set to nonzero to enable this +feature. And you should set the <parameter moreinfo="none">current.docid</parameter> parameter to the document id for the document currently +being processed for output. If an olink's <literal moreinfo="none">targetdoc</literal> id differs from the <literal moreinfo="none">current.docid</literal>, then the stylesheet can append the target document's +title to the generated olink text. </para> +</refsect1> +</refentry> + +</reference> + <reference><title>QAndASet</title> <refentry id="qandadiv.autolabel"> <refmeta> @@ -1807,6 +2125,28 @@ </refsect1> </refentry> +<refentry id="bibliography.numbered"> +<refmeta> +<refentrytitle>bibliography.numbered</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>bibliography.numbered</refname> +<refpurpose>Should bibliography entries be numbered?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="bibliography.numbered.frag"><xsl:param name="bibliography.numbered" + select="0"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero bibliography entries will be numbered</para> + +</refsect1> +</refentry> + </reference> <reference><title>Glossary</title> @@ -2048,143 +2388,306 @@ <para>The stylesheets will format the glossary in your document as if all of the entries implicilty referenced appeared there literally.</para> </refsect2> + +<refsect2><title>Limitations</title> + +<para>Glossary cross-references <emphasis>within the glossary</emphasis> are +not supported. For example, this <emphasis>will not</emphasis> work:</para> + +<informalexample> +<programlisting format="linespecific"><glossentry> +<glossterm>gloss-1</glossterm> +<glossdef><para>A description that references <glossterm>gloss-2</glossterm>.</para> +<glossseealso>gloss-2</glossseealso> +</glossdef> +</glossentry></programlisting> +</informalexample> + +<para>If you put glossary cross-references in your glossary that way, +you'll get the cryptic error: <computeroutput moreinfo="none">Warning: +glossary.collection specified, but there are 0 automatic +glossaries</computeroutput>.</para> + +<para>Instead, you must do two things:</para> + +<orderedlist inheritnum="ignore" continuation="restarts"> +<listitem> +<para>Markup your glossary using <sgmltag>glossseealso</sgmltag>:</para> + +<informalexample> +<programlisting format="linespecific"><glossentry> +<glossterm>gloss-1</glossterm> +<glossdef><para>A description that references <glossterm>gloss-2</glossterm>.</para> +<glossseealso>gloss-2</glossseealso> +</glossdef> +</glossentry></programlisting> +</informalexample> +</listitem> + +<listitem> +<para>Make sure there is at least one <sgmltag>glossterm</sgmltag> reference to +<glossterm>gloss-2</glossterm> <emphasis>in your document</emphasis>. The +easiest way to do that is probably within a <sgmltag>remark</sgmltag> in your +automatic glossary:</para> + +<informalexample> +<programlisting format="linespecific"><glossary role="auto"> +<remark>Make sure there's a reference to <glossterm>gloss-2</glossterm>.</remark> +<glossentry> +<glossterm>Irrelevant</glossterm> +<glossdef> +<para>If you can see this, the document was processed incorrectly. Use +the <parameter>glossary.collection</parameter> parameter.</para> +</glossdef> +</glossentry> +</glossary></programlisting> +</informalexample> +</listitem> +</orderedlist> +</refsect2> + </refsect1> </refentry> -</reference> - -<reference><title>Miscellaneous</title> -<refentry id="graphic.default.extension"> +<refentry id="glossterm.separation"> <refmeta> -<refentrytitle>graphic.default.extension</refentrytitle> -<refmiscinfo role="type">string</refmiscinfo> +<refentrytitle>glossterm.separation</refentrytitle> +<refmiscinfo role="type">length</refmiscinfo> </refmeta> <refnamediv> -<refname>graphic.default.extension</refname> -<refpurpose>Default extension for graphic filenames</refpurpose> +<refname>glossterm.separation</refname> +<refpurpose>Separation between glossary terms and descriptions in list mode</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="graphic.default.extension.frag"><xsl:param name="graphic.default.extension"/></src:fragment> +<src:fragment id="glossterm.separation.frag"><xsl:param name="glossterm.separation" + select="'0.25in'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>If a <sgmltag>graphic</sgmltag> or <sgmltag>mediaobject</sgmltag> -includes a reference to a filename that does not include an extension, -and the <sgmltag class="attribute">format</sgmltag> attribute is -<emphasis>unspecified</emphasis>, the default extension will be used. -</para> +<para>Specifies the separation between glossary terms and descriptions when +glossarys are presented using lists.</para> </refsect1> </refentry> -<refentry id="formal.procedures"> +<refentry id="glossterm.width"> <refmeta> -<refentrytitle>formal.procedures</refentrytitle> -<refmiscinfo role="type">boolean</refmiscinfo> +<refentrytitle>glossterm.width</refentrytitle> +<refmiscinfo role="type">length</refmiscinfo> </refmeta> <refnamediv> -<refname>formal.procedures</refname> -<refpurpose>Selects formal or informal procedures</refpurpose> +<refname>glossterm.width</refname> +<refpurpose>Width of glossterm in list presentation mode</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="formal.procedures.frag"><xsl:param name="formal.procedures" - select="1"/></src:fragment> +<src:fragment id="glossterm.width.frag"><xsl:param name="glossterm.width" + select="'2in'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>Formal procedures are numbered and always have a title. -</para> +<para>This parameter specifies the width reserved for glossary terms when +a list presentation is used.</para> </refsect1> </refentry> -<refentry id="formal.title.placement"> +<refentry id="glossary.as.blocks"> <refmeta> -<refentrytitle>formal.title.placement</refentrytitle> -<refmiscinfo role="type"/> +<refentrytitle>glossary.as.blocks</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>formal.title.placement</refname> -<refpurpose/> +<refname>glossary.as.blocks</refname> +<refpurpose>Present glossarys using blocks instead of lists?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="formal.title.placement.frag"><xsl:param name="formal.title.placement"> -figure before -example before -equation before -table before -procedure before -</xsl:param></src:fragment> +<src:fragment id="glossary.as.blocks.frag"><xsl:param name="glossary.as.blocks" + select="0"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>Specifies where formal object titles should occur. For each formal object -type (<sgmltag>figure</sgmltag>, -<sgmltag>example</sgmltag>, -<sgmltag>equation</sgmltag>, -<sgmltag>table</sgmltag>, and <sgmltag>procedure</sgmltag>) -you can specify either the keyword -<quote><literal moreinfo="none">before</literal></quote> or -<quote><literal moreinfo="none">after</literal></quote>.</para> +<para>If non-zero, <sgmltag>glossary</sgmltag>s will be formatted as +blocks.</para> + +<para>If you have long <sgmltag>glossterm</sgmltag>s, proper list +markup in the FO case may produce unattractive lists. By setting this +parameter, you can force the stylesheets to produce block markup +instead of proper lists.</para> + +<para>You can override this setting with a processing instruction as the +child of <sgmltag>glossary</sgmltag>: <sgmltag class="pi">dbfo +glossary-presentation="blocks"</sgmltag> or <sgmltag class="pi">dbfo +glossary-presentation="list"</sgmltag></para> </refsect1> </refentry> -<refentry id="runinhead.default.title.end.punct"> +<refentry id="glosslist.as.blocks"> <refmeta> -<refentrytitle>runinhead.default.title.end.punct</refentrytitle> -<refmiscinfo role="type">string</refmiscinfo> +<refentrytitle>glosslist.as.blocks</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>runinhead.default.title.end.punct</refname> -<refpurpose>Default punctuation character on a run-in-head</refpurpose> +<refname>glosslist.as.blocks</refname> +<refpurpose>Use blocks for glosslists?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="runinhead.default.title.end.punct.frag"><xsl:param name="runinhead.default.title.end.punct" - select="'.'"/></src:fragment> +<src:fragment id="glosslist.as.blocks.frag"><xsl:param name="glosslist.as.blocks" + select="0"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>FIXME: -</para> +<para>See <parameter moreinfo="none">glossary.as.blocks</parameter>.</para> </refsect1> </refentry> -<refentry id="runinhead.title.end.punct"> +<refentry id="glossentry.show.acronym"> <refmeta> -<refentrytitle>runinhead.title.end.punct</refentrytitle> -<refmiscinfo role="type">string</refmiscinfo> +<refentrytitle>glossentry.show.acronym</refentrytitle> +<refmiscinfo role="type">list</refmiscinfo> </refmeta> <refnamediv> -<refname>runinhead.title.end.punct</refname> -<refpurpose>Characters that count as punctuation on a run-in-head</refpurpose> +<refname>glossentry.show.acronym</refname> +<refpurpose>Display <sgmltag>glossentry</sgmltag> acronyms?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="runinhead.title.end.punct.frag"><xsl:param name="runinhead.title.end.punct" - select="'.!?:'"/></src:fragment> +<src:fragment id="glossentry.show.acronym.frag"><xsl:param name="glossentry.show.acronym" + select="'no'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>FIXME: -</para> +<para>A setting of <quote>yes</quote> means they should be displayed; +<quote>no</quote> means they shouldn't. If <quote>primary</quote> is used, +then they are shown as the primary text for the entry.</para> + +<note> +<para>This setting controls both <sgmltag>acronym</sgmltag> and +<sgmltag>abbrev</sgmltag> elements in the <sgmltag>glossentry</sgmltag>.</para> +</note> </refsect1> </refentry> -<refentry id="show.comments"> -<refmeta> -<refentrytitle>show.comments</refentrytitle> +</reference> + +<reference><title>Miscellaneous</title> +<refentry id="formal.procedures"> +<refmeta> +<refentrytitle>formal.procedures</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>formal.procedures</refname> +<refpurpose>Selects formal or informal procedures</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="formal.procedures.frag"><xsl:param name="formal.procedures" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Formal procedures are numbered and always have a title. +</para> + +</refsect1> +</refentry> + +<refentry id="formal.title.placement"> +<refmeta> +<refentrytitle>formal.title.placement</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>formal.title.placement</refname> +<refpurpose/> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="formal.title.placement.frag"><xsl:param name="formal.title.placement"> +figure before +example before +equation before +table before +procedure before +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Specifies where formal object titles should occur. For each formal object +type (<sgmltag>figure</sgmltag>, +<sgmltag>example</sgmltag>, +<sgmltag>equation</sgmltag>, +<sgmltag>table</sgmltag>, and <sgmltag>procedure</sgmltag>) +you can specify either the keyword +<quote><literal moreinfo="none">before</literal></quote> or +<quote><literal moreinfo="none">after</literal></quote>.</para> + +</refsect1> +</refentry> + +<refentry id="runinhead.default.title.end.punct"> +<refmeta> +<refentrytitle>runinhead.default.title.end.punct</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>runinhead.default.title.end.punct</refname> +<refpurpose>Default punctuation character on a run-in-head</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="runinhead.default.title.end.punct.frag"><xsl:param name="runinhead.default.title.end.punct" + select="'.'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>FIXME: +</para> + +</refsect1> +</refentry> + +<refentry id="runinhead.title.end.punct"> +<refmeta> +<refentrytitle>runinhead.title.end.punct</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>runinhead.title.end.punct</refname> +<refpurpose>Characters that count as punctuation on a run-in-head</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="runinhead.title.end.punct.frag"><xsl:param name="runinhead.title.end.punct" + select="'.!?:'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>FIXME: +</para> + +</refsect1> +</refentry> + +<refentry id="show.comments"> +<refmeta> +<refentrytitle>show.comments</refentrytitle> <refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> @@ -2277,7 +2780,24 @@ unattractive lists. By setting this parameter, you can force the stylesheets to produce block markup instead of proper lists.</para> +<para>You can override this setting with a processing instruction as the +child of <sgmltag>variablelist</sgmltag>: <sgmltag class="pi">dbfo +list-presentation="blocks"</sgmltag> or <sgmltag class="pi">dbfo +list-presentation="list"</sgmltag></para> + +<programlisting format="linespecific"> <variablelist> + <?dbfo list-presentation="list"?> + <varlistentry> + <term>list</term> + <listitem> + <para> + Formatted as a list even if variablelist.as.blocks is set to 1. + </para> + </listitem> + </varlistentry> + </variablelist></programlisting> </refsect1> + </refentry> <refentry id="blockquote.properties"> @@ -2346,12 +2866,35 @@ <refsect1><title>Description</title> <para>If non-zero, the URL of each <sgmltag>ULink</sgmltag> will -appear as a footnote. <emphasis>Not yet implemented!</emphasis> +appear as a footnote. </para> </refsect1> </refentry> +<refentry id="ulink.footnote.number.format"> +<refmeta> +<refentrytitle>ulink.footnote.number.format</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>ulink.footnote.number.format</refname> +<refpurpose>Identifies the format used for <sgmltag>ulink</sgmltag> footnote numbers</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="ulink.footnote.number.format.frag"><xsl:param name="ulink.footnote.number.format" + select="'1'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The <parameter moreinfo="none">ulink.footnote.number.format</parameter> specifies the format +to use for footnote numeration (1, i, I, a, or A).</para> + +</refsect1> +</refentry> + <refentry id="ulink.hyphenate"> <refmeta> <refentrytitle>ulink.hyphenate</refentrytitle> @@ -2451,1184 +2994,2268 @@ </refsect1> </refentry> -</reference> +<refentry id="use.role.as.xrefstyle"> +<refmeta> +<refentrytitle>use.role.as.xrefstyle</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>use.role.as.xrefstyle</refname> +<refpurpose>Use <sgmltag class="attribute">role</sgmltag> attribute for +<sgmltag class="attribute">xrefstyle</sgmltag> on <sgmltag>xref</sgmltag>?</refpurpose> +</refnamediv> -<reference><title>Pagination and General Styles</title> -<partintro> -<section><title>Understanding XSL FO Margins</title> +<refsynopsisdiv> +<src:fragment id="use.role.as.xrefstyle.frag"><xsl:param name="use.role.as.xrefstyle" + select="1"/></src:fragment> +</refsynopsisdiv> -<para>In order for the parameters in this section to make sense, it is useful to -consider <xref linkend="fig.pagemodel"/>.</para> +<refsect1><title>Description</title> -<figure id="fig.pagemodel" float="0"> -<mediaobject> -<imageobject> -<imagedata fileref="page.png"/> -</imageobject> -<textobject><phrase>Figure showing page margins</phrase></textobject> -<textobject> -<para>This figure shows the physical page with the various FO page regions -identified.</para> -</textobject> -</mediaobject> -</figure> +<para>If non-zero, the <sgmltag class="attribute">role</sgmltag> attribute on +<sgmltag>xref</sgmltag> will be used to select the cross reference style. +The <ulink url="http://www.oasis-open.org/docbook/">DocBook +Technical Committee</ulink> recently added an +<sgmltag class="attribute">xrefstyle</sgmltag> attribute for this purpose. +If the <sgmltag class="attribute">xrefstyle</sgmltag> attribute +is present, <sgmltag class="attribute">role</sgmltag> will be ignored, regardless +of this setting.</para> -<para>First, let's consider the regions on the page.</para> +<para>Until an official DocBook release that includes the new +attribute, this flag allows <sgmltag class="attribute">role</sgmltag> +to serve that purpose.</para> -<para>The white region is the physical page. Its dimensions are determined by -the <parameter moreinfo="none">page.height</parameter> and <parameter moreinfo="none">page.width</parameter> -parameters.</para> +</refsect1> -<para>The yellow region is the region-body. The size and placement of -the region body is constrained by the dimensions labelled in the -figure.</para> +<refsect1><title>Example</title> -<para>The pink region at the top of the page is the region-before. The -darker area inside the region-before is the header text. In XSL, the default -display alignment for the region-before is <literal moreinfo="none">before</literal>, but -the DocBook stylesheets explicitly make it <literal moreinfo="none">after</literal>. That's -why the darker area is at the bottom.</para> +<para>The following small stylesheet shows how to configure the stylesheets to make +use of the cross reference style:</para> -<para>The pink region at the bottom of the page is the region-after. -The darker area is the footer text. In XSL, the default display -alignment for the region-after is <literal moreinfo="none">before</literal> (really!), -but the DocBook stylesheets explicitly make it -<literal moreinfo="none">after</literal>. That's why the darker area is at the bottom.</para> +<programlisting format="linespecific"><?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> -<para>The dimensions in the figure are:</para> +<xsl:import href="../xsl/html/docbook.xsl"/> -<orderedlist numeration="upperalpha" inheritnum="ignore" continuation="restarts"> -<listitem><para>The page-master margin-top. -</para></listitem> -<listitem><para>The region-before extent. -</para></listitem> -<listitem><para>The region-body margin-top. -</para></listitem> -<listitem><para>The region-after extent. -</para></listitem> -<listitem><para>The page-master margin-bottom. -</para></listitem> -<listitem><para>The region-body margin-bottom. -</para></listitem> -<listitem><para>The sum of the page-master margin-left and the -region-body margin-left. In DocBook, the region-body margin-left is -zero by default, so this is simply the page-master region-left. -</para></listitem> -<listitem><para>The sum of the page-master margin-right and the -region-body margin-right. In DocBook, the region-body margin-right is -zero by default, so this is simply the page-master region-left. -</para></listitem> -</orderedlist> +<xsl:output method="html"/> -</section> -</partintro> +<xsl:param name="local.l10n.xml" select="document('')"/> +<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> + <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en"> + <l:context name="xref"> + <l:template name="chapter" style="title" text="Chapter %n, %t"/> + <l:template name="chapter" text="Chapter %n"/> + </l:context> + </l:l10n> +</l:i18n> -<refentry id="page.height"> -<refmeta> -<refentrytitle>page.height</refentrytitle> +</xsl:stylesheet></programlisting> + +<para>With this stylesheet, the cross references in the following document:</para> + +<programlisting format="linespecific"><?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> +<book id="book"><title>Book</title> + +<preface> +<title>Preface</title> + +<para>Normal: <xref linkend="ch1"/>.</para> +<para>Title: <xref xrefstyle="title" linkend="ch1"/>.</para> + +</preface> + +<chapter id="ch1"> +<title>First Chapter</title> + +<para>Irrelevant.</para> + +</chapter> +</book></programlisting> + +<para>will appear as:</para> + +<informalexample> +<para>Normal: Chapter 1.</para> +<para>Title: Chapter 1, <emphasis>First Chapter</emphasis>.</para> +</informalexample> +</refsect1> + +</refentry> +<refentry id="menuchoice.separator"> +<refmeta> +<refentrytitle>menuchoice.separator</refentrytitle> +<refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>page.height</refname> -<refpurpose>The height of the physical page</refpurpose> +<refname>menuchoice.separator</refname> +<refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.height.frag"><xsl:param name="page.height"> - <xsl:choose> - <xsl:when test="$page.orientation = 'portrait'"> - <xsl:value-of select="$page.height.portrait"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$page.width.portrait"/> - </xsl:otherwise> - </xsl:choose> -</xsl:param></src:fragment> +<src:fragment id="menuchoice.separator.frag"><xsl:param name="menuchoice.separator" + select="'+'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The page height is generally calculated from the -<literal moreinfo="none">paper.type</literal> and -<literal moreinfo="none">page.orientation</literal>. +<para>Separator used to connect items of a <sgmltag>menuchoice</sgmltag> other +than <sgmltag>guimenuitem</sgmltag> and <sgmltag>guisubmenu</sgmltag>. The latter +elements are linked with <parameter moreinfo="none">menuchoice.menu.separator</parameter>. </para> </refsect1> </refentry> -<refentry id="page.height.portrait"> +<refentry id="menuchoice.menu.separator"> <refmeta> -<refentrytitle>page.height.portrait</refentrytitle> +<refentrytitle>menuchoice.menu.separator</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>menuchoice.menu.separator</refname> +<refpurpose/> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="menuchoice.menu.separator.frag"><xsl:param name="menuchoice.menu.separator" + select="'->'"/></src:fragment> +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Separator used to connect items of a <sgmltag>menuchoice</sgmltag> with +<sgmltag>guimenuitem</sgmltag> or <sgmltag>guisubmenu</sgmltag>. Other elements +are linked with <parameter moreinfo="none">menuchoice.separator</parameter>. +</para> + +</refsect1> +</refentry> + +<refentry id="default.float.class"> +<refmeta> +<refentrytitle>default.float.class</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> </refmeta> <refnamediv> -<refname>page.height.portrait</refname> -<refpurpose>Specify the physical size of the long edge of the page</refpurpose> +<refname>default.float.class</refname> +<refpurpose>Specifies the default float class</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.height.portrait.frag"><xsl:param name="page.height.portrait"> - <xsl:choose> - <xsl:when test="$paper.type = 'A4landscape'">210mm</xsl:when> - <xsl:when test="$paper.type = 'USletter'">11in</xsl:when> - <xsl:when test="$paper.type = 'USlandscape'">8.5in</xsl:when> - <xsl:when test="$paper.type = '4A0'">2378mm</xsl:when> - <xsl:when test="$paper.type = '2A0'">1682mm</xsl:when> - <xsl:when test="$paper.type = 'A0'">1189mm</xsl:when> - <xsl:when test="$paper.type = 'A1'">841mm</xsl:when> - <xsl:when test="$paper.type = 'A2'">594mm</xsl:when> - <xsl:when test="$paper.type = 'A3'">420mm</xsl:when> - <xsl:when test="$paper.type = 'A4'">297mm</xsl:when> - <xsl:when test="$paper.type = 'A5'">210mm</xsl:when> - <xsl:when test="$paper.type = 'A6'">148mm</xsl:when> - <xsl:when test="$paper.type = 'A7'">105mm</xsl:when> - <xsl:when test="$paper.type = 'A8'">74mm</xsl:when> - <xsl:when test="$paper.type = 'A9'">52mm</xsl:when> - <xsl:when test="$paper.type = 'A10'">37mm</xsl:when> - <xsl:when test="$paper.type = 'B0'">1414mm</xsl:when> - <xsl:when test="$paper.type = 'B1'">1000mm</xsl:when> - <xsl:when test="$paper.type = 'B2'">707mm</xsl:when> - <xsl:when test="$paper.type = 'B3'">500mm</xsl:when> - <xsl:when test="$paper.type = 'B4'">353mm</xsl:when> - <xsl:when test="$paper.type = 'B5'">250mm</xsl:when> - <xsl:when test="$paper.type = 'B6'">176mm</xsl:when> - <xsl:when test="$paper.type = 'B7'">125mm</xsl:when> - <xsl:when test="$paper.type = 'B8'">88mm</xsl:when> - <xsl:when test="$paper.type = 'B9'">62mm</xsl:when> - <xsl:when test="$paper.type = 'B10'">44mm</xsl:when> - <xsl:when test="$paper.type = 'C0'">1297mm</xsl:when> - <xsl:when test="$paper.type = 'C1'">917mm</xsl:when> - <xsl:when test="$paper.type = 'C2'">648mm</xsl:when> - <xsl:when test="$paper.type = 'C3'">458mm</xsl:when> - <xsl:when test="$paper.type = 'C4'">324mm</xsl:when> - <xsl:when test="$paper.type = 'C5'">229mm</xsl:when> - <xsl:when test="$paper.type = 'C6'">162mm</xsl:when> - <xsl:when test="$paper.type = 'C7'">114mm</xsl:when> - <xsl:when test="$paper.type = 'C8'">81mm</xsl:when> - <xsl:when test="$paper.type = 'C9'">57mm</xsl:when> - <xsl:when test="$paper.type = 'C10'">40mm</xsl:when> - <xsl:otherwise>11in</xsl:otherwise> - </xsl:choose> -</xsl:param></src:fragment> +<src:fragment id="default.float.class.frag"><xsl:param name="default.float.class" + select="'before'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The portrait page height is the length of the long -edge of the physical page. -</para> +<para>FIXME:</para> </refsect1> </refentry> -<refentry id="page.margin.bottom"> +<refentry id="footnote.number.format"> <refmeta> -<refentrytitle>page.margin.bottom</refentrytitle> - +<refentrytitle>footnote.number.format</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> </refmeta> <refnamediv> -<refname>page.margin.bottom</refname> -<refpurpose>The bottom margin of the page</refpurpose> +<refname>footnote.number.format</refname> +<refpurpose>Identifies the format used for footnote numbers</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.margin.bottom.frag"><xsl:param name="page.margin.bottom">0.5in</xsl:param></src:fragment> +<src:fragment id="footnote.number.format.frag"><xsl:param name="footnote.number.format" + select="'1'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The bottom page margin is the distance from the bottom of the region-after -to the physical bottom of the page. -</para> +<para>The <parameter moreinfo="none">footnote.number.format</parameter> specifies the format +to use for footnote numeration (1, i, I, a, or A).</para> </refsect1> </refentry> -<refentry id="page.margin.inner"> +<refentry id="table.footnote.number.format"> <refmeta> -<refentrytitle>page.margin.inner</refentrytitle> - +<refentrytitle>table.footnote.number.format</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> </refmeta> <refnamediv> -<refname>page.margin.inner</refname> -<refpurpose>The inner page margin</refpurpose> +<refname>table.footnote.number.format</refname> +<refpurpose>Identifies the format used for footnote numbers in tables</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.margin.inner.frag"><xsl:param name="page.margin.inner"> - <xsl:choose> - <xsl:when test="$double.sided != 0">1.25in</xsl:when> - <xsl:otherwise>1in</xsl:otherwise> - </xsl:choose> -</xsl:param></src:fragment> +<src:fragment id="table.footnote.number.format.frag"><xsl:param name="table.footnote.number.format" + select="'a'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The inner page margin is the distance from binding edge of the -page to the first column of text. In the left-to-right, top-to-bottom writing -direction, this is the left margin of recto pages.</para> -<para>The inner and outer margins are usually the same unless the output -is double-sided. -</para> +<para>The <parameter moreinfo="none">table.footnote.number.format</parameter> specifies the format +to use for footnote numeration (1, i, I, a, or A) in tables.</para> </refsect1> </refentry> -<refentry id="page.margin.outer"> +<refentry id="footnote.number.symbols"> <refmeta> -<refentrytitle>page.margin.outer</refentrytitle> - +<refentrytitle>footnote.number.symbols</refentrytitle> +<refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>page.margin.outer</refname> -<refpurpose>The outer page margin</refpurpose> +<refname>footnote.number.symbols</refname> +<refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.margin.outer.frag"><xsl:param name="page.margin.outer"> - <xsl:choose> - <xsl:when test="$double.sided != 0">0.75in</xsl:when> - <xsl:otherwise>1in</xsl:otherwise> - </xsl:choose> -</xsl:param></src:fragment> +<src:fragment id="footnote.number.symbols.frag"><xsl:param name="footnote.number.symbols" + select="''"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The outer page margin is the distance from non-binding edge of the -page to the last column of text. In the left-to-right, top-to-bottom writing -direction, this is the right margin of recto pages.</para> -<para>The inner and outer margins are usually the same unless the output -is double-sided. -</para> +<para>If <parameter moreinfo="none">footnote.number.symbols</parameter> is not the empty string, +footnotes will use the characters it contains as footnote symbols. For example, +<quote>*&#x2020;&#x2021;&#x25CA;&#x2720;</quote> will identify +footnotes with <quote>*</quote>, <quote>â </quote>, <quote>â¡</quote>, +<quote>â</quote>, and <quote>â </quote>. If there are more footnotes +than symbols, the stylesheets will fall back to numbered footnotes using +<parameter moreinfo="none">footnote.number.format</parameter>.</para> + +<para>The use of symbols for footnotes depends on the ability of your +processor (or browser) to render the symbols you select. Not all systems are +capable of displaying the full range of Unicode characters. If the quoted characters +in the preceding paragraph are not displayed properly, that's a good indicator +that you may have trouble using those symbols for footnotes.</para> </refsect1> </refentry> -<refentry id="page.margin.top"> +<refentry id="table.footnote.number.symbols"> <refmeta> -<refentrytitle>page.margin.top</refentrytitle> - +<refentrytitle>table.footnote.number.symbols</refentrytitle> +<refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>page.margin.top</refname> -<refpurpose>The top margin of the page</refpurpose> +<refname>table.footnote.number.symbols</refname> +<refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.margin.top.frag"><xsl:param name="page.margin.top">0in</xsl:param></src:fragment> +<src:fragment id="table.footnote.number.symbols.frag"><xsl:param name="table.footnote.number.symbols" + select="''"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The top page margin is the distance from the physical top of the -page to the top of the region-before.</para> +<para>If <parameter moreinfo="none">table.footnote.number.symbols</parameter> is not the empty string, +table footnotes will use the characters it contains as footnote symbols. For example, +<quote>*&#x2020;&#x2021;&#x25CA;&#x2720;</quote> will identify +footnotes with <quote>*</quote>, <quote>â </quote>, <quote>â¡</quote>, +<quote>â</quote>, and <quote>â </quote>. If there are more footnotes +than symbols, the stylesheets will fall back to numbered footnotes using +<parameter moreinfo="none">table.footnote.number.format</parameter>.</para> + +<para>The use of symbols for footnotes depends on the ability of your +processor (or browser) to render the symbols you select. Not all systems are +capable of displaying the full range of Unicode characters. If the quoted characters +in the preceding paragraph are not displayed properly, that's a good indicator +that you may have trouble using those symbols for footnotes.</para> </refsect1> </refentry> -<refentry id="page.orientation"> +<refentry id="xref.with.number.and.title"> <refmeta> -<refentrytitle>page.orientation</refentrytitle> - +<refentrytitle>xref.with.number.and.title</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>page.orientation</refname> -<refpurpose>Select the page orientation</refpurpose> +<refname>xref.with.number.and.title</refname> +<refpurpose>Use number and title in cross references</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.orientation.frag"><xsl:param name="page.orientation" - select="'portrait'"/></src:fragment> +<src:fragment id="xref.with.number.and.title.frag"><xsl:param name="xref.with.number.and.title" + select="1"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>In portrait orientation, the short edge is horizontal; in -landscape orientation, it is vertical. -</para> +<para>FIXME:</para> </refsect1> </refentry> -<refentry id="page.width"> -<refmeta> -<refentrytitle>page.width</refentrytitle> +</reference> +<reference><title>Graphics</title> +<refentry id="graphic.default.extension"> +<refmeta> +<refentrytitle>graphic.default.extension</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> </refmeta> <refnamediv> -<refname>page.width</refname> -<refpurpose>The width of the physical page</refpurpose> +<refname>graphic.default.extension</refname> +<refpurpose>Default extension for graphic filenames</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.width.frag"><xsl:param name="page.width"> - <xsl:choose> - <xsl:when test="$page.orientation = 'portrait'"> - <xsl:value-of select="$page.width.portrait"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$page.height.portrait"/> - </xsl:otherwise> - </xsl:choose> -</xsl:param></src:fragment> +<src:fragment id="graphic.default.extension.frag"><xsl:param name="graphic.default.extension"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The page width is generally calculated from the -<literal moreinfo="none">paper.type</literal> and <literal moreinfo="none">page.orientation</literal>. +<para>If a <sgmltag>graphic</sgmltag> or <sgmltag>mediaobject</sgmltag> +includes a reference to a filename that does not include an extension, +and the <sgmltag class="attribute">format</sgmltag> attribute is +<emphasis>unspecified</emphasis>, the default extension will be used. </para> </refsect1> </refentry> -<refentry id="page.width.portrait"> +<refentry id="default.image.width"> <refmeta> -<refentrytitle>page.width.portrait</refentrytitle> - +<refentrytitle>default.image.width</refentrytitle> +<refmiscinfo role="type">length</refmiscinfo> </refmeta> <refnamediv> -<refname>page.width.portrait</refname> -<refpurpose>Specify the physical size of the short edge of the page</refpurpose> +<refname>default.image.width</refname> +<refpurpose>The default width of images</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.width.portrait.frag"><xsl:param name="page.width.portrait"> - <xsl:choose> - <xsl:when test="$paper.type = 'USletter'">8.5in</xsl:when> - <xsl:when test="$paper.type = '4A0'">1682mm</xsl:when> - <xsl:when test="$paper.type = '2A0'">1189mm</xsl:when> - <xsl:when test="$paper.type = 'A0'">841mm</xsl:when> - <xsl:when test="$paper.type = 'A1'">594mm</xsl:when> - <xsl:when test="$paper.type = 'A2'">420mm</xsl:when> - <xsl:when test="$paper.type = 'A3'">297mm</xsl:when> - <xsl:when test="$paper.type = 'A4'">210mm</xsl:when> - <xsl:when test="$paper.type = 'A5'">148mm</xsl:when> - <xsl:when test="$paper.type = 'A6'">105mm</xsl:when> - <xsl:when test="$paper.type = 'A7'">74mm</xsl:when> - <xsl:when test="$paper.type = 'A8'">52mm</xsl:when> - <xsl:when test="$paper.type = 'A9'">37mm</xsl:when> - <xsl:when test="$paper.type = 'A10'">26mm</xsl:when> - <xsl:when test="$paper.type = 'B0'">1000mm</xsl:when> - <xsl:when test="$paper.type = 'B1'">707mm</xsl:when> - <xsl:when test="$paper.type = 'B2'">500mm</xsl:when> - <xsl:when test="$paper.type = 'B3'">353mm</xsl:when> - <xsl:when test="$paper.type = 'B4'">250mm</xsl:when> - <xsl:when test="$paper.type = 'B5'">176mm</xsl:when> - <xsl:when test="$paper.type = 'B6'">125mm</xsl:when> - <xsl:when test="$paper.type = 'B7'">88mm</xsl:when> - <xsl:when test="$paper.type = 'B8'">62mm</xsl:when> - <xsl:when test="$paper.type = 'B9'">44mm</xsl:when> - <xsl:when test="$paper.type = 'B10'">31mm</xsl:when> - <xsl:when test="$paper.type = 'C0'">917mm</xsl:when> - <xsl:when test="$paper.type = 'C1'">648mm</xsl:when> - <xsl:when test="$paper.type = 'C2'">458mm</xsl:when> - <xsl:when test="$paper.type = 'C3'">324mm</xsl:when> - <xsl:when test="$paper.type = 'C4'">229mm</xsl:when> - <xsl:when test="$paper.type = 'C5'">162mm</xsl:when> - <xsl:when test="$paper.type = 'C6'">114mm</xsl:when> - <xsl:when test="$paper.type = 'C7'">81mm</xsl:when> - <xsl:when test="$paper.type = 'C8'">57mm</xsl:when> - <xsl:when test="$paper.type = 'C9'">40mm</xsl:when> - <xsl:when test="$paper.type = 'C10'">28mm</xsl:when> - <xsl:otherwise>8.5in</xsl:otherwise> - </xsl:choose> -</xsl:param></src:fragment> +<src:fragment id="default.image.width.frag"><xsl:param name="default.image.width" + select="''"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The portrait page width is the length of the short -edge of the physical page. -</para> +<para>If specified, this value will be used for the +<sgmltag class="attribute">width</sgmltag> attribute on +images that do not specify any +<ulink url="http://docbook.org/tdg/en/html/imagedata.html#viewport.area">viewport +dimensions</ulink>.</para> </refsect1> </refentry> -<refentry id="paper.type"> +<refentry id="preferred.mediaobject.role"> <refmeta> -<refentrytitle>paper.type</refentrytitle> - +<refentrytitle>preferred.mediaobject.role</refentrytitle> </refmeta> <refnamediv> -<refname>paper.type</refname> -<refpurpose>Select the paper type</refpurpose> +<refname>preferred.mediaobject.role</refname> +<refpurpose>Select which mediaobject to use based on +this value of an object's <sgmltag class="attribute">role</sgmltag> attribute. +</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="paper.type.frag"><xsl:param name="paper.type" - select="'USletter'"/></src:fragment> +<src:fragment id="preferred.mediaobject.role.frag"><xsl:param name="preferred.mediaobject.role"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The paper type is a convenient way to specify the paper size. -The list of known paper sizes includes USletter and most of the A, -B, and C sizes. See <literal moreinfo="none">page.width.portrait</literal>, for example. +<para>A mediaobject may contain several objects such as imageobjects. +If the parameter <parameter moreinfo="none">use.role.for.mediaobject</parameter> +is non-zero, then the <sgmltag class="attribute">role</sgmltag> attribute on +<sgmltag>imageobject</sgmltag>s and other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be +used. If one of the objects has a role value that matches the +preferred.mediaobject.role parameter, then it has first +priority for selection. If more than one has such a +role value, the first one is used. </para> - +<para> +See the <parameter moreinfo="none">use.role.for.mediaobject</parameter> parameter +for the sequence of selection.</para> </refsect1> </refentry> -<refentry id="double.sided"> +<refentry id="use.role.for.mediaobject"> <refmeta> -<refentrytitle>double.sided</refentrytitle> - +<refentrytitle>use.role.for.mediaobject</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>double.sided</refname> -<refpurpose>Is the document to be printed double sided?</refpurpose> +<refname>use.role.for.mediaobject</refname> +<refpurpose>Use <sgmltag class="attribute">role</sgmltag> attribute +value for selecting which of several objects within a mediaobject to use. +</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="double.sided.frag"><xsl:param name="double.sided" - select="'0'"/></src:fragment> +<src:fragment id="use.role.for.mediaobject.frag"><xsl:param name="use.role.for.mediaobject" + select="1"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>Double-sided documents are printed with a slightly wider margin -on the binding edge of the page. +<para>If non-zero, the <sgmltag class="attribute">role</sgmltag> attribute on +<sgmltag>imageobject</sgmltag>s or other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be +used. +</para> +<para> +The order of selection when then parameter is non-zero is: +</para> +<orderedlist inheritnum="ignore" continuation="restarts"> +<listitem> + <para>If the stylesheet parameter <parameter moreinfo="none">preferred.mediaojbect.role</parameter> has a value, then the object whose role equals that value is selected.</para> +</listitem> +<listitem> +<para>Else if an object's role attribute has a value of +<literal moreinfo="none">html</literal> for HTML processing or +<literal moreinfo="none">fo</literal> for FO output, then the first +of such objects is selected. +</para> +</listitem> +<listitem> +<para>Else the first suitable object is selected.</para> +</listitem> +</orderedlist> +<para> +If the value of +<parameter moreinfo="none">use.role.for.mediaobject</parameter> +is zero, then role attributes are not considered +and the first suitable object +with or without a role value is used. </para> -<para>FIXME: The current set of parameters does not take writing direction -into account.</para> - </refsect1> </refentry> -<refentry id="body.margin.bottom"> +<refentry id="ignore.image.scaling"> <refmeta> -<refentrytitle>body.margin.bottom</refentrytitle> - +<refentrytitle>ignore.image.scaling</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>body.margin.bottom</refname> -<refpurpose>The bottom margin of the body text</refpurpose> +<refname>ignore.image.scaling</refname> +<refpurpose>Tell the stylesheets to ignore the author's image scaling attributes</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="body.margin.bottom.frag"><xsl:param name="body.margin.bottom">0.5in</xsl:param></src:fragment> +<src:fragment id="ignore.image.scaling.frag"><xsl:param name="ignore.image.scaling" + select="0"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The body bottom margin is the distance from the last line of text -in the page body to the bottom of the region-after. -</para> +<para>If non-zero, the scaling attributes on graphics and media objects are +ignored.</para> </refsect1> </refentry> -<refentry id="body.margin.top"> -<refmeta> -<refentrytitle>body.margin.top</refentrytitle> - -</refmeta> -<refnamediv> -<refname>body.margin.top</refname> -<refpurpose>To specify the size of the top margin of a page</refpurpose> -</refnamediv> - -<refsynopsisdiv> -<src:fragment id="body.margin.top.frag"><xsl:param name="body.margin.top">1in</xsl:param></src:fragment> -</refsynopsisdiv> - -<refsect1><title>Description</title> +</reference> -<para>The body top margin is the distance from the top of the region-before -to the first line of text in the page body. -</para> +<reference><title>Pagination and General Styles</title> +<partintro> +<section><title>Understanding XSL FO Margins</title> -</refsect1> -</refentry> +<para>In order for the parameters in this section to make sense, it is useful to +consider <xref linkend="fig.pagemodel"/>.</para> + +<figure id="fig.pagemodel" float="0"> +<mediaobject> +<imageobject> +<imagedata fileref="page.png"/> +</imageobject> +<textobject><phrase>Figure showing page margins</phrase></textobject> +<textobject> +<para>This figure shows the physical page with the various FO page regions +identified.</para> +</textobject> +</mediaobject> +</figure> + +<para>First, let's consider the regions on the page.</para> + +<para>The white region is the physical page. Its dimensions are determined by +the <parameter moreinfo="none">page.height</parameter> and <parameter moreinfo="none">page.width</parameter> +parameters.</para> + +<para>The yellow region is the region-body. The size and placement of +the region body is constrained by the dimensions labelled in the +figure.</para> + +<para>The pink region at the top of the page is the region-before. The +darker area inside the region-before is the header text. In XSL, the default +display alignment for a region is <literal moreinfo="none">before</literal>, but the +DocBook stylesheets still explicitly make it <literal moreinfo="none">before</literal>. That's +why the darker area is at the top.</para> + +<para>The pink region at the bottom of the page is the region-after. +The darker area is the footer text. In XSL, the default display +alignment for a region is <literal moreinfo="none">before</literal>, +but the DocBook stylesheets explicitly make it +<literal moreinfo="none">after</literal>. That's why the darker area is at the bottom.</para> + +<para>The dimensions in the figure are:</para> + +<orderedlist numeration="upperalpha" inheritnum="ignore" continuation="restarts"> +<listitem><para>The page-master margin-top. +</para></listitem> +<listitem><para>The region-before extent. +</para></listitem> +<listitem><para>The region-body margin-top. +</para></listitem> +<listitem><para>The region-after extent. +</para></listitem> +<listitem><para>The page-master margin-bottom. +</para></listitem> +<listitem><para>The region-body margin-bottom. +</para></listitem> +<listitem><para>The sum of the page-master margin-left and the +region-body margin-left. In DocBook, the region-body margin-left is +zero by default, so this is simply the page-master region-left. +</para></listitem> +<listitem><para>The sum of the page-master margin-right and the +region-body margin-right. In DocBook, the region-body margin-right is +zero by default, so this is simply the page-master region-left. +</para></listitem> +</orderedlist> + +</section> +</partintro> + +<refentry id="page.height"> +<refmeta> +<refentrytitle>page.height</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.height</refname> +<refpurpose>The height of the physical page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.height.frag"><xsl:param name="page.height"> + <xsl:choose> + <xsl:when test="$page.orientation = 'portrait'"> + <xsl:value-of select="$page.height.portrait"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$page.width.portrait"/> + </xsl:otherwise> + </xsl:choose> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The page height is generally calculated from the +<literal moreinfo="none">paper.type</literal> and +<literal moreinfo="none">page.orientation</literal>. +</para> + +</refsect1> +</refentry> + +<refentry id="page.height.portrait"> +<refmeta> +<refentrytitle>page.height.portrait</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.height.portrait</refname> +<refpurpose>Specify the physical size of the long edge of the page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.height.portrait.frag"><xsl:param name="page.height.portrait"> + <xsl:choose> + <xsl:when test="$paper.type = 'A4landscape'">210mm</xsl:when> + <xsl:when test="$paper.type = 'USletter'">11in</xsl:when> + <xsl:when test="$paper.type = 'USlandscape'">8.5in</xsl:when> + <xsl:when test="$paper.type = '4A0'">2378mm</xsl:when> + <xsl:when test="$paper.type = '2A0'">1682mm</xsl:when> + <xsl:when test="$paper.type = 'A0'">1189mm</xsl:when> + <xsl:when test="$paper.type = 'A1'">841mm</xsl:when> + <xsl:when test="$paper.type = 'A2'">594mm</xsl:when> + <xsl:when test="$paper.type = 'A3'">420mm</xsl:when> + <xsl:when test="$paper.type = 'A4'">297mm</xsl:when> + <xsl:when test="$paper.type = 'A5'">210mm</xsl:when> + <xsl:when test="$paper.type = 'A6'">148mm</xsl:when> + <xsl:when test="$paper.type = 'A7'">105mm</xsl:when> + <xsl:when test="$paper.type = 'A8'">74mm</xsl:when> + <xsl:when test="$paper.type = 'A9'">52mm</xsl:when> + <xsl:when test="$paper.type = 'A10'">37mm</xsl:when> + <xsl:when test="$paper.type = 'B0'">1414mm</xsl:when> + <xsl:when test="$paper.type = 'B1'">1000mm</xsl:when> + <xsl:when test="$paper.type = 'B2'">707mm</xsl:when> + <xsl:when test="$paper.type = 'B3'">500mm</xsl:when> + <xsl:when test="$paper.type = 'B4'">353mm</xsl:when> + <xsl:when test="$paper.type = 'B5'">250mm</xsl:when> + <xsl:when test="$paper.type = 'B6'">176mm</xsl:when> + <xsl:when test="$paper.type = 'B7'">125mm</xsl:when> + <xsl:when test="$paper.type = 'B8'">88mm</xsl:when> + <xsl:when test="$paper.type = 'B9'">62mm</xsl:when> + <xsl:when test="$paper.type = 'B10'">44mm</xsl:when> + <xsl:when test="$paper.type = 'C0'">1297mm</xsl:when> + <xsl:when test="$paper.type = 'C1'">917mm</xsl:when> + <xsl:when test="$paper.type = 'C2'">648mm</xsl:when> + <xsl:when test="$paper.type = 'C3'">458mm</xsl:when> + <xsl:when test="$paper.type = 'C4'">324mm</xsl:when> + <xsl:when test="$paper.type = 'C5'">229mm</xsl:when> + <xsl:when test="$paper.type = 'C6'">162mm</xsl:when> + <xsl:when test="$paper.type = 'C7'">114mm</xsl:when> + <xsl:when test="$paper.type = 'C8'">81mm</xsl:when> + <xsl:when test="$paper.type = 'C9'">57mm</xsl:when> + <xsl:when test="$paper.type = 'C10'">40mm</xsl:when> + <xsl:otherwise>11in</xsl:otherwise> + </xsl:choose> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The portrait page height is the length of the long +edge of the physical page. +</para> + +</refsect1> +</refentry> + +<refentry id="page.margin.bottom"> +<refmeta> +<refentrytitle>page.margin.bottom</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.margin.bottom</refname> +<refpurpose>The bottom margin of the page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.margin.bottom.frag"><xsl:param name="page.margin.bottom" + select="'0.5in'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The bottom page margin is the distance from the bottom of the region-after +to the physical bottom of the page. +</para> + +</refsect1> +</refentry> + +<refentry id="page.margin.inner"> +<refmeta> +<refentrytitle>page.margin.inner</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.margin.inner</refname> +<refpurpose>The inner page margin</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.margin.inner.frag"><xsl:param name="page.margin.inner"> + <xsl:choose> + <xsl:when test="$double.sided != 0">1.25in</xsl:when> + <xsl:otherwise>1in</xsl:otherwise> + </xsl:choose> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The inner page margin is the distance from binding edge of the +page to the first column of text. In the left-to-right, top-to-bottom writing +direction, this is the left margin of recto pages.</para> +<para>The inner and outer margins are usually the same unless the output +is double-sided. +</para> + +</refsect1> +</refentry> + +<refentry id="page.margin.outer"> +<refmeta> +<refentrytitle>page.margin.outer</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.margin.outer</refname> +<refpurpose>The outer page margin</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.margin.outer.frag"><xsl:param name="page.margin.outer"> + <xsl:choose> + <xsl:when test="$double.sided != 0">0.75in</xsl:when> + <xsl:otherwise>1in</xsl:otherwise> + </xsl:choose> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The outer page margin is the distance from non-binding edge of the +page to the last column of text. In the left-to-right, top-to-bottom writing +direction, this is the right margin of recto pages.</para> +<para>The inner and outer margins are usually the same unless the output +is double-sided. +</para> + +</refsect1> +</refentry> + +<refentry id="page.margin.top"> +<refmeta> +<refentrytitle>page.margin.top</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.margin.top</refname> +<refpurpose>The top margin of the page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.margin.top.frag"><xsl:param name="page.margin.top" + select="'0.5in'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The top page margin is the distance from the physical top of the +page to the top of the region-before.</para> + +</refsect1> +</refentry> + +<refentry id="page.orientation"> +<refmeta> +<refentrytitle>page.orientation</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.orientation</refname> +<refpurpose>Select the page orientation</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.orientation.frag"><xsl:param name="page.orientation" + select="'portrait'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>In portrait orientation, the short edge is horizontal; in +landscape orientation, it is vertical. +</para> + +</refsect1> +</refentry> + +<refentry id="page.width"> +<refmeta> +<refentrytitle>page.width</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.width</refname> +<refpurpose>The width of the physical page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.width.frag"><xsl:param name="page.width"> + <xsl:choose> + <xsl:when test="$page.orientation = 'portrait'"> + <xsl:value-of select="$page.width.portrait"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$page.height.portrait"/> + </xsl:otherwise> + </xsl:choose> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The page width is generally calculated from the +<literal moreinfo="none">paper.type</literal> and <literal moreinfo="none">page.orientation</literal>. +</para> + +</refsect1> +</refentry> + +<refentry id="page.width.portrait"> +<refmeta> +<refentrytitle>page.width.portrait</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.width.portrait</refname> +<refpurpose>Specify the physical size of the short edge of the page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.width.portrait.frag"><xsl:param name="page.width.portrait"> + <xsl:choose> + <xsl:when test="$paper.type = 'USletter'">8.5in</xsl:when> + <xsl:when test="$paper.type = '4A0'">1682mm</xsl:when> + <xsl:when test="$paper.type = '2A0'">1189mm</xsl:when> + <xsl:when test="$paper.type = 'A0'">841mm</xsl:when> + <xsl:when test="$paper.type = 'A1'">594mm</xsl:when> + <xsl:when test="$paper.type = 'A2'">420mm</xsl:when> + <xsl:when test="$paper.type = 'A3'">297mm</xsl:when> + <xsl:when test="$paper.type = 'A4'">210mm</xsl:when> + <xsl:when test="$paper.type = 'A5'">148mm</xsl:when> + <xsl:when test="$paper.type = 'A6'">105mm</xsl:when> + <xsl:when test="$paper.type = 'A7'">74mm</xsl:when> + <xsl:when test="$paper.type = 'A8'">52mm</xsl:when> + <xsl:when test="$paper.type = 'A9'">37mm</xsl:when> + <xsl:when test="$paper.type = 'A10'">26mm</xsl:when> + <xsl:when test="$paper.type = 'B0'">1000mm</xsl:when> + <xsl:when test="$paper.type = 'B1'">707mm</xsl:when> + <xsl:when test="$paper.type = 'B2'">500mm</xsl:when> + <xsl:when test="$paper.type = 'B3'">353mm</xsl:when> + <xsl:when test="$paper.type = 'B4'">250mm</xsl:when> + <xsl:when test="$paper.type = 'B5'">176mm</xsl:when> + <xsl:when test="$paper.type = 'B6'">125mm</xsl:when> + <xsl:when test="$paper.type = 'B7'">88mm</xsl:when> + <xsl:when test="$paper.type = 'B8'">62mm</xsl:when> + <xsl:when test="$paper.type = 'B9'">44mm</xsl:when> + <xsl:when test="$paper.type = 'B10'">31mm</xsl:when> + <xsl:when test="$paper.type = 'C0'">917mm</xsl:when> + <xsl:when test="$paper.type = 'C1'">648mm</xsl:when> + <xsl:when test="$paper.type = 'C2'">458mm</xsl:when> + <xsl:when test="$paper.type = 'C3'">324mm</xsl:when> + <xsl:when test="$paper.type = 'C4'">229mm</xsl:when> + <xsl:when test="$paper.type = 'C5'">162mm</xsl:when> + <xsl:when test="$paper.type = 'C6'">114mm</xsl:when> + <xsl:when test="$paper.type = 'C7'">81mm</xsl:when> + <xsl:when test="$paper.type = 'C8'">57mm</xsl:when> + <xsl:when test="$paper.type = 'C9'">40mm</xsl:when> + <xsl:when test="$paper.type = 'C10'">28mm</xsl:when> + <xsl:otherwise>8.5in</xsl:otherwise> + </xsl:choose> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The portrait page width is the length of the short +edge of the physical page. +</para> + +</refsect1> +</refentry> + +<refentry id="paper.type"> +<refmeta> +<refentrytitle>paper.type</refentrytitle> + +</refmeta> +<refnamediv> +<refname>paper.type</refname> +<refpurpose>Select the paper type</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="paper.type.frag"><xsl:param name="paper.type" + select="'USletter'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The paper type is a convenient way to specify the paper size. +The list of known paper sizes includes USletter and most of the A, +B, and C sizes. See <literal moreinfo="none">page.width.portrait</literal>, for example. +</para> + +</refsect1> +</refentry> + +<refentry id="double.sided"> +<refmeta> +<refentrytitle>double.sided</refentrytitle> + +</refmeta> +<refnamediv> +<refname>double.sided</refname> +<refpurpose>Is the document to be printed double sided?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="double.sided.frag"><xsl:param name="double.sided" + select="0"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Double-sided documents are printed with a slightly wider margin +on the binding edge of the page. +</para> +<para>FIXME: The current set of parameters does not take writing direction +into account.</para> + +</refsect1> +</refentry> + +<refentry id="body.margin.bottom"> +<refmeta> +<refentrytitle>body.margin.bottom</refentrytitle> + +</refmeta> +<refnamediv> +<refname>body.margin.bottom</refname> +<refpurpose>The bottom margin of the body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="body.margin.bottom.frag"><xsl:param name="body.margin.bottom" + select="'0.5in'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The body bottom margin is the distance from the last line of text +in the page body to the bottom of the region-after. +</para> + +</refsect1> +</refentry> + +<refentry id="body.margin.top"> +<refmeta> +<refentrytitle>body.margin.top</refentrytitle> + +</refmeta> +<refnamediv> +<refname>body.margin.top</refname> +<refpurpose>To specify the size of the top margin of a page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="body.margin.top.frag"><xsl:param name="body.margin.top" + select="'0.5in'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The body top margin is the distance from the top of the region-before +to the first line of text in the page body. +</para> + +</refsect1> +</refentry> <refentry id="alignment"> <refmeta> -<refentrytitle>alignment</refentrytitle> +<refentrytitle>alignment</refentrytitle> + +</refmeta> +<refnamediv> +<refname>alignment</refname> +<refpurpose>Specify the default text alignment</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="alignment.frag"><xsl:param name="alignment">justify</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The default text alignment is used for most body text. +</para> + +</refsect1> +</refentry> + +<refentry id="hyphenate"> +<refmeta> +<refentrytitle>hyphenate</refentrytitle> + +</refmeta> +<refnamediv> +<refname>hyphenate</refname> +<refpurpose>Specify hyphenation behavior</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="hyphenate.frag"><xsl:param name="hyphenate">true</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If true, words may be hyphenated. Otherwise, they may not. +</para> + +</refsect1> +</refentry> + +<refentry id="line-height"> +<refmeta> +<refentrytitle>line-height</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>line-height</refname> +<refpurpose>Specify the line-height property</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="line-height.frag"><xsl:param name="line-height" + select="'normal'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Sets the line-height property.</para> + +</refsect1> +</refentry> + +<refentry id="column.count.back"> +<refmeta> +<refentrytitle>column.count.back</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.back</refname> +<refpurpose>Number of columns on back matter pages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="column.count.back.frag"><xsl:param name="column.count.back" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Number of columns on back matter (appendix, glossary, etc.) pages.</para> + +</refsect1> +</refentry> + +<refentry id="column.count.body"> +<refmeta> +<refentrytitle>column.count.body</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.body</refname> +<refpurpose>Number of columns on body pages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="column.count.body.frag"><xsl:param name="column.count.body" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Number of columns on body pages.</para> + +</refsect1> +</refentry> + +<refentry id="column.count.front"> +<refmeta> +<refentrytitle>column.count.front</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.front</refname> +<refpurpose>Number of columns on front matter pages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="column.count.front.frag"><xsl:param name="column.count.front" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Number of columns on front matter (dedication, preface, etc.) pages.</para> + +</refsect1> +</refentry> + +<refentry id="column.count.index"> +<refmeta> +<refentrytitle>column.count.index</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.index</refname> +<refpurpose>Number of columns on index pages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="column.count.index.frag"><xsl:param name="column.count.index" + select="2"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Number of columns on index pages.</para> + +</refsect1> +</refentry> + +<refentry id="column.count.lot"> +<refmeta> +<refentrytitle>column.count.lot</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.lot</refname> +<refpurpose>Number of columns on a 'List-of-Titles' page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="column.count.lot.frag"><xsl:param name="column.count.lot" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Number of columns on a page sequence containing the Table of Contents, +List of Figures, etc.</para> + +</refsect1> +</refentry> + +<refentry id="column.count.titlepage"> +<refmeta> +<refentrytitle>column.count.titlepage</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.titlepage</refname> +<refpurpose>Number of columns on a title page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="column.count.titlepage.frag"><xsl:param name="column.count.titlepage" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Number of columns on a title page</para> + +</refsect1> +</refentry> + +<refentry id="region.after.extent"> +<refmeta> +<refentrytitle>region.after.extent</refentrytitle> + +</refmeta> +<refnamediv> +<refname>region.after.extent</refname> +<refpurpose>Specifies the height of the footer.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="region.after.extent.frag"><xsl:param name="region.after.extent" + select="'0.4in'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The region after extent is the height of the area where footers +are printed. +</para> + +</refsect1> +</refentry> + +<refentry id="region.before.extent"> +<refmeta> +<refentrytitle>region.before.extent</refentrytitle> + +</refmeta> +<refnamediv> +<refname>region.before.extent</refname> +<refpurpose>Specifies the height of the header</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="region.before.extent.frag"><xsl:param name="region.before.extent" + select="'0.4in'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The region before extent is the height of the area where headers +are printed. +</para> + +</refsect1> +</refentry> + +<refentry id="default.units"> +<refmeta> +<refentrytitle>default.units</refentrytitle> +<refmiscinfo role="type">list</refmiscinfo> +<refmiscinfo role="value">cm</refmiscinfo> +<refmiscinfo role="value">mm</refmiscinfo> +<refmiscinfo role="value">in</refmiscinfo> +<refmiscinfo role="value">pt</refmiscinfo> +<refmiscinfo role="value">pc</refmiscinfo> +<refmiscinfo role="value">px</refmiscinfo> +<refmiscinfo role="value">em</refmiscinfo> +</refmeta> +<refnamediv> +<refname>default.units</refname> +<refpurpose>Default units for an unqualified dimension</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="default.units.frag"><xsl:param name="default.units" + select="'pt'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If an unqualified dimension is encountered (for example, in a +graphic width), the <parameter moreinfo="none">default-units</parameter> will be used for the +units. Unqualified dimensions are not allowed in XSL Formatting Objects. +</para> + +</refsect1> +</refentry> + +<refentry id="normal.para.spacing"> +<refnamediv> +<refname>normal.para.spacing</refname> +<refpurpose>What space do you want between normal paragraphs</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="normal.para.spacing.frag"><xsl:attribute-set name="normal.para.spacing"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> +<refsect1><title>Description</title> +<para>Specify the spacing required between normal paragraphs</para> +</refsect1> +</refentry> + +<refentry id="body.font.master"> +<refmeta> +<refentrytitle>body.font.master</refentrytitle> + +</refmeta> +<refnamediv> +<refname>body.font.master</refname> +<refpurpose>Specifies the default point size for body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="body.font.master.frag"><xsl:param name="body.font.master">10</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The body font size is specified in two parameters +(<varname>body.font.master</varname> and <varname>body.font.size</varname>) +so that math can be performed on the font size by XSLT. +</para> + +</refsect1> +</refentry> + +<refentry id="body.font.size"> +<refmeta> +<refentrytitle>body.font.size</refentrytitle> + +</refmeta> +<refnamediv> +<refname>body.font.size</refname> +<refpurpose>Specifies the default font size for body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="body.font.size.frag"><xsl:param name="body.font.size"> + <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The body font size is specified in two parameters +(<varname>body.font.master</varname> and <varname>body.font.size</varname>) +so that math can be performed on the font size by XSLT. +</para> + +</refsect1> +</refentry> + +<refentry id="footnote.font.size"> +<refmeta> +<refentrytitle>footnote.font.size</refentrytitle> </refmeta> <refnamediv> -<refname>alignment</refname> -<refpurpose>Specify the default text alignment</refpurpose> +<refname>footnote.font.size</refname> +<refpurpose>The font size for footnotes</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="alignment.frag"><xsl:param name="alignment">justify</xsl:param></src:fragment> +<src:fragment id="footnote.font.size.frag"><xsl:param name="footnote.font.size"> + <xsl:value-of select="$body.font.master * 0.8"/><xsl:text>pt</xsl:text> +</xsl:param></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The default text alignment is used for most body text. +<para>The footnote font size is used for...footnotes! </para> </refsect1> </refentry> -<refentry id="hyphenate"> +<refentry id="title.margin.left"> <refmeta> -<refentrytitle>hyphenate</refentrytitle> +<refentrytitle>title.margin.left</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>title.margin.left</refname> +<refpurpose>Adjust the left margin for titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="title.margin.left.frag"><xsl:param name="title.margin.left" + select="'-4pc'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>This parameter adjusts the left margin for titles. +</para> +</refsect1> +</refentry> + +<refentry id="draft.mode"> +<refmeta> +<refentrytitle>draft.mode</refentrytitle> +<refmiscinfo role="type">list</refmiscinfo> </refmeta> <refnamediv> -<refname>hyphenate</refname> -<refpurpose>Specify hyphenation behavior</refpurpose> +<refname>draft.mode</refname> +<refpurpose>Select draft mode</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="hyphenate.frag"><xsl:param name="hyphenate">true</xsl:param></src:fragment> +<src:fragment id="draft.mode.frag"><xsl:param name="draft.mode" + select="'maybe'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>If true, words may be hyphenated. Otherwise, they may not. +<para>Selects draft mode. If <parameter moreinfo="none">draft.mode</parameter> is +<quote><literal moreinfo="none">yes</literal></quote>, the entire document will be treated +as a draft. If it is <quote><literal moreinfo="none">no</literal></quote>, the entire document +will be treated as a final copy. If it is <quote><literal moreinfo="none">maybe</literal></quote>, +individual sections will be treated as draft or final independently, depending +on how their <sgmltag class="attribute">status</sgmltag> attribute is set. </para> </refsect1> </refentry> -<refentry id="line-height"> +<refentry id="draft.watermark.image"> <refmeta> -<refentrytitle>line-height</refentrytitle> -<refmiscinfo role="type">string</refmiscinfo> +<refentrytitle>draft.watermark.image</refentrytitle> +<refmiscinfo role="type">uri</refmiscinfo> </refmeta> <refnamediv> -<refname>line-height</refname> -<refpurpose>Specify the line-height property</refpurpose> +<refname>draft.watermark.image</refname> +<refpurpose>The URI of the image to be used for draft watermarks</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="line-height.frag"><xsl:param name="line-height" - select="'normal'"/></src:fragment> +<src:fragment id="draft.watermark.image.frag"><xsl:param name="draft.watermark.image" + select="'http://docbook.sourceforge.net/release/images/draft.png'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>Sets the line-height property.</para> +<para>The image to be used for draft watermarks.</para> </refsect1> </refentry> -<refentry id="column.count"> +<refentry id="headers.on.blank.pages"> <refmeta> -<refentrytitle>column.count</refentrytitle> +<refentrytitle>headers.on.blank.pages</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>headers.on.blank.pages</refname> +<refpurpose>Put headers on blank pages?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="headers.on.blank.pages.frag"><xsl:param name="headers.on.blank.pages" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero, headers will be placed on blank pages.</para> +</refsect1> +</refentry> + +<refentry id="footers.on.blank.pages"> +<refmeta> +<refentrytitle>footers.on.blank.pages</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>column.count</refname> -<refpurpose>Specifies the number of columns of text on the page</refpurpose> +<refname>footers.on.blank.pages</refname> +<refpurpose>Put footers on blank pages?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="column.count.frag"><xsl:param name="column.count" - select="'1'"/></src:fragment> +<src:fragment id="footers.on.blank.pages.frag"><xsl:param name="footers.on.blank.pages" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero, footers will be placed on blank pages.</para> + +</refsect1> +</refentry> + +<refentry id="header.rule"> +<refmeta> +<refentrytitle>header.rule</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>header.rule</refname> +<refpurpose>Rule under headers?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="header.rule.frag"><xsl:param name="header.rule" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero, a rule will be drawn below the page headers.</para> + +</refsect1> +</refentry> + +<refentry id="footer.rule"> +<refmeta> +<refentrytitle>footer.rule</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>footer.rule</refname> +<refpurpose>Rule over footers?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="footer.rule.frag"><xsl:param name="footer.rule" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero, a rule will be drawn above the page footers.</para> + +</refsect1> +</refentry> + +<refentry id="header.content.properties"> +<refmeta> +<refentrytitle>header.content.properties</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>header.content.properties</refname> +<refpurpose/> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="header.content.properties.frag"><xsl:attribute-set name="header.content.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.font.family"/> + </xsl:attribute> + <xsl:attribute name="margin-left"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> + <xsl:attribute name="margin-right"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Properties of page header content.</para> + +</refsect1> +</refentry> + +<refentry id="footer.content.properties"> +<refmeta> +<refentrytitle>footer.content.properties</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>footer.content.properties</refname> +<refpurpose/> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="footer.content.properties.frag"><xsl:attribute-set name="footer.content.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.font.family"/> + </xsl:attribute> + <xsl:attribute name="margin-left"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> + <xsl:attribute name="margin-right"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Properties of page footer content.</para> + +</refsect1> +</refentry> + +</reference> + +<reference><title>Font Families</title> +<refentry id="body.font.family"> +<refmeta> +<refentrytitle>body.font.family</refentrytitle> + +</refmeta> +<refnamediv> +<refname>body.font.family</refname> +<refpurpose>The default font family for body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="body.font.family.frag"><xsl:param name="body.font.family" + select="'serif'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The specified number of columns of text will appear on each page. +<para>The body font family is the default font used for text in the page body. </para> </refsect1> </refentry> -<refentry id="column.count.of.index"> +<refentry id="dingbat.font.family"> <refmeta> -<refentrytitle>column.count.of.index</refentrytitle> -<refmiscinfo role="type">integer</refmiscinfo> +<refentrytitle>dingbat.font.family</refentrytitle> + </refmeta> <refnamediv> -<refname>column.count.of.index</refname> -<refpurpose>Number of columns in the index</refpurpose> +<refname>dingbat.font.family</refname> +<refpurpose>The font family for copyright, quotes, and other symbols</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="column.count.of.index.frag"><xsl:param name="column.count.of.index" - select="$column.count"/></src:fragment> +<src:fragment id="dingbat.font.family.frag"><xsl:param name="dingbat.font.family" + select="'serif'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>This parameter specifies the number of columns on pages in the index. -The default is the same as the <parameter moreinfo="none">column.count</parameter>.</para> +<para>The dingbat font family is used for dingbats. If it is defined +as the empty string, no font change is effected around dingbats. +</para> </refsect1> </refentry> -<refentry id="region.after.extent"> +<refentry id="monospace.font.family"> <refmeta> -<refentrytitle>region.after.extent</refentrytitle> +<refentrytitle>monospace.font.family</refentrytitle> </refmeta> <refnamediv> -<refname>region.after.extent</refname> -<refpurpose>Specifies the height of the footer.</refpurpose> +<refname>monospace.font.family</refname> +<refpurpose>The default font family for monospace environments</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="region.after.extent.frag"><xsl:param name="region.after.extent" - select="'0.5in'"/></src:fragment> +<src:fragment id="monospace.font.family.frag"><xsl:param name="monospace.font.family" + select="'monospace'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The region after extent is the height of the area where footers -are printed. +<para>The monospace font family is used for verbatim environments +(program listings, screens, etc.). </para> </refsect1> </refentry> -<refentry id="region.before.extent"> +<refentry id="sans.font.family"> <refmeta> -<refentrytitle>region.before.extent</refentrytitle> +<refentrytitle>sans.font.family</refentrytitle> </refmeta> <refnamediv> -<refname>region.before.extent</refname> -<refpurpose>Specifies the height of the header</refpurpose> +<refname>sans.font.family</refname> +<refpurpose>The default sans-serif font family</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="region.before.extent.frag"><xsl:param name="region.before.extent" - select="'0.5in'"/></src:fragment> +<src:fragment id="sans.font.family.frag"><xsl:param name="sans.font.family" + select="'sans-serif'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The region before extent is the height of the area where headers -are printed. +<para>The default sans-serif font family. At the present, this isn't +actually used by the stylesheets. </para> </refsect1> </refentry> -<refentry id="default.units"> +<refentry id="title.font.family"> <refmeta> -<refentrytitle>default.units</refentrytitle> -<refmiscinfo role="type">list</refmiscinfo> -<refmiscinfo role="value">cm</refmiscinfo> -<refmiscinfo role="value">mm</refmiscinfo> -<refmiscinfo role="value">in</refmiscinfo> -<refmiscinfo role="value">pt</refmiscinfo> -<refmiscinfo role="value">pc</refmiscinfo> -<refmiscinfo role="value">px</refmiscinfo> -<refmiscinfo role="value">em</refmiscinfo> +<refentrytitle>title.font.family</refentrytitle> + </refmeta> <refnamediv> -<refname>default.units</refname> -<refpurpose>Default units for an unqualified dimension</refpurpose> +<refname>title.font.family</refname> +<refpurpose>The default font family for titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="title.font.family.frag"><xsl:param name="title.font.family" + select="'sans-serif'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The title font family is used for titles (chapter, section, figure, +etc.) +</para> + +</refsect1> +</refentry> + +</reference> + +<reference><title>Lists</title> +<refentry id="list.block.spacing"> +<refnamediv> +<refname>list.block.spacing</refname> +<refpurpose>What spacing do you want before and after lists?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="default.units.frag"><xsl:param name="default.units" - select="'pt'"/></src:fragment> +<src:fragment id="list.block.spacing.frag"><xsl:attribute-set name="list.block.spacing"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> - <refsect1><title>Description</title> - -<para>If an unqualified dimension is encountered (for example, in a -graphic width), the <parameter moreinfo="none">default-units</parameter> will be used for the -units. Unqualified dimensions are not allowed in XSL Formatting Objects. -</para> - +<para>Specify the spacing required before and after a list. It is necessary to specify the space after a list block because lists can come inside of paras. </para> </refsect1> </refentry> -<refentry id="normal.para.spacing"> +<refentry id="list.item.spacing"> <refnamediv> -<refname>normal.para.spacing</refname> -<refpurpose>What space do you want between normal paragraphs</refpurpose> +<refname>list.item.spacing</refname> +<refpurpose>What space do you want between list items?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="normal.para.spacing.frag"><xsl:attribute-set name="normal.para.spacing"> +<src:fragment id="list.item.spacing.frag"><xsl:attribute-set name="list.item.spacing"> <xsl:attribute name="space-before.optimum">1em</xsl:attribute> <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>Specify the spacing required between normal paragraphs</para> +<para>Specify what spacing you want between each list item.</para> </refsect1> </refentry> -<refentry id="body.font.master"> -<refmeta> -<refentrytitle>body.font.master</refentrytitle> - -</refmeta> +<refentry id="compact.list.item.spacing"> <refnamediv> -<refname>body.font.master</refname> -<refpurpose>Specifies the default point size for body text</refpurpose> +<refname>compact.list.item.spacing</refname> +<refpurpose>What space do you want between list items (when spacing=compact)?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="body.font.master.frag"><xsl:param name="body.font.master">10</xsl:param></src:fragment> +<src:fragment id="compact.list.item.spacing.frag"><xsl:attribute-set name="compact.list.item.spacing"> + <xsl:attribute name="space-before.optimum">0em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> - <refsect1><title>Description</title> - -<para>The body font size is specified in two parameters -(<varname>body.font.master</varname> and <varname>body.font.size</varname>) -so that math can be performed on the font size by XSLT. -</para> - +<para>Specify what spacing you want between each list item when +<sgmltag class="attribute">spacing</sgmltag> is +<quote><literal moreinfo="none">compact</literal></quote>.</para> </refsect1> </refentry> -<refentry id="body.font.size"> -<refmeta> -<refentrytitle>body.font.size</refentrytitle> +</reference> +<reference><title>Cross References</title> +<refentry id="insert.xref.page.number"> +<refmeta> +<refentrytitle>insert.xref.page.number</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>body.font.size</refname> -<refpurpose>Specifies the default font size for body text</refpurpose> +<refname>insert.xref.page.number</refname> +<refpurpose>Turns page numbers in xrefs on and off</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="body.font.size.frag"><xsl:param name="body.font.size"> - <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text> -</xsl:param></src:fragment> +<src:fragment id="insert.xref.page.number.frag"><xsl:param name="insert.xref.page.number" + select="0"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The body font size is specified in two parameters -(<varname>body.font.master</varname> and <varname>body.font.size</varname>) -so that math can be performed on the font size by XSLT. +<para>If non-zero, cross references (<sgmltag>xref</sgmltag>s) will +include page number citations. </para> </refsect1> </refentry> -<refentry id="footnote.font.size"> -<refmeta> -<refentrytitle>footnote.font.size</refentrytitle> - -</refmeta> +<refentry id="xref.properties"> <refnamediv> -<refname>footnote.font.size</refname> -<refpurpose>The font size for footnotes</refpurpose> +<refname>xref.properties</refname> +<refpurpose>Properties associated with cross-reference text</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="footnote.font.size.frag"><xsl:param name="footnote.font.size"> - <xsl:value-of select="$body.font.master * 0.8"/><xsl:text>pt</xsl:text> -</xsl:param></src:fragment> +<src:fragment id="xref.properties.frag"><xsl:attribute-set name="xref.properties"> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The footnote font size is used for...footnotes! -</para> +<para>This attribute set is used on cross reference text.</para> </refsect1> </refentry> -<refentry id="title.margin.left"> -<refmeta> -<refentrytitle>title.margin.left</refentrytitle> -<refmiscinfo role="type"/> -</refmeta> +</reference> + +<reference><title>Property Sets</title> +<refentry id="component.title.properties"> <refnamediv> -<refname>title.margin.left</refname> -<refpurpose>Adjust the left margin for titles</refpurpose> +<refname>component.title.properties</refname> +<refpurpose>Specify the styling for the title elements of a component.</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="title.margin.left.frag"><xsl:param name="title.margin.left" - select="'-4pc'"/></src:fragment> +<src:fragment id="component.title.properties.frag"><xsl:attribute-set name="component.title.properties"> + <xsl:attribute name="space-before.optimum">2em</xsl:attribute> + <xsl:attribute name="space-before.minimum">1.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">2.2em</xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="font-size">18pt</xsl:attribute> + <xsl:attribute name="space-after.optimum">1.5em</xsl:attribute> + <xsl:attribute name="space-after.minimum">1.3em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.8em</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> - <refsect1><title>Description</title> -<para>This parameter adjusts the left margin for titles. -</para> +<para>A set of attributes are used to style the title of a +component (chapters, appendixes, articles, etc.). Components are usually +printed in the <parameter moreinfo="none">title.font.family</parameter>. +Spacing before and after, font size etc are specified +using this parameter.</para> </refsect1> </refentry> -<refentry id="draft.watermark.image"> -<refmeta> -<refentrytitle>draft.watermark.image</refentrytitle> -<refmiscinfo role="type">uri</refmiscinfo> -</refmeta> +<refentry id="formal.object.properties"> <refnamediv> -<refname>draft.watermark.image</refname> -<refpurpose>The URI of the image to be used for draft watermarks</refpurpose> +<refname>formal.object.properties</refname> +<refpurpose>Properties associated with a formal object such as a figure, or other component that has a title</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="draft.watermark.image.frag"><xsl:param name="draft.watermark.image" - select="'http://docbook.sourceforge.net/release/images/draft.png'"/></src:fragment> +<src:fragment id="formal.object.properties.frag"><xsl:attribute-set name="formal.object.properties"> + <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">2em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The image to be used for draft watermarks.</para> +<para>The styling for formal objects in docbook. Specify the spacing +before and after the object.</para> </refsect1> </refentry> -</reference> - -<reference><title>Font Families</title> -<refentry id="body.font.family"> -<refmeta> -<refentrytitle>body.font.family</refentrytitle> - -</refmeta> +<refentry id="formal.title.properties"> <refnamediv> -<refname>body.font.family</refname> -<refpurpose>The default font family for body text</refpurpose> +<refname>formal.title.properties</refname> +<refpurpose>Style the title element of formal object such as a figure.</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="body.font.family.frag"><xsl:param name="body.font.family">Times Roman</xsl:param></src:fragment> +<src:fragment id="formal.title.properties.frag"><xsl:attribute-set name="formal.title.properties" + use-attribute-sets="normal.para.spacing"> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> + <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute> + <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> - <refsect1><title>Description</title> +<para>Specify how the title should be styled. Specify the font size and weight of the title of the formal object.</para> +</refsect1> +</refentry> -<para>The body font family is the default font used for text in the page body. -</para> +<refentry id="informal.object.properties"> +<refnamediv> +<refname>informal.object.properties</refname> +<refpurpose>Properties associated with a formal object such as a figure, or other component that has a title</refpurpose> +</refnamediv> +<refsynopsisdiv> +<src:fragment id="informal.object.properties.frag"><xsl:attribute-set name="informal.object.properties"> + <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">2em</xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> +<refsect1><title>Description</title> +<para>The styling for informal objects in docbook. Specify the spacing before and after the object.</para> </refsect1> </refentry> -<refentry id="dingbat.font.family"> +<refentry id="monospace.properties"> <refmeta> -<refentrytitle>dingbat.font.family</refentrytitle> - +<refentrytitle>monospace.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> </refmeta> <refnamediv> -<refname>dingbat.font.family</refname> -<refpurpose>The font family for copyright, quotes, and other symbols</refpurpose> +<refname>monospace.properties</refname> +<refpurpose>Properties of monospaced content</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="dingbat.font.family.frag"><xsl:param name="dingbat.font.family">Times Roman</xsl:param></src:fragment> +<src:fragment id="monospace.properties.frag"><xsl:attribute-set name="monospace.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$monospace.font.family"/> + </xsl:attribute> + <xsl:attribute name="font-size">0.9em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The dingbat font family is used for dingbats. If it is defined -as the empty string, no font change is effected around dingbats. -</para> +<para>Specifies the font name and size for monospaced output.</para> </refsect1> </refentry> -<refentry id="monospace.font.family"> -<refmeta> -<refentrytitle>monospace.font.family</refentrytitle> - -</refmeta> +<refentry id="verbatim.properties"> <refnamediv> -<refname>monospace.font.family</refname> -<refpurpose>The default font family for monospace environments</refpurpose> +<refname>verbatim.properties</refname> +<refpurpose>Properties associated with verbatim text</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="monospace.font.family.frag"><xsl:param name="monospace.font.family">Courier</xsl:param></src:fragment> +<src:fragment id="verbatim.properties.frag"><xsl:attribute-set name="verbatim.properties"> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> +<para>This attribute set is used on all verbatim environments.</para> +</refsect1> -<para>The monospace font family is used for verbatim environments -(program listings, screens, etc.). -</para> +</refentry> + +<refentry id="monospace.verbatim.properties"> +<refnamediv> +<refname>monospace.verbatim.properties</refname> +<refpurpose>What font and size do you want for monospaced content?</refpurpose> +</refnamediv> +<refsynopsisdiv> +<src:fragment id="monospace.verbatim.properties.frag"><xsl:attribute-set name="monospace.verbatim.properties" + use-attribute-sets="verbatim.properties monospace.properties"> + <xsl:attribute name="text-align">start</xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> +<refsect1><title>Description</title> +<para>Specify the font name and size you want for monospaced output</para> </refsect1> </refentry> -<refentry id="sans.font.family"> +<refentry id="sidebar.properties"> <refmeta> -<refentrytitle>sans.font.family</refentrytitle> - +<refentrytitle>sidebar.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> </refmeta> <refnamediv> -<refname>sans.font.family</refname> -<refpurpose>The default sans-serif font family</refpurpose> +<refname>sidebar.properties</refname> +<refpurpose>Attribute set for sidebar properties</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="sans.font.family.frag"><xsl:param name="sans.font.family">Helvetica</xsl:param></src:fragment> +<src:fragment id="sidebar.properties.frag"><xsl:attribute-set name="sidebar.properties" + use-attribute-sets="formal.object.properties"> + <xsl:attribute name="border-style">solid</xsl:attribute> + <xsl:attribute name="border-width">1pt</xsl:attribute> + <xsl:attribute name="border-color">black</xsl:attribute> + <xsl:attribute name="background-color">#DDDDDD</xsl:attribute> + <xsl:attribute name="padding-left">12pt</xsl:attribute> + <xsl:attribute name="padding-right">12pt</xsl:attribute> + <xsl:attribute name="padding-top">6pt</xsl:attribute> + <xsl:attribute name="padding-bottom">6pt</xsl:attribute> +<!-- + <xsl:attribute name="margin-left">12pt</xsl:attribute> + <xsl:attribute name="margin-right">12pt</xsl:attribute> + <xsl:attribute name="margin-top">6pt</xsl:attribute> + <xsl:attribute name="margin-bottom">6pt</xsl:attribute> +--> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The default sans-serif font family. At the present, this isn't -actually used by the stylesheets. -</para> +<para>The styling for sidebars.</para> </refsect1> </refentry> -<refentry id="title.font.family"> +<refentry id="section.title.properties"> <refmeta> -<refentrytitle>title.font.family</refentrytitle> - +<refentrytitle>section.title.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> </refmeta> <refnamediv> -<refname>title.font.family</refname> -<refpurpose>The default font family for titles</refpurpose> +<refname>section.title.properties</refname> +<refpurpose>Properties for section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="title.font.family.frag"><xsl:param name="title.font.family">Helvetica</xsl:param></src:fragment> +<src:fragment id="section.title.properties.frag"><xsl:attribute-set name="section.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"/> + </xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <!-- font size is calculated dynamically by section.heading template --> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The title font family is used for titles (chapter, section, figure, -etc.) -</para> +<para>The properties common to all section titles.</para> </refsect1> </refentry> -</reference> - -<reference><title>Lists</title> -<refentry id="list.block.spacing"> +<refentry id="section.title.level1.properties"> +<refmeta> +<refentrytitle>section.title.level1.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> +</refmeta> <refnamediv> -<refname>list.block.spacing</refname> -<refpurpose>What spacing do you want before lists?</refpurpose> +<refname>section.title.level1.properties</refname> +<refpurpose>Properties for level-1 section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="list.block.spacing.frag"><xsl:attribute-set name="list.block.spacing"> - <xsl:attribute name="space-before.optimum">1em</xsl:attribute> - <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> - <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +<src:fragment id="section.title.level1.properties.frag"><xsl:attribute-set name="section.title.level1.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 2.0736"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>Specify the spacing required before a list. </para> + +<para>The properties of level-1 section titles.</para> + </refsect1> </refentry> -<refentry id="list.item.spacing"> +<refentry id="section.title.level2.properties"> +<refmeta> +<refentrytitle>section.title.level2.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> +</refmeta> <refnamediv> -<refname>list.item.spacing</refname> -<refpurpose>What space do you want between list items?</refpurpose> +<refname>section.title.level2.properties</refname> +<refpurpose>Properties for level-1 section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="list.item.spacing.frag"><xsl:attribute-set name="list.item.spacing"> - <xsl:attribute name="space-before.optimum">1em</xsl:attribute> - <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> - <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +<src:fragment id="section.title.level2.properties.frag"><xsl:attribute-set name="section.title.level2.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.728"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>Specify what spacing you want between each list item.</para> + +<para>The properties of level-2 section titles.</para> + </refsect1> </refentry> -<refentry id="compact.list.item.spacing"> +<refentry id="section.title.level3.properties"> +<refmeta> +<refentrytitle>section.title.level3.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> +</refmeta> <refnamediv> -<refname>compact.list.item.spacing</refname> -<refpurpose>What space do you want between list items (when spacing=compact)?</refpurpose> +<refname>section.title.level3.properties</refname> +<refpurpose>Properties for level-1 section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="compact.list.item.spacing.frag"><xsl:attribute-set name="compact.list.item.spacing"> - <xsl:attribute name="space-before.optimum">0em</xsl:attribute> - <xsl:attribute name="space-before.minimum">0em</xsl:attribute> - <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute> +<src:fragment id="section.title.level3.properties.frag"><xsl:attribute-set name="section.title.level3.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.44"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>Specify what spacing you want between each list item when -<sgmltag class="attribute">spacing</sgmltag> is -<quote><literal moreinfo="none">compact</literal></quote>.</para> + +<para>The properties of level-3 section titles.</para> + </refsect1> </refentry> -</reference> - -<reference><title>Cross References</title> -<refentry id="insert.xref.page.number"> +<refentry id="section.title.level4.properties"> <refmeta> -<refentrytitle>insert.xref.page.number</refentrytitle> -<refmiscinfo role="type">boolean</refmiscinfo> +<refentrytitle>section.title.level4.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> </refmeta> <refnamediv> -<refname>insert.xref.page.number</refname> -<refpurpose>Turns page numbers in xrefs on and off</refpurpose> +<refname>section.title.level4.properties</refname> +<refpurpose>Properties for level-1 section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="insert.xref.page.number.frag"><xsl:param name="insert.xref.page.number" - select="0"/></src:fragment> +<src:fragment id="section.title.level4.properties.frag"><xsl:attribute-set name="section.title.level4.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>When equal to 1, this parameter triggers generation of page -number citations after xrefs. -</para> +<para>The properties of level-4 section titles.</para> </refsect1> </refentry> -<refentry id="xref.properties"> +<refentry id="section.title.level5.properties"> +<refmeta> +<refentrytitle>section.title.level5.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> +</refmeta> <refnamediv> -<refname>xref.properties</refname> -<refpurpose>FIXME:</refpurpose> +<refname>section.title.level5.properties</refname> +<refpurpose>Properties for level-1 section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="xref.properties.frag"><xsl:attribute-set name="xref.properties"> - +<src:fragment id="section.title.level5.properties.frag"><xsl:attribute-set name="section.title.level5.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>FIXME:</para> + +<para>The properties of level-5 section titles.</para> + </refsect1> </refentry> -</reference> - -<reference><title>Property Sets</title> -<refentry id="component.title.properties"> +<refentry id="section.title.level6.properties"> +<refmeta> +<refentrytitle>section.title.level6.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> +</refmeta> <refnamediv> -<refname>component.title.properties</refname> -<refpurpose>Specify the styling for the title elements of a component.</refpurpose> +<refname>section.title.level6.properties</refname> +<refpurpose>Properties for level-1 section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="component.title.properties.frag"><xsl:attribute-set name="component.title.properties"> - <xsl:attribute name="space-before.optimum">2em</xsl:attribute> - <xsl:attribute name="space-before.minimum">1.8em</xsl:attribute> - <xsl:attribute name="space-before.maximum">2.2em</xsl:attribute> - <xsl:attribute name="font-weight">bold</xsl:attribute> - <xsl:attribute name="font-size">18pt</xsl:attribute> - <xsl:attribute name="space-after.optimum">1.5em</xsl:attribute> - <xsl:attribute name="space-after.minimum">1.3em</xsl:attribute> - <xsl:attribute name="space-after.maximum">1.8em</xsl:attribute> - <xsl:attribute name="hyphenate">false</xsl:attribute> - <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> +<src:fragment id="section.title.level6.properties.frag"><xsl:attribute-set name="section.title.level6.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>A set of attributes are used to style the title of a -component (chapters, appendixes, articles, etc.). Components are usually -printed in the <parameter moreinfo="none">title.font.family</parameter>. -Spacing before and after, font size etc are specified -using this parameter.</para> +<para>The properties of level-6 section titles. This property set is actually +used for all titles below level 5.</para> </refsect1> </refentry> -<refentry id="formal.object.properties"> +<refentry id="figure.properties"> <refnamediv> -<refname>formal.object.properties</refname> -<refpurpose>Properties associated with a formal object such as a figure, or other component that has a title</refpurpose> +<refname>figure.properties</refname> +<refpurpose>Properties associated with a figure</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="formal.object.properties.frag"><xsl:attribute-set name="formal.object.properties"> - <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> - <xsl:attribute name="space-before.optimum">1em</xsl:attribute> - <xsl:attribute name="space-before.maximum">2em</xsl:attribute> - <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> - <xsl:attribute name="space-after.optimum">1em</xsl:attribute> - <xsl:attribute name="space-after.maximum">2em</xsl:attribute> -</xsl:attribute-set></src:fragment> +<src:fragment id="figure.properties.frag"><xsl:attribute-set name="figure.properties" + use-attribute-sets="formal.object.properties"/></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>The styling for formal objects in docbook. Specify the spacing before and after the object.</para> + +<para>The styling for figures.</para> + </refsect1> </refentry> -<refentry id="formal.title.properties"> +<refentry id="example.properties"> <refnamediv> -<refname>formal.title.properties</refname> -<refpurpose>Style the title element of formal object such as a figure.</refpurpose> +<refname>example.properties</refname> +<refpurpose>Properties associated with a example</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="formal.title.properties.frag"><xsl:attribute-set name="formal.title.properties" - use-attribute-sets="normal.para.spacing"> - <xsl:attribute name="font-weight">bold</xsl:attribute> - <xsl:attribute name="font-size">12pt</xsl:attribute> - <xsl:attribute name="hyphenate">false</xsl:attribute> - <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> - <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> - <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute> - <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute> -</xsl:attribute-set></src:fragment> +<src:fragment id="example.properties.frag"><xsl:attribute-set name="example.properties" + use-attribute-sets="formal.object.properties"/></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>Specify how the title should be styled. Specify the font size and weight of the title of the formal object.</para> + +<para>The styling for examples.</para> + </refsect1> </refentry> -<refentry id="informal.object.properties"> +<refentry id="equation.properties"> <refnamediv> -<refname>informal.object.properties</refname> -<refpurpose>Properties associated with a formal object such as a figure, or other component that has a title</refpurpose> +<refname>equation.properties</refname> +<refpurpose>Properties associated with a equation</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="informal.object.properties.frag"><xsl:attribute-set name="informal.object.properties"> - <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> - <xsl:attribute name="space-before.optimum">1em</xsl:attribute> - <xsl:attribute name="space-before.maximum">2em</xsl:attribute> - <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> - <xsl:attribute name="space-after.optimum">1em</xsl:attribute> - <xsl:attribute name="space-after.maximum">2em</xsl:attribute> -</xsl:attribute-set></src:fragment> +<src:fragment id="equation.properties.frag"><xsl:attribute-set name="equation.properties" + use-attribute-sets="formal.object.properties"/></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>The styling for informal objects in docbook. Specify the spacing before and after the object.</para> + +<para>The styling for equations.</para> + </refsect1> </refentry> -<refentry id="monospace.verbatim.properties"> +<refentry id="table.properties"> <refnamediv> -<refname>monospace.verbatim.properties</refname> -<refpurpose>What font and size do you want for monospaced content?</refpurpose> +<refname>table.properties</refname> +<refpurpose>Properties associated with a table</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="monospace.verbatim.properties.frag"><xsl:attribute-set name="monospace.verbatim.properties" - use-attribute-sets="verbatim.properties"> - <xsl:attribute name="font-family"> - <xsl:value-of select="$monospace.font.family"/> - </xsl:attribute> - <xsl:attribute name="font-size"> - <xsl:value-of select="$body.font.master * 0.9"/> - <xsl:text>pt</xsl:text> - </xsl:attribute> -</xsl:attribute-set></src:fragment> +<src:fragment id="table.properties.frag"><xsl:attribute-set name="table.properties" + use-attribute-sets="formal.object.properties"/></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>Specify the font name and size you want for monospaced output</para> + +<para>The styling for tables.</para> + </refsect1> </refentry> -<refentry id="verbatim.properties"> +<refentry id="procedure.properties"> <refnamediv> -<refname>verbatim.properties</refname> -<refpurpose>FIXME:</refpurpose> +<refname>procedure.properties</refname> +<refpurpose>Properties associated with a procedure</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="verbatim.properties.frag"><xsl:attribute-set name="verbatim.properties"> - <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> - <xsl:attribute name="space-before.optimum">1em</xsl:attribute> - <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> -</xsl:attribute-set></src:fragment> +<src:fragment id="procedure.properties.frag"><xsl:attribute-set name="procedure.properties" + use-attribute-sets="formal.object.properties"/></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>FIXME:</para> + +<para>The styling for procedures.</para> + </refsect1> </refentry> @@ -3901,6 +5528,22 @@ ones (<filename moreinfo="none">docbook.xsl</filename>, <filename moreinfo="none">chunk.xsl</filename>, â¦).</para> +<warning> +<para>Note that <sgmltag class="attribute">role</sgmltag> is often +used for other purposes than profiling. For example it is commonly +used to get emphasize in bold font:</para> + +<programlisting format="linespecific"><emphasis role="bold">very important</emphasis></programlisting> + +<para>If you are using <sgmltag class="attribute">role</sgmltag> for +these purposes do not forget to add values like <literal moreinfo="none">bold</literal> to +value of this parameter. If you forgot you will get document with +small pieces missing which are very hard to track.</para> + +<para>For this reason it is not recommended to use <sgmltag class="attribute">role</sgmltag> attribute for profiling. You should +rather use profiling specific attributes like <sgmltag class="attribute">userlevel</sgmltag>, <sgmltag class="attribute">os</sgmltag>, <sgmltag class="attribute">arch</sgmltag>, <sgmltag class="attribute">condition</sgmltag>, etc.</para> +</warning> + </refsect1> </refentry> @@ -4090,6 +5733,109 @@ </reference> +<reference><title>Localization</title> +<refentry id="l10n.gentext.language"> +<refmeta> +<refentrytitle>l10n.gentext.language</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>l10n.gentext.language</refname> +<refpurpose>Sets the gentext language</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="l10n.gentext.language.frag"><xsl:param name="l10n.gentext.language" + select="''"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If this parameter is set to any value other than the empty string, its +value will be used as the value for the language when generating text. Setting +<parameter moreinfo="none">l10n.gentext.language</parameter> overrides any settings within the +document being formatted.</para> + +<para>It's much more likely that you might want to set the +<parameter moreinfo="none">l10n.gentext.default.language</parameter> parameter.</para> + +</refsect1> +</refentry> + +<refentry id="l10n.gentext.default.language"> +<refmeta> +<refentrytitle>l10n.gentext.default.language</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>l10n.gentext.default.language</refname> +<refpurpose>Sets the default language for generated text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="l10n.gentext.default.language.frag"><xsl:param name="l10n.gentext.default.language" + select="'en'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The value of the <parameter moreinfo="none">l10n.gentext.default.language</parameter> +parameter is used as the language for generated text if no setting is provided +in the source document.</para> + +</refsect1> +</refentry> + +<refentry id="l10n.gentext.use.xref.language"> +<refmeta> +<refentrytitle>l10n.gentext.use.xref.language</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>l10n.gentext.use.xref.language</refname> +<refpurpose>Use the language of target when generating cross-reference text?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="l10n.gentext.use.xref.language.frag"><xsl:param name="l10n.gentext.use.xref.language" + select="0"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero, the language of the target will be used when +generating cross reference text. Usually, the <quote>current</quote> +language is used when generating text (that is, the language of the +element that contains the cross-reference element). But setting this parameter +allows the language of the element <emphasis>pointed to</emphasis> to control +the generated text.</para> + +<para>Consider the following example:</para> + +<informalexample> +<programlisting format="linespecific"><para lang="en">See also <xref linkend="chap3"/>.</para> +</programlisting> +</informalexample> + +<para>Suppose that Chapter 3 happens to be written in German. +If <parameter moreinfo="none">l10n.gentext.use.xref.language</parameter> is non-zero, the +resulting text will be something like this:</para> + +<blockquote> +<para>See also Kapital 3.</para> +</blockquote> + +<para>Where the more traditional rendering would be:</para> + +<blockquote> +<para>See also Chapter 3.</para> +</blockquote> + +</refsect1> +</refentry> + +</reference> + <!-- <reference><title></title> </reference> @@ -4107,7 +5853,7 @@ <!-- This file is generated from param.xweb; do not edit this file! --> <!-- ******************************************************************** - $Id: param.xml,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: param.xml,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -4128,12 +5874,14 @@ <src:fragref linkend="autotoc.label.separator.frag"/> <src:fragref linkend="biblioentry.item.separator.frag"/> <src:fragref linkend="bibliography.collection.frag"/> +<src:fragref linkend="bibliography.numbered.frag"/> <src:fragref linkend="blockquote.properties.frag"/> <src:fragref linkend="body.font.family.frag"/> <src:fragref linkend="body.font.master.frag"/> <src:fragref linkend="body.font.size.frag"/> <src:fragref linkend="body.margin.bottom.frag"/> <src:fragref linkend="body.margin.top.frag"/> +<src:fragref linkend="bridgehead.in.toc.frag"/> <src:fragref linkend="callout.defaultcolumn.frag"/> <src:fragref linkend="callout.graphics.extension.frag"/> <src:fragref linkend="callout.graphics.frag"/> @@ -4145,17 +5893,33 @@ <src:fragref linkend="callout.unicode.start.character.frag"/> <src:fragref linkend="callouts.extension.frag"/> <src:fragref linkend="chapter.autolabel.frag"/> -<src:fragref linkend="column.count.frag"/> -<src:fragref linkend="column.count.of.index.frag"/> +<src:fragref linkend="column.count.back.frag"/> +<src:fragref linkend="column.count.body.frag"/> +<src:fragref linkend="column.count.front.frag"/> +<src:fragref linkend="column.count.index.frag"/> +<src:fragref linkend="column.count.lot.frag"/> +<src:fragref linkend="column.count.titlepage.frag"/> <src:fragref linkend="compact.list.item.spacing.frag"/> <src:fragref linkend="component.title.properties.frag"/> +<src:fragref linkend="current.docid.frag"/> +<src:fragref linkend="default.float.class.frag"/> +<src:fragref linkend="default.image.width.frag"/> <src:fragref linkend="default.table.width.frag"/> <src:fragref linkend="default.units.frag"/> <src:fragref linkend="dingbat.font.family.frag"/> <src:fragref linkend="double.sided.frag"/> +<src:fragref linkend="draft.mode.frag"/> <src:fragref linkend="draft.watermark.image.frag"/> +<src:fragref linkend="equation.properties.frag"/> +<src:fragref linkend="example.properties.frag"/> +<src:fragref linkend="figure.properties.frag"/> <src:fragref linkend="firstterm.only.link.frag"/> +<src:fragref linkend="footer.content.properties.frag"/> +<src:fragref linkend="footer.rule.frag"/> +<src:fragref linkend="footers.on.blank.pages.frag"/> <src:fragref linkend="footnote.font.size.frag"/> +<src:fragref linkend="footnote.number.format.frag"/> +<src:fragref linkend="footnote.number.symbols.frag"/> <src:fragref linkend="fop.extensions.frag"/> <src:fragref linkend="formal.object.properties.frag"/> <src:fragref linkend="formal.procedures.frag"/> @@ -4165,13 +5929,26 @@ <src:fragref linkend="funcsynopsis.style.frag"/> <src:fragref linkend="function.parens.frag"/> <src:fragref linkend="generate.index.frag"/> +<src:fragref linkend="generate.section.toc.level.frag"/> <src:fragref linkend="generate.toc.frag"/> +<src:fragref linkend="glossary.as.blocks.frag"/> <src:fragref linkend="glossary.collection.frag"/> +<src:fragref linkend="glossentry.show.acronym.frag"/> +<src:fragref linkend="glosslist.as.blocks.frag"/> <src:fragref linkend="glossterm.auto.link.frag"/> +<src:fragref linkend="glossterm.separation.frag"/> +<src:fragref linkend="glossterm.width.frag"/> <src:fragref linkend="graphic.default.extension.frag"/> +<src:fragref linkend="header.content.properties.frag"/> +<src:fragref linkend="header.rule.frag"/> +<src:fragref linkend="headers.on.blank.pages.frag"/> <src:fragref linkend="hyphenate.frag"/> +<src:fragref linkend="ignore.image.scaling.frag"/> <src:fragref linkend="informal.object.properties.frag"/> <src:fragref linkend="insert.xref.page.number.frag"/> +<src:fragref linkend="l10n.gentext.default.language.frag"/> +<src:fragref linkend="l10n.gentext.language.frag"/> +<src:fragref linkend="l10n.gentext.use.xref.language.frag"/> <src:fragref linkend="label.from.part.frag"/> <src:fragref linkend="line-height.frag"/> <src:fragref linkend="linenumbering.everyNth.frag"/> @@ -4180,12 +5957,17 @@ <src:fragref linkend="linenumbering.width.frag"/> <src:fragref linkend="list.block.spacing.frag"/> <src:fragref linkend="list.item.spacing.frag"/> +<src:fragref linkend="make.index.markup.frag"/> <src:fragref linkend="make.single.year.ranges.frag"/> <src:fragref linkend="make.year.ranges.frag"/> +<src:fragref linkend="menuchoice.menu.separator.frag"/> +<src:fragref linkend="menuchoice.separator.frag"/> <src:fragref linkend="monospace.font.family.frag"/> +<src:fragref linkend="monospace.properties.frag"/> <src:fragref linkend="monospace.verbatim.properties.frag"/> <src:fragref linkend="nominal.table.width.frag"/> <src:fragref linkend="normal.para.spacing.frag"/> +<src:fragref linkend="olink.doctitle.frag"/> <src:fragref linkend="page.height.frag"/> <src:fragref linkend="page.height.portrait.frag"/> <src:fragref linkend="page.margin.bottom.frag"/> @@ -4199,9 +5981,12 @@ <src:fragref linkend="part.autolabel.frag"/> <src:fragref linkend="passivetex.extensions.frag"/> <src:fragref linkend="preface.autolabel.frag"/> +<src:fragref linkend="preferred.mediaobject.role.frag"/> +<src:fragref linkend="procedure.properties.frag"/> <src:fragref linkend="process.empty.source.toc.frag"/> <src:fragref linkend="process.source.toc.frag"/> <src:fragref linkend="profile.arch.frag"/> +<src:fragref linkend="profile.attribute.frag"/> <src:fragref linkend="profile.condition.frag"/> <src:fragref linkend="profile.conformance.frag"/> <src:fragref linkend="profile.lang.frag"/> @@ -4210,16 +5995,16 @@ <src:fragref linkend="profile.revisionflag.frag"/> <src:fragref linkend="profile.role.frag"/> <src:fragref linkend="profile.security.frag"/> +<src:fragref linkend="profile.separator.frag"/> <src:fragref linkend="profile.userlevel.frag"/> -<src:fragref linkend="profile.vendor.frag"/> -<src:fragref linkend="profile.attribute.frag"/> <src:fragref linkend="profile.value.frag"/> -<src:fragref linkend="profile.separator.frag"/> +<src:fragref linkend="profile.vendor.frag"/> <src:fragref linkend="punct.honorific.frag"/> <src:fragref linkend="qanda.inherit.numeration.frag"/> <src:fragref linkend="qandadiv.autolabel.frag"/> <src:fragref linkend="refentry.generate.name.frag"/> <src:fragref linkend="refentry.generate.title.frag"/> +<src:fragref linkend="refentry.title.properties.frag"/> <src:fragref linkend="refentry.xref.manvolnum.frag"/> <src:fragref linkend="region.after.extent.frag"/> <src:fragref linkend="region.before.extent.frag"/> @@ -4229,33 +6014,52 @@ <src:fragref linkend="sans.font.family.frag"/> <src:fragref linkend="section.autolabel.frag"/> <src:fragref linkend="section.label.includes.component.label.frag"/> +<src:fragref linkend="section.title.level1.properties.frag"/> +<src:fragref linkend="section.title.level2.properties.frag"/> +<src:fragref linkend="section.title.level3.properties.frag"/> +<src:fragref linkend="section.title.level4.properties.frag"/> +<src:fragref linkend="section.title.level5.properties.frag"/> +<src:fragref linkend="section.title.level6.properties.frag"/> +<src:fragref linkend="section.title.properties.frag"/> <src:fragref linkend="segmentedlist.as.table.frag"/> <src:fragref linkend="shade.verbatim.frag"/> <src:fragref linkend="shade.verbatim.style.frag"/> <src:fragref linkend="show.comments.frag"/> -<src:fragref linkend="table.border.color.frag"/> -<src:fragref linkend="table.border.style.frag"/> -<src:fragref linkend="table.border.thickness.frag"/> +<src:fragref linkend="sidebar.properties.frag"/> +<src:fragref linkend="table.cell.border.color.frag"/> +<src:fragref linkend="table.cell.border.style.frag"/> +<src:fragref linkend="table.cell.border.thickness.frag"/> <src:fragref linkend="table.cell.padding.frag"/> -<src:fragref linkend="table.entry.padding.frag"/> +<src:fragref linkend="table.footnote.number.format.frag"/> +<src:fragref linkend="table.footnote.number.symbols.frag"/> +<src:fragref linkend="table.frame.border.color.frag"/> +<src:fragref linkend="table.frame.border.style.frag"/> +<src:fragref linkend="table.frame.border.thickness.frag"/> +<src:fragref linkend="table.properties.frag"/> <src:fragref linkend="tablecolumns.extension.frag"/> -<src:fragref linkend="textinsert.extension.frag"/> -<src:fragref linkend="tex.math.in.alt.frag"/> +<src:fragref linkend="target.database.document.frag"/> <src:fragref linkend="tex.math.delims.frag"/> +<src:fragref linkend="tex.math.in.alt.frag"/> +<src:fragref linkend="textinsert.extension.frag"/> <src:fragref linkend="title.font.family.frag"/> <src:fragref linkend="title.margin.left.frag"/> <src:fragref linkend="toc.indent.width.frag"/> <src:fragref linkend="toc.margin.properties.frag"/> <src:fragref linkend="toc.section.depth.frag"/> -<src:fragref linkend="use.extensions.frag"/> -<src:fragref linkend="use.svg.frag"/> +<src:fragref linkend="ulink.footnote.number.format.frag"/> <src:fragref linkend="ulink.footnotes.frag"/> <src:fragref linkend="ulink.hyphenate.frag"/> <src:fragref linkend="ulink.show.frag"/> +<src:fragref linkend="use.extensions.frag"/> +<src:fragref linkend="use.local.olink.style.frag"/> +<src:fragref linkend="use.role.as.xrefstyle.frag"/> +<src:fragref linkend="use.role.for.mediaobject.frag"/> +<src:fragref linkend="use.svg.frag"/> <src:fragref linkend="variablelist.as.blocks.frag"/> <src:fragref linkend="verbatim.properties.frag"/> <src:fragref linkend="xep.extensions.frag"/> <src:fragref linkend="xref.properties.frag"/> +<src:fragref linkend="xref.with.number.and.title.frag"/> </xsl:stylesheet></src:fragment> Index: phpdoc/xsl/docbook/fo/param.xsl diff -u phpdoc/xsl/docbook/fo/param.xsl:1.1 phpdoc/xsl/docbook/fo/param.xsl:1.2 --- phpdoc/xsl/docbook/fo/param.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/param.xsl Sun Mar 9 09:54:48 2003 @@ -1,10 +1,9 @@ -<?xml version="1.0" encoding="utf-8"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" exclude-result-prefixes="src" version="1.0"> +<?xml version="1.0" encoding="utf-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" exclude-result-prefixes="src" version="1.0"> <!-- This file is generated from param.xweb; do not edit this file! --> <!-- ******************************************************************** - $Id: param.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: param.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -17,7 +16,6 @@ <xsl:param name="admon.graphics" select="0"/> <xsl:param name="admon.graphics.path">images/</xsl:param> <xsl:attribute-set name="admonition.properties"/> - <xsl:attribute-set name="admonition.title.properties"> <xsl:attribute name="font-size">14pt</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> @@ -31,7 +29,7 @@ <xsl:param name="autotoc.label.separator" select="'. '"/> <xsl:param name="biblioentry.item.separator">. </xsl:param> <xsl:param name="bibliography.collection" select="'http://docbook.sourceforge.net/release/bibliography/bibliography.xml'"/> - +<xsl:param name="bibliography.numbered" select="0"/> <xsl:attribute-set name="blockquote.properties"> <xsl:attribute name="start-indent">0.5in</xsl:attribute> <xsl:attribute name="end-indent">0.5in</xsl:attribute> @@ -39,18 +37,14 @@ <xsl:attribute name="space-after.optimum">1em</xsl:attribute> <xsl:attribute name="space-after.maximum">2em</xsl:attribute> </xsl:attribute-set> - -<xsl:param name="body.font.family">Times Roman</xsl:param> +<xsl:param name="body.font.family" select="'serif'"/> <xsl:param name="body.font.master">10</xsl:param> <xsl:param name="body.font.size"> <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text> </xsl:param> - -<xsl:param name="body.margin.bottom">0.5in</xsl:param> - - -<xsl:param name="body.margin.top">1in</xsl:param> - +<xsl:param name="body.margin.bottom" select="'0.5in'"/> +<xsl:param name="body.margin.top" select="'0.5in'"/> +<xsl:param name="bridgehead.in.toc" select="0"/> <xsl:param name="callout.defaultcolumn" select="'60'"/> <xsl:param name="callout.graphics.extension" select="'.png'"/> <xsl:param name="callout.graphics" select="'1'"/> @@ -62,10 +56,12 @@ <xsl:param name="callout.unicode.start.character" select="10102"/> <xsl:param name="callouts.extension" select="'1'"/> <xsl:param name="chapter.autolabel" select="1"/> -<xsl:param name="column.count" select="'1'"/> - -<xsl:param name="column.count.of.index" select="$column.count"/> - +<xsl:param name="column.count.back" select="1"/> +<xsl:param name="column.count.body" select="1"/> +<xsl:param name="column.count.front" select="1"/> +<xsl:param name="column.count.index" select="2"/> +<xsl:param name="column.count.lot" select="1"/> +<xsl:param name="column.count.titlepage" select="1"/> <xsl:attribute-set name="compact.list.item.spacing"> <xsl:attribute name="space-before.optimum">0em</xsl:attribute> <xsl:attribute name="space-before.minimum">0em</xsl:attribute> @@ -83,19 +79,37 @@ <xsl:attribute name="hyphenate">false</xsl:attribute> <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> </xsl:attribute-set> +<xsl:param name="current.docid" select="''"/> +<xsl:param name="default.float.class" select="'before'"/> +<xsl:param name="default.image.width" select="''"/> <xsl:param name="default.table.width" select="''"/> <xsl:param name="default.units" select="'pt'"/> -<xsl:param name="dingbat.font.family">Times Roman</xsl:param> -<xsl:param name="double.sided" select="'0'"/> - +<xsl:param name="dingbat.font.family" select="'serif'"/> +<xsl:param name="double.sided" select="0"/> +<xsl:param name="draft.mode" select="'maybe'"/> <xsl:param name="draft.watermark.image" select="'http://docbook.sourceforge.net/release/images/draft.png'"/> - - +<xsl:attribute-set name="equation.properties" use-attribute-sets="formal.object.properties"/> +<xsl:attribute-set name="example.properties" use-attribute-sets="formal.object.properties"/> +<xsl:attribute-set name="figure.properties" use-attribute-sets="formal.object.properties"/> <xsl:param name="firstterm.only.link" select="0"/> - +<xsl:attribute-set name="footer.content.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.font.family"/> + </xsl:attribute> + <xsl:attribute name="margin-left"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> + <xsl:attribute name="margin-right"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> +</xsl:attribute-set> +<xsl:param name="footer.rule" select="1"/> +<xsl:param name="footers.on.blank.pages" select="1"/> <xsl:param name="footnote.font.size"> <xsl:value-of select="$body.font.master * 0.8"/><xsl:text>pt</xsl:text> </xsl:param> +<xsl:param name="footnote.number.format" select="'1'"/> +<xsl:param name="footnote.number.symbols" select="''"/> <xsl:param name="fop.extensions" select="0"/> <xsl:attribute-set name="formal.object.properties"> <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> @@ -105,10 +119,7 @@ <xsl:attribute name="space-after.optimum">1em</xsl:attribute> <xsl:attribute name="space-after.maximum">2em</xsl:attribute> </xsl:attribute-set> - <xsl:param name="formal.procedures" select="1"/> - - <xsl:param name="formal.title.placement"> figure before example before @@ -116,44 +127,65 @@ table before procedure before </xsl:param> - - <xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing"> <xsl:attribute name="font-weight">bold</xsl:attribute> - <xsl:attribute name="font-size">12pt</xsl:attribute> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> <xsl:attribute name="hyphenate">false</xsl:attribute> - <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute> <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute> </xsl:attribute-set> - <xsl:param name="funcsynopsis.decoration" select="1"/> <xsl:param name="funcsynopsis.style">kr</xsl:param> <xsl:param name="function.parens">0</xsl:param> <xsl:param name="generate.index" select="1"/> - +<xsl:param name="generate.section.toc.level" select="0"/> <xsl:param name="generate.toc"> -/appendix toc -/article toc -book toc,figure,table,example,equation -/chapter toc -part toc -/preface toc +/appendix toc,title +article/appendix nop +/article toc,title +book toc,title,figure,table,example,equation +/chapter toc,title +part toc,title +/preface toc,title qandadiv toc qandaset toc -reference toc +reference toc,title +/sect1 toc +/sect2 toc +/sect3 toc +/sect4 toc +/sect5 toc /section toc -set toc +set toc,title </xsl:param> - - +<xsl:param name="glossary.as.blocks" select="0"/> <xsl:param name="glossary.collection" select="''"/> - +<xsl:param name="glossentry.show.acronym" select="'no'"/> +<xsl:param name="glosslist.as.blocks" select="0"/> <xsl:param name="glossterm.auto.link" select="'0'"/> +<xsl:param name="glossterm.separation" select="'0.25in'"/> +<xsl:param name="glossterm.width" select="'2in'"/> <xsl:param name="graphic.default.extension"/> +<xsl:attribute-set name="header.content.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.font.family"/> + </xsl:attribute> + <xsl:attribute name="margin-left"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> + <xsl:attribute name="margin-right"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> +</xsl:attribute-set> +<xsl:param name="header.rule" select="1"/> +<xsl:param name="headers.on.blank.pages" select="1"/> <xsl:param name="hyphenate">true</xsl:param> +<xsl:param name="ignore.image.scaling" select="0"/> <xsl:attribute-set name="informal.object.properties"> <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> <xsl:attribute name="space-before.optimum">1em</xsl:attribute> @@ -163,10 +195,11 @@ <xsl:attribute name="space-after.maximum">2em</xsl:attribute> </xsl:attribute-set> <xsl:param name="insert.xref.page.number" select="0"/> +<xsl:param name="l10n.gentext.default.language" select="'en'"/> +<xsl:param name="l10n.gentext.language" select="''"/> +<xsl:param name="l10n.gentext.use.xref.language" select="0"/> <xsl:param name="label.from.part" select="'0'"/> - <xsl:param name="line-height" select="'normal'"/> - <xsl:param name="linenumbering.everyNth" select="'5'"/> <xsl:param name="linenumbering.extension" select="'1'"/> <xsl:param name="linenumbering.separator" select="' '"/> @@ -175,23 +208,29 @@ <xsl:attribute name="space-before.optimum">1em</xsl:attribute> <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="list.item.spacing"> <xsl:attribute name="space-before.optimum">1em</xsl:attribute> <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> </xsl:attribute-set> +<xsl:param name="make.index.markup" select="0"/> <xsl:param name="make.single.year.ranges" select="0"/> <xsl:param name="make.year.ranges" select="0"/> -<xsl:param name="monospace.font.family">Courier</xsl:param> -<xsl:attribute-set name="monospace.verbatim.properties" use-attribute-sets="verbatim.properties"> +<xsl:param name="menuchoice.menu.separator" select="'->'"/> +<xsl:param name="menuchoice.separator" select="'+'"/> +<xsl:param name="monospace.font.family" select="'monospace'"/> +<xsl:attribute-set name="monospace.properties"> <xsl:attribute name="font-family"> <xsl:value-of select="$monospace.font.family"/> </xsl:attribute> - <xsl:attribute name="font-size"> - <xsl:value-of select="$body.font.master * 0.9"/> - <xsl:text>pt</xsl:text> - </xsl:attribute> + <xsl:attribute name="font-size">0.9em</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="monospace.verbatim.properties" use-attribute-sets="verbatim.properties monospace.properties"> + <xsl:attribute name="text-align">start</xsl:attribute> </xsl:attribute-set> <xsl:param name="nominal.table.width" select="'6in'"/> <xsl:attribute-set name="normal.para.spacing"> @@ -199,6 +238,7 @@ <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> </xsl:attribute-set> +<xsl:param name="olink.doctitle" select="0"/> <xsl:param name="page.height"> <xsl:choose> <xsl:when test="$page.orientation = 'portrait'"> @@ -252,9 +292,7 @@ <xsl:otherwise>11in</xsl:otherwise> </xsl:choose> </xsl:param> - -<xsl:param name="page.margin.bottom">0.5in</xsl:param> - +<xsl:param name="page.margin.bottom" select="'0.5in'"/> <xsl:param name="page.margin.inner"> <xsl:choose> <xsl:when test="$double.sided != 0">1.25in</xsl:when> @@ -267,9 +305,7 @@ <xsl:otherwise>1in</xsl:otherwise> </xsl:choose> </xsl:param> - -<xsl:param name="page.margin.top">0in</xsl:param> - +<xsl:param name="page.margin.top" select="'0.5in'"/> <xsl:param name="page.orientation" select="'portrait'"/> <xsl:param name="page.width"> <xsl:choose> @@ -326,118 +362,146 @@ <xsl:param name="part.autolabel" select="1"/> <xsl:param name="passivetex.extensions" select="0"/> <xsl:param name="preface.autolabel" select="0"/> +<xsl:param name="preferred.mediaobject.role"/> +<xsl:attribute-set name="procedure.properties" use-attribute-sets="formal.object.properties"/> <xsl:param name="process.empty.source.toc" select="0"/> <xsl:param name="process.source.toc" select="0"/> - <xsl:param name="profile.arch" select="''"/> - - +<xsl:param name="profile.attribute" select="''"/> <xsl:param name="profile.condition" select="''"/> - - <xsl:param name="profile.conformance" select="''"/> - - <xsl:param name="profile.lang" select="''"/> - - <xsl:param name="profile.os" select="''"/> - - <xsl:param name="profile.revision" select="''"/> - - <xsl:param name="profile.revisionflag" select="''"/> - - <xsl:param name="profile.role" select="''"/> - - <xsl:param name="profile.security" select="''"/> - - +<xsl:param name="profile.separator" select="';'"/> <xsl:param name="profile.userlevel" select="''"/> - - -<xsl:param name="profile.vendor" select="''"/> - - -<xsl:param name="profile.attribute" select="''"/> - - <xsl:param name="profile.value" select="''"/> - - -<xsl:param name="profile.separator" select="';'"/> - - +<xsl:param name="profile.vendor" select="''"/> <xsl:param name="punct.honorific" select="'.'"/> - <xsl:param name="qanda.inherit.numeration" select="1"/> <xsl:param name="qandadiv.autolabel" select="1"/> <xsl:param name="refentry.generate.name" select="1"/> - <xsl:param name="refentry.generate.title" select="0"/> - +<xsl:attribute-set name="refentry.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"/> + </xsl:attribute> + <xsl:attribute name="font-size">18pt</xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="space-after">1em</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> + <xsl:attribute name="space-after.maximum">0.6em</xsl:attribute> +</xsl:attribute-set> <xsl:param name="refentry.xref.manvolnum" select="1"/> - -<xsl:param name="region.after.extent" select="'0.5in'"/> - - -<xsl:param name="region.before.extent" select="'0.5in'"/> - +<xsl:param name="region.after.extent" select="'0.4in'"/> +<xsl:param name="region.before.extent" select="'0.4in'"/> <xsl:param name="rootid" select="''"/> <xsl:param name="runinhead.default.title.end.punct" select="'.'"/> <xsl:param name="runinhead.title.end.punct" select="'.!?:'"/> -<xsl:param name="sans.font.family">Helvetica</xsl:param> +<xsl:param name="sans.font.family" select="'sans-serif'"/> <xsl:param name="section.autolabel" select="0"/> <xsl:param name="section.label.includes.component.label" select="0"/> - +<xsl:attribute-set name="section.title.level1.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 2.0736"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level2.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.728"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level3.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.44"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level4.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level5.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level6.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"/> + </xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <!-- font size is calculated dynamically by section.heading template --> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set> <xsl:param name="segmentedlist.as.table" select="0"/> - <xsl:param name="shade.verbatim" select="0"/> - <xsl:attribute-set name="shade.verbatim.style"> <xsl:attribute name="background-color">#E0E0E0</xsl:attribute> </xsl:attribute-set> - <xsl:param name="show.comments">1</xsl:param> - -<xsl:param name="table.border.color" select="'black'"/> - - -<xsl:param name="table.border.style" select="'solid'"/> - - -<xsl:param name="table.border.thickness" select="'0.5pt'"/> - - +<xsl:attribute-set name="sidebar.properties" use-attribute-sets="formal.object.properties"> + <xsl:attribute name="border-style">solid</xsl:attribute> + <xsl:attribute name="border-width">1pt</xsl:attribute> + <xsl:attribute name="border-color">black</xsl:attribute> + <xsl:attribute name="background-color">#DDDDDD</xsl:attribute> + <xsl:attribute name="padding-left">12pt</xsl:attribute> + <xsl:attribute name="padding-right">12pt</xsl:attribute> + <xsl:attribute name="padding-top">6pt</xsl:attribute> + <xsl:attribute name="padding-bottom">6pt</xsl:attribute> +<!-- + <xsl:attribute name="margin-left">12pt</xsl:attribute> + <xsl:attribute name="margin-right">12pt</xsl:attribute> + <xsl:attribute name="margin-top">6pt</xsl:attribute> + <xsl:attribute name="margin-bottom">6pt</xsl:attribute> +--> +</xsl:attribute-set> + +<xsl:param name="table.cell.border.color" select="'black'"/> +<xsl:param name="table.cell.border.style" select="'solid'"/> +<xsl:param name="table.cell.border.thickness" select="'0.5pt'"/> <xsl:attribute-set name="table.cell.padding"> <xsl:attribute name="padding-left">2pt</xsl:attribute> <xsl:attribute name="padding-right">2pt</xsl:attribute> <xsl:attribute name="padding-top">2pt</xsl:attribute> <xsl:attribute name="padding-bottom">2pt</xsl:attribute> </xsl:attribute-set> +<xsl:param name="table.footnote.number.format" select="'a'"/> +<xsl:param name="table.footnote.number.symbols" select="''"/> - -<xsl:param name="table.entry.padding" select="'2pt'"/> - +<xsl:param name="table.frame.border.color" select="'black'"/> +<xsl:param name="table.frame.border.style" select="'solid'"/> +<xsl:param name="table.frame.border.thickness" select="'0.5pt'"/> +<xsl:attribute-set name="table.properties" use-attribute-sets="formal.object.properties"/> <xsl:param name="tablecolumns.extension" select="'1'"/> -<xsl:param name="textinsert.extension" select="'1'"/> - -<xsl:param name="tex.math.in.alt" select="''"/> - - +<xsl:param name="target.database.document" select="''"/> <xsl:param name="tex.math.delims" select="'1'"/> - -<xsl:param name="title.font.family">Helvetica</xsl:param> - +<xsl:param name="tex.math.in.alt" select="''"/> +<xsl:param name="textinsert.extension" select="'1'"/> +<xsl:param name="title.font.family" select="'sans-serif'"/> <xsl:param name="title.margin.left" select="'-4pc'"/> - - <xsl:param name="toc.indent.width" select="24"/> - <xsl:attribute-set name="toc.margin.properties"> <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> <xsl:attribute name="space-before.optimum">1em</xsl:attribute> @@ -447,31 +511,27 @@ <xsl:attribute name="space-after.maximum">2em</xsl:attribute> </xsl:attribute-set> <xsl:param name="toc.section.depth">2</xsl:param> -<xsl:param name="use.extensions" select="'0'"/> - -<xsl:param name="use.svg" select="1"/> - - +<xsl:param name="ulink.footnote.number.format" select="'1'"/> <xsl:param name="ulink.footnotes" select="0"/> - - <xsl:param name="ulink.hyphenate" select="''"/> - - <xsl:param name="ulink.show" select="1"/> - - +<xsl:param name="use.extensions" select="'0'"/> +<xsl:param name="use.local.olink.style" select="0"/> +<xsl:param name="use.role.as.xrefstyle" select="1"/> +<xsl:param name="use.role.for.mediaobject" select="1"/> +<xsl:param name="use.svg" select="1"/> <xsl:param name="variablelist.as.blocks" select="0"/> - - <xsl:attribute-set name="verbatim.properties"> <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.optimum">1em</xsl:attribute> <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> </xsl:attribute-set> <xsl:param name="xep.extensions" select="0"/> <xsl:attribute-set name="xref.properties"> - </xsl:attribute-set> +<xsl:param name="xref.with.number.and.title" select="1"/> -</xsl:stylesheet> +</xsl:stylesheet> \ No newline at end of file Index: phpdoc/xsl/docbook/fo/param.xweb diff -u phpdoc/xsl/docbook/fo/param.xweb:1.1 phpdoc/xsl/docbook/fo/param.xweb:1.2 --- phpdoc/xsl/docbook/fo/param.xweb:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/param.xweb Sun Mar 9 09:54:48 2003 @@ -7,7 +7,7 @@ <bookinfo> <title>FO Parameter Reference</title> <releaseinfo role="meta"> -$Id: param.xweb,v 1.1 2002/08/13 15:45:40 goba Exp $ +$Id: param.xweb,v 1.2 2003/03/09 14:54:48 tom Exp $ </releaseinfo> <author> <surname>Walsh</surname> @@ -87,9 +87,12 @@ &process.source.toc; &generate.toc; &generate.index; +&make.index.markup; &toc.section.depth; &toc.indent.width; &toc.margin.properties; +&bridgehead.in.toc; +&generate.section.toc.level; <!-- annotate.toc; @@ -145,17 +148,27 @@ &function.parens; &refentry.generate.name; &refentry.generate.title; +&refentry.title.properties; &refentry.xref.manvolnum; </reference> <reference><title>Tables</title> &default.table.width; &nominal.table.width; -&table.border.thickness; &table.cell.padding; -&table.border.style; -&table.border.color; -&table.entry.padding; +&table.frame.border.thickness; +&table.frame.border.style; +&table.frame.border.color; +&table.cell.border.thickness; +&table.cell.border.style; +&table.cell.border.color; +</reference> + +<reference><title>Linking</title> +&target.database.document; +&use.local.olink.style; +¤t.docid; +&olink.doctitle; </reference> <reference><title>QAndASet</title> @@ -166,16 +179,21 @@ <reference><title>Bibliography</title> &biblioentry.item.separator; &bibliography.collection; +&bibliography.numbered; </reference> <reference><title>Glossary</title> &glossterm.auto.link; &firstterm.only.link; &glossary.collection; +&glossterm.separation; +&glossterm.width; +&glossary.as.blocks; +&glosslist.as.blocks; +&glossentry.show.acronym; </reference> <reference><title>Miscellaneous</title> -&graphic.default.extension; &formal.procedures; &formal.title.placement; &runinhead.default.title.end.punct; @@ -187,10 +205,28 @@ &blockquote.properties; &ulink.show; &ulink.footnotes; +&ulink.footnote.number.format; &ulink.hyphenate; &shade.verbatim; &shade.verbatim.style; &use.svg; +&use.role.as.xrefstyle; +&menuchoice.separator; +&menuchoice.menu.separator; +&default.float.class; +&footnote.number.format; +&table.footnote.number.format; +&footnote.number.symbols; +&table.footnote.number.symbols; +&xref.with.number.and.title; +</reference> + +<reference><title>Graphics</title> +&graphic.default.extension; +&default.image.width; +&preferred.mediaobject.role; +&use.role.for.mediaobject; +&ignore.image.scaling; </reference> <reference><title>Pagination and General Styles</title> @@ -225,13 +261,13 @@ <para>The pink region at the top of the page is the region-before. The darker area inside the region-before is the header text. In XSL, the default -display alignment for the region-before is <literal>before</literal>, but -the DocBook stylesheets explicitly make it <literal>after</literal>. That's -why the darker area is at the bottom.</para> +display alignment for a region is <literal>before</literal>, but the +DocBook stylesheets still explicitly make it <literal>before</literal>. That's +why the darker area is at the top.</para> <para>The pink region at the bottom of the page is the region-after. The darker area is the footer text. In XSL, the default display -alignment for the region-after is <literal>before</literal> (really!), +alignment for a region is <literal>before</literal>, but the DocBook stylesheets explicitly make it <literal>after</literal>. That's why the darker area is at the bottom.</para> @@ -279,8 +315,12 @@ &alignment; &hyphenate; &line-height; -&column.count; -&column.count.of.index; +&column.count.back; +&column.count.body; +&column.count.front; +&column.count.index; +&column.count.lot; +&column.count.titlepage; ®ion.after.extent; ®ion.before.extent; &default.units; @@ -289,7 +329,14 @@ &body.font.size; &footnote.font.size; &title.margin.left; +&draft.mode; &draft.watermark.image; +&headers.on.blank.pages; +&footers.on.blank.pages; +&header.rule; +&footer.rule; +&header.content.properties; +&footer.content.properties; </reference> <reference><title>Font Families</title> @@ -316,8 +363,22 @@ &formal.object.properties; &formal.title.properties; &informal.object.properties; -&monospace.verbatim.properties; +&monospace.properties; &verbatim.properties; +&monospace.verbatim.properties; +&sidebar.properties; +§ion.title.properties; +§ion.title.level1.properties; +§ion.title.level2.properties; +§ion.title.level3.properties; +§ion.title.level4.properties; +§ion.title.level5.properties; +§ion.title.level6.properties; +&figure.properties; +&example.properties; +&equation.properties; +&table.properties; +&procedure.properties; </reference> <reference><title>Profiling</title> @@ -343,6 +404,12 @@ &profile.separator; </reference> +<reference><title>Localization</title> +&l10n.gentext.language; +&l10n.gentext.default.language; +&l10n.gentext.use.xref.language; +</reference> + <!-- <reference><title></title> </reference> @@ -361,7 +428,7 @@ <!-- This file is generated from param.xweb; do not edit this file! --> <!-- ******************************************************************** - $Id: param.xweb,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: param.xweb,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -382,12 +449,14 @@ <src:fragref linkend="autotoc.label.separator.frag"/> <src:fragref linkend="biblioentry.item.separator.frag"/> <src:fragref linkend="bibliography.collection.frag"/> +<src:fragref linkend="bibliography.numbered.frag"/> <src:fragref linkend="blockquote.properties.frag"/> <src:fragref linkend="body.font.family.frag"/> <src:fragref linkend="body.font.master.frag"/> <src:fragref linkend="body.font.size.frag"/> <src:fragref linkend="body.margin.bottom.frag"/> <src:fragref linkend="body.margin.top.frag"/> +<src:fragref linkend="bridgehead.in.toc.frag"/> <src:fragref linkend="callout.defaultcolumn.frag"/> <src:fragref linkend="callout.graphics.extension.frag"/> <src:fragref linkend="callout.graphics.frag"/> @@ -399,17 +468,33 @@ <src:fragref linkend="callout.unicode.start.character.frag"/> <src:fragref linkend="callouts.extension.frag"/> <src:fragref linkend="chapter.autolabel.frag"/> -<src:fragref linkend="column.count.frag"/> -<src:fragref linkend="column.count.of.index.frag"/> +<src:fragref linkend="column.count.back.frag"/> +<src:fragref linkend="column.count.body.frag"/> +<src:fragref linkend="column.count.front.frag"/> +<src:fragref linkend="column.count.index.frag"/> +<src:fragref linkend="column.count.lot.frag"/> +<src:fragref linkend="column.count.titlepage.frag"/> <src:fragref linkend="compact.list.item.spacing.frag"/> <src:fragref linkend="component.title.properties.frag"/> +<src:fragref linkend="current.docid.frag"/> +<src:fragref linkend="default.float.class.frag"/> +<src:fragref linkend="default.image.width.frag"/> <src:fragref linkend="default.table.width.frag"/> <src:fragref linkend="default.units.frag"/> <src:fragref linkend="dingbat.font.family.frag"/> <src:fragref linkend="double.sided.frag"/> +<src:fragref linkend="draft.mode.frag"/> <src:fragref linkend="draft.watermark.image.frag"/> +<src:fragref linkend="equation.properties.frag"/> +<src:fragref linkend="example.properties.frag"/> +<src:fragref linkend="figure.properties.frag"/> <src:fragref linkend="firstterm.only.link.frag"/> +<src:fragref linkend="footer.content.properties.frag"/> +<src:fragref linkend="footer.rule.frag"/> +<src:fragref linkend="footers.on.blank.pages.frag"/> <src:fragref linkend="footnote.font.size.frag"/> +<src:fragref linkend="footnote.number.format.frag"/> +<src:fragref linkend="footnote.number.symbols.frag"/> <src:fragref linkend="fop.extensions.frag"/> <src:fragref linkend="formal.object.properties.frag"/> <src:fragref linkend="formal.procedures.frag"/> @@ -419,13 +504,26 @@ <src:fragref linkend="funcsynopsis.style.frag"/> <src:fragref linkend="function.parens.frag"/> <src:fragref linkend="generate.index.frag"/> +<src:fragref linkend="generate.section.toc.level.frag"/> <src:fragref linkend="generate.toc.frag"/> +<src:fragref linkend="glossary.as.blocks.frag"/> <src:fragref linkend="glossary.collection.frag"/> +<src:fragref linkend="glossentry.show.acronym.frag"/> +<src:fragref linkend="glosslist.as.blocks.frag"/> <src:fragref linkend="glossterm.auto.link.frag"/> +<src:fragref linkend="glossterm.separation.frag"/> +<src:fragref linkend="glossterm.width.frag"/> <src:fragref linkend="graphic.default.extension.frag"/> +<src:fragref linkend="header.content.properties.frag"/> +<src:fragref linkend="header.rule.frag"/> +<src:fragref linkend="headers.on.blank.pages.frag"/> <src:fragref linkend="hyphenate.frag"/> +<src:fragref linkend="ignore.image.scaling.frag"/> <src:fragref linkend="informal.object.properties.frag"/> <src:fragref linkend="insert.xref.page.number.frag"/> +<src:fragref linkend="l10n.gentext.default.language.frag"/> +<src:fragref linkend="l10n.gentext.language.frag"/> +<src:fragref linkend="l10n.gentext.use.xref.language.frag"/> <src:fragref linkend="label.from.part.frag"/> <src:fragref linkend="line-height.frag"/> <src:fragref linkend="linenumbering.everyNth.frag"/> @@ -434,12 +532,17 @@ <src:fragref linkend="linenumbering.width.frag"/> <src:fragref linkend="list.block.spacing.frag"/> <src:fragref linkend="list.item.spacing.frag"/> +<src:fragref linkend="make.index.markup.frag"/> <src:fragref linkend="make.single.year.ranges.frag"/> <src:fragref linkend="make.year.ranges.frag"/> +<src:fragref linkend="menuchoice.menu.separator.frag"/> +<src:fragref linkend="menuchoice.separator.frag"/> <src:fragref linkend="monospace.font.family.frag"/> +<src:fragref linkend="monospace.properties.frag"/> <src:fragref linkend="monospace.verbatim.properties.frag"/> <src:fragref linkend="nominal.table.width.frag"/> <src:fragref linkend="normal.para.spacing.frag"/> +<src:fragref linkend="olink.doctitle.frag"/> <src:fragref linkend="page.height.frag"/> <src:fragref linkend="page.height.portrait.frag"/> <src:fragref linkend="page.margin.bottom.frag"/> @@ -453,9 +556,12 @@ <src:fragref linkend="part.autolabel.frag"/> <src:fragref linkend="passivetex.extensions.frag"/> <src:fragref linkend="preface.autolabel.frag"/> +<src:fragref linkend="preferred.mediaobject.role.frag"/> +<src:fragref linkend="procedure.properties.frag"/> <src:fragref linkend="process.empty.source.toc.frag"/> <src:fragref linkend="process.source.toc.frag"/> <src:fragref linkend="profile.arch.frag"/> +<src:fragref linkend="profile.attribute.frag"/> <src:fragref linkend="profile.condition.frag"/> <src:fragref linkend="profile.conformance.frag"/> <src:fragref linkend="profile.lang.frag"/> @@ -464,16 +570,16 @@ <src:fragref linkend="profile.revisionflag.frag"/> <src:fragref linkend="profile.role.frag"/> <src:fragref linkend="profile.security.frag"/> +<src:fragref linkend="profile.separator.frag"/> <src:fragref linkend="profile.userlevel.frag"/> -<src:fragref linkend="profile.vendor.frag"/> -<src:fragref linkend="profile.attribute.frag"/> <src:fragref linkend="profile.value.frag"/> -<src:fragref linkend="profile.separator.frag"/> +<src:fragref linkend="profile.vendor.frag"/> <src:fragref linkend="punct.honorific.frag"/> <src:fragref linkend="qanda.inherit.numeration.frag"/> <src:fragref linkend="qandadiv.autolabel.frag"/> <src:fragref linkend="refentry.generate.name.frag"/> <src:fragref linkend="refentry.generate.title.frag"/> +<src:fragref linkend="refentry.title.properties.frag"/> <src:fragref linkend="refentry.xref.manvolnum.frag"/> <src:fragref linkend="region.after.extent.frag"/> <src:fragref linkend="region.before.extent.frag"/> @@ -483,33 +589,52 @@ <src:fragref linkend="sans.font.family.frag"/> <src:fragref linkend="section.autolabel.frag"/> <src:fragref linkend="section.label.includes.component.label.frag"/> +<src:fragref linkend="section.title.level1.properties.frag"/> +<src:fragref linkend="section.title.level2.properties.frag"/> +<src:fragref linkend="section.title.level3.properties.frag"/> +<src:fragref linkend="section.title.level4.properties.frag"/> +<src:fragref linkend="section.title.level5.properties.frag"/> +<src:fragref linkend="section.title.level6.properties.frag"/> +<src:fragref linkend="section.title.properties.frag"/> <src:fragref linkend="segmentedlist.as.table.frag"/> <src:fragref linkend="shade.verbatim.frag"/> <src:fragref linkend="shade.verbatim.style.frag"/> <src:fragref linkend="show.comments.frag"/> -<src:fragref linkend="table.border.color.frag"/> -<src:fragref linkend="table.border.style.frag"/> -<src:fragref linkend="table.border.thickness.frag"/> +<src:fragref linkend="sidebar.properties.frag"/> +<src:fragref linkend="table.cell.border.color.frag"/> +<src:fragref linkend="table.cell.border.style.frag"/> +<src:fragref linkend="table.cell.border.thickness.frag"/> <src:fragref linkend="table.cell.padding.frag"/> -<src:fragref linkend="table.entry.padding.frag"/> +<src:fragref linkend="table.footnote.number.format.frag"/> +<src:fragref linkend="table.footnote.number.symbols.frag"/> +<src:fragref linkend="table.frame.border.color.frag"/> +<src:fragref linkend="table.frame.border.style.frag"/> +<src:fragref linkend="table.frame.border.thickness.frag"/> +<src:fragref linkend="table.properties.frag"/> <src:fragref linkend="tablecolumns.extension.frag"/> -<src:fragref linkend="textinsert.extension.frag"/> -<src:fragref linkend="tex.math.in.alt.frag"/> +<src:fragref linkend="target.database.document.frag"/> <src:fragref linkend="tex.math.delims.frag"/> +<src:fragref linkend="tex.math.in.alt.frag"/> +<src:fragref linkend="textinsert.extension.frag"/> <src:fragref linkend="title.font.family.frag"/> <src:fragref linkend="title.margin.left.frag"/> <src:fragref linkend="toc.indent.width.frag"/> <src:fragref linkend="toc.margin.properties.frag"/> <src:fragref linkend="toc.section.depth.frag"/> -<src:fragref linkend="use.extensions.frag"/> -<src:fragref linkend="use.svg.frag"/> +<src:fragref linkend="ulink.footnote.number.format.frag"/> <src:fragref linkend="ulink.footnotes.frag"/> <src:fragref linkend="ulink.hyphenate.frag"/> <src:fragref linkend="ulink.show.frag"/> +<src:fragref linkend="use.extensions.frag"/> +<src:fragref linkend="use.local.olink.style.frag"/> +<src:fragref linkend="use.role.as.xrefstyle.frag"/> +<src:fragref linkend="use.role.for.mediaobject.frag"/> +<src:fragref linkend="use.svg.frag"/> <src:fragref linkend="variablelist.as.blocks.frag"/> <src:fragref linkend="verbatim.properties.frag"/> <src:fragref linkend="xep.extensions.frag"/> <src:fragref linkend="xref.properties.frag"/> +<src:fragref linkend="xref.with.number.and.title.frag"/> </xsl:stylesheet> </src:fragment> Index: phpdoc/xsl/docbook/fo/passivetex.xsl diff -u phpdoc/xsl/docbook/fo/passivetex.xsl:1.1 phpdoc/xsl/docbook/fo/passivetex.xsl:1.2 --- phpdoc/xsl/docbook/fo/passivetex.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/passivetex.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: passivetex.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: passivetex.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This extension stops PassiveTeX from merging subsequent '-' to dashes. You must set passivetex.extensions to '1' if you want get Index: phpdoc/xsl/docbook/fo/pi.xsl diff -u phpdoc/xsl/docbook/fo/pi.xsl:1.1 phpdoc/xsl/docbook/fo/pi.xsl:1.2 --- phpdoc/xsl/docbook/fo/pi.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/pi.xsl Sun Mar 9 09:54:48 2003 @@ -3,7 +3,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: pi.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: pi.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. Index: phpdoc/xsl/docbook/fo/profile-docbook.xsl diff -u phpdoc/xsl/docbook/fo/profile-docbook.xsl:1.1 phpdoc/xsl/docbook/fo/profile-docbook.xsl:1.2 --- phpdoc/xsl/docbook/fo/profile-docbook.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/profile-docbook.xsl Sun Mar 9 09:54:48 2003 @@ -9,7 +9,7 @@ <xsl:output method="xml" indent="no"/> <!-- ******************************************************************** - $Id: profile-docbook.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: profile-docbook.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -78,7 +78,12 @@ <xsl:template match="*"> <xsl:message> <xsl:value-of select="name(.)"/> - <xsl:text> encountered, but no template matches.</xsl:text> + <xsl:text> encountered</xsl:text> + <xsl:if test="parent::*"> + <xsl:text> in </xsl:text> + <xsl:value-of select="name(parent::*)"/> + </xsl:if> + <xsl:text>, but no template matches.</xsl:text> </xsl:message> <fo:block color="red"> <xsl:text><</xsl:text> @@ -92,19 +97,10 @@ </xsl:template> <xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xsl:template match="/"><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:apply-templates select="." mode="profile"/></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/> - <xsl:message> - <xsl:text>Making </xsl:text> - <xsl:value-of select="$page.orientation"/> - <xsl:text> pages on </xsl:text> - <xsl:value-of select="$paper.type"/> - <xsl:text> paper (</xsl:text> - <xsl:value-of select="$page.width"/> - <xsl:text>x</xsl:text> - <xsl:value-of select="$page.height"/> - <xsl:text>)</xsl:text> - </xsl:message> + <xsl:call-template name="root.messages"/> <xsl:variable name="document.element" select="*[1]"/> + <xsl:variable name="title"> <xsl:choose> <xsl:when test="$document.element/title[1]"> @@ -155,11 +151,11 @@ </xsl:when> <xsl:otherwise> <xsl:if test="$fop.extensions != 0"> - <xsl:apply-templates mode="fop.outline"/> + <xsl:apply-templates mode="fop.outline" select="$profiled-nodes/node()"/> </xsl:if> <xsl:if test="$xep.extensions != 0"> <xsl:variable name="bookmarks"> - <xsl:apply-templates mode="xep.outline"/> + <xsl:apply-templates mode="xep.outline" select="$profiled-nodes/node()"/> </xsl:variable> <xsl:if test="string($bookmarks) != ''"> <rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions"> @@ -167,11 +163,28 @@ </rx:outline> </xsl:if> </xsl:if> - <xsl:apply-templates/> + <xsl:apply-templates select="$profiled-nodes/node()"/> </xsl:otherwise> </xsl:choose> </fo:root> +</xsl:template> + + +<xsl:template name="root.messages"> + <!-- redefine this any way you'd like to output messages --> + <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE --> + <xsl:message> + <xsl:text>Making </xsl:text> + <xsl:value-of select="$page.orientation"/> + <xsl:text> pages on </xsl:text> + <xsl:value-of select="$paper.type"/> + <xsl:text> paper (</xsl:text> + <xsl:value-of select="$page.width"/> + <xsl:text>x</xsl:text> + <xsl:value-of select="$page.height"/> + <xsl:text>)</xsl:text> + </xsl:message> </xsl:template> <!-- ==================================================================== --> Index: phpdoc/xsl/docbook/fo/qandaset.xsl diff -u phpdoc/xsl/docbook/fo/qandaset.xsl:1.1 phpdoc/xsl/docbook/fo/qandaset.xsl:1.2 --- phpdoc/xsl/docbook/fo/qandaset.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/qandaset.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: qandaset.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: qandaset.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -60,7 +60,8 @@ </xsl:variable> <xsl:call-template name="section.heading"> - <xsl:with-param name="level" select="$sectlvl"/> + <xsl:with-param name="level" select="$sectlvl + 1"/> + <xsl:with-param name="marker" select="0"/> <xsl:with-param name="title"> <xsl:apply-templates/> </xsl:with-param> @@ -107,8 +108,8 @@ </xsl:variable> <xsl:call-template name="section.heading"> - <xsl:with-param name="level" - select="$sectlvl + count(ancestor::qandadiv)"/> + <xsl:with-param name="level" select="$sectlvl + 1 + count(ancestor::qandadiv)"/> + <xsl:with-param name="marker" select="0"/> <xsl:with-param name="title"> <xsl:apply-templates/> </xsl:with-param> Index: phpdoc/xsl/docbook/fo/refentry.xsl diff -u phpdoc/xsl/docbook/fo/refentry.xsl:1.1 phpdoc/xsl/docbook/fo/refentry.xsl:1.2 --- phpdoc/xsl/docbook/fo/refentry.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/refentry.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: refentry.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: refentry.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -30,8 +30,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -69,8 +72,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -90,7 +96,7 @@ </fo:page-sequence> </xsl:template> -<xsl:template match="reference/docinfo"></xsl:template> +<xsl:template match="reference/docinfo|refentry/refentryinfo"></xsl:template> <xsl:template match="reference/title"></xsl:template> <xsl:template match="reference/subtitle"></xsl:template> @@ -106,33 +112,24 @@ </xsl:variable> <xsl:variable name="refentry.content"> -<!-- FIXME: what should this be? - <fo:block font-size="20pt" font-weight="bold"> - <xsl:choose> - <xsl:when test="refmeta/refentrytitle"> - <xsl:apply-templates select="refmeta/refentrytitle" mode="title"/> - </xsl:when> - <xsl:when test="refnamediv/refname"> - <xsl:apply-templates select="refnamediv/refname" mode="title"/> - </xsl:when> - </xsl:choose> - </fo:block> ---> <fo:block id="{$id}"> <xsl:apply-templates/> </fo:block> </xsl:variable> <xsl:choose> - <xsl:when test="not(parent::*) or parent::reference"> + <xsl:when test="not(parent::*) or parent::reference or parent::part"> <!-- make a page sequence --> <fo:page-sequence hyphenate="{$hyphenate}" master-reference="{$master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -177,14 +174,15 @@ <fo:block> <xsl:choose> <xsl:when test="$refentry.generate.name != 0"> - <fo:block font-size="18pt" font-weight="bold"> + <fo:block xsl:use-attribute-sets="refentry.title.properties"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'RefName'"/> </xsl:call-template> </fo:block> </xsl:when> + <xsl:when test="$refentry.generate.title != 0"> - <fo:block font-size="18pt" font-weight="bold"> + <fo:block xsl:use-attribute-sets="refentry.title.properties"> <xsl:choose> <xsl:when test="../refmeta/refentrytitle"> <xsl:apply-templates select="../refmeta/refentrytitle"/> @@ -197,7 +195,7 @@ </xsl:when> </xsl:choose> - <fo:block> + <fo:block space-after="1em"> <xsl:choose> <xsl:when test="../refmeta/refentrytitle"> <xsl:apply-templates select="../refmeta/refentrytitle"/> @@ -248,49 +246,107 @@ </xsl:template> <xsl:template match="refsynopsisdiv"> - <fo:block> - <xsl:attribute name="id"> - <xsl:call-template name="object.id"/> - </xsl:attribute> - <fo:block font-size="18pt" font-weight="bold"> - <xsl:choose> - <xsl:when test="refsynopsisdiv/title|title"> - <xsl:apply-templates select="(refsynopsisdiv/title|title)[1]" - mode="titlepage.mode"/> - </xsl:when> - <xsl:otherwise> - <xsl:call-template name="gentext"> - <xsl:with-param name="key" select="'RefSynopsisDiv'"/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </fo:block> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="refsynopsisdiv.titlepage"/> <xsl:apply-templates/> </fo:block> </xsl:template> -<xsl:template match="refsynopsisdiv/title"> -</xsl:template> +<xsl:template match="refsection"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> -<xsl:template match="refsect1|refsect2|refsect3"> - <xsl:call-template name="block.object"/> + <fo:block id="{$id}"> + <xsl:call-template name="refsection.titlepage"/> + <xsl:apply-templates/> + </fo:block> </xsl:template> -<xsl:template match="refsect1/title"> - <fo:block font-size="18pt" font-weight="bold"> +<xsl:template match="refsect1"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="refsect1.titlepage"/> <xsl:apply-templates/> </fo:block> </xsl:template> -<xsl:template match="refsect2/title"> - <fo:block font-size="16pt" font-weight="bold"> +<xsl:template match="refsect2"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="refsect2.titlepage"/> <xsl:apply-templates/> </fo:block> </xsl:template> -<xsl:template match="refsect3/title"> - <fo:block font-size="14pt" font-weight="bold"> +<xsl:template match="refsect3"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="refsect3.titlepage"/> <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="refsynopsisdiv/title + |refsection/title + |refsect1/title + |refsect2/title + |refsect3/title"> + <!-- nop; titlepage.mode instead --> +</xsl:template> + +<xsl:template match="refsynopsisdiv/title + |refsection/title + |refsect1/title + |refsect2/title + |refsect3/title" + mode="titlepage.mode" + priority="2"> + <xsl:variable name="section" select="parent::*"/> + <fo:block keep-with-next.within-column="always"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$section"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="level"> + <xsl:call-template name="section.level"> + <xsl:with-param name="node" select="$section"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="title"> + <xsl:apply-templates select="$section" mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> + </xsl:variable> + + <xsl:if test="$passivetex.extensions != 0"> + <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" + fotex-bookmark-level="{$level + 2}" + fotex-bookmark-label="{$id}"> + <xsl:value-of select="$title"/> + </fotex:bookmark> + </xsl:if> + + <xsl:call-template name="section.heading"> + <xsl:with-param name="level" select="$level"/> + <xsl:with-param name="title" select="$title"/> + </xsl:call-template> </fo:block> </xsl:template> Index: phpdoc/xsl/docbook/fo/sections.xsl diff -u phpdoc/xsl/docbook/fo/sections.xsl:1.1 phpdoc/xsl/docbook/fo/sections.xsl:1.2 --- phpdoc/xsl/docbook/fo/sections.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/sections.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: sections.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: sections.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -22,6 +22,21 @@ <fo:block id="{$id}"> <xsl:call-template name="section.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and (count(ancestor::section)+1) <= $generate.section.toc.level"> + <xsl:call-template name="section.toc"> + <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:block> </xsl:template> @@ -42,8 +57,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -55,6 +73,19 @@ <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="section.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and (count(ancestor::section)+1) <= $generate.section.toc.level"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:flow> </fo:page-sequence> @@ -89,17 +120,22 @@ </xsl:apply-templates> </xsl:variable> + <xsl:variable name="titleabbrev"> + <xsl:apply-templates select="$section" mode="titleabbrev.markup"/> + </xsl:variable> + <xsl:if test="$passivetex.extensions != 0"> <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" - fotex-bookmark-level="{$level + 1}" + fotex-bookmark-level="{$level + 2}" fotex-bookmark-label="{$id}"> - <xsl:value-of select="$title"/> + <xsl:value-of select="$titleabbrev"/> </fotex:bookmark> </xsl:if> <xsl:call-template name="section.heading"> <xsl:with-param name="level" select="$level"/> <xsl:with-param name="title" select="$title"/> + <xsl:with-param name="titleabbrev" select="$titleabbrev"/> </xsl:call-template> </fo:block> </xsl:template> @@ -111,6 +147,19 @@ <fo:block id="{$id}"> <xsl:call-template name="sect1.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 1"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:block> </xsl:template> @@ -131,8 +180,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -144,6 +196,19 @@ <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="sect1.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 1"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:flow> </fo:page-sequence> @@ -156,6 +221,19 @@ <fo:block id="{$id}"> <xsl:call-template name="sect2.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 2"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:block> </xsl:template> @@ -167,6 +245,19 @@ <fo:block id="{$id}"> <xsl:call-template name="sect3.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 3"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:block> </xsl:template> @@ -178,6 +269,19 @@ <fo:block id="{$id}"> <xsl:call-template name="sect4.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 4"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:block> </xsl:template> @@ -189,6 +293,19 @@ <fo:block id="{$id}"> <xsl:call-template name="sect5.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 5"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:block> </xsl:template> @@ -241,28 +358,56 @@ <!-- ==================================================================== --> <xsl:template name="section.heading"> - <xsl:param name="level">1</xsl:param> - <xsl:param name="title"></xsl:param> - <xsl:variable name="fsize"> + <xsl:param name="level" select="1"/> + <xsl:param name="marker" select="1"/> + <xsl:param name="title"/> + <xsl:param name="titleabbrev"/> + + <fo:block xsl:use-attribute-sets="section.title.properties"> + <xsl:if test="$marker != 0"> + <fo:marker marker-class-name="section.head.marker"> + <xsl:choose> + <xsl:when test="$titleabbrev = ''"> + <xsl:value-of select="$title"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$titleabbrev"/> + </xsl:otherwise> + </xsl:choose> + </fo:marker> + </xsl:if> <xsl:choose> - <xsl:when test="$level=1">18</xsl:when> - <xsl:when test="$level=2">16</xsl:when> - <xsl:when test="$level=3">14</xsl:when> - <xsl:when test="$level=4">12</xsl:when> - <xsl:when test="$level=5">12</xsl:when> - <xsl:otherwise>10</xsl:otherwise> + <xsl:when test="$level=1"> + <fo:block xsl:use-attribute-sets="section.title.level1.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=2"> + <fo:block xsl:use-attribute-sets="section.title.level2.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=3"> + <fo:block xsl:use-attribute-sets="section.title.level3.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=4"> + <fo:block xsl:use-attribute-sets="section.title.level4.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=5"> + <fo:block xsl:use-attribute-sets="section.title.level5.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block xsl:use-attribute-sets="section.title.level6.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:otherwise> </xsl:choose> - </xsl:variable> - <fo:block font-size="{$fsize}pt" - font-weight="bold" - font-family="{$title.font.family}" - margin-left="4pc" - text-indent="-4pc" - keep-with-next.within-column="always" - space-before.minimum="1em" - space-before.optimum="1.5em" - space-before.maximum="2em"> - <xsl:copy-of select="$title"/> </fo:block> </xsl:template> Index: phpdoc/xsl/docbook/fo/synop.xsl diff -u phpdoc/xsl/docbook/fo/synop.xsl:1.1 phpdoc/xsl/docbook/fo/synop.xsl:1.2 --- phpdoc/xsl/docbook/fo/synop.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/synop.xsl Sun Mar 9 09:54:48 2003 @@ -8,7 +8,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: synop.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: synop.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -39,7 +39,7 @@ <xsl:text> </xsl:text> </xsl:template> -<xsl:template match="group|arg"> +<xsl:template match="group|arg" name="group-or-arg"> <xsl:variable name="choice" select="@choice"/> <xsl:variable name="rep" select="@rep"/> <xsl:variable name="sepchar"> @@ -99,11 +99,11 @@ <xsl:variable name="choice" select="@choice"/> <xsl:variable name="rep" select="@rep"/> <xsl:if test="position()>1"><xsl:value-of select="$arg.or.sep"/></xsl:if> - <xsl:apply-templates/> + <xsl:call-template name="group-or-arg"/> </xsl:template> <xsl:template match="sbr"> - <fo:inline linefeed-treatment="preserve">
</fo:inline> + <fo:block/> </xsl:template> <!-- ==================================================================== --> @@ -114,9 +114,14 @@ <xsl:apply-templates select="$target" mode="synopfragment.number"/> </xsl:variable> <fo:inline font-style="italic"> - <xsl:text>(</xsl:text> - <xsl:value-of select="$snum"/> - <xsl:text>)</xsl:text> + <fo:basic-link internal-destination="{@linkend}" + xsl:use-attribute-sets="xref.properties"> + <xsl:text>(</xsl:text> + <xsl:value-of select="$snum"/> + <xsl:text>)</xsl:text> + </fo:basic-link> + <xsl:text> </xsl:text> + <xsl:apply-templates/> </fo:inline> </xsl:template> @@ -135,7 +140,7 @@ <xsl:text> </xsl:text> <xsl:apply-templates/> </fo:block> -</xsl:template> +</xsl:template> <xsl:template match="funcsynopsis"> <xsl:call-template name="informal.object"/> Index: phpdoc/xsl/docbook/fo/table.xsl diff -u phpdoc/xsl/docbook/fo/table.xsl:1.1 phpdoc/xsl/docbook/fo/table.xsl:1.2 --- phpdoc/xsl/docbook/fo/table.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/table.xsl Sun Mar 9 09:54:48 2003 @@ -5,13 +5,14 @@ xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table" xmlns:xtbl="com.nwalsh.xalan.Table" xmlns:lxslt="http://xml.apache.org/xslt" - exclude-result-prefixes="doc stbl xtbl lxslt" + xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table" + exclude-result-prefixes="doc stbl xtbl lxslt ptbl" version='1.0'> <xsl:include href="../common/table.xsl"/> <!-- ******************************************************************** - $Id: table.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: table.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -23,7 +24,7 @@ <doc:reference xmlns=""> <referenceinfo> <releaseinfo role="meta"> -$Id: table.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ +$Id: table.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ </releaseinfo> <author><surname>Walsh</surname> <firstname>Norman</firstname></author> @@ -61,11 +62,10 @@ <xsl:template name="empty.table.cell"> <xsl:param name="colnum" select="0"/> - <xsl:variable name="frame" select="ancestor::tgroup/parent::*/@frame"/> - <xsl:variable name="rowsep"> <xsl:call-template name="inherited.table.attribute"> <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/> + <xsl:with-param name="row" select="ancestor-or-self::row[1]"/> <xsl:with-param name="colnum" select="$colnum"/> <xsl:with-param name="attribute" select="'rowsep'"/> </xsl:call-template> @@ -74,6 +74,7 @@ <xsl:variable name="colsep"> <xsl:call-template name="inherited.table.attribute"> <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/> + <xsl:with-param name="row" select="ancestor-or-self::row[1]"/> <xsl:with-param name="colnum" select="$colnum"/> <xsl:with-param name="attribute" select="'colsep'"/> </xsl:call-template> @@ -82,19 +83,24 @@ <fo:table-cell text-align="center" display-align="center" xsl:use-attribute-sets="table.cell.padding"> + <xsl:if test="$xep.extensions != 0"> + <!-- Suggested by RenderX to workaround a bug in their implementation --> + <xsl:attribute name="keep-together.within-column">always</xsl:attribute> + </xsl:if> <xsl:if test="$rowsep > 0"> <xsl:call-template name="border"> <xsl:with-param name="side" select="'bottom'"/> </xsl:call-template> </xsl:if> - <xsl:if test="$colsep > 0"> + <xsl:if test="$colsep > 0 and $colnum < ancestor::tgroup/@cols"> <xsl:call-template name="border"> <xsl:with-param name="side" select="'right'"/> </xsl:call-template> </xsl:if> - <fo:block/> <!-- fo:table-cell should not be empty --> + <!-- fo:table-cell should not be empty --> + <fo:block/> </fo:table-cell> </xsl:template> @@ -104,19 +110,19 @@ <xsl:param name="side" select="'left'"/> <xsl:attribute name="border-{$side}-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.cell.border.thickness"/> </xsl:attribute> <xsl:attribute name="border-{$side}-style"> - <xsl:value-of select="$table.border.style"/> + <xsl:value-of select="$table.cell.border.style"/> </xsl:attribute> <xsl:attribute name="border-{$side}-color"> - <xsl:value-of select="$table.border.color"/> + <xsl:value-of select="$table.cell.border.color"/> </xsl:attribute> </xsl:template> <!-- ==================================================================== --> -<xsl:template match="tgroup"> +<xsl:template match="tgroup" name="tgroup"> <xsl:variable name="explicit.table.width"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" @@ -155,9 +161,14 @@ </xsl:choose> </xsl:variable> - <xsl:attribute name="width"> - <xsl:value-of select="$table.width"/> - </xsl:attribute> + <xsl:if test="position() = 1"> + <!-- If this is the first tgroup, output the width attribute for the --> + <!-- surrounding fo:table. (If this isn't the first tgroup, trying --> + <!-- to output the attribute will cause an error.) --> + <xsl:attribute name="width"> + <xsl:value-of select="$table.width"/> + </xsl:attribute> + </xsl:if> <xsl:choose> <xsl:when test="$use.extensions != 0 @@ -169,6 +180,9 @@ <xsl:when test="function-available('xtbl:adjustColumnWidths')"> <xsl:copy-of select="xtbl:adjustColumnWidths($colspecs)"/> </xsl:when> + <xsl:when test="function-available('ptbl:adjustColumnWidths')"> + <xsl:copy-of select="ptbl:adjustColumnWidths($colspecs)"/> + </xsl:when> <xsl:otherwise> <xsl:message terminate="yes"> <xsl:text>No adjustColumnWidths function available.</xsl:text> @@ -239,14 +253,14 @@ <fo:table-row> <xsl:call-template name="anchor"/> - <xsl:apply-templates select="entry[1]"> + <xsl:apply-templates select="(entry|entrytbl)[1]"> <xsl:with-param name="spans" select="$spans"/> </xsl:apply-templates> </fo:table-row> <xsl:if test="following-sibling::row"> <xsl:variable name="nextspans"> - <xsl:apply-templates select="entry[1]" mode="span"> + <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span"> <xsl:with-param name="spans" select="$spans"/> </xsl:apply-templates> </xsl:variable> @@ -257,7 +271,7 @@ </xsl:if> </xsl:template> -<xsl:template match="entry" name="entry"> +<xsl:template match="entry|entrytbl" name="entry"> <xsl:param name="col" select="1"/> <xsl:param name="spans"/> @@ -369,7 +383,114 @@ </xsl:when> <xsl:otherwise> + <xsl:variable name="cell.content"> + <fo:block> + <!-- highlight this entry? --> + <xsl:if test="ancestor::thead"> + <xsl:attribute name="font-weight">bold</xsl:attribute> + </xsl:if> + + <!-- are we missing any indexterms? --> + <xsl:if test="not(preceding-sibling::entry) + and not(parent::row/preceding-sibling::row)"> + <!-- this is the first entry of the first row --> + <xsl:if test="ancestor::thead or + (ancestor::tbody + and not(ancestor::tbody/preceding-sibling::thead + or ancestor::tbody/preceding-sibling::tbody))"> + <!-- of the thead or the first tbody --> + <xsl:apply-templates select="ancestor::tgroup/preceding-sibling::indexterm"/> + </xsl:if> + </xsl:if> + + <!-- + <xsl:text>(</xsl:text> + <xsl:value-of select="$rowsep"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$colsep"/> + <xsl:text>)</xsl:text> + --> + <xsl:choose> + <xsl:when test="$empty.cell"> + <xsl:text> </xsl:text> + </xsl:when> + <xsl:when test="self::entrytbl"> + <xsl:variable name="prop-columns" + select=".//colspec[contains(@colwidth, '*')]"/> + <fo:table border-collapse="collapse"> + <xsl:if test="count($prop-columns) != 0"> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + </xsl:if> + <xsl:call-template name="tgroup"/> + </fo:table> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </fo:block> + </xsl:variable> + + <xsl:variable name="cell-orientation"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="ancestor-or-self::entry/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'orientation'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="row-orientation"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="ancestor-or-self::row/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'orientation'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="cell-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="ancestor-or-self::entry/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'rotated-width'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="row-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="ancestor-or-self::row/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'rotated-width'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="orientation"> + <xsl:choose> + <xsl:when test="$cell-orientation != ''"> + <xsl:value-of select="$cell-orientation"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$row-orientation"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="rotated-width"> + <xsl:choose> + <xsl:when test="$cell-width != ''"> + <xsl:value-of select="$cell-width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$row-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <fo:table-cell xsl:use-attribute-sets="table.cell.padding"> + <xsl:if test="$xep.extensions != 0"> + <!-- Suggested by RenderX to workaround a bug in their implementation --> + <xsl:attribute name="keep-together.within-column">always</xsl:attribute> + </xsl:if> + <xsl:call-template name="anchor"/> <xsl:if test="$rowsep > 0"> @@ -378,7 +499,7 @@ </xsl:call-template> </xsl:if> - <xsl:if test="$colsep > 0"> + <xsl:if test="$colsep > 0 and $col < ancestor::tgroup/@cols"> <xsl:call-template name="border"> <xsl:with-param name="side" select="'right'"/> </xsl:call-template> @@ -434,41 +555,27 @@ </xsl:if> --> - <fo:block> - <!-- are we missing any indexterms? --> - <xsl:if test="not(preceding-sibling::entry) - and not(parent::row/preceding-sibling::row)"> - <!-- this is the first entry of the first row --> - <xsl:if test="ancestor::thead or - (ancestor::tbody - and not(ancestor::tbody/preceding-sibling::thead - or ancestor::tbody/preceding-sibling::tbody))"> - <!-- of the thead or the first tbody --> - <xsl:apply-templates select="ancestor::tgroup/preceding-sibling::indexterm"/> - </xsl:if> - </xsl:if> - - <!-- - <xsl:text>(</xsl:text> - <xsl:value-of select="$rowsep"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="$colsep"/> - <xsl:text>)</xsl:text> - --> - <xsl:choose> - <xsl:when test="$empty.cell"> - <xsl:text> </xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates/> - </xsl:otherwise> - </xsl:choose> - </fo:block> + <xsl:choose> + <xsl:when test="$xep.extensions != 0 and $orientation != ''"> + <fo:block-container reference-orientation="{$orientation}"> + <xsl:if test="$rotated-width != ''"> + <xsl:attribute name="width"> + <xsl:value-of select="$rotated-width"/> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="$cell.content"/> + </fo:block-container> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$cell.content"/> + </xsl:otherwise> + </xsl:choose> </fo:table-cell> <xsl:choose> - <xsl:when test="following-sibling::entry"> - <xsl:apply-templates select="following-sibling::entry[1]"> + <xsl:when test="following-sibling::entry|following-sibling::entrytbl"> + <xsl:apply-templates select="(following-sibling::entry + |following-sibling::entrytbl)[1]"> <xsl:with-param name="col" select="$col+$entry.colspan"/> <xsl:with-param name="spans" select="$following.spans"/> </xsl:apply-templates> @@ -484,7 +591,7 @@ </xsl:choose> </xsl:template> -<xsl:template match="entry" name="sentry" mode="span"> +<xsl:template match="entry|entrytbl" name="sentry" mode="span"> <xsl:param name="col" select="1"/> <xsl:param name="spans"/> @@ -541,8 +648,9 @@ </xsl:call-template> <xsl:choose> - <xsl:when test="following-sibling::entry"> - <xsl:apply-templates select="following-sibling::entry[1]" + <xsl:when test="following-sibling::entry|following-sibling::entrytbl"> + <xsl:apply-templates select="(following-sibling::entry + |following-sibling::entrytbl)[1]" mode="span"> <xsl:with-param name="col" select="$col+$entry.colspan"/> <xsl:with-param name="spans" select="$following.spans"/> Index: phpdoc/xsl/docbook/fo/titlepage.templates.xml diff -u phpdoc/xsl/docbook/fo/titlepage.templates.xml:1.1 phpdoc/xsl/docbook/fo/titlepage.templates.xml:1.2 --- phpdoc/xsl/docbook/fo/titlepage.templates.xml:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/titlepage.templates.xml Sun Mar 9 09:54:48 2003 @@ -17,62 +17,84 @@ xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<!-- ******************************************************************** + $Id: titlepage.templates.xml,v 1.2 2003/03/09 14:54:48 tom Exp $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + and other information. + + ******************************************************************** --> + <!-- ==================================================================== --> -<t:titlepage element="article" wrapper="fo:block"> - <t:titlepage-content side="recto"> - <title named-template="component.title" - param:node="ancestor-or-self::article[1]" - fo:text-align="center" - fo:keep-with-next="always" - fo:font-size="&hsize5;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> - <subtitle fo:font-family="{$title.font.family}" - fo:text-align="center"/> - <corpauthor fo:text-align="center"/> - <authorgroup fo:text-align="center"/> - <author fo:text-align="center" - fo:font-size="&hsize2;" - fo:font-weight="bold"/> - <othercredit fo:text-align="center"/> - <releaseinfo fo:text-align="center"/> - <copyright fo:text-align="center"/> - <legalnotice/> - <pubdate fo:text-align="center"/> - <revision fo:text-align="center"/> - <revhistory/> - <abstract/> +<t:titlepage t:element="article" t:wrapper="fo:block" + font-family="{$title.font.family}"> + + <t:titlepage-content t:side="recto" + text-align="center"> + + <title t:named-template="component.title" + param:node="ancestor-or-self::article[1]" + keep-with-next="always" + font-size="&hsize5;" + font-weight="bold"/> + + <subtitle/> + + <corpauthor space-before="0.5em" + font-size="&hsize2;"/> + <authorgroup space-before="0.5em" + font-size="&hsize2;"/> + <author space-before="0.5em" + font-size="&hsize2;"/> + + <othercredit space-before="0.5em"/> + <releaseinfo space-before="0.5em"/> + <copyright space-before="0.5em"/> + <legalnotice text-align="start" + margin-left="0.5in" + margin-right="0.5in" + font-family="{$body.font.family}"/> + <pubdate space-before="0.5em"/> + <revision space-before="0.5em"/> + <revhistory space-before="0.5em"/> + <abstract space-before="0.5em" + text-align="start" + margin-left="0.5in" + margin-right="0.5in" + font-family="{$body.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> -<t:titlepage element="set" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="set" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - named-template="division.title" + t:named-template="division.title" param:node="ancestor-or-self::set[1]" - fo:text-align="center" - fo:font-size="&hsize5;" - fo:space-before="&hsize5space;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize5;" + space-before="&hsize5space;" + font-weight="bold" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}" - fo:text-align="center"/> + font-family="{$title.font.family}" + text-align="center"/> <corpauthor/> <authorgroup/> <author/> @@ -86,121 +108,121 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="book" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="book" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - named-template="division.title" + t:named-template="division.title" param:node="ancestor-or-self::book[1]" - fo:text-align="center" - fo:font-size="&hsize5;" - fo:space-before="&hsize5space;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> - <subtitle - fo:text-align="center" - fo:font-size="&hsize4;" - fo:space-before="&hsize4space;" - fo:font-family="{$title.font.family}"/> - <corpauthor fo:font-size="&hsize3;" - fo:keep-with-next="always" - fo:space-before="2in"/> - <authorgroup fo:space-before="2in"/> - <author fo:font-size="&hsize3;" - fo:space-before="&hsize2space;" - fo:keep-with-next="always"/> - </t:titlepage-content> - - <t:titlepage-content side="verso"> - <title - named-template="book.verso.title" - fo:font-size="&hsize2;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize5;" + space-before="&hsize5space;" + font-weight="bold" + font-family="{$title.font.family}"/> + <subtitle + text-align="center" + font-size="&hsize4;" + space-before="&hsize4space;" + font-family="{$title.font.family}"/> + <corpauthor font-size="&hsize3;" + keep-with-next="always" + space-before="2in"/> + <authorgroup space-before="2in"/> + <author font-size="&hsize3;" + space-before="&hsize2space;" + keep-with-next="always"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + <title + t:named-template="book.verso.title" + font-size="&hsize2;" + font-weight="bold" + font-family="{$title.font.family}"/> <corpauthor/> - <authorgroup named-template="verso.authorgroup"/> + <authorgroup t:named-template="verso.authorgroup"/> <author/> <othercredit/> - <pubdate fo:space-before="1em"/> + <pubdate space-before="1em"/> <copyright/> <abstract/> - <legalnotice fo:font-size="8pt"/> + <legalnotice font-size="8pt"/> </t:titlepage-content> <t:titlepage-separator> <fo:block break-after="page"/> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> <fo:block break-after="page"/> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> -<t:titlepage element="part" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="part" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - named-template="division.title" + t:named-template="division.title" param:node="ancestor-or-self::part[1]" - fo:text-align="center" - fo:font-size="&hsize5;" - fo:space-before="&hsize5space;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize5;" + space-before="&hsize5space;" + font-weight="bold" + font-family="{$title.font.family}"/> <subtitle - fo:text-align="center" - fo:font-size="&hsize4;" - fo:space-before="&hsize4space;" - fo:font-weight='bold' - fo:font-style='italic' - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize4;" + space-before="&hsize4space;" + font-weight='bold' + font-style='italic' + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="partintro" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="partintro" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:text-align="center" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:space-before="1em" - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize5;" + font-weight="bold" + space-before="1em" + font-family="{$title.font.family}"/> <subtitle - fo:text-align="center" - fo:font-size="&hsize2;" - fo:font-weight="bold" - fo:font-style="italic" - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize2;" + font-weight="bold" + font-style="italic" + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -214,34 +236,34 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> -<t:titlepage element="reference" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="reference" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - named-template="division.title" + t:named-template="division.title" param:node="ancestor-or-self::reference[1]" - fo:text-align="center" - fo:font-size="&hsize5;" - fo:space-before="&hsize5space;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize5;" + space-before="&hsize5space;" + font-weight="bold" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}" - fo:text-align="center"/> + font-family="{$title.font.family}" + text-align="center"/> <corpauthor/> <authorgroup/> <author/> @@ -255,62 +277,167 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refsynopsisdiv" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refsection" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refsect1" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refsect2" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="dedication" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="refsect3" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="dedication" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="component.title" + t:force="1" + t:named-template="component.title" param:node="ancestor-or-self::dedication[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-family="{$title.font.family}" - fo:font-weight="bold"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="preface" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="preface" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="component.title" + t:force="1" + t:named-template="component.title" param:node="ancestor-or-self::preface[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-family="{$title.font.family}" - fo:font-weight="bold"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -324,40 +451,46 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="chapter" wrapper="fo:block"> - <t:titlepage-content side="recto"> - <title - named-template="component.title" + <t:titlepage t:element="chapter" t:wrapper="fo:block" + font-family="{$title.font.family}"> + <t:titlepage-content t:side="recto" margin-left="{$title.margin.left}"> + <title t:named-template="component.title" param:node="ancestor-or-self::chapter[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> - <subtitle - fo:space-before="0.5em" - fo:margin-left="{$title.margin.left}" - fo:font-style="italic" - fo:font-size="&hsize2;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> - <corpauthor/> - <authorgroup/> - <author/> + font-size="&hsize5;" + font-weight="bold"/> + + <subtitle space-before="0.5em" + font-style="italic" + font-size="&hsize2;" + font-weight="bold"/> + + <corpauthor space-before="0.5em" + space-after="0.5em" + font-size="&hsize2;"/> + + <authorgroup space-before="0.5em" + space-after="0.5em" + font-size="&hsize2;"/> + + <author space-before="0.5em" + space-after="0.5em" + font-size="&hsize2;"/> + <othercredit/> <releaseinfo/> <copyright/> @@ -368,32 +501,32 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="appendix" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="appendix" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - named-template="component.title" + t:named-template="component.title" param:node="ancestor-or-self::appendix[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-weight="bold" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -407,28 +540,28 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> -<t:titlepage element="section" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="section" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -442,26 +575,26 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="sect1" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="sect1" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -475,26 +608,26 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="sect2" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="sect2" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -508,26 +641,26 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="sect3" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="sect3" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -541,26 +674,26 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="sect4" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="sect4" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -574,26 +707,26 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="sect5" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="sect5" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -607,26 +740,26 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="simplesect" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="simplesect" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -640,291 +773,450 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="bibliography" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="bibliography" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="component.title" + t:force="1" + t:named-template="component.title" param:node="ancestor-or-self::bibliography[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-family="{$title.font.family}" - fo:font-weight="bold"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> + <subtitle + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="bibliodiv" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title t:named-template="component.title" + param:node="ancestor-or-self::bibliodiv[1]" + margin-left="{$title.margin.left}" + font-size="&hsize4;" + font-family="{$title.font.family}" + font-weight="bold"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="glossary" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="glossary" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="component.title" + t:force="1" + t:named-template="component.title" param:node="ancestor-or-self::glossary[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-family="{$title.font.family}" - fo:font-weight="bold"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="index" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="glossdiv" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title t:named-template="component.title" + param:node="ancestor-or-self::glossdiv[1]" + margin-left="{$title.margin.left}" + font-size="&hsize4;" + font-family="{$title.font.family}" + font-weight="bold"/> + <subtitle + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="index" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="component.title" + t:force="1" + t:named-template="component.title" param:node="ancestor-or-self::index[1]" param:pagewide="1" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-family="{$title.font.family}" - fo:font-weight="bold"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="colophon" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <!-- The indexdiv.title template is used so that manual and --> + <!-- automatically generated indexdiv titles get the same --> + <!-- formatting. --> + + <t:titlepage t:element="indexdiv" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title t:force="1" + t:named-template="indexdiv.title" + param:title="title"/> + <subtitle + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="setindex" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="component.title" + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::setindex[1]" + param:pagewide="1" + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> + <subtitle + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="colophon" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" param:node="ancestor-or-self::colophon[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-family="{$title.font.family}" - fo:font-weight="bold"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="table.of.contents" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="table.of.contents" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="gentext" + t:force="1" + t:named-template="gentext" param:key="'TableofContents'" - fo:space-after="1em" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> - <t:titlepage element="list.of.tables" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="list.of.tables" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="gentext" + t:force="1" + t:named-template="gentext" param:key="'ListofTables'" - fo:space-after="1em" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> - <t:titlepage element="list.of.figures" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="list.of.figures" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="gentext" + t:force="1" + t:named-template="gentext" param:key="'ListofFigures'" - fo:space-after="1em" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> - <t:titlepage element="list.of.examples" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="list.of.examples" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="gentext" + t:force="1" + t:named-template="gentext" param:key="'ListofExamples'" - fo:space-after="1em" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> - <t:titlepage element="list.of.equations" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="list.of.equations" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="gentext" + t:force="1" + t:named-template="gentext" param:key="'ListofEquations'" - fo:space-after="1em" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + + <t:titlepage t:element="list.of.procedures" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="gentext" + param:key="'ListofProcedures'" + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> - <t:titlepage element="list.of.unknowns" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="list.of.unknowns" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="gentext" + t:force="1" + t:named-template="gentext" param:key="'ListofUnknown'" - fo:space-after="1em" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> Index: phpdoc/xsl/docbook/fo/titlepage.templates.xsl diff -u phpdoc/xsl/docbook/fo/titlepage.templates.xsl:1.1 phpdoc/xsl/docbook/fo/titlepage.templates.xsl:1.2 --- phpdoc/xsl/docbook/fo/titlepage.templates.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/titlepage.templates.xsl Sun Mar 9 09:54:48 2003 @@ -64,11 +64,15 @@ </xsl:template> <xsl:template name="article.titlepage"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.font.family}"> + <fo:block text-align="center"> <xsl:call-template name="article.titlepage.before.recto"/> <xsl:call-template name="article.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="article.titlepage.before.verso"/> <xsl:call-template name="article.titlepage.verso"/> + </fo:block> <xsl:call-template name="article.titlepage.separator"/> </fo:block> </xsl:template> @@ -86,7 +90,7 @@ </xsl:template> <xsl:template match="title" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center" keep-with-next="always" font-size="24.8832pt" font-weight="bold" font-family="{$title.font.family}"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" keep-with-next="always" font-size="24.8832pt" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::article[1]"/> </xsl:call-template> @@ -94,73 +98,73 @@ </xsl:template> <xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" font-family="{$title.font.family}" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="author" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center" font-size="14.4pt" font-weight="bold"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="copyright" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.font.family}"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="revision" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="abstract" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.font.family}"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> @@ -211,10 +215,14 @@ <xsl:template name="set.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="set.titlepage.before.recto"/> <xsl:call-template name="set.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="set.titlepage.before.verso"/> <xsl:call-template name="set.titlepage.verso"/> + </fo:block> <xsl:call-template name="set.titlepage.separator"/> </fo:block> </xsl:template> @@ -366,10 +374,14 @@ <xsl:template name="book.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="book.titlepage.before.recto"/> <xsl:call-template name="book.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="book.titlepage.before.verso"/> <xsl:call-template name="book.titlepage.verso"/> + </fo:block> <xsl:call-template name="book.titlepage.separator"/> </fo:block> </xsl:template> @@ -515,10 +527,14 @@ <xsl:template name="part.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="part.titlepage.before.recto"/> <xsl:call-template name="part.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="part.titlepage.before.verso"/> <xsl:call-template name="part.titlepage.verso"/> + </fo:block> <xsl:call-template name="part.titlepage.separator"/> </fo:block> </xsl:template> @@ -612,10 +628,14 @@ <xsl:template name="partintro.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="partintro.titlepage.before.recto"/> <xsl:call-template name="partintro.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="partintro.titlepage.before.verso"/> <xsl:call-template name="partintro.titlepage.verso"/> + </fo:block> <xsl:call-template name="partintro.titlepage.separator"/> </fo:block> </xsl:template> @@ -633,7 +653,7 @@ </xsl:template> <xsl:template match="title" mode="partintro.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="17.28pt" font-weight="bold" space-before="1em" font-family="{$title.font.family}"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="24.8832pt" font-weight="bold" space-before="1em" font-family="{$title.font.family}"> <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> </fo:block> </xsl:template> @@ -773,10 +793,14 @@ <xsl:template name="reference.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="reference.titlepage.before.recto"/> <xsl:call-template name="reference.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="reference.titlepage.before.verso"/> <xsl:call-template name="reference.titlepage.verso"/> + </fo:block> <xsl:call-template name="reference.titlepage.separator"/> </fo:block> </xsl:template> @@ -873,8 +897,303 @@ </fo:block> </xsl:template> +<xsl:template name="refsynopsisdiv.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsynopsisdivinfo/title"> + <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="refsynopsisdiv.titlepage.before.recto"/> + <xsl:call-template name="refsynopsisdiv.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="refsynopsisdiv.titlepage.before.verso"/> + <xsl:call-template name="refsynopsisdiv.titlepage.verso"/> + </fo:block> + <xsl:call-template name="refsynopsisdiv.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsynopsisdiv.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsynopsisdiv.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsynopsisdiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="refsection.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsectioninfo/title"> + <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsection.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsection.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsection.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsection.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsection.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="refsection.titlepage.before.recto"/> + <xsl:call-template name="refsection.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="refsection.titlepage.before.verso"/> + <xsl:call-template name="refsection.titlepage.verso"/> + </fo:block> + <xsl:call-template name="refsection.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsection.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsection.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsection.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsection.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="refsect1.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsect1info/title"> + <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsect1.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsect1.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsect1.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsect1.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsect1.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="refsect1.titlepage.before.recto"/> + <xsl:call-template name="refsect1.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="refsect1.titlepage.before.verso"/> + <xsl:call-template name="refsect1.titlepage.verso"/> + </fo:block> + <xsl:call-template name="refsect1.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsect1.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsect1.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect1.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="refsect2.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsect2info/title"> + <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsect2.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsect2.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsect2.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsect2.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsect2.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="refsect2.titlepage.before.recto"/> + <xsl:call-template name="refsect2.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="refsect2.titlepage.before.verso"/> + <xsl:call-template name="refsect2.titlepage.verso"/> + </fo:block> + <xsl:call-template name="refsect2.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsect2.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsect2.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect2.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="refsect3.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsect3info/title"> + <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsect3.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsect3.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsect3.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsect3.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsect3.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="refsect3.titlepage.before.recto"/> + <xsl:call-template name="refsect3.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="refsect3.titlepage.before.verso"/> + <xsl:call-template name="refsect3.titlepage.verso"/> + </fo:block> + <xsl:call-template name="refsect3.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsect3.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsect3.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect3.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + <xsl:template name="dedication.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-family="{$title.font.family}" font-weight="bold"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/> </xsl:call-template></fo:block> @@ -906,10 +1225,14 @@ <xsl:template name="dedication.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="dedication.titlepage.before.recto"/> <xsl:call-template name="dedication.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="dedication.titlepage.before.verso"/> <xsl:call-template name="dedication.titlepage.verso"/> + </fo:block> <xsl:call-template name="dedication.titlepage.separator"/> </fo:block> </xsl:template> @@ -933,7 +1256,7 @@ </xsl:template> <xsl:template name="preface.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-family="{$title.font.family}" font-weight="bold"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::preface[1]"/> </xsl:call-template></fo:block> @@ -987,10 +1310,14 @@ <xsl:template name="preface.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="preface.titlepage.before.recto"/> <xsl:call-template name="preface.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="preface.titlepage.before.verso"/> <xsl:call-template name="preface.titlepage.verso"/> + </fo:block> <xsl:call-template name="preface.titlepage.separator"/> </fo:block> </xsl:template> @@ -1141,11 +1468,15 @@ </xsl:template> <xsl:template name="chapter.titlepage"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.font.family}"> + <fo:block margin-left="{$title.margin.left}"> <xsl:call-template name="chapter.titlepage.before.recto"/> <xsl:call-template name="chapter.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="chapter.titlepage.before.verso"/> <xsl:call-template name="chapter.titlepage.verso"/> + </fo:block> <xsl:call-template name="chapter.titlepage.separator"/> </fo:block> </xsl:template> @@ -1163,7 +1494,7 @@ </xsl:template> <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" font-size="24.8832pt" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/> </xsl:call-template> @@ -1171,25 +1502,25 @@ </xsl:template> <xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" margin-left="{$title.margin.left}" font-style="italic" font-size="14.4pt" font-weight="bold" font-family="{$title.font.family}"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" font-style="italic" font-size="14.4pt" font-weight="bold"> <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt"> <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt"> <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="author" mode="chapter.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt"> <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> </fo:block> </xsl:template> @@ -1305,10 +1636,14 @@ <xsl:template name="appendix.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="appendix.titlepage.before.recto"/> <xsl:call-template name="appendix.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="appendix.titlepage.before.verso"/> <xsl:call-template name="appendix.titlepage.verso"/> + </fo:block> <xsl:call-template name="appendix.titlepage.separator"/> </fo:block> </xsl:template> @@ -1326,7 +1661,7 @@ </xsl:template> <xsl:template match="title" mode="appendix.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::appendix[1]"/> </xsl:call-template> @@ -1451,10 +1786,14 @@ <xsl:template name="section.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="section.titlepage.before.recto"/> <xsl:call-template name="section.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="section.titlepage.before.verso"/> <xsl:call-template name="section.titlepage.verso"/> + </fo:block> <xsl:call-template name="section.titlepage.separator"/> </fo:block> </xsl:template> @@ -1595,10 +1934,14 @@ <xsl:template name="sect1.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="sect1.titlepage.before.recto"/> <xsl:call-template name="sect1.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="sect1.titlepage.before.verso"/> <xsl:call-template name="sect1.titlepage.verso"/> + </fo:block> <xsl:call-template name="sect1.titlepage.separator"/> </fo:block> </xsl:template> @@ -1739,10 +2082,14 @@ <xsl:template name="sect2.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="sect2.titlepage.before.recto"/> <xsl:call-template name="sect2.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="sect2.titlepage.before.verso"/> <xsl:call-template name="sect2.titlepage.verso"/> + </fo:block> <xsl:call-template name="sect2.titlepage.separator"/> </fo:block> </xsl:template> @@ -1883,10 +2230,14 @@ <xsl:template name="sect3.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="sect3.titlepage.before.recto"/> <xsl:call-template name="sect3.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="sect3.titlepage.before.verso"/> <xsl:call-template name="sect3.titlepage.verso"/> + </fo:block> <xsl:call-template name="sect3.titlepage.separator"/> </fo:block> </xsl:template> @@ -2027,10 +2378,14 @@ <xsl:template name="sect4.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="sect4.titlepage.before.recto"/> <xsl:call-template name="sect4.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="sect4.titlepage.before.verso"/> <xsl:call-template name="sect4.titlepage.verso"/> + </fo:block> <xsl:call-template name="sect4.titlepage.separator"/> </fo:block> </xsl:template> @@ -2171,10 +2526,14 @@ <xsl:template name="sect5.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="sect5.titlepage.before.recto"/> <xsl:call-template name="sect5.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="sect5.titlepage.before.verso"/> <xsl:call-template name="sect5.titlepage.verso"/> + </fo:block> <xsl:call-template name="sect5.titlepage.separator"/> </fo:block> </xsl:template> @@ -2332,10 +2691,14 @@ <xsl:template name="simplesect.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="simplesect.titlepage.before.recto"/> <xsl:call-template name="simplesect.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="simplesect.titlepage.before.verso"/> <xsl:call-template name="simplesect.titlepage.verso"/> + </fo:block> <xsl:call-template name="simplesect.titlepage.separator"/> </fo:block> </xsl:template> @@ -2431,7 +2794,7 @@ </xsl:template> <xsl:template name="bibliography.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-family="{$title.font.family}" font-weight="bold"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/> </xsl:call-template></fo:block> @@ -2463,10 +2826,14 @@ <xsl:template name="bibliography.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="bibliography.titlepage.before.recto"/> <xsl:call-template name="bibliography.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="bibliography.titlepage.before.verso"/> <xsl:call-template name="bibliography.titlepage.verso"/> + </fo:block> <xsl:call-template name="bibliography.titlepage.separator"/> </fo:block> </xsl:template> @@ -2489,8 +2856,87 @@ </fo:block> </xsl:template> +<xsl:template name="bibliodiv.titlepage.recto"> + <xsl:choose> + <xsl:when test="bibliodivinfo/title"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="bibliodivinfo/subtitle"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="bibliodiv.titlepage.verso"> +</xsl:template> + +<xsl:template name="bibliodiv.titlepage.separator"> +</xsl:template> + +<xsl:template name="bibliodiv.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="bibliodiv.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="bibliodiv.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="bibliodiv.titlepage.before.recto"/> + <xsl:call-template name="bibliodiv.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="bibliodiv.titlepage.before.verso"/> + <xsl:call-template name="bibliodiv.titlepage.verso"/> + </fo:block> + <xsl:call-template name="bibliodiv.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="bibliodiv.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="bibliodiv.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="bibliodiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.font.family}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::bibliodiv[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="bibliodiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + <xsl:template name="glossary.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-family="{$title.font.family}" font-weight="bold"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/> </xsl:call-template></fo:block> @@ -2522,10 +2968,14 @@ <xsl:template name="glossary.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="glossary.titlepage.before.recto"/> <xsl:call-template name="glossary.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="glossary.titlepage.before.verso"/> <xsl:call-template name="glossary.titlepage.verso"/> + </fo:block> <xsl:call-template name="glossary.titlepage.separator"/> </fo:block> </xsl:template> @@ -2548,8 +2998,87 @@ </fo:block> </xsl:template> +<xsl:template name="glossdiv.titlepage.recto"> + <xsl:choose> + <xsl:when test="glossdivinfo/title"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="glossdivinfo/subtitle"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="glossdiv.titlepage.verso"> +</xsl:template> + +<xsl:template name="glossdiv.titlepage.separator"> +</xsl:template> + +<xsl:template name="glossdiv.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="glossdiv.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="glossdiv.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="glossdiv.titlepage.before.recto"/> + <xsl:call-template name="glossdiv.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="glossdiv.titlepage.before.verso"/> + <xsl:call-template name="glossdiv.titlepage.verso"/> + </fo:block> + <xsl:call-template name="glossdiv.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="glossdiv.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="glossdiv.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="glossdiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.font.family}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::glossdiv[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="glossdiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + <xsl:template name="index.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-family="{$title.font.family}" font-weight="bold"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::index[1]"/> <xsl:with-param name="pagewide" select="1"/> @@ -2582,10 +3111,14 @@ <xsl:template name="index.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="index.titlepage.before.recto"/> <xsl:call-template name="index.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="index.titlepage.before.verso"/> <xsl:call-template name="index.titlepage.verso"/> + </fo:block> <xsl:call-template name="index.titlepage.separator"/> </fo:block> </xsl:template> @@ -2608,8 +3141,135 @@ </fo:block> </xsl:template> +<xsl:template name="indexdiv.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style"> +<xsl:call-template name="indexdiv.title"> +<xsl:with-param name="title" select="title"/> +</xsl:call-template></fo:block> + <xsl:choose> + <xsl:when test="indexdivinfo/subtitle"> + <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="indexdiv.titlepage.verso"> +</xsl:template> + +<xsl:template name="indexdiv.titlepage.separator"> +</xsl:template> + +<xsl:template name="indexdiv.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="indexdiv.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="indexdiv.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="indexdiv.titlepage.before.recto"/> + <xsl:call-template name="indexdiv.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="indexdiv.titlepage.before.verso"/> + <xsl:call-template name="indexdiv.titlepage.verso"/> + </fo:block> + <xsl:call-template name="indexdiv.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="indexdiv.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="indexdiv.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subtitle" mode="indexdiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="setindex.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/> +<xsl:with-param name="pagewide" select="1"/> +</xsl:call-template></fo:block> + <xsl:choose> + <xsl:when test="setindexinfo/subtitle"> + <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="setindex.titlepage.verso"> +</xsl:template> + +<xsl:template name="setindex.titlepage.separator"> +</xsl:template> + +<xsl:template name="setindex.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="setindex.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="setindex.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="setindex.titlepage.before.recto"/> + <xsl:call-template name="setindex.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="setindex.titlepage.before.verso"/> + <xsl:call-template name="setindex.titlepage.verso"/> + </fo:block> + <xsl:call-template name="setindex.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="setindex.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="setindex.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + <xsl:template name="colophon.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-family="{$title.font.family}" font-weight="bold"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::colophon[1]"/> </xsl:call-template></fo:block> @@ -2641,10 +3301,14 @@ <xsl:template name="colophon.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="colophon.titlepage.before.recto"/> <xsl:call-template name="colophon.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="colophon.titlepage.before.verso"/> <xsl:call-template name="colophon.titlepage.verso"/> + </fo:block> <xsl:call-template name="colophon.titlepage.separator"/> </fo:block> </xsl:template> @@ -2668,7 +3332,7 @@ </xsl:template> <xsl:template name="table.of.contents.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="table.of.contents.titlepage.recto.style" space-after="1em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="table.of.contents.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'TableofContents'"/> </xsl:call-template></fo:block> @@ -2688,10 +3352,14 @@ <xsl:template name="table.of.contents.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="table.of.contents.titlepage.before.recto"/> <xsl:call-template name="table.of.contents.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="table.of.contents.titlepage.before.verso"/> <xsl:call-template name="table.of.contents.titlepage.verso"/> + </fo:block> <xsl:call-template name="table.of.contents.titlepage.separator"/> </fo:block> </xsl:template> @@ -2709,7 +3377,7 @@ </xsl:template> <xsl:template name="list.of.tables.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.tables.titlepage.recto.style" space-after="1em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.tables.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'ListofTables'"/> </xsl:call-template></fo:block> @@ -2729,10 +3397,14 @@ <xsl:template name="list.of.tables.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="list.of.tables.titlepage.before.recto"/> <xsl:call-template name="list.of.tables.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="list.of.tables.titlepage.before.verso"/> <xsl:call-template name="list.of.tables.titlepage.verso"/> + </fo:block> <xsl:call-template name="list.of.tables.titlepage.separator"/> </fo:block> </xsl:template> @@ -2750,7 +3422,7 @@ </xsl:template> <xsl:template name="list.of.figures.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.figures.titlepage.recto.style" space-after="1em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.figures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'ListofFigures'"/> </xsl:call-template></fo:block> @@ -2770,10 +3442,14 @@ <xsl:template name="list.of.figures.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="list.of.figures.titlepage.before.recto"/> <xsl:call-template name="list.of.figures.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="list.of.figures.titlepage.before.verso"/> <xsl:call-template name="list.of.figures.titlepage.verso"/> + </fo:block> <xsl:call-template name="list.of.figures.titlepage.separator"/> </fo:block> </xsl:template> @@ -2791,7 +3467,7 @@ </xsl:template> <xsl:template name="list.of.examples.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.examples.titlepage.recto.style" space-after="1em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.examples.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'ListofExamples'"/> </xsl:call-template></fo:block> @@ -2811,10 +3487,14 @@ <xsl:template name="list.of.examples.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="list.of.examples.titlepage.before.recto"/> <xsl:call-template name="list.of.examples.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="list.of.examples.titlepage.before.verso"/> <xsl:call-template name="list.of.examples.titlepage.verso"/> + </fo:block> <xsl:call-template name="list.of.examples.titlepage.separator"/> </fo:block> </xsl:template> @@ -2832,7 +3512,7 @@ </xsl:template> <xsl:template name="list.of.equations.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.equations.titlepage.recto.style" space-after="1em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.equations.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'ListofEquations'"/> </xsl:call-template></fo:block> @@ -2852,10 +3532,14 @@ <xsl:template name="list.of.equations.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="list.of.equations.titlepage.before.recto"/> <xsl:call-template name="list.of.equations.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="list.of.equations.titlepage.before.verso"/> <xsl:call-template name="list.of.equations.titlepage.verso"/> + </fo:block> <xsl:call-template name="list.of.equations.titlepage.separator"/> </fo:block> </xsl:template> @@ -2872,8 +3556,53 @@ <xsl:apply-templates select="." mode="titlepage.mode"/> </xsl:template> +<xsl:template name="list.of.procedures.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.procedures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> +<xsl:call-template name="gentext"> +<xsl:with-param name="key" select="'ListofProcedures'"/> +</xsl:call-template></fo:block> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage.verso"> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage.separator"> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="list.of.procedures.titlepage.before.recto"/> + <xsl:call-template name="list.of.procedures.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="list.of.procedures.titlepage.before.verso"/> + <xsl:call-template name="list.of.procedures.titlepage.verso"/> + </fo:block> + <xsl:call-template name="list.of.procedures.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="list.of.procedures.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="list.of.procedures.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + <xsl:template name="list.of.unknowns.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.unknowns.titlepage.recto.style" space-after="1em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.unknowns.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'ListofUnknown'"/> </xsl:call-template></fo:block> @@ -2893,10 +3622,14 @@ <xsl:template name="list.of.unknowns.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="list.of.unknowns.titlepage.before.recto"/> <xsl:call-template name="list.of.unknowns.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="list.of.unknowns.titlepage.before.verso"/> <xsl:call-template name="list.of.unknowns.titlepage.verso"/> + </fo:block> <xsl:call-template name="list.of.unknowns.titlepage.separator"/> </fo:block> </xsl:template> Index: phpdoc/xsl/docbook/fo/titlepage.xsl diff -u phpdoc/xsl/docbook/fo/titlepage.xsl:1.1 phpdoc/xsl/docbook/fo/titlepage.xsl:1.2 --- phpdoc/xsl/docbook/fo/titlepage.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/titlepage.xsl Sun Mar 9 09:54:49 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: titlepage.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: titlepage.xsl,v 1.2 2003/03/09 14:54:49 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -61,12 +61,24 @@ <xsl:attribute-set name="bibliography.titlepage.recto.style"/> <xsl:attribute-set name="bibliography.titlepage.verso.style"/> +<xsl:attribute-set name="bibliodiv.titlepage.recto.style"/> +<xsl:attribute-set name="bibliodiv.titlepage.verso.style"/> + <xsl:attribute-set name="glossary.titlepage.recto.style"/> <xsl:attribute-set name="glossary.titlepage.verso.style"/> +<xsl:attribute-set name="glossdiv.titlepage.recto.style"/> +<xsl:attribute-set name="glossdiv.titlepage.verso.style"/> + <xsl:attribute-set name="index.titlepage.recto.style"/> <xsl:attribute-set name="index.titlepage.verso.style"/> +<xsl:attribute-set name="setindex.titlepage.recto.style"/> +<xsl:attribute-set name="setindex.titlepage.verso.style"/> + +<xsl:attribute-set name="indexdiv.titlepage.recto.style"/> +<xsl:attribute-set name="indexdiv.titlepage.verso.style"/> + <xsl:attribute-set name="colophon.titlepage.recto.style"/> <xsl:attribute-set name="colophon.titlepage.verso.style"/> @@ -109,6 +121,31 @@ <xsl:attribute-set name="simplesect.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/> +<xsl:attribute-set name="refsynopsisdiv.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsynopsisdiv.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refsection.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsection.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refsect1.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsect1.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refsect2.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsect2.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refsect3.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsect3.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + <xsl:attribute-set name="table.of.contents.titlepage.recto.style"/> <xsl:attribute-set name="table.of.contents.titlepage.verso.style"/> @@ -124,6 +161,9 @@ <xsl:attribute-set name="list.of.examples.titlepage.recto.style"/> <xsl:attribute-set name="list.of.examples.contents.titlepage.verso.style"/> +<xsl:attribute-set name="list.of.procedures.titlepage.recto.style"/> +<xsl:attribute-set name="list.of.procedures.contents.titlepage.verso.style"/> + <xsl:attribute-set name="list.of.unknowns.titlepage.recto.style"/> <xsl:attribute-set name="list.of.unknowns.contents.titlepage.verso.style"/> @@ -176,7 +216,14 @@ <fo:block> <xsl:call-template name="anchor"/> <xsl:call-template name="person.name"/> - <xsl:apply-templates select="affiliation" mode="titlepage.mode"/> + <xsl:if test="affiliation/orgname"> + <xsl:text>, </xsl:text> + <xsl:apply-templates select="affiliation/orgname" mode="titlepage.mode"/> + </xsl:if> + <xsl:if test="email|affiliation/address/email"> + <xsl:text> </xsl:text> + <xsl:apply-templates select="(email|affiliation/address/email)[1]"/> + </xsl:if> </fo:block> </xsl:template> @@ -262,12 +309,7 @@ <xsl:apply-templates select="holder" mode="titlepage.mode"/> </xsl:template> - <xsl:template match="year" mode="titlepage.mode"> - <xsl:apply-templates/><xsl:text>, </xsl:text> -</xsl:template> - -<xsl:template match="year[position()=last()]" mode="titlepage.mode"> <xsl:apply-templates/> </xsl:template> @@ -384,9 +426,7 @@ </xsl:template> <xsl:template match="orgname" mode="titlepage.mode"> - <fo:block> - <xsl:apply-templates mode="titlepage.mode"/> - </fo:block> + <xsl:apply-templates mode="titlepage.mode"/> </xsl:template> <xsl:template match="othercredit" mode="titlepage.mode"> @@ -481,7 +521,7 @@ <xsl:variable name="revnumber" select=".//revnumber"/> <xsl:variable name="revdate" select=".//date"/> <xsl:variable name="revauthor" select=".//authorinitials"/> - <xsl:variable name="revremark" select=".//revremark"/> + <xsl:variable name="revremark" select=".//revremark|.//revdescription"/> <fo:table-row> <fo:table-cell> <fo:block> @@ -529,6 +569,10 @@ </xsl:template> <xsl:template match="revision/revremark" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="revision/revdescription" mode="titlepage.mode"> <xsl:apply-templates mode="titlepage.mode"/> </xsl:template> Index: phpdoc/xsl/docbook/fo/toc.xsl diff -u phpdoc/xsl/docbook/fo/toc.xsl:1.1 phpdoc/xsl/docbook/fo/toc.xsl:1.2 --- phpdoc/xsl/docbook/fo/toc.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/toc.xsl Sun Mar 9 09:54:49 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: toc.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: toc.xsl,v 1.2 2003/03/09 14:54:49 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -32,8 +32,13 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -59,8 +64,13 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> Index: phpdoc/xsl/docbook/fo/verbatim.xsl diff -u phpdoc/xsl/docbook/fo/verbatim.xsl:1.1 phpdoc/xsl/docbook/fo/verbatim.xsl:1.2 --- phpdoc/xsl/docbook/fo/verbatim.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/verbatim.xsl Sun Mar 9 09:54:49 2003 @@ -8,7 +8,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: verbatim.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: verbatim.xsl,v 1.2 2003/03/09 14:54:49 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -42,28 +42,31 @@ </xsl:choose> </xsl:variable> - <fo:block wrap-option='no-wrap' - white-space-collapse='false' - linefeed-treatment="preserve" - xsl:use-attribute-sets="monospace.verbatim.properties"> - <xsl:choose> - <xsl:when test="$shade.verbatim != 0"> - <fo:block space-before="0pt" space-after="0pt" - xsl:use-attribute-sets="shade.verbatim.style"> - <xsl:copy-of select="$content"/> - </fo:block> - </xsl:when> - <xsl:otherwise> + <xsl:choose> + <xsl:when test="$shade.verbatim != 0"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style"> + <xsl:copy-of select="$content"/> - </xsl:otherwise> - </xsl:choose> - </fo:block> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="literallayout"> <xsl:param name="suppress-numbers" select="'0'"/> - <xsl:variable name="raw.content"> + <xsl:variable name="content"> <xsl:choose> <xsl:when test="$suppress-numbers = '0' and @linenumbering = 'numbered' @@ -81,36 +84,48 @@ </xsl:choose> </xsl:variable> - <xsl:variable name="content"> - <xsl:choose> - <xsl:when test="@class='monospaced' and $shade.verbatim != 0"> - <fo:block space-before="0pt" space-after="0pt" - xsl:use-attribute-sets="shade.verbatim.style"> - <xsl:copy-of select="$raw.content"/> - </fo:block> - </xsl:when> - <xsl:otherwise> - <xsl:copy-of select="$raw.content"/> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - <xsl:choose> <xsl:when test="@class='monospaced'"> - <fo:block wrap-option='no-wrap' - linefeed-treatment="preserve" - white-space-collapse='false' - xsl:use-attribute-sets="monospace.verbatim.properties"> - <xsl:copy-of select="$content"/> - </fo:block> + <xsl:choose> + <xsl:when test="$shade.verbatim != 0"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style"> + + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> </xsl:when> <xsl:otherwise> - <fo:block wrap-option='no-wrap' - linefeed-treatment="preserve" - white-space-collapse='false' - xsl:use-attribute-sets="verbatim.properties"> - <xsl:copy-of select="$content"/> - </fo:block> + <xsl:choose> + <xsl:when test="$shade.verbatim != 0"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="verbatim.properties shade.verbatim.style"> + + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="verbatim.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> Index: phpdoc/xsl/docbook/fo/xep.xsl diff -u phpdoc/xsl/docbook/fo/xep.xsl:1.1 phpdoc/xsl/docbook/fo/xep.xsl:1.2 --- phpdoc/xsl/docbook/fo/xep.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/xep.xsl Sun Mar 9 09:54:49 2003 @@ -5,7 +5,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: xep.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: xep.xsl,v 1.2 2003/03/09 14:54:49 tom Exp $ ******************************************************************** (c) Stephane Bline Peregrine Systems 2001 Implementation of xep extensions: Index: phpdoc/xsl/docbook/fo/xref.xsl diff -u phpdoc/xsl/docbook/fo/xref.xsl:1.1 phpdoc/xsl/docbook/fo/xref.xsl:1.2 --- phpdoc/xsl/docbook/fo/xref.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/xref.xsl Sun Mar 9 09:54:49 2003 @@ -1,10 +1,12 @@ <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:exsl="http://exslt.org/common" + exclude-result-prefixes="exsl" version='1.0'> <!-- ******************************************************************** - $Id: xref.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: xref.xsl,v 1.2 2003/03/09 14:54:49 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -13,6 +15,11 @@ ******************************************************************** --> +<!-- Create keys for quickly looking up olink targets --> +<xsl:key name="targetdoc-key" match="document" use="@targetdoc" /> +<xsl:key name="targetptr-key" match="div|obj" + use="concat(ancestor::document/@targetdoc, '/', @targetptr)" /> + <!-- ==================================================================== --> <xsl:template match="anchor"> @@ -39,6 +46,27 @@ <xsl:text>???</xsl:text> </xsl:when> + <xsl:when test="@endterm"> + <fo:basic-link internal-destination="{@linkend}" + xsl:use-attribute-sets="xref.properties"> + <xsl:variable name="etargets" select="key('id',@endterm)"/> + <xsl:variable name="etarget" select="$etargets[1]"/> + <xsl:choose> + <xsl:when test="count($etarget) = 0"> + <xsl:message> + <xsl:value-of select="count($etargets)"/> + <xsl:text>Endterm points to nonexistent ID: </xsl:text> + <xsl:value-of select="@endterm"/> + </xsl:message> + <xsl:text>???</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$etarget" mode="endterm"/> + </xsl:otherwise> + </xsl:choose> + </fo:basic-link> + </xsl:when> + <xsl:when test="$target/@xreflabel"> <fo:basic-link internal-destination="{@linkend}" xsl:use-attribute-sets="xref.properties"> @@ -51,62 +79,96 @@ <xsl:otherwise> <fo:basic-link internal-destination="{@linkend}" xsl:use-attribute-sets="xref.properties"> - <xsl:choose> - <xsl:when test="@endterm"> - <xsl:variable name="etargets" select="key('id',@endterm)"/> - <xsl:variable name="etarget" select="$etargets[1]"/> - <xsl:choose> - <xsl:when test="count($etarget) = 0"> - <xsl:message> - <xsl:value-of select="count($etargets)"/> - <xsl:text>Endterm points to nonexistent ID: </xsl:text> - <xsl:value-of select="@endterm"/> - </xsl:message> - <xsl:text>???</xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates select="$etarget" mode="endterm"/> - </xsl:otherwise> - </xsl:choose> - </xsl:when> - - <xsl:otherwise> - <xsl:apply-templates select="$target" mode="xref-to"/> - </xsl:otherwise> - </xsl:choose> + <xsl:apply-templates select="$target" mode="xref-to"> + <xsl:with-param name="referrer" select="."/> + <xsl:with-param name="xrefstyle"> + <xsl:choose> + <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0"> + <xsl:value-of select="@role"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@xrefstyle"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:apply-templates> </fo:basic-link> </xsl:otherwise> </xsl:choose> + + <xsl:if test="$insert.xref.page.number != 0 or local-name($target) = 'para'"> + <xsl:apply-templates select="$target" mode="page.citation"> + <xsl:with-param name="id" select="@linkend"/> + </xsl:apply-templates> + </xsl:if> </xsl:template> +<!-- ==================================================================== --> + <xsl:template match="*" mode="endterm"> <!-- Process the children of the endterm element --> - <xsl:apply-templates select="child::node()"/> + <xsl:variable name="endterm"> + <xsl:apply-templates select="child::node()"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"> + <xsl:apply-templates select="exsl:node-set($endterm)" mode="remove-ids"/> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$endterm"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="*" mode="remove-ids"> + <xsl:copy> + <xsl:for-each select="@*"> + <xsl:choose> + <xsl:when test="name(.) != 'id'"> + <xsl:copy/> + </xsl:when> + <xsl:otherwise> + <xsl:message>removing <xsl:value-of select="name(.)"/></xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> + <xsl:apply-templates mode="remove-ids"/> + </xsl:copy> </xsl:template> <!--- ==================================================================== --> <xsl:template match="*" mode="xref-to"> - <xsl:param name="target" select="."/> - <xsl:param name="refelem" select="local-name($target)"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> <xsl:message> <xsl:text>Don't know what gentext to create for xref to: "</xsl:text> - <xsl:value-of select="$refelem"/> + <xsl:value-of select="name(.)"/> <xsl:text>"</xsl:text> </xsl:message> <xsl:text>???</xsl:text> </xsl:template> <xsl:template match="title" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <!-- if you xref to a title, xref to the parent... --> <xsl:choose> <!-- FIXME: how reliable is this? --> <xsl:when test="contains(local-name(parent::*), 'info')"> - <xsl:apply-templates select="parent::*[2]" mode="xref-to"/> + <xsl:apply-templates select="parent::*[2]" mode="xref-to"> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + </xsl:apply-templates> </xsl:when> <xsl:otherwise> - <xsl:apply-templates select="parent::*" mode="xref-to"/> + <xsl:apply-templates select="parent::*" mode="xref-to"> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + </xsl:apply-templates> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -119,67 +181,93 @@ |productionset|qandadiv|refsynopsisdiv|segmentedlist |set|setindex|sidebar|tip|toc|variablelist|warning" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <!-- catch-all for things with (possibly optional) titles --> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="author|editor|othercredit|personname" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:call-template name="person.name"/> </xsl:template> <xsl:template match="authorgroup" mode="xref-to"> - <xsl:call-template name="person.name.list"/> -</xsl:template> - -<xsl:template match="figure" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> -<xsl:template match="example" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> - -<xsl:template match="table" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:call-template name="person.name.list"/> </xsl:template> -<xsl:template match="equation" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> +<xsl:template match="figure|example|table|equation" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="procedure" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="cmdsynopsis" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:apply-templates select="(.//command)[1]" mode="xref"/> </xsl:template> <xsl:template match="funcsynopsis" mode="xref-to"> - <xsl:apply-templates select="(.//function)[1]" mode="xref"/> -</xsl:template> - -<xsl:template match="dedication" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> -<xsl:template match="preface" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> - -<xsl:template match="chapter" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:apply-templates select="(.//function)[1]" mode="xref"/> </xsl:template> -<xsl:template match="appendix" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> +<xsl:template match="dedication|preface|chapter|appendix" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="bibliography" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="biblioentry|bibliomixed" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <!-- handles both biblioentry and bibliomixed --> <xsl:text>[</xsl:text> <xsl:choose> @@ -190,6 +278,10 @@ <xsl:choose> <xsl:when test="$entry"> <xsl:choose> + <xsl:when test="$bibliography.numbered != 0"> + <xsl:number from="bibliography" count="biblioentry|bibliomixed" + level="any" format="1"/> + </xsl:when> <xsl:when test="local-name($entry/*[1]) = 'abbrev'"> <xsl:apply-templates select="$entry/*[1]"/> </xsl:when> @@ -211,6 +303,10 @@ </xsl:when> <xsl:otherwise> <xsl:choose> + <xsl:when test="$bibliography.numbered != 0"> + <xsl:number from="bibliography" count="biblioentry|bibliomixed" + level="any" format="1"/> + </xsl:when> <xsl:when test="local-name(*[1]) = 'abbrev'"> <xsl:apply-templates select="*[1]"/> </xsl:when> @@ -224,58 +320,145 @@ </xsl:template> <xsl:template match="glossary" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="glossentry" mode="xref-to"> + <xsl:choose> + <xsl:when test="$glossentry.show.acronym = 'primary'"> + <xsl:choose> + <xsl:when test="acronym|abbrev"> + <xsl:apply-templates select="(acronym|abbrev)[1]"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossterm[1]" mode="xref-to"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossterm[1]" mode="xref-to"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="glossterm" mode="xref-to"> + <xsl:apply-templates/> </xsl:template> <xsl:template match="index" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="listitem" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="section|simplesect |sect1|sect2|sect3|sect4|sect5 |refsect1|refsect2|refsect3" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> <!-- What about "in Chapter X"? --> </xsl:template> <xsl:template match="bridgehead" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> <!-- What about "in Chapter X"? --> </xsl:template> <xsl:template match="qandaset" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> - -<xsl:template match="qandadiv" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> -<xsl:template match="qandaentry" mode="xref-to"> - <xsl:apply-templates select="question[1]" mode="object.xref.markup"/> + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> -<xsl:template match="question" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> +<xsl:template match="qandadiv" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> -<xsl:template match="answer" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> -<xsl:template match="part" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> +<xsl:template match="qandaentry" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> -<xsl:template match="reference" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:apply-templates select="question[1]" mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="question|answer" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="part|reference" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="refentry" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:choose> <xsl:when test="refmeta/refentrytitle"> <xsl:apply-templates select="refmeta/refentrytitle"/> @@ -288,14 +471,29 @@ </xsl:template> <xsl:template match="refnamediv" mode="xref-to"> - <xsl:apply-templates select="refname[1]" mode="xref-to"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="refname[1]" mode="xref-to"> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="refname" mode="xref-to"> - <xsl:apply-templates mode="xref-to"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates mode="xref-to"> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="step" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'Step'"/> </xsl:call-template> @@ -304,7 +502,13 @@ </xsl:template> <xsl:template match="varlistentry" mode="xref-to"> - <xsl:apply-templates select="term[1]" mode="xref-to"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="term[1]" mode="xref-to"> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="varlistentry/term" mode="xref-to"> @@ -313,11 +517,59 @@ </xsl:template> <xsl:template match="co" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:apply-templates select="." mode="callout-bug"/> </xsl:template> <xsl:template match="book" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="para" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:variable name="context" select="(ancestor::simplesect + |ancestor::section + |ancestor::sect1 + |ancestor::sect2 + |ancestor::sect3 + |ancestor::sect4 + |ancestor::sect5 + |ancestor::refsection + |ancestor::refsect1 + |ancestor::refsect2 + |ancestor::refsect3 + |ancestor::chapter + |ancestor::appendix + |ancestor::preface + |ancestor::partintro + |ancestor::dedication + |ancestor::colophon + |ancestor::bibliography + |ancestor::index + |ancestor::glossary + |ancestor::glossentry + |ancestor::listitem + |ancestor::varlistentry)[last()]"/> + + <xsl:apply-templates select="$context" mode="xref-to"/> +<!-- + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> +--> </xsl:template> <!-- ==================================================================== --> @@ -373,8 +625,13 @@ </xsl:template> <xsl:template match="ulink" name="ulink"> - <fo:basic-link external-destination="{@url}" - xsl:use-attribute-sets="xref.properties"> + <fo:basic-link xsl:use-attribute-sets="xref.properties"> + <xsl:attribute name="external-destination"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="@url"/> + </xsl:call-template> + </xsl:attribute> + <xsl:choose> <xsl:when test="count(child::node())=0"> <xsl:call-template name="hyphenate-url"> @@ -386,19 +643,51 @@ </xsl:otherwise> </xsl:choose> </fo:basic-link> + <xsl:if test="count(child::node()) != 0 and string(.) != @url and $ulink.show != 0"> - <fo:inline hyphenate="false"> - <xsl:text> [</xsl:text> - <xsl:call-template name="hyphenate-url"> - <xsl:with-param name="url" select="@url"/> - </xsl:call-template> - <xsl:text>]</xsl:text> - </fo:inline> + <!-- yes, show the URI --> + <xsl:choose> + <xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote)"> + <fo:footnote> + <xsl:call-template name="ulink.footnote.number"/> + <fo:footnote-body font-family="{$body.font.family}" + font-size="{$footnote.font.size}"> + <fo:block> + <xsl:call-template name="ulink.footnote.number"/> + <xsl:text> </xsl:text> + <fo:inline> + <xsl:value-of select="@url"/> + </fo:inline> + </fo:block> + </fo:footnote-body> + </fo:footnote> + </xsl:when> + <xsl:otherwise> + <fo:inline hyphenate="false"> + <xsl:text> [</xsl:text> + <xsl:call-template name="hyphenate-url"> + <xsl:with-param name="url" select="@url"/> + </xsl:call-template> + <xsl:text>]</xsl:text> + </fo:inline> + </xsl:otherwise> + </xsl:choose> </xsl:if> </xsl:template> +<xsl:template name="ulink.footnote.number"> + <fo:inline font-size="90%"> + <!-- FIXME: this isn't going to be perfect! --> + <xsl:text>[</xsl:text> + <xsl:number level="any" + from="chapter|appendix|preface|article|refentry" + format="{$ulink.footnote.number.format}"/> + <xsl:text>]</xsl:text> + </fo:inline> +</xsl:template> + <xsl:template name="hyphenate-url"> <xsl:param name="url" select="''"/> <xsl:choose> @@ -419,8 +708,152 @@ </xsl:choose> </xsl:template> -<xsl:template match="olink" name="olink"> - <xsl:apply-templates/> + +<xsl:template match="olink"> + <xsl:param name="target.database" + select="document($target.database.document, /)"/> + + <xsl:variable name="localinfo" select="@localinfo"/> + + <!-- Olink that points to internal id can be a link --> + <xsl:variable name="linkend"> + <xsl:choose> + <xsl:when test="@targetdoc and not(@targetptr)" > + <xsl:message>Olink missing @targetptr attribute value</xsl:message> + </xsl:when> + <xsl:when test="not(@targetdoc) and @targetptr" > + <xsl:message>Olink missing @targetdoc attribute value</xsl:message> + </xsl:when> + <xsl:when test="@targetdoc and @targetptr"> + <xsl:if test="$current.docid = @targetdoc"> + <xsl:if test="id(@targetptr)"> + <xsl:value-of select="@targetptr"/> + </xsl:if> + </xsl:if> + </xsl:when> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$linkend != ''"> + <fo:basic-link internal-destination="{$linkend}" + xsl:use-attribute-sets="xref.properties"> + <xsl:call-template name="olink.hottext"> + <xsl:with-param name="target.database" select="$target.database"/> + </xsl:call-template> + </fo:basic-link> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="olink.hottext"> + <xsl:with-param name="target.database" select="$target.database"/> + </xsl:call-template> + + <!-- Append other document title if appropriate --> + <xsl:if test="@targetdoc and @targetptr and $olink.doctitle != 0 + and $current.docid != '' and $current.docid != @targetdoc"> + <xsl:variable name="doctitle"> + <xsl:variable name="seek.targetdoc" select="@targetdoc"/> + <xsl:for-each select="$target.database" > + <xsl:value-of select="key('targetdoc-key', $seek.targetdoc)/div[1]/ttl" /> + </xsl:for-each> + </xsl:variable> + <xsl:if test="$doctitle != ''"> + <xsl:text> (</xsl:text><xsl:value-of select="$doctitle"/><xsl:text>)</xsl:text> + </xsl:if> + </xsl:if> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + + +<xsl:template name="olink.hottext"> + <xsl:param name="target.database"/> + + <xsl:choose> + <!-- If it has elements or text (not just PI or comment) --> + <xsl:when test="child::text() or child::*"> + <xsl:apply-templates/> + </xsl:when> + <xsl:when test="@targetdoc and @targetptr"> + <!-- Get the xref text for this record --> + <xsl:variable name="seek.targetdoc" select="@targetdoc"/> + <xsl:variable name="seek.targetptr" select="@targetptr"/> + <xsl:variable name="xref.text" > + <xsl:for-each select="$target.database" > + <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/xreftext"/> + </xsl:for-each> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$use.local.olink.style != 0"> + <!-- Get the element name and lang for this targetptr --> + <xsl:variable name="element" > + <xsl:for-each select="$target.database" > + <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@element"/> + </xsl:for-each> + </xsl:variable> + + <xsl:variable name="lang"> + <xsl:variable name="candidate"> + <xsl:for-each select="$target.database" > + <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@lang"/> + </xsl:for-each> + </xsl:variable> + <xsl:choose> + <xsl:when test="$candidate != ''"> + <xsl:value-of select="$candidate"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="'en'"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="template"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'title'"/> + <xsl:with-param name="name" select="$element"/> + <xsl:with-param name="lang" select="$lang"/> + </xsl:call-template> + </xsl:variable> + <xsl:call-template name="substitute-markup"> + <xsl:with-param name="template" select="$template"/> + <xsl:with-param name="title"> + <xsl:for-each select="$target.database" > + <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/ttl"/> + </xsl:for-each> + </xsl:with-param> + <xsl:with-param name="label"> + <xsl:for-each select="$target.database" > + <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@number"/> + </xsl:for-each> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$xref.text !=''"> + <xsl:value-of select="$xref.text"/> + </xsl:when> + <xsl:otherwise> + <xsl:message>Olink error: no generated text for targetdoc/targetptr = <xsl:value-of select="@targetdoc"/>/<xsl:value-of select="@targetptr"/></xsl:message> + <xsl:text>????</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:text>????</xsl:text> +<!-- + <xsl:call-template name="olink.outline"> + <xsl:with-param name="outline.base.uri" + select="unparsed-entity-uri(@targetdocent)"/> + <xsl:with-param name="localinfo" select="@localinfo"/> + <xsl:with-param name="return" select="'xreftext'"/> + </xsl:call-template> +--> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="olink.outline"> + <xsl:message terminate="yes">Fatal error: what is this supposed to do?</xsl:message> </xsl:template> <!-- ==================================================================== --> @@ -480,24 +913,90 @@ <xsl:call-template name="inline.monoseq"/> </xsl:template> -<xsl:template name="insert.page.citation"> +<xsl:template match="*" mode="page.citation"> <xsl:param name="id" select="'???'"/> - <xsl:if test="$insert.xref.page.number"> - <xsl:text> </xsl:text> - <fo:inline keep-together.within-line="always"> - <xsl:text>[</xsl:text> - <xsl:call-template name="gentext"> - <xsl:with-param name="key" select="'page.citation'"/> - </xsl:call-template> - <xsl:text> </xsl:text> - <fo:page-number-citation ref-id="{$id}"/> - <xsl:text>]</xsl:text> - </fo:inline> - </xsl:if> + + <fo:inline keep-together.within-line="always"> + <xsl:call-template name="substitute-markup"> + <xsl:with-param name="template"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="name" select="'page.citation'"/> + <xsl:with-param name="context" select="'xref'"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </fo:inline> </xsl:template> <xsl:template match="*" mode="pagenumber.markup"> <fo:page-number-citation ref-id="{@id}"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="insert.title.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="title"/> + + <xsl:choose> + <!-- FIXME: what about the case where titleabbrev is inside the info? --> + <xsl:when test="$purpose = 'xref' and titleabbrev"> + <xsl:apply-templates select="." mode="titleabbrev.markup"/> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$title"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="chapter|appendix" mode="insert.title.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="title"/> + + <xsl:choose> + <xsl:when test="$purpose = 'xref'"> + <fo:inline font-style="italic"> + <xsl:copy-of select="$title"/> + </fo:inline> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$title"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="*" mode="insert.subtitle.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="subtitle"/> + + <xsl:copy-of select="$subtitle"/> +</xsl:template> + +<xsl:template match="*" mode="insert.label.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="label"/> + + <xsl:copy-of select="$label"/> +</xsl:template> + +<xsl:template match="*" mode="insert.pagenumber.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="pagenumber"/> + + <xsl:copy-of select="$pagenumber"/> +</xsl:template> + +<xsl:template match="*" mode="insert.direction.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="direction"/> + + <xsl:copy-of select="$direction"/> </xsl:template> </xsl:stylesheet>
Index: phpdoc/xsl/docbook/fo/ChangeLog diff -u phpdoc/xsl/docbook/fo/ChangeLog:1.1 phpdoc/xsl/docbook/fo/ChangeLog:1.2 --- phpdoc/xsl/docbook/fo/ChangeLog:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/ChangeLog Sun Mar 9 09:54:48 2003 @@ -1,3 +1,551 @@ +2003-01-23 Norman Walsh <nwalsh@users.sourceforge.net> + + * autotoc.xsl: Fix bugs associated with toc-context parameter in division.toc + + * division.xsl: Generate Part ToCs + + * pagesetup.xsl: Use proportional-column-width() for header/footer tables; suppress relative-align when when using FOP + +2003-01-22 Norman Walsh <nwalsh@users.sourceforge.net> + + * formal.xsl: Handle alignment correctly when screenshot is used in figure + + * xref.xsl: Format chapter and appendix titles consistently in xrefs + +2003-01-21 Norman Walsh <nwalsh@users.sourceforge.net> + + * formal.xsl: Attempt to support multiple tgroups (by making multiple tables and placing them right next to each other) + + * lists.xsl: Bug #653344: Output fo:table-columns in simplelist tables + +2003-01-20 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl, index.xsl: Use titlepage templates for indexdiv title formatting + + * biblio.xsl: Bug #640762: Support new biblioentry elements + + * component.xsl: Use titleabbrev in markers; use titlepage templates for subtitles; delete bogus component.separator template. + + * footnote.xsl: Support {table.}footnote.number.{format,symbols} + + * glossary.xsl: Use titlepage templates for glossdiv formatting; support glossentry.show.acronyms + + * pagesetup.xsl: Suppress draft page-masters when draft.mode=no + + * pagesetup.xsl: Bug #669765: Make blank pages verso not recto + + * param.ent, param.xweb: Support xref.with.number.and.title + + * param.ent, param.xweb: Added {table.}footnote.number.{format,symbols}, glossentry.show.acronym, and ulink.footnote.number.format + + * param.xweb: Fix missing fragref + + * qandaset.xsl: QandASet titles use section.title for convenience. Now they don't output fo:markers for those titles. + + * sections.xsl: Support titleabbrev for running headers/footers; don't force a section ToC for refentrys + + * titlepage.templates.xml: SIGNIFICANT changes to the titlepage template setup. See RELEASE-NOTES. + + * titlepage.xsl: Add property sets for glossdiv, bibliodiv, and indexdiv. Improve formatting of authors. + + * verbatim.xsl: Arrange to use only a single fo:block for shading to avoid a bug in earlier versions of XEP + + * xref.xsl: Improve formatting of ulink footnotes; provide template to override formatting; use ulink.footnote.number.format; support xref to glossentry + + * xref.xsl: Change formatting of URL footnotes + +2003-01-17 Norman Walsh <nwalsh@users.sourceforge.net> + + * lists.xsl: Output IDs for the first-paras in a listitem + + * pagesetup.xsl: Fix bugs in page numbering when double.sided=1 + + * pagesetup.xsl: Remove region-name from region-body on blank pages + + * xref.xsl: Remove duplicated IDs when endterm is used on xref + +2003-01-13 Robert Stayton <bobstayton@users.sourceforge.net> + + * math.xsl: Added @align value to fo:block containing mediaobject in equation. + +2003-01-12 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Make sure that indexdivs are properly scoped. I've done this by adding a test to suppress the division if it contains no terms. It seems like there might be a better way, but I can't see it just at the moment + +2003-01-08 Robert Stayton <bobstayton@users.sourceforge.net> + + * xref.xsl: In olink, use document($target.database.document, /) so the + olink target database location is relative to the document + instead of the stylesheet. + +2003-01-06 Robert Stayton <bobstayton@users.sourceforge.net> + + * autoidx.xsl, index.xsl: Removed the unnecessary generate-index-from-terms template + in favor of generate-index, called with scope parameter. + +2003-01-02 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl, index.xsl: Rework indexing to avoid XSLT limitation/Saxon bug with context dependencies; finish porting Bob's changes from FO to HTML + + * index.xsl, titlepage.templates.xml, titlepage.xsl: Support setindex (there were all sorts of things wrong with it) + +2003-01-01 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl, index.xsl: Make index elements always index the book that contains them (if there is one, otherwise the whole document); setindex always indexes the whole document + + * autotoc.xsl, division.xsl, titlepage.templates.xml, titlepage.xsl: + Support List of Procedures + + * formal.xsl: Support separate property sets for figures, examples, equations, tables, and procedures. This way, they can have different border and other formatting properties. + + * graphics.xsl: Support ignore.image.scaling parameter + + * param.ent, param.xweb: New parameters + + * xref.xsl: Use titleabbrev instead of title in xrefs + +2002-12-31 Norman Walsh <nwalsh@users.sourceforge.net> + + * inline.xsl: Make lineannotations italic + + * pagesetup.xsl: Added blank.page.content template to allow 'This Page Intentionally Left Blank' blank pages. + +2002-12-30 <dcramer@users.sourceforge.net> + + * lists.xsl: Fixed spacing problem where step numbers don't line up with the corresponding text. + +2002-12-28 Norman Walsh <nwalsh@users.sourceforge.net> + + * xref.xsl: Now that xrefstyle is official; make it take priority even when use.role.as.xrefstyle is non-zero. + + * xref.xsl: Make endterm on xref higher priority than xreflabel on the target + +2002-12-24 Robert Stayton <bobstayton@users.sourceforge.net> + + * division.xsl: Fixes bug #655587 to restart page numbering + after a preface. + +2002-12-18 Robert Stayton <bobstayton@users.sourceforge.net> + + * autoidx.xsl: Changed sort to fold uppercase and lowercase together to fix + odd indexdiv sort order. + + * graphics.xsl: Add graphic/@align value to fo:block text-align property + since text-align on external-graphic doesn't seem to work. + +2002-12-17 Robert Stayton <bobstayton@users.sourceforge.net> + + * formal.xsl, graphics.xsl: Changed selection of mediaobject to be more consistent using + a separate select.mediaobject.index template. Also added + text-align to block containing external-graphic in fo output. + +2002-12-17 Jirka Kosek <kosek@users.sourceforge.net> + + * param.xweb: Build fixes. + +2002-12-17 Robert Stayton <bobstayton@users.sourceforge.net> + + * titlepage.templates.xml: Made list.of.tables specifications the same as other list.of.*. + +2002-12-13 Robert Stayton <bobstayton@users.sourceforge.net> + + * glossary.xsl: Handles missing otherterm target in glosssee and glosseealso. + + * inline.xsl: Added the author et al special cases similar to + the HTML inline.xsl templates. + +2002-12-12 Robert Stayton <bobstayton@users.sourceforge.net> + + * autoidx.xsl: An index now contains only indexterms within its scope + (within its parent element). + + * autotoc.xsl, index.xsl: Make sure $generate.index controls whether the index is processed. + + * formal.xsl: Change formal.object template to pass $placement parameter + to formal.object.heading template. + + * lists.xsl: Fixed bug in segmentedlist title when segmentedlist.as.table set. + +2002-12-06 Robert Stayton <bobstayton@users.sourceforge.net> + + * block.xsl: Fixed epigraph template so it processes all of its allowed + children, not just para. + + * graphics.xsl, param.ent, param.xweb: Enabled support for selecting imageobject using the role attribute. + +2002-12-04 Robert Stayton <bobstayton@users.sourceforge.net> + + * autotoc.xsl, component.xsl, sections.xsl: Added empty component.toc.separator and section.toc.separator templates + to provide customization opportunity between toc and first content. + +2002-11-29 Norman Walsh <nwalsh@users.sourceforge.net> + + * pagesetup.xsl: Don't output a footnote-separator for FOP + +2002-11-16 Norman Walsh <nwalsh@users.sourceforge.net> + + * biblio.xsl: Support abstract in bibliomixed + + * biblio.xsl, xref.xsl: Support bibliosource; improve numbered bibliography entries and cross-references to them + + * pagesetup.xsl: Added template to create footnote separator rule (if supported by your favorite FO processor) + + * sections.xsl: Use value-of instead of copy-of for fo:marker because I haven't thought of a better way to avoid footnotes in markers which are illegal + +2002-11-15 Robert Stayton <bobstayton@users.sourceforge.net> + + * admon.xsl: Changed graphical.admonition template from an fo:table + to an fo:list-block, so it works in both FOP and XEP. + + * lists.xsl: Fixed two bugs in longest.term template that prevented proper + calculation of longest term width in variablelist. + +2002-11-15 Norman Walsh <nwalsh@users.sourceforge.net> + + * table.xsl: Add support for xsltproc adjustColumnWidths extension + +2002-11-14 Norman Walsh <nwalsh@users.sourceforge.net> + + * biblio.xsl: Use xreflabel (if it's present) on bibliography entries + + * component.xsl: Don't restart page numbers on the first preface + + * table.xsl: Support entrytbl + +2002-11-08 Robert Stayton <bobstayton@users.sourceforge.net> + + * pagesetup.xsl: Corrected left and right page margins for even page masters: + inner and outer were reversed from what they should have been. + +2002-10-31 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Support spanning index terms (endofrange/startref) + + * lists.xsl: Put para spacing around tabular simplelists + +2002-10-21 Norman Walsh <nwalsh@users.sourceforge.net> + + * glossary.xsl: Bug #577798: glossentry with multiple glossdefs creates broken FO + + * pagesetup.xsl: Updated header/footer properties to avoid missmatched margins caused by title.margin.left + +2002-10-20 Norman Walsh <nwalsh@users.sourceforge.net> + + * inline.xsl: Bug #619474: support errortext element + +2002-10-19 Norman Walsh <nwalsh@users.sourceforge.net> + + * pagesetup.xsl, param.ent, param.xweb: Added property sets to control page header and footer content formatting + +2002-10-18 Robert Stayton <bobstayton@users.sourceforge.net> + + * param.xweb: Corrected the wording describing the placement of + the header and footer in the region-before and + region-after to match the diagram and stylesheet changes. + +2002-10-17 Norman Walsh <nwalsh@users.sourceforge.net> + + * refentry.xsl: Fix bug where refentrys in parts were not in a page sequence + +2002-10-11 Robert Stayton <bobstayton@users.sourceforge.net> + + * inline.xsl: glossterm and firstterm in text now use italicseq + to match the html formatting. + +2002-10-09 Norman Walsh <nwalsh@users.sourceforge.net> + + * table.xsl: Removed debug code. + +2002-10-04 Norman Walsh <nwalsh@users.sourceforge.net> + + * autotoc.xsl, sections.xsl: Support optional title on section ToCs. Optional titles for components, books, and sets will be trickier. + + * formal.xsl, param.ent, param.xweb, table.xsl: Made separate parameters for table frame and table cell border properties + +2002-10-02 Norman Walsh <nwalsh@users.sourceforge.net> + + * lists.xsl: Support continuation of orderedlists and inherited numeration in FO + +2002-10-01 Robert Stayton <bobstayton@users.sourceforge.net> + + * qandaset.xsl, refentry.xsl, sections.xsl: Changed section.level template to return number that matches + the section level (sect1 = 1, etc.), and adjusted templates + that use section.level accordingly to produce same output + as before. + +2002-09-27 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Bug #496294: don't index endofrangeentries. They're no longer indexed, but they aren't handled quite right yet either, they don't generate ranges + + * autotoc.xsl, sections.xsl: Support section ToCs + + * block.xsl, titlepage.xsl: Bug #582192: support revdescription + + * formal.xsl: Bug #497603: fixed and added default.float.class + + * param.ent, param.xweb: Use new parameters + + * synop.xsl: Fix sbr + +2002-09-20 Norman Walsh <nwalsh@users.sourceforge.net> + + * docbook.xsl: Add context to error message about a missing template + + * synop.xsl: Bug #605150: process arg correctly even when it's in a group + +2002-09-19 Robert Stayton <bobstayton@users.sourceforge.net> + + * formal.xsl: Removed 'keep-with-next' from 'formal.title.properties' attribute set now + that the stylesheets support the option of putting such + titles below the object. Now the $placement value determines + if 'keep-with-next' or 'keep-with-previous' is used in the + title block. + +2002-09-19 Norman Walsh <nwalsh@users.sourceforge.net> + + * xref.xsl: Use fo-external-image (badly named) to wrap url() around external-destinations + +2002-09-15 Norman Walsh <nwalsh@users.sourceforge.net> + + * table.xsl: Support a PI to rotate table cells + +2002-09-08 <dcramer@users.sourceforge.net> + + * lists.xsl: Bug #445750: Adding a keep-together and keep-with-next to the block that wraps terms in a varlistentry to keep terms from being orphaned/widowed when variablelists are formatted as blocks. + +2002-09-06 <dcramer@users.sourceforge.net> + + * component.xsl: Changing the mode in the apply-templates from title.markup to object.title.markup so that appendixes in articles can be formatted as specified in the appropriate lang.xml file. + +2002-09-05 Norman Walsh <nwalsh@users.sourceforge.net> + + * division.xsl: Restart all books on page 1 + +2002-09-04 Norman Walsh <nwalsh@users.sourceforge.net> + + * param.ent, param.xweb: Reference the l10n.* parameters + +2002-09-03 Norman Walsh <nwalsh@users.sourceforge.net> + + * graphics.xsl: Support textdata in textobject + + * table.xsl: Make sure row-level colsep and rowsep values are 'inherited' onto missing cells + +2002-09-01 Norman Walsh <nwalsh@users.sourceforge.net> + + * graphics.xsl: Put the url()/no-url() test for external graphics into a named template + + * pagesetup.xsl: Add SVG to the list of XEP graphics formats; use the url()/no-url() named template for draft.watermark.image + +2002-08-28 Norman Walsh <nwalsh@users.sourceforge.net> + + * table.xsl: Make inherited attributes work for 'missing' table cells + +2002-08-26 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Handle endofrange indexterms properly + + * graphics.xsl: Make graphics formats FO-processor aware; support SVG when FOP is being used + + * pdf2index: Support page ranges (generated by startofrang/endofrange index entries) + +2002-08-22 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Fix serious indexing bug that caused many index terms to be missing from the automatically generated index + +2002-08-21 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Support make.index.markup parameter + + * index.xsl: Support make.index.markup parameter and hand-crafted indexes + + * lists.xsl: Attempt to workaround bug in FOP handling of step content + + * param.ent, param.xweb: Remove unused table.entry.padding parameter; add new make.index.markup parameter + + * pdf2index: New file. + +2002-08-20 <dcramer@users.sourceforge.net> + + * block.xsl: Adding missing template for simplemsgentry + +2002-08-11 Robert Stayton <bobstayton@users.sourceforge.net> + + * pagesetup.xsl: Changed running header/footer rule line dimension from 1px to + 0.5pt so passivetex doesn't gack. + +2002-08-08 Robert Stayton <bobstayton@users.sourceforge.net> + + * autotoc.xsl: Fixed toc.line for FOP to align numbers + by adding leader-pattern-width property + as suggested by Nicolas Nieswandt. Was able to remove + the fop.extensions choose/when structure because + it works for all processors. The numbers in fop + align left rather than right, but at least they + line up. + +2002-07-26 Norman Walsh <nwalsh@users.sourceforge.net> + + * pagesetup.xsl: A little more tweaking to make things equivalent to the old scheme + + * pagesetup.xsl: Bob's reworked page header/footer ideas. I think there are still some rough edges. + +2002-07-24 Robert Stayton <bobstayton@users.sourceforge.net> + + * sections.xsl: Moved <fo:marker> for section heading to be first child + of its parent block, per bug #586005 (and the XSL-FO spec). + +2002-07-19 Norman Walsh <nwalsh@users.sourceforge.net> + + * biblio.xsl, param.ent, param.xweb: Support bibliography.numbered + + * inline.xsl, param.ent, param.xweb: Use monospace.properties for inline monospaced items + + * inline.xsl, param.ent, param.xweb: Support menuchoice.menu.separator and menuchoice.separator + + * param.ent, param.xweb, sections.xsl: Support section.title.levelN.properties to remove hard coding of font sizes in section headings + +2002-07-17 Norman Walsh <nwalsh@users.sourceforge.net> + + * biblio.xsl: Add keep to bibliodiv titles--they still need more work + + * pagesetup.xsl: Add a touch of padding between the page-footer rule and the footer text + + * table.xsl: Make header entries bold by default + +2002-07-16 Norman Walsh <nwalsh@users.sourceforge.net> + + * biblio.xsl, component.xsl, division.xsl, glossary.xsl, index.xsl, refentry.xsl, sections.xsl, toc.xsl: + Use basic initial-page-number property instead of extended force-page-count property to get components to start on odd pages in double.sided mode; call format.page.number to set the page number format for all page sequences + + * division.xsl: Don't include equations w/o titles in the LOT for equations + + * pagesetup.xsl: Added foot.empty and page.number.format named templates + +2002-07-15 Norman Walsh <nwalsh@users.sourceforge.net> + + * pagesetup.xsl: Use named-templates for headers/footers to make customization easier + +2002-07-09 Norman Walsh <nwalsh@users.sourceforge.net> + + * biblio.xsl: Don't output square brackets if there's no biblioentry label + + * synop.xsl: Bug #573726: fix cmdsynopsisref formatting + +2002-07-08 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl: Bug #574841: trim leading and trailing whitespace from primary/secondary/tertiary index terms + + * autoidx.xsl: Bug #574840: fix bug where some symbol index terms got lost + + * block.xsl, param.ent, param.xweb: Add sidebar.properties to control presentation of Sidebar elements + + * graphics.xsl: Work-around bug in xsltproc: explicitly cast scale to a number() before comparing it to 1.0 + +2002-07-07 Norman Walsh <nwalsh@users.sourceforge.net> + + * footnote.xsl, formal.xsl: Fix footnotes in table titles + + * lists.xsl: Fix ugly bug: make sure premables to orderedlist and itemizedlist elements are actually formatted + +2002-07-06 Norman Walsh <nwalsh@users.sourceforge.net> + + * xref.xsl: Added missing parameter to olink.hottext; added missing olink.outline template + +2002-07-06 Robert Stayton <bobstayton@users.sourceforge.net> + + * xref.xsl: Commented out call to olink.outline for old + style olinks, in case Norm wants to add + support for them. + + * xref.xsl: Bug fix: move xsl:param in olink template to be first child. + +2002-07-05 Robert Stayton <bobstayton@users.sourceforge.net> + + * param.ent, param.xweb: Added four parameters to support new stylesheet olink system: + target.database.document.xml + use.local.olink.style.xml + current.docid.xml + olink.doctitle.xml + + * xref.xsl: Modified for the new stylesheet olink system. + Modfified olink template to support the new + targetdoc and targetptr attributes. + Loads target database into keys for fast lookup. + +2002-07-04 Norman Walsh <nwalsh@users.sourceforge.net> + + * block.xsl, xref.xsl: Feature req #525507: support xref to para by using the nearest containing section as the generated text + + * fop.xsl: Patch #530026: suppress whitespace in FOP bookmarks + + * glossary.xsl: Fix page number citation code + +2002-07-03 Norman Walsh <nwalsh@users.sourceforge.net> + + * division.xsl, index.xsl, pagesetup.xsl, param.ent, param.xweb: + More hacking on page headers and footers: added toggles for rules and headers on blank pages + + * docbook.xsl: Feature Req #502932: added root.messages template for user defined messages + + * pagesetup.xsl: Remove silly debugging message + + * xref.xsl: Support insert.xref.page.number parameter + +2002-07-02 Norman Walsh <nwalsh@users.sourceforge.net> + + * component.xsl, division.xsl, index.xsl, pagesetup.xsl, param.ent, param.xweb, sections.xsl: + Completely rewrote pagesetup.xsl: more page models, more logical page margin setup + +2002-06-29 Norman Walsh <nwalsh@users.sourceforge.net> + + * formal.xsl, lists.xsl: Make list/procedure titles use gentext and have consisten formatting + + * table.xsl: Patch #514664: keep-together for table-cell if xep + +2002-06-27 Norman Walsh <nwalsh@users.sourceforge.net> + + * glossary.xsl, param.ent, param.xweb: Make glossary parameters properly documented parameters; support glossary.as.blocks + +2002-06-26 Norman Walsh <nwalsh@users.sourceforge.net> + + * table.xsl: Make sure we don't attempt to set the table width more than once if a table has multiple tgroups + +2002-06-11 Norman Walsh <nwalsh@users.sourceforge.net> + + * autoidx.xsl, fo-patch-for-fop.xsl, fo-rtf.xsl, pagesetup.xsl, titlepage.templates.xml: + Add CVS Ids + + * biblio.xsl: Add spacing before bibliodivs + + * pagesetup.xsl: Put a titlepage at the beginning of the oneside sequence + + * param.ent, param.xweb: Added refentry.title.properties, section.title.properties, and use.role.as.xrefstyle + + * refentry.xsl: Use titlepage system for refentry (refsynopsisdiv, refsect*) titles + + * sections.xsl: Use section.title.properties + + * titlepage.templates.xml: Added refentry titlepage elements; tweaked font sizes and some spacing + + * titlepage.xsl: Fix copyright year formatting; add *.style attribute sets for refentry elements + + * xref.xsl: Experimental support for xrefstyle + +2002-06-09 Norman Walsh <nwalsh@users.sourceforge.net> + + * index.xsl: Fix bug #496453: make sure comments don't contain illegal chars + +2002-06-09 Jirka Kosek <kosek@users.sourceforge.net> + + * lists.xsl: Fixed bug #547163. Paragraph after formal paragraph in listitem gets correct spacing. + + * refentry.xsl: Fixed bug #554159. Added empty template for refentryinfo + +2002-06-03 Jirka Kosek <kosek@users.sourceforge.net> + + * Makefile: Added dependencies for profiling stylesheets + 2002-06-02 Norman Walsh <nwalsh@users.sourceforge.net> * lists.xsl: Support title on step in procedure Index: phpdoc/xsl/docbook/fo/admon.xsl diff -u phpdoc/xsl/docbook/fo/admon.xsl:1.1 phpdoc/xsl/docbook/fo/admon.xsl:1.2 --- phpdoc/xsl/docbook/fo/admon.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/admon.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: admon.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: admon.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -63,38 +63,35 @@ <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="graphic.width"> + <xsl:call-template name="admon.graphic.width"/> + </xsl:variable> <fo:block id="{$id}"> - <fo:table> - <fo:table-body> - <fo:table-row> - <fo:table-cell number-rows-spanned="2"> + <fo:list-block provisional-distance-between-starts="{$graphic.width} + 18pt" + provisional-label-separation="18pt" + xsl:use-attribute-sets="list.block.spacing"> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> <fo:block> - <fo:external-graphic width="auto" height="auto"> + <fo:external-graphic width="auto" height="auto" + content-width="{$graphic.width}" > <xsl:attribute name="src"> <xsl:call-template name="admon.graphic"/> </xsl:attribute> - <xsl:attribute name="content-width"> - <xsl:call-template name="admon.graphic.width"/> - </xsl:attribute> </fo:external-graphic> </fo:block> - </fo:table-cell> - <fo:table-cell> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> <fo:block xsl:use-attribute-sets="admonition.title.properties"> <xsl:apply-templates select="." mode="object.title.markup"/> </fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row> - <fo:table-cell number-columns-spanned="2"> <fo:block xsl:use-attribute-sets="admonition.properties"> <xsl:apply-templates/> </fo:block> - </fo:table-cell> - </fo:table-row> - </fo:table-body> - </fo:table> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> </fo:block> </xsl:template> Index: phpdoc/xsl/docbook/fo/autoidx.xsl diff -u phpdoc/xsl/docbook/fo/autoidx.xsl:1.1 phpdoc/xsl/docbook/fo/autoidx.xsl:1.2 --- phpdoc/xsl/docbook/fo/autoidx.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/autoidx.xsl Sun Mar 9 09:54:48 2003 @@ -4,39 +4,27 @@ <!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'"> <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"> -<!ENTITY primary 'concat(primary/@sortas, primary[not(@sortas)])'> -<!ENTITY secondary 'concat(secondary/@sortas, secondary[not(@sortas)])'> -<!ENTITY tertiary 'concat(tertiary/@sortas, tertiary[not(@sortas)])'> - -<!ENTITY section '(ancestor-or-self::set - |ancestor-or-self::book - |ancestor-or-self::part - |ancestor-or-self::reference - |ancestor-or-self::partintro - |ancestor-or-self::chapter - |ancestor-or-self::appendix - |ancestor-or-self::preface - |ancestor-or-self::section - |ancestor-or-self::sect1 - |ancestor-or-self::sect2 - |ancestor-or-self::sect3 - |ancestor-or-self::sect4 - |ancestor-or-self::sect5 - |ancestor-or-self::refsect1 - |ancestor-or-self::refsect2 - |ancestor-or-self::refsect3 - |ancestor-or-self::simplesect - |ancestor-or-self::bibliography - |ancestor-or-self::glossary - |ancestor-or-self::index)[last()]'> +<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'> +<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'> +<!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'> -<!ENTITY section.id 'generate-id(§ion;)'> <!ENTITY sep '" "'> +<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> +<!-- ******************************************************************** + $Id: autoidx.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + and other information. + + ******************************************************************** --> + <!-- ==================================================================== --> <!-- Derived from Jeni Tennison's work in the HTML case --> @@ -56,17 +44,9 @@ match="indexterm" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> -<xsl:key name="primary-section" - match="indexterm[not(secondary) and not(see)]" - use="concat(&primary;, &sep;, §ion.id;)"/> - -<xsl:key name="secondary-section" - match="indexterm[not(tertiary) and not(see)]" - use="concat(&primary;, &sep;, &secondary;, &sep;, §ion.id;)"/> - -<xsl:key name="tertiary-section" - match="indexterm[not(see)]" - use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, §ion.id;)"/> +<xsl:key name="endofrange" + match="indexterm[@class='endofrange']" + use="@startref"/> <xsl:key name="see-also" match="indexterm[seealso]" @@ -76,77 +56,118 @@ match="indexterm[see]" use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see)"/> -<xsl:key name="sections" match="*[@id]" use="@id"/> - <xsl:template name="generate-index"> - <xsl:variable name="terms" select="//indexterm[count(.|key('letter', - translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[1]) = 1]"/> + <xsl:param name="scope" select="(ancestor::book|/)[last()]"/> + + <xsl:variable name="terms" + select="//indexterm[count(.|key('letter', + translate(substring(&primary;, 1, 1), + &lowercase;, + &uppercase;))[&scope;][1]) = 1 + and not(@class = 'endofrange')]"/> + <xsl:variable name="alphabetical" select="$terms[contains(concat(&lowercase;, &uppercase;), substring(&primary;, 1, 1))]"/> + <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;, &uppercase;), substring(&primary;, 1, 1)))]"/> <fo:block> <xsl:if test="$others"> - <fo:block font-size="16pt" - font-weight="bold" - keep-with-next.within-column="always" - space-before="1em"> - <xsl:call-template name="gentext"> - <xsl:with-param name="key" select="'index symbols'"/> - </xsl:call-template> - </fo:block> + <xsl:call-template name="indexdiv.title"> + <xsl:with-param name="titlecontent"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'index symbols'"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + <fo:block> <xsl:apply-templates select="$others[count(.|key('primary', - &primary;)[1]) = 1]" - mode="index-primary"> - <xsl:sort select="&primary;"/> + &primary;)[&scope;][1]) = 1]" + mode="index-symbol-div"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </fo:block> </xsl:if> + <xsl:apply-templates select="$alphabetical[count(.|key('letter', - translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[1]) = 1]" + translate(substring(&primary;, 1, 1), + &lowercase;,&uppercase;))[&scope;][1]) = 1]" mode="index-div"> - <xsl:sort select="&primary;"/> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> </xsl:apply-templates> </fo:block> </xsl:template> <xsl:template match="indexterm" mode="index-div"> - <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> - <fo:block> - <!-- this isn't quite exactly right. ideally all the symbols would --> - <!-- be grouped together. as it stands, they all get separate divs --> - <!-- but at least this test makes sure that they don't all get --> - <!-- separate titles as well. --> - <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)"> - <fo:block font-size="16pt" - font-weight="bold" - keep-with-next.within-column="always" - space-before="1em"> - <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/> - </fo:block> - </xsl:if> + <xsl:param name="scope" select="."/> + + <xsl:variable name="key" + select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> + + <xsl:if test="key('letter', $key)[&scope;] + [count(.|key('primary', &primary;)[&scope;][1]) = 1]"> <fo:block> - <xsl:apply-templates select="key('letter', $key)[count(.|key('primary', &primary;)[1]) = 1]" - mode="index-primary"> - <xsl:sort select="&primary;"/> - </xsl:apply-templates> + <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)"> + <xsl:call-template name="indexdiv.title"> + <xsl:with-param name="titlecontent"> + <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + <fo:block> + <xsl:apply-templates select="key('letter', $key)[&scope;] + [count(.|key('primary', &primary;)[&scope;][1])=1]" + mode="index-primary"> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> + </fo:block> </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template match="indexterm" mode="index-symbol-div"> + <xsl:param name="scope" select="."/> + + <xsl:variable name="key" + select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> + + <fo:block> + <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]" + mode="index-primary"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> </fo:block> </xsl:template> <xsl:template match="indexterm" mode="index-primary"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="&primary;"/> - <xsl:variable name="refs" select="key('primary', $key)"/> + <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> <fo:block> <xsl:value-of select="primary"/> <xsl:variable name="page-number-citations"> - <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section', concat($key, &sep;, §ion.id;))[1])]"> - <xsl:apply-templates select="." mode="reference"/> + <xsl:for-each select="$refs[not(see) and not(seealso)]"> + <xsl:apply-templates select="." mode="reference"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> </xsl:for-each> + + <xsl:if test="$refs[not(secondary)]/*[self::see]"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]" + mode="index-see"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> </xsl:variable> <xsl:choose> @@ -160,36 +181,45 @@ </xsl:otherwise> </xsl:choose> </fo:block> - <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::see or self::seealso]"> + + <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]"> <fo:block start-indent="1pc"> - <fo:block> - <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[1])]" - mode="index-see"> - <xsl:sort select="see"/> - </xsl:apply-templates> - <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[1])]" - mode="index-seealso"> - <xsl:sort select="seealso"/> - </xsl:apply-templates> - <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[1]) = 1]" - mode="index-secondary"> - <xsl:sort select="&secondary;"/> - </xsl:apply-templates> - </fo:block> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" + mode="index-secondary"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-secondary"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/> - <xsl:variable name="refs" select="key('secondary', $key)"/> + <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> <fo:block> <xsl:value-of select="secondary"/> <xsl:variable name="page-number-citations"> - <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section', concat($key, &sep;, §ion.id;))[1])]"> - <xsl:apply-templates select="." mode="reference"/> + <xsl:for-each select="$refs[not(see) and not(seealso)]"> + <xsl:apply-templates select="." mode="reference"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> </xsl:for-each> + + <xsl:if test="$refs[not(tertiary)]/*[self::see]"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]" + mode="index-see"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> </xsl:variable> <xsl:choose> @@ -203,36 +233,44 @@ </xsl:otherwise> </xsl:choose> </fo:block> - <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::see or self::seealso]"> + + <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]"> <fo:block start-indent="2pc"> - <fo:block> - <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[1])]" - mode="index-see"> - <xsl:sort select="see"/> - </xsl:apply-templates> - <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[1])]" - mode="index-seealso"> - <xsl:sort select="seealso"/> - </xsl:apply-templates> - <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[1]) = 1]" - mode="index-tertiary"> - <xsl:sort select="&tertiary;"/> - </xsl:apply-templates> - </fo:block> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" + mode="index-tertiary"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="index-tertiary"> + <xsl:param name="scope" select="."/> <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> - <xsl:variable name="refs" select="key('tertiary', $key)"/> + <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/> <fo:block> <xsl:value-of select="tertiary"/> <xsl:variable name="page-number-citations"> - <xsl:for-each select="$refs[generate-id() = generate-id(key('tertiary-section', concat($key, &sep;, §ion.id;))[1])]"> - <xsl:apply-templates select="." mode="reference"/> + <xsl:for-each select="$refs[not(see) and not(seealso)]"> + <xsl:apply-templates select="." mode="reference"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> </xsl:for-each> + + <xsl:if test="$refs/see"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]" + mode="index-see"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> </xsl:variable> <xsl:choose> @@ -246,54 +284,65 @@ </xsl:otherwise> </xsl:choose> </fo:block> - <xsl:variable name="see" select="$refs/see | $refs/seealso"/> - <xsl:if test="$see"> + + <xsl:if test="$refs/seealso"> <fo:block> - <fo:block> - <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[1])]" - mode="index-see"> - <xsl:sort select="see"/> - </xsl:apply-templates> - <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[1])]" - mode="index-seealso"> - <xsl:sort select="seealso"/> - </xsl:apply-templates> - </fo:block> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> </fo:block> </xsl:if> </xsl:template> <xsl:template match="indexterm" mode="reference"> + <xsl:param name="scope" select="."/> + <xsl:param name="separator" select="', '"/> + <xsl:if test="$passivetex.extensions = '0'"> - <xsl:text>, </xsl:text> + <xsl:value-of select="$separator"/> </xsl:if> + <xsl:choose> <xsl:when test="@zone and string(@zone)"> <xsl:call-template name="reference"> <xsl:with-param name="zones" select="normalize-space(@zone)"/> + <xsl:with-param name="scope" select="$scope"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <fo:basic-link internal-destination="{$id}"> <fo:page-number-citation ref-id="{$id}"/> </fo:basic-link> + + <xsl:if test="key('endofrange', @id)[&scope;]"> + <xsl:apply-templates select="key('endofrange', @id)[&scope;][last()]" + mode="reference"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:with-param name="separator" select="'-'"/> + </xsl:apply-templates> + </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="reference"> + <xsl:param name="scope" select="."/> <xsl:param name="zones"/> + <xsl:choose> <xsl:when test="contains($zones, ' ')"> <xsl:variable name="zone" select="substring-before($zones, ' ')"/> - <xsl:variable name="target" select="key('sections', $zone)"/> + <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> <xsl:variable name="id"> <xsl:call-template name="object.id"> - <xsl:with-param name="object" select="$target[1]"/> + <xsl:with-param name="object" select="$target[1]"/> </xsl:call-template> </xsl:variable> @@ -306,11 +355,12 @@ </xsl:if> <xsl:call-template name="reference"> <xsl:with-param name="zones" select="substring-after($zones, ' ')"/> + <xsl:with-param name="scope" select="$scope"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:variable name="zone" select="$zones"/> - <xsl:variable name="target" select="key('sections', $zone)"/> + <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> <xsl:variable name="id"> <xsl:call-template name="object.id"> @@ -326,11 +376,417 @@ </xsl:template> <xsl:template match="indexterm" mode="index-see"> - <fo:block><xsl:value-of select="see"/></fo:block> + <xsl:param name="scope" select="."/> + + <fo:inline> + <xsl:text> (</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'see'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:value-of select="see"/> + <xsl:text>)</xsl:text> + </fo:inline> </xsl:template> <xsl:template match="indexterm" mode="index-seealso"> - <fo:block><xsl:value-of select="seealso"/></fo:block> + <xsl:param name="scope" select="."/> + + <fo:block> + <xsl:text>(</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'seealso'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:value-of select="seealso"/> + <xsl:text>)</xsl:text> + </fo:block> +</xsl:template> + +<!-- ====================================================================== --> + +<xsl:template name="generate-index-markup"> + <xsl:param name="scope" select="(ancestor::book|/)[last()]"/> + + <xsl:variable name="terms" select="$scope//indexterm[count(.|key('letter', + translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[&scope;][1]) = 1]"/> + <xsl:variable name="alphabetical" + select="$terms[contains(concat(&lowercase;, &uppercase;), + substring(&primary;, 1, 1))]"/> + <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;, + &uppercase;), + substring(&primary;, 1, 1)))]"/> + + <xsl:text><index> </xsl:text> + <xsl:if test="$others"> + <xsl:text> <indexdiv> </xsl:text> + <xsl:text><title></xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'index symbols'"/> + </xsl:call-template> + <xsl:text></title> </xsl:text> + <xsl:apply-templates select="$others[count(.|key('primary', + &primary;)[&scope;][1]) = 1]" + mode="index-symbol-div-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:text></indexdiv> </xsl:text> + </xsl:if> + + <xsl:apply-templates select="$alphabetical[count(.|key('letter', + translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[&scope;][1]) = 1]" + mode="index-div-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:text></index> </xsl:text> +</xsl:template> + +<xsl:template match="*" mode="index-markup"> + <xsl:param name="scope" select="."/> + + <xsl:text><</xsl:text> + <xsl:value-of select="name(.)"/> + <xsl:text>> </xsl:text> + <xsl:apply-templates mode="index-markup"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="indexterm" mode="index-div-markup"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> + <xsl:text> <indexdiv> </xsl:text> + <xsl:text><title></xsl:text> + <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/> + <xsl:text></title> </xsl:text> + + <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]" + mode="index-primary-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:text></indexdiv> </xsl:text> +</xsl:template> + +<xsl:template match="indexterm" mode="index-symbol-div-markup"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/> + + <xsl:apply-templates select="key('letter', $key)[&scope;][count(.|key('primary', &primary;)[&scope;][1]) = 1]" + mode="index-primary-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="indexterm" mode="index-primary-markup"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="&primary;"/> + <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/> + <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/> + + <xsl:text> <indexentry> </xsl:text> + <xsl:text><primaryie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(primary)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:if test="$pages">,</xsl:if> + <xsl:text> </xsl:text> + + <xsl:for-each select="$pages"> + <xsl:apply-templates select="." mode="reference-markup"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> + </xsl:for-each> + + <xsl:text></primaryie> </xsl:text> + + <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::see or self::seealso]"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]" + mode="index-see-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + + <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" + mode="index-secondary-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> + <xsl:text></indexentry> </xsl:text> +</xsl:template> + +<xsl:template match="indexterm" mode="index-secondary-markup"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/> + <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/> + <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/> + + <xsl:text><secondaryie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(secondary)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:if test="$pages">,</xsl:if> + <xsl:text> </xsl:text> + + <xsl:for-each select="$pages"> + <xsl:apply-templates select="." mode="reference-markup"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> + </xsl:for-each> + + <xsl:text></secondaryie> </xsl:text> + + <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::see or self::seealso]"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]" + mode="index-see-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" + mode="index-tertiary-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> +</xsl:template> + +<xsl:template match="indexterm" mode="index-tertiary-markup"> + <xsl:param name="scope" select="."/> + <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/> + <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/> + <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/> + + <xsl:text><tertiaryie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(tertiary)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:if test="$pages">,</xsl:if> + <xsl:text> </xsl:text> + + <xsl:for-each select="$pages"> + <xsl:apply-templates select="." mode="reference-markup"> + <xsl:with-param name="scope" select="$scope"/> + </xsl:apply-templates> + </xsl:for-each> + + <xsl:text></tertiaryie> </xsl:text> + + <xsl:variable name="see" select="$refs/see | $refs/seealso"/> + <xsl:if test="$see"> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]" + mode="index-see-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]" + mode="index-seealso-markup"> + <xsl:with-param name="scope" select="$scope"/> + <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/> + </xsl:apply-templates> + </xsl:if> +</xsl:template> + +<xsl:template match="indexterm" mode="reference-markup"> + <xsl:param name="scope" select="."/> + <xsl:choose> + <xsl:when test="@zone and string(@zone)"> + <xsl:call-template name="reference-markup"> + <xsl:with-param name="zones" select="normalize-space(@zone)"/> + <xsl:with-param name="scope" select="$scope"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + + <xsl:choose> + <xsl:when test="@startref and @class='endofrange'"> + <xsl:text><phrase role="pageno"></xsl:text> + <xsl:text><link linkend="</xsl:text> + <xsl:value-of select="@startref"/> + <xsl:text>"></xsl:text> + <fo:basic-link internal-destination="{@startref}"> + <fo:page-number-citation ref-id="{@startref}"/> + <xsl:text>-</xsl:text> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + <xsl:text></link></xsl:text> + <xsl:text></phrase> </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text><phrase role="pageno"></xsl:text> + <xsl:if test="@id"> + <xsl:text><link linkend="</xsl:text> + <xsl:value-of select="$id"/> + <xsl:text>"></xsl:text> + </xsl:if> + <fo:basic-link internal-destination="{$id}"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + <xsl:if test="@id"> + <xsl:text></link></xsl:text> + </xsl:if> + <xsl:text></phrase> </xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="reference-markup"> + <xsl:param name="scope" select="."/> + <xsl:param name="zones"/> + <xsl:choose> + <xsl:when test="contains($zones, ' ')"> + <xsl:variable name="zone" select="substring-before($zones, ' ')"/> + <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target[1]"/> + </xsl:call-template> + </xsl:variable> + + <xsl:text><phrase fole="pageno"></xsl:text> + <xsl:if test="$target[1]/@id"> + <xsl:text><link linkend="</xsl:text> + <xsl:value-of select="$id"/> + <xsl:text>"></xsl:text> + </xsl:if> + <fo:basic-link internal-destination="{$id}"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + <xsl:if test="$target[1]/@id"> + <xsl:text></link></xsl:text> + </xsl:if> + <xsl:text></phrase> </xsl:text> + + <xsl:call-template name="reference"> + <xsl:with-param name="zones" select="substring-after($zones, ' ')"/> + <xsl:with-param name="scope" select="$scope"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="zone" select="$zones"/> + <xsl:variable name="target" select="key('id', $zone)[&scope;]"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target[1]"/> + </xsl:call-template> + </xsl:variable> + + <xsl:text><phrase role="pageno"></xsl:text> + <xsl:if test="$target[1]/@id"> + <xsl:text><link linkend="</xsl:text> + <xsl:value-of select="$id"/> + <xsl:text>"></xsl:text> + </xsl:if> + <fo:basic-link internal-destination="{$id}"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + <xsl:if test="$target[1]/@id"> + <xsl:text></link></xsl:text> + </xsl:if> + <xsl:text></phrase> </xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="indexterm" mode="index-see-markup"> + <xsl:param name="scope" select="."/> + <fo:block> + <xsl:text><seeie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(see)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:text></seeie> </xsl:text> + </fo:block> +</xsl:template> + +<xsl:template match="indexterm" mode="index-seealso-markup"> + <xsl:param name="scope" select="."/> + <fo:block> + <xsl:text><seealsoie></xsl:text> + <xsl:text><phrase></xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="string(seealso)"/> + </xsl:call-template> + <xsl:text></phrase></xsl:text> + <xsl:text></seealsoie> </xsl:text> + </fo:block> +</xsl:template> + +<xsl:template name="escape-text"> + <xsl:param name="text" select="''"/> + + <xsl:variable name="ltpos" select="substring-before($text, '<')"/> + <xsl:variable name="amppos" select="substring-before($text, '&')"/> + + <xsl:choose> + <xsl:when test="contains($text,'<') and contains($text, '&') + and string-length($ltpos) < string-length($amppos)"> + <xsl:value-of select="$ltpos"/> + <xsl:text>&lt;</xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="substring-after($text, '<')"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="contains($text,'<') and contains($text, '&') + and string-length($amppos) < string-length($ltpos)"> + <xsl:value-of select="$amppos"/> + <xsl:text>&amp;</xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="substring-after($text, '&')"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="contains($text, '<')"> + <xsl:value-of select="$ltpos"/> + <xsl:text>&lt;</xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="substring-after($text, '<')"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="contains($text, '&')"> + <xsl:value-of select="$amppos"/> + <xsl:text>&amp;</xsl:text> + <xsl:call-template name="escape-text"> + <xsl:with-param name="text" select="substring-after($text, '&')"/> + </xsl:call-template> + </xsl:when> + + <xsl:otherwise> + <xsl:value-of select="$text"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> </xsl:stylesheet> Index: phpdoc/xsl/docbook/fo/autotoc.xsl diff -u phpdoc/xsl/docbook/fo/autotoc.xsl:1.1 phpdoc/xsl/docbook/fo/autotoc.xsl:1.2 --- phpdoc/xsl/docbook/fo/autotoc.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/autotoc.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: autotoc.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: autotoc.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -44,10 +44,6 @@ <xsl:template name="division.toc"> <xsl:param name="toc-context" select="."/> - <xsl:variable name="id"> - <xsl:call-template name="object.id"/> - </xsl:variable> - <xsl:variable name="cid"> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="$toc-context"/> @@ -55,12 +51,18 @@ </xsl:variable> <xsl:variable name="nodes" - select="part|reference|preface - |chapter|appendix - |article - |bibliography|glossary|index"/> + select="$toc-context/part + |$toc-context/reference + |$toc-context/preface + |$toc-context/chapter + |$toc-context/appendix + |$toc-context/article + |$toc-context/bibliography + |$toc-context/glossary + |$toc-context/index"/> + <xsl:if test="$nodes"> - <fo:block id="toc...{$id}" + <fo:block id="toc...{$cid}" xsl:use-attribute-sets="toc.margin.properties"> <xsl:call-template name="table.of.contents.titlepage"/> <xsl:apply-templates select="$nodes" mode="toc"> @@ -97,6 +99,61 @@ </xsl:if> </xsl:template> +<xsl:template name="component.toc.separator"> + <!-- Customize to output something between + component.toc and first output --> +</xsl:template> + +<xsl:template name="section.toc"> + <xsl:param name="toc-context" select="."/> + <xsl:param name="toc.title.p" select="true()"/> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="cid"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$toc-context"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="nodes" + select="section|sect1|sect2|sect3|sect4|sect5|refentry + |bridgehead[$bridgehead.in.toc != 0]"/> + + <xsl:variable name="level"> + <xsl:call-template name="section.level"/> + </xsl:variable> + + <xsl:if test="$nodes"> + <fo:block id="toc...{$id}" + xsl:use-attribute-sets="toc.margin.properties"> + + <xsl:if test="$toc.title.p"> + <xsl:call-template name="section.heading"> + <xsl:with-param name="level" select="$level + 1"/> + <xsl:with-param name="title"> + <fo:block space-after="0.5em"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'TableofContents'"/> + </xsl:call-template> + </fo:block> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + + <xsl:apply-templates select="$nodes" mode="toc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + </xsl:apply-templates> + </fo:block> + </xsl:if> +</xsl:template> + +<xsl:template name="section.toc.separator"> + <!-- Customize to output something between + section.toc and first output --> +</xsl:template> <!-- ==================================================================== --> <xsl:template name="toc.line"> @@ -108,46 +165,30 @@ <xsl:apply-templates select="." mode="label.markup"/> </xsl:variable> - <xsl:choose> - <xsl:when test="$fop.extensions != 0"> - <fo:block text-align="start"> - <fo:basic-link internal-destination="{$id}"> - <fo:inline keep-with-next.within-line="always"> - <xsl:apply-templates select="." mode="object.title.markup"/> - </fo:inline> - <fo:inline keep-together.within-line="always" font-style="italic"> - <xsl:text>        </xsl:text> - <fo:page-number-citation ref-id="{$id}"/> - <xsl:text></xsl:text> - </fo:inline> - </fo:basic-link> - </fo:block> - </xsl:when> - <xsl:otherwise> - <fo:block text-align-last="justify" - end-indent="{$toc.indent.width}pt" - last-line-end-indent="-{$toc.indent.width}pt"> - <fo:inline keep-with-next.within-line="always"> - <fo:basic-link internal-destination="{$id}"> - <xsl:if test="$label != ''"> - <xsl:copy-of select="$label"/> - <xsl:value-of select="$autotoc.label.separator"/> - </xsl:if> - <xsl:apply-templates select="." mode="title.markup"/> - </fo:basic-link> - </fo:inline> - <fo:inline keep-together.within-line="always"> - <xsl:text> </xsl:text> - <fo:leader leader-pattern="dots" - keep-with-next.within-line="always"/> - <xsl:text> </xsl:text> - <fo:basic-link internal-destination="{$id}"> - <fo:page-number-citation ref-id="{$id}"/> - </fo:basic-link> - </fo:inline> - </fo:block> - </xsl:otherwise> - </xsl:choose> + <fo:block text-align-last="justify" + end-indent="{$toc.indent.width}pt" + last-line-end-indent="-{$toc.indent.width}pt"> + <fo:inline keep-with-next.within-line="always"> + <fo:basic-link internal-destination="{$id}"> + <xsl:if test="$label != ''"> + <xsl:copy-of select="$label"/> + <xsl:value-of select="$autotoc.label.separator"/> + </xsl:if> + <xsl:apply-templates select="." mode="title.markup"/> + </fo:basic-link> + </fo:inline> + <fo:inline keep-together.within-line="always"> + <xsl:text> </xsl:text> + <fo:leader leader-pattern="dots" + leader-pattern-width="3pt" + leader-alignment="reference-area" + keep-with-next.within-line="always"/> + <xsl:text> </xsl:text> + <fo:basic-link internal-destination="{$id}"> + <fo:page-number-citation ref-id="{$id}"/> + </fo:basic-link> + </fo:inline> + </fo:block> </xsl:template> <!-- ==================================================================== --> @@ -306,9 +347,12 @@ <xsl:call-template name="toc.line"/> + <xsl:variable name="reldepth" + select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + <xsl:if test="$toc.section.depth > 2 and sect3"> <fo:block id="toc.{$cid}.{$id}" - start-indent="{count(ancestor::*)*$toc.indent.width}pt"> + start-indent="{$reldepth*$toc.indent.width}pt"> <xsl:apply-templates select="sect3" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> @@ -331,9 +375,12 @@ <xsl:call-template name="toc.line"/> + <xsl:variable name="reldepth" + select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + <xsl:if test="$toc.section.depth > 3 and sect4"> <fo:block id="toc.{$cid}.{$id}" - start-indent="{count(ancestor::*)*$toc.indent.width}pt"> + start-indent="{$reldepth*$toc.indent.width}pt"> <xsl:apply-templates select="sect4" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> @@ -356,9 +403,12 @@ <xsl:call-template name="toc.line"/> + <xsl:variable name="reldepth" + select="count(ancestor::*)-count($toc-context/ancestor::*)"/> + <xsl:if test="$toc.section.depth > 4 and sect5"> <fo:block id="toc.{$cid}.{$id}" - start-indent="{count(ancestor::*)*$toc.indent.width}pt"> + start-indent="{$reldepth*$toc.indent.width}pt"> <xsl:apply-templates select="sect5" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> @@ -386,13 +436,15 @@ </xsl:variable> <xsl:variable name="depth" select="count(ancestor::section) + 1"/> + <xsl:variable name="reldepth" + select="count(ancestor::*)-count($toc-context/ancestor::*)"/> <xsl:if test="$toc.section.depth >= $depth"> <xsl:call-template name="toc.line"/> <xsl:if test="$toc.section.depth > $depth and section"> <fo:block id="toc.{$cid}.{$id}" - start-indent="{count(ancestor::*)*$toc.indent.width}pt"> + start-indent="{$reldepth*$toc.indent.width}pt"> <xsl:apply-templates select="section" mode="toc"> <xsl:with-param name="toc-context" select="$toc-context"/> </xsl:apply-templates> @@ -408,11 +460,10 @@ <xsl:call-template name="toc.line"/> </xsl:template> -<xsl:template match="index" - mode="toc"> +<xsl:template match="index" mode="toc"> <xsl:param name="toc-context" select="."/> - <xsl:if test="* or $generate.index"> + <xsl:if test="* or $generate.index != 0"> <xsl:call-template name="toc.line"/> </xsl:if> </xsl:template> @@ -447,6 +498,9 @@ <xsl:when test="$titles='example'"> <xsl:call-template name="list.of.examples.titlepage"/> </xsl:when> + <xsl:when test="$titles='procedure'"> + <xsl:call-template name="list.of.procedures.titlepage"/> + </xsl:when> <xsl:otherwise> <xsl:call-template name="list.of.unknowns.titlepage"/> </xsl:otherwise> @@ -458,7 +512,7 @@ </xsl:if> </xsl:template> -<xsl:template match="figure|table|example|equation" mode="toc"> +<xsl:template match="figure|table|example|equation|procedure" mode="toc"> <xsl:call-template name="toc.line"/> </xsl:template> Index: phpdoc/xsl/docbook/fo/biblio.xsl diff -u phpdoc/xsl/docbook/fo/biblio.xsl:1.1 phpdoc/xsl/docbook/fo/biblio.xsl:1.2 --- phpdoc/xsl/docbook/fo/biblio.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/biblio.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: biblio.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: biblio.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -32,8 +32,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -50,8 +53,10 @@ </fo:page-sequence> </xsl:when> <xsl:otherwise> - <fo:block id="{$id}"> - <xsl:call-template name="component.separator"/> + <fo:block id="{$id}" + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em"> <xsl:call-template name="bibliography.titlepage"/> <xsl:apply-templates/> </fo:block> @@ -64,37 +69,21 @@ <xsl:template match="bibliography/subtitle"></xsl:template> <xsl:template match="bibliography/titleabbrev"></xsl:template> -<xsl:template match="bibliography/title" mode="component.title.mode"> - <fo:block xsl:use-attribute-sets="component.title.properties"> - <xsl:apply-templates/> - </fo:block> -</xsl:template> - -<xsl:template match="bibliography/subtitle" mode="component.title.mode"> - <fo:block font-size="18pt" font-weight="bold" font-style="italic"> - <xsl:apply-templates/> - </fo:block> -</xsl:template> - <!-- ==================================================================== --> <xsl:template match="bibliodiv"> <fo:block> + <xsl:attribute name="id"> + <xsl:call-template name="object.id"/> + </xsl:attribute> + <xsl:call-template name="bibliodiv.titlepage"/> <xsl:apply-templates/> </fo:block> </xsl:template> -<xsl:template match="bibliodiv/title"> - <xsl:variable name="id"> - <xsl:call-template name="object.id"> - <xsl:with-param name="object" select=".."/> - </xsl:call-template> - </xsl:variable> - <fo:block font-size="16pt" font-weight="bold" - font-family="{$title.font.family}"> - <xsl:apply-templates/> - </fo:block> -</xsl:template> +<xsl:template match="bibliodiv/title"/> +<xsl:template match="bibliodiv/subtitle"/> +<xsl:template match="bibliodiv/titleabbrev"/> <!-- ==================================================================== --> @@ -173,16 +162,30 @@ <xsl:template name="biblioentry.label"> <xsl:param name="node" select="."/> - <xsl:text>[</xsl:text> <xsl:choose> + <xsl:when test="$bibliography.numbered != 0"> + <xsl:text>[</xsl:text> + <xsl:number from="bibliography" count="biblioentry|bibliomixed" + level="any" format="1"/> + <xsl:text>] </xsl:text> + </xsl:when> <xsl:when test="local-name($node/child::*[1]) = 'abbrev'"> + <xsl:text>[</xsl:text> <xsl:apply-templates select="$node/abbrev[1]"/> + <xsl:text>] </xsl:text> </xsl:when> - <xsl:otherwise> + <xsl:when test="$node/@xreflabel"> + <xsl:text>[</xsl:text> + <xsl:value-of select="$node/@xreflabel"/> + <xsl:text>] </xsl:text> + </xsl:when> + <xsl:when test="$node/@id"> + <xsl:text>[</xsl:text> <xsl:value-of select="$node/@id"/> - </xsl:otherwise> + <xsl:text>] </xsl:text> + </xsl:when> + <xsl:otherwise><!-- nop --></xsl:otherwise> </xsl:choose> - <xsl:text>] </xsl:text> </xsl:template> <!-- ==================================================================== --> @@ -200,10 +203,7 @@ </xsl:template> <xsl:template match="abstract" mode="bibliography.mode"> - <fo:inline> - <xsl:apply-templates mode="bibliography.mode"/> - <xsl:value-of select="$biblioentry.item.separator"/> - </fo:inline> + <!-- suppressed --> </xsl:template> <xsl:template match="address" mode="bibliography.mode"> @@ -595,10 +595,9 @@ </xsl:template> <xsl:template match="revhistory" mode="bibliography.mode"> - <fo:inline> - <xsl:apply-templates mode="bibliography.mode"/> - <xsl:value-of select="$biblioentry.item.separator"/> - </fo:inline> + <fo:block> + <xsl:apply-templates select="."/> <!-- use normal mode --> + </fo:block> </xsl:template> <xsl:template match="seriesinfo" mode="bibliography.mode"> @@ -693,6 +692,14 @@ </fo:inline> </xsl:template> +<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource" + mode="bibliography.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliography.mode"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </fo:inline> +</xsl:template> + <!-- ==================================================================== --> <xsl:template match="*" mode="bibliomixed.mode"> @@ -702,15 +709,21 @@ <xsl:template match="abbrev" mode="bibliomixed.mode"> <xsl:if test="preceding-sibling::*"> <fo:inline> - <xsl:apply-templates mode="bibliography.mode"/> + <xsl:apply-templates mode="bibliomixed.mode"/> </fo:inline> </xsl:if> </xsl:template> <xsl:template match="abstract" mode="bibliomixed.mode"> - <fo:inline> + <fo:block start-indent="1in"> <xsl:apply-templates mode="bibliomixed.mode"/> - </fo:inline> + </fo:block> +</xsl:template> + +<xsl:template match="para" mode="bibliomixed.mode"> + <fo:block> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:block> </xsl:template> <xsl:template match="address" mode="bibliomixed.mode"> @@ -1050,6 +1063,13 @@ </xsl:template> <xsl:template match="volumenum" mode="bibliomixed.mode"> + <fo:inline> + <xsl:apply-templates mode="bibliomixed.mode"/> + </fo:inline> +</xsl:template> + +<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource" + mode="bibliomixed.mode"> <fo:inline> <xsl:apply-templates mode="bibliomixed.mode"/> </fo:inline> Index: phpdoc/xsl/docbook/fo/block.xsl diff -u phpdoc/xsl/docbook/fo/block.xsl:1.1 phpdoc/xsl/docbook/fo/block.xsl:1.2 --- phpdoc/xsl/docbook/fo/block.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/block.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: block.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: block.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -25,6 +25,7 @@ <xsl:template match="para"> <fo:block xsl:use-attribute-sets="normal.para.spacing"> + <xsl:call-template name="anchor"/> <xsl:apply-templates/> </fo:block> </xsl:template> @@ -92,7 +93,7 @@ <xsl:template match="epigraph"> <fo:block> <xsl:call-template name="anchor"/> - <xsl:apply-templates select="para"/> + <xsl:apply-templates select="para|simpara|formalpara|literallayout"/> <fo:inline> <xsl:text>--</xsl:text> <xsl:apply-templates select="attribution"/> @@ -107,7 +108,7 @@ <!-- ==================================================================== --> <xsl:template match="sidebar"> - <fo:block> + <fo:block xsl:use-attribute-sets="sidebar.properties"> <xsl:if test="./title"> <fo:block font-weight="bold" keep-with-next.within-column="always" @@ -156,6 +157,10 @@ <xsl:call-template name="block.object"/> </xsl:template> +<xsl:template match="simplemsgentry"> + <xsl:call-template name="block.object"/> +</xsl:template> + <xsl:template match="msg"> <xsl:call-template name="block.object"/> </xsl:template> @@ -258,7 +263,7 @@ <xsl:variable name="revnumber" select=".//revnumber"/> <xsl:variable name="revdate" select=".//date"/> <xsl:variable name="revauthor" select=".//authorinitials"/> - <xsl:variable name="revremark" select=".//revremark"/> + <xsl:variable name="revremark" select=".//revremark|.//revdescription"/> <fo:table-row> <fo:table-cell> <fo:block> @@ -306,6 +311,10 @@ </xsl:template> <xsl:template match="revision/revremark"> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="revision/revdescription"> <xsl:apply-templates/> </xsl:template> Index: phpdoc/xsl/docbook/fo/callout.xsl diff -u phpdoc/xsl/docbook/fo/callout.xsl:1.1 phpdoc/xsl/docbook/fo/callout.xsl:1.2 --- phpdoc/xsl/docbook/fo/callout.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/callout.xsl Sun Mar 9 09:54:48 2003 @@ -8,7 +8,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: callout.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: callout.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. Index: phpdoc/xsl/docbook/fo/component.xsl diff -u phpdoc/xsl/docbook/fo/component.xsl:1.1 phpdoc/xsl/docbook/fo/component.xsl:1.2 --- phpdoc/xsl/docbook/fo/component.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/component.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: component.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: component.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -28,16 +28,22 @@ <xsl:with-param name="allow-anchors" select="1"/> </xsl:apply-templates> </xsl:variable> + <xsl:variable name="titleabbrev"> + <xsl:apply-templates select="$node" mode="titleabbrev.markup"/> + </xsl:variable> <xsl:if test="$passivetex.extensions != 0"> <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" fotex-bookmark-level="2" fotex-bookmark-label="{$id}"> - <xsl:value-of select="$title"/> + <xsl:value-of select="$titleabbrev"/> </fotex:bookmark> </xsl:if> <fo:block keep-with-next.within-column="always" + space-before.optimum="{$body.font.master}pt" + space-before.minimum="{$body.font.master * 0.8}pt" + space-before.maximum="{$body.font.master * 1.2}pt" hyphenate="false"> <xsl:if test="$pagewide != 0"> <xsl:attribute name="span">all</xsl:attribute> @@ -46,50 +52,47 @@ </fo:block> </xsl:template> -<xsl:template name="component.subtitle"> - <xsl:param name="node" select="."/> - <xsl:variable name="subtitle"> - <xsl:apply-templates select="$node" mode="subtitle.markup"/> - </xsl:variable> - - <xsl:if test="$subtitle != ''"> - <fo:block font-size="16pt" - font-weight="bold" - font-style="italic" - keep-with-next.within-column="always" - hyphenate="false"> - <xsl:copy-of select="$subtitle"/> - </fo:block> - </xsl:if> -</xsl:template> - -<xsl:template name="component.separator"> -</xsl:template> - <!-- ==================================================================== --> <xsl:template match="dedication" mode="dedication"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"/> </xsl:variable> <fo:page-sequence id="{$id}" hyphenate="{$hyphenate}" - format="i" master-reference="{$master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> - <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> - </xsl:if> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + <xsl:choose> + <xsl:when test="not(preceding::chapter + or preceding::preface + or preceding::appendix + or preceding::article + or preceding::dedication + or parent::part + or parent::reference)"> + <!-- if there is a preceding component or we're in a part, the --> + <!-- page numbering will already be adjusted --> + <xsl:attribute name="initial-page-number">1</xsl:attribute> + </xsl:when> + <xsl:when test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:when> + </xsl:choose> <xsl:apply-templates select="." mode="running.head.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> @@ -113,24 +116,28 @@ <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"/> </xsl:variable> <fo:page-sequence id="{$id}" hyphenate="{$hyphenate}" - format="i" master-reference="{$master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> @@ -152,30 +159,35 @@ <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"/> </xsl:variable> <fo:page-sequence id="{$id}" hyphenate="{$hyphenate}" - format="i" master-reference="{$master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + + <!-- Page numbering for a preface doesn't restart; it continues from the ToC --> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> <fo:flow flow-name="xsl-region-body"> - <xsl:call-template name="component.separator"/> <xsl:call-template name="preface.titlepage"/> <xsl:variable name="toc.params"> @@ -185,6 +197,7 @@ </xsl:variable> <xsl:if test="contains($toc.params, 'toc')"> <xsl:call-template name="component.toc"/> + <xsl:call-template name="component.toc.separator"/> </xsl:if> <xsl:apply-templates/> @@ -197,10 +210,13 @@ <xsl:template match="preface/titleabbrev"></xsl:template> <xsl:template match="preface/subtitle"></xsl:template> +<!-- ==================================================================== --> + <xsl:template match="chapter"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"/> </xsl:variable> @@ -211,25 +227,34 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> - - <!-- if there is a preceding chapter or this chapter appears in a part, the --> - <!-- page numbering will already be adjusted --> - <xsl:if test="not(preceding::chapter) and not(parent::part)"> - <xsl:attribute name="initial-page-number">1</xsl:attribute> - </xsl:if> - <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> - </xsl:if> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + <xsl:choose> + <xsl:when test="not(preceding::chapter + or preceding::appendix + or preceding::article + or preceding::dedication + or parent::part + or parent::reference)"> + <!-- if there is a preceding component or we're in a part, the --> + <!-- page numbering will already be adjusted --> + <xsl:attribute name="initial-page-number">1</xsl:attribute> + </xsl:when> + <xsl:when test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:when> + </xsl:choose> <xsl:apply-templates select="." mode="running.head.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> <fo:flow flow-name="xsl-region-body"> - <xsl:call-template name="component.separator"/> <xsl:call-template name="chapter.titlepage"/> <xsl:variable name="toc.params"> @@ -239,6 +264,7 @@ </xsl:variable> <xsl:if test="contains($toc.params, 'toc')"> <xsl:call-template name="component.toc"/> + <xsl:call-template name="component.toc.separator"/> </xsl:if> <xsl:apply-templates/> </fo:flow> @@ -250,10 +276,13 @@ <xsl:template match="chapter/titleabbrev"></xsl:template> <xsl:template match="chapter/subtitle"></xsl:template> +<!-- ==================================================================== --> + <xsl:template match="appendix"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"/> </xsl:variable> @@ -264,19 +293,34 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> - <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> - </xsl:if> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + <xsl:choose> + <xsl:when test="not(preceding::chapter + or preceding::appendix + or preceding::article + or preceding::dedication + or parent::part + or parent::reference)"> + <!-- if there is a preceding component or we're in a part, the --> + <!-- page numbering will already be adjusted --> + <xsl:attribute name="initial-page-number">1</xsl:attribute> + </xsl:when> + <xsl:when test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:when> + </xsl:choose> <xsl:apply-templates select="." mode="running.head.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> <fo:flow flow-name="xsl-region-body"> - <xsl:call-template name="component.separator"/> <xsl:call-template name="appendix.titlepage"/> <xsl:variable name="toc.params"> @@ -284,8 +328,10 @@ <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> + <xsl:if test="contains($toc.params, 'toc')"> <xsl:call-template name="component.toc"/> + <xsl:call-template name="component.toc.separator"/> </xsl:if> <xsl:apply-templates/> </fo:flow> @@ -299,76 +345,11 @@ <!-- ==================================================================== --> -<xsl:template match="dedication" mode="component.number"> - <xsl:param name="add.space" select="false()"/> -</xsl:template> - -<xsl:template match="preface" mode="component.number"> - <xsl:param name="add.space" select="false()"/> -</xsl:template> - -<xsl:template match="chapter" mode="component.number"> - <xsl:param name="add.space" select="false()"/> - <xsl:choose> - <xsl:when test="@label"> - <xsl:value-of select="@label"/> - <xsl:text>.</xsl:text> - <xsl:if test="$add.space"> - <xsl:call-template name="gentext.space"/> - </xsl:if> - </xsl:when> - <xsl:when test="$chapter.autolabel"> - <xsl:number from="book" count="chapter" format="1."/> - <xsl:if test="$add.space"> - <xsl:call-template name="gentext.space"/> - </xsl:if> - </xsl:when> - <xsl:otherwise></xsl:otherwise> - </xsl:choose> -</xsl:template> - -<xsl:template match="appendix" mode="component.number"> - <xsl:param name="add.space" select="false()"/> - <xsl:choose> - <xsl:when test="@label"> - <xsl:value-of select="@label"/> - <xsl:text>.</xsl:text> - <xsl:if test="$add.space"> - <xsl:call-template name="gentext.space"/> - </xsl:if> - </xsl:when> - <xsl:when test="$chapter.autolabel"> - <xsl:number from="book" count="appendix" format="A."/> - <xsl:if test="$add.space"> - <xsl:call-template name="gentext.space"/> - </xsl:if> - </xsl:when> - <xsl:otherwise></xsl:otherwise> - </xsl:choose> -</xsl:template> - -<xsl:template match="article" mode="component.number"> - <xsl:param name="add.space" select="false()"/> -</xsl:template> - -<xsl:template match="bibliography" mode="component.number"> - <xsl:param name="add.space" select="false()"/> -</xsl:template> - -<xsl:template match="glossary" mode="component.number"> - <xsl:param name="add.space" select="false()"/> -</xsl:template> - -<xsl:template match="index" mode="component.number"> - <xsl:param name="add.space" select="false()"/> -</xsl:template> - -<!-- ==================================================================== --> - <xsl:template match="article"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"/> </xsl:variable> @@ -379,13 +360,30 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> - <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> - </xsl:if> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + <xsl:choose> + <xsl:when test="not(preceding::chapter + or preceding::preface + or preceding::appendix + or preceding::article + or preceding::dedication + or parent::part + or parent::reference)"> + <!-- if there is a preceding component or we're in a part, the --> + <!-- page numbering will already be adjusted --> + <xsl:attribute name="initial-page-number">1</xsl:attribute> + </xsl:when> + <xsl:when test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:when> + </xsl:choose> <xsl:apply-templates select="." mode="running.head.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> @@ -398,8 +396,10 @@ <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> + <xsl:if test="contains($toc.params, 'toc')"> <xsl:call-template name="component.toc"/> + <xsl:call-template name="component.toc.separator"/> </xsl:if> <xsl:apply-templates/> </fo:flow> @@ -420,7 +420,10 @@ <xsl:call-template name="section.heading"> <xsl:with-param name="level" select="2"/> <xsl:with-param name="title"> - <xsl:apply-templates select="." mode="title.markup"/> + <xsl:apply-templates select="." mode="object.title.markup"/> + </xsl:with-param> + <xsl:with-param name="titleabbrev"> + <xsl:apply-templates select="." mode="titleabbrev.markup"/> </xsl:with-param> </xsl:call-template> Index: phpdoc/xsl/docbook/fo/division.xsl diff -u phpdoc/xsl/docbook/fo/division.xsl:1.1 phpdoc/xsl/docbook/fo/division.xsl:1.2 --- phpdoc/xsl/docbook/fo/division.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/division.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: division.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: division.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -43,34 +43,49 @@ <!-- ==================================================================== --> <xsl:template match="set"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <xsl:variable name="preamble" select="*[not(self::book or self::setindex)]"/> + <xsl:variable name="content" select="book|setindex"/> - <xsl:variable name="id"> - <xsl:call-template name="object.id"/> + <xsl:variable name="titlepage-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'titlepage'"/> + </xsl:call-template> </xsl:variable> - <xsl:variable name="master-reference"> - <xsl:call-template name="select.pagemaster"/> + + <xsl:variable name="lot-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'lot'"/> + </xsl:call-template> </xsl:variable> <xsl:if test="$preamble"> <fo:page-sequence id="{$id}" hyphenate="{$hyphenate}" - master-reference="{$master-reference}"> + master-reference="{$titlepage-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="set.titlepage"/> </fo:flow> @@ -82,23 +97,31 @@ <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> + <xsl:if test="contains($toc.params, 'toc')"> <fo:page-sequence hyphenate="{$hyphenate}" format="i" - master-reference="{$master-reference}"> + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="set.toc"/> </fo:flow> @@ -115,36 +138,53 @@ <!-- ==================================================================== --> <xsl:template match="book"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <xsl:variable name="preamble" select="title|subtitle|titleabbrev|bookinfo"/> + <xsl:variable name="content" select="*[not(self::title or self::subtitle or self::titleabbrev or self::bookinfo)]"/> - <xsl:variable name="id"> - <xsl:call-template name="object.id"/> + + <xsl:variable name="titlepage-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'titlepage'"/> + </xsl:call-template> </xsl:variable> - <xsl:variable name="master-reference"> - <xsl:call-template name="select.pagemaster"/> + + <xsl:variable name="lot-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'lot'"/> + </xsl:call-template> </xsl:variable> <xsl:if test="$preamble"> <fo:page-sequence id="{$id}" hyphenate="{$hyphenate}" - master-reference="{$master-reference}"> + master-reference="{$titlepage-master-reference}" + initial-page-number="1"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="book.titlepage"/> </fo:flow> @@ -158,23 +198,33 @@ <xsl:with-param name="table" select="normalize-space($generate.toc)"/> </xsl:call-template> </xsl:variable> + <xsl:if test="contains($toc.params, 'toc')"> <fo:page-sequence hyphenate="{$hyphenate}" format="i" - master-reference="{$master-reference}"> + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'TableofContents'"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'TableofContents'"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="division.toc"/> </fo:flow> @@ -184,20 +234,29 @@ <xsl:if test="contains($toc.params,'figure') and .//figure"> <fo:page-sequence hyphenate="{$hyphenate}" format="i" - master-reference="{$master-reference}"> + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofFigures'"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofFigures'"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'figure'"/> @@ -210,20 +269,29 @@ <xsl:if test="contains($toc.params,'table') and .//table"> <fo:page-sequence hyphenate="{$hyphenate}" format="i" - master-reference="{$master-reference}"> + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofTables'"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofTables'"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'table'"/> @@ -236,20 +304,29 @@ <xsl:if test="contains($toc.params,'example') and .//example"> <fo:page-sequence hyphenate="{$hyphenate}" format="i" - master-reference="{$master-reference}"> + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofExamples'"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofExamples'"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'example'"/> @@ -262,123 +339,210 @@ <xsl:if test="contains($toc.params,'equation') and .//equation"> <fo:page-sequence hyphenate="{$hyphenate}" format="i" - master-reference="{$master-reference}"> + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofEquations'"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofEquations'"/> </xsl:apply-templates> + <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'equation'"/> - <xsl:with-param name="nodes" select=".//equation"/> + <xsl:with-param name="nodes" select=".//equation[title]"/> </xsl:call-template> </fo:flow> </fo:page-sequence> </xsl:if> - <xsl:apply-templates select="$content"/> -</xsl:template> - -<xsl:template match="book/bookinfo"></xsl:template> -<xsl:template match="book/title"></xsl:template> -<xsl:template match="book/subtitle"></xsl:template> - -<!-- ==================================================================== --> - -<xsl:template match="part"> - <xsl:if test="not(partintro)"> - <xsl:variable name="id"> - <xsl:call-template name="object.id"/> - </xsl:variable> - <xsl:variable name="master-reference"> - <xsl:call-template name="select.pagemaster"/> - </xsl:variable> - - <fo:page-sequence id="{$id}" - hyphenate="{$hyphenate}" - master-reference="{$master-reference}"> + <xsl:if test="contains($toc.params,'procedure') and .//procedure"> + <fo:page-sequence hyphenate="{$hyphenate}" + format="i" + master-reference="{$lot-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> - - <!-- if there is a preceding chapter or part, page numbering will already --> - <!-- be adjusted, otherwise restart the page numbers --> - <xsl:if test="not(preceding::chapter) and not(preceding::part)"> - <xsl:attribute name="initial-page-number">1</xsl:attribute> - </xsl:if> - + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofProcedures'"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + <xsl:with-param name="gentext-key" select="'ListofProcedures'"/> </xsl:apply-templates> <fo:flow flow-name="xsl-region-body"> - <xsl:call-template name="part.titlepage"/> + <xsl:call-template name="list.of.titles"> + <xsl:with-param name="titles" select="'procedure'"/> + <xsl:with-param name="nodes" select=".//procedure[title]"/> + </xsl:call-template> </fo:flow> </fo:page-sequence> </xsl:if> + + <xsl:apply-templates select="$content"/> +</xsl:template> + +<xsl:template match="book/bookinfo"></xsl:template> +<xsl:template match="book/title"></xsl:template> +<xsl:template match="book/subtitle"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="part"> + <xsl:if test="not(partintro)"> + <xsl:apply-templates select="." mode="part.titlepage.mode"/> + <xsl:call-template name="generate.part.toc"/> + </xsl:if> <xsl:apply-templates/> </xsl:template> <xsl:template match="part" mode="part.titlepage.mode"> <!-- done this way to force the context node to be the part --> - <xsl:call-template name="part.titlepage"/> -</xsl:template> - -<xsl:template match="part/docinfo|partinfo"></xsl:template> -<xsl:template match="part/title"></xsl:template> -<xsl:template match="part/subtitle"></xsl:template> + <xsl:param name="additional.content"/> -<xsl:template match="part/partintro"> <xsl:variable name="id"> - <xsl:call-template name="object.id"> - <xsl:with-param name="object" select="ancestor::part"/> - </xsl:call-template> + <xsl:call-template name="object.id"/> </xsl:variable> - <xsl:variable name="master-reference"> - <xsl:call-template name="select.pagemaster"/> + + <xsl:variable name="titlepage-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'titlepage'"/> + </xsl:call-template> </xsl:variable> <fo:page-sequence id="{$id}" hyphenate="{$hyphenate}" - master-reference="{$master-reference}"> + master-reference="{$titlepage-master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> - <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> - </xsl:if> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + + <xsl:choose> + <xsl:when test="not(preceding::chapter) + and not(preceding::part)"> + <!-- if there is a preceding chapter or part, page numbering will already --> + <!-- be adjusted, otherwise restart the page numbers --> + <xsl:attribute name="initial-page-number">1</xsl:attribute> + </xsl:when> + <xsl:when test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:when> + </xsl:choose> <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> + <xsl:with-param name="master-reference" select="$titlepage-master-reference"/> </xsl:apply-templates> <fo:flow flow-name="xsl-region-body"> - <xsl:apply-templates select=".." mode="part.titlepage.mode"/> + <xsl:call-template name="part.titlepage"/> + <xsl:copy-of select="$additional.content"/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="part/docinfo|partinfo"></xsl:template> +<xsl:template match="part/title"></xsl:template> +<xsl:template match="part/subtitle"></xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="generate.part.toc"> + <xsl:param name="part" select="."/> + + <xsl:variable name="lot-master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass" select="'lot'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="node" select="$part"/> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc')"> + <fo:page-sequence hyphenate="{$hyphenate}" + master-reference="{$lot-master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> + <xsl:if test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:if> + + <xsl:apply-templates select="$part" mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + </xsl:apply-templates> + + <xsl:apply-templates select="$part" mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$lot-master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="division.toc"> + <xsl:with-param name="toc-context" select="$part"/> + </xsl:call-template> + </fo:flow> + </fo:page-sequence> + </xsl:if> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="part/partintro"> + <xsl:apply-templates select=".." mode="part.titlepage.mode"> + <xsl:with-param name="additional.content"> <xsl:if test="title"> <xsl:call-template name="partintro.titlepage"/> </xsl:if> <xsl:apply-templates/> - </fo:flow> - </fo:page-sequence> + </xsl:with-param> + </xsl:apply-templates> + + <xsl:call-template name="generate.part.toc"> + <xsl:with-param name="part" select=".."/> + </xsl:call-template> </xsl:template> <xsl:template match="partintro/title"></xsl:template> Index: phpdoc/xsl/docbook/fo/docbook.xsl diff -u phpdoc/xsl/docbook/fo/docbook.xsl:1.1 phpdoc/xsl/docbook/fo/docbook.xsl:1.2 --- phpdoc/xsl/docbook/fo/docbook.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/docbook.xsl Sun Mar 9 09:54:48 2003 @@ -11,7 +11,7 @@ <xsl:output method="xml" indent="no"/> <!-- ******************************************************************** - $Id: docbook.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: docbook.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -80,7 +80,12 @@ <xsl:template match="*"> <xsl:message> <xsl:value-of select="name(.)"/> - <xsl:text> encountered, but no template matches.</xsl:text> + <xsl:text> encountered</xsl:text> + <xsl:if test="parent::*"> + <xsl:text> in </xsl:text> + <xsl:value-of select="name(parent::*)"/> + </xsl:if> + <xsl:text>, but no template matches.</xsl:text> </xsl:message> <fo:block color="red"> <xsl:text><</xsl:text> @@ -94,19 +99,10 @@ </xsl:template> <xsl:template match="/"> - <xsl:message> - <xsl:text>Making </xsl:text> - <xsl:value-of select="$page.orientation"/> - <xsl:text> pages on </xsl:text> - <xsl:value-of select="$paper.type"/> - <xsl:text> paper (</xsl:text> - <xsl:value-of select="$page.width"/> - <xsl:text>x</xsl:text> - <xsl:value-of select="$page.height"/> - <xsl:text>)</xsl:text> - </xsl:message> + <xsl:call-template name="root.messages"/> <xsl:variable name="document.element" select="*[1]"/> + <xsl:variable name="title"> <xsl:choose> <xsl:when test="$document.element/title[1]"> @@ -177,6 +173,23 @@ </xsl:choose> </fo:root> +</xsl:template> + + +<xsl:template name="root.messages"> + <!-- redefine this any way you'd like to output messages --> + <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE --> + <xsl:message> + <xsl:text>Making </xsl:text> + <xsl:value-of select="$page.orientation"/> + <xsl:text> pages on </xsl:text> + <xsl:value-of select="$paper.type"/> + <xsl:text> paper (</xsl:text> + <xsl:value-of select="$page.width"/> + <xsl:text>x</xsl:text> + <xsl:value-of select="$page.height"/> + <xsl:text>)</xsl:text> + </xsl:message> </xsl:template> <!-- ==================================================================== --> Index: phpdoc/xsl/docbook/fo/ebnf.xsl diff -u phpdoc/xsl/docbook/fo/ebnf.xsl:1.1 phpdoc/xsl/docbook/fo/ebnf.xsl:1.2 --- phpdoc/xsl/docbook/fo/ebnf.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/ebnf.xsl Sun Mar 9 09:54:48 2003 @@ -6,7 +6,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: ebnf.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: ebnf.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -18,7 +18,7 @@ <doc:reference xmlns=""> <referenceinfo> <releaseinfo role="meta"> -$Id: ebnf.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ +$Id: ebnf.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ </releaseinfo> <author><surname>Walsh</surname> <firstname>Norman</firstname></author> Index: phpdoc/xsl/docbook/fo/fo-patch-for-fop.xsl diff -u phpdoc/xsl/docbook/fo/fo-patch-for-fop.xsl:1.1 phpdoc/xsl/docbook/fo/fo-patch-for-fop.xsl:1.2 --- phpdoc/xsl/docbook/fo/fo-patch-for-fop.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/fo-patch-for-fop.xsl Sun Mar 9 09:54:48 2003 @@ -4,6 +4,16 @@ xmlns:fox="http://xml.apache.org/fop/extensions" version="1.0"> +<!-- ******************************************************************** + $Id: fo-patch-for-fop.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + and other information. + + ******************************************************************** --> + <xsl:output method="xml"/> <xsl:template match="*"> Index: phpdoc/xsl/docbook/fo/fo-rtf.xsl diff -u phpdoc/xsl/docbook/fo/fo-rtf.xsl:1.1 phpdoc/xsl/docbook/fo/fo-rtf.xsl:1.2 --- phpdoc/xsl/docbook/fo/fo-rtf.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/fo-rtf.xsl Sun Mar 9 09:54:48 2003 @@ -6,6 +6,16 @@ exclude-result-prefixes="exsl set" version="1.0"> +<!-- ******************************************************************** + $Id: fo-rtf.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + and other information. + + ******************************************************************** --> + <!-- This module contains templates that match against FO nodes. It is used to post-process result tree fragments for some sorts of cleanup. These templates can only ever be fired by a processor that supports Index: phpdoc/xsl/docbook/fo/fo.xsl diff -u phpdoc/xsl/docbook/fo/fo.xsl:1.1 phpdoc/xsl/docbook/fo/fo.xsl:1.2 --- phpdoc/xsl/docbook/fo/fo.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/fo.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: fo.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: fo.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. Index: phpdoc/xsl/docbook/fo/footnote.xsl diff -u phpdoc/xsl/docbook/fo/footnote.xsl:1.1 phpdoc/xsl/docbook/fo/footnote.xsl:1.2 --- phpdoc/xsl/docbook/fo/footnote.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/footnote.xsl Sun Mar 9 09:54:48 2003 @@ -6,7 +6,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: footnote.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: footnote.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -61,13 +61,33 @@ <xsl:template match="footnote" mode="footnote.number"> <xsl:choose> <xsl:when test="ancestor::tgroup"> - <xsl:number level="any" from="tgroup" format="a"/> + <xsl:variable name="tfnum"> + <xsl:number level="any" from="table|informaltable" format="1"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="string-length($table.footnote.number.symbols) >= $tfnum"> + <xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/> + </xsl:when> + <xsl:otherwise> + <xsl:number level="any" from="tgroup" + format="{$table.footnote.number.format}"/> + </xsl:otherwise> + </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:variable name="pfoot" select="preceding::footnote"/> - <xsl:variable name="ptfoot" select="preceding::table//footnote - |preceding::informaltable//footnote"/> - <xsl:number value="count($pfoot) - count($ptfoot) + 1" format="1"/> + <xsl:variable name="ptfoot" select="preceding::tgroup//footnote"/> + <xsl:variable name="fnum" select="count($pfoot) - count($ptfoot) + 1"/> + + <xsl:choose> + <xsl:when test="string-length($footnote.number.symbols) >= $fnum"> + <xsl:value-of select="substring($footnote.number.symbols, $fnum, 1)"/> + </xsl:when> + <xsl:otherwise> + <xsl:number value="$fnum" format="{$footnote.number.format}"/> + </xsl:otherwise> + </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> Index: phpdoc/xsl/docbook/fo/fop.xsl diff -u phpdoc/xsl/docbook/fo/fop.xsl:1.1 phpdoc/xsl/docbook/fo/fop.xsl:1.2 --- phpdoc/xsl/docbook/fo/fop.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/fop.xsl Sun Mar 9 09:54:48 2003 @@ -5,7 +5,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: fop.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: fop.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** (c) Stephane Bline Peregrine Systems 2001 Driver file to allow pdf bookmarking (based on fop implementation). @@ -45,7 +45,7 @@ <xsl:when test="parent::*"> <fox:outline internal-destination="{$id}"> <fox:label> - <xsl:value-of select="translate($bookmark-label, $a-dia, $a-asc)"/> + <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/> </fox:label> <xsl:apply-templates select="*" mode="fop.outline"/> </fox:outline> @@ -53,7 +53,7 @@ <xsl:otherwise> <fox:outline internal-destination="{$id}"> <fox:label> - <xsl:value-of select="translate($bookmark-label, $a-dia, $a-asc)"/> + <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/> </fox:label> </fox:outline> Index: phpdoc/xsl/docbook/fo/formal.xsl diff -u phpdoc/xsl/docbook/fo/formal.xsl:1.1 phpdoc/xsl/docbook/fo/formal.xsl:1.2 --- phpdoc/xsl/docbook/fo/formal.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/formal.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: formal.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: formal.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -20,29 +20,105 @@ <xsl:call-template name="object.id"/> </xsl:variable> - <fo:block id="{$id}" - xsl:use-attribute-sets="formal.object.properties"> + <xsl:variable name="content"> <xsl:if test="$placement = 'before'"> - <xsl:call-template name="formal.object.heading"/> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> </xsl:if> <xsl:apply-templates/> <xsl:if test="$placement != 'before'"> - <xsl:call-template name="formal.object.heading"/> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> </xsl:if> - </fo:block> + </xsl:variable> + + <xsl:choose> + <xsl:when test="local-name(.) = 'figure'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="figure.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:when test="local-name(.) = 'example'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="example.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:when test="local-name(.) = 'equation'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="equation.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:when test="local-name(.) = 'table'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="table.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:when test="local-name(.) = 'procedure'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="procedure.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}" + xsl:use-attribute-sets="formal.object.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template name="formal.object.heading"> - <xsl:param name="title"></xsl:param> + <xsl:param name="object" select="."/> + <xsl:param name="placement" select="'before'"/> + <fo:block xsl:use-attribute-sets="formal.title.properties"> - <xsl:apply-templates select="." mode="object.title.markup"/> + <xsl:choose> + <xsl:when test="$placement = 'before'"> + <xsl:attribute + name="keep-with-next.within-column">always</xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute + name="keep-with-previous.within-column">always</xsl:attribute> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates select="$object" mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> </fo:block> </xsl:template> <xsl:template name="informal.object"> - <fo:block> - <xsl:apply-templates/> - </fo:block> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="local-name(.) = 'equation'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="equation.properties"> + <xsl:apply-templates/> + </fo:block> + </xsl:when> + <xsl:when test="local-name(.) = 'procedure'"> + <fo:block id="{$id}" + xsl:use-attribute-sets="procedure.properties"> + <xsl:apply-templates/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}"> + <xsl:apply-templates/> + </fo:block> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template name="semiformal.object"> @@ -76,19 +152,90 @@ </xsl:choose> </xsl:variable> - <!-- FIXME: is this too careless? --> - <xsl:choose> - <xsl:when test=".//imagedata[@align][1]"> - <fo:block text-align="{.//imagedata[@align][1]/@align}"> + <!-- Get align value from internal mediaobject --> + <xsl:variable name="align"> + <xsl:if test="mediaobject|mediaobjectco|screenshot|graphic|graphicco"> + <xsl:variable name="olist" select="mediaobject/imageobject + |mediaobject/imageobjectco + |mediaobject/videoobject + |mediaobject/audioobject + |mediaobject/textobject + + |mediaobjectco/imageobject + |mediaobjectco/imageobjectco + |mediaobjectco/videoobject + |mediaobjectco/audioobject + |mediaobjectco/textobject + + |screenshot/mediaobject/imageobject + |screenshot/mediaobject/imageobjectco + |screenshot/mediaobject/videoobject + |screenshot/mediaobject/audioobject + |screenshot/mediaobject/textobject + + |screenshot/mediaobjectco/imageobject + |screenshot/mediaobjectco/imageobjectco + |screenshot/mediaobjectco/videoobject + |screenshot/mediaobjectco/audioobject + |screenshot/mediaobjectco/textobject + + |graphic + |graphicco/graphic + |screenshot/graphic + |screenshot/graphicco/graphic"/> + + <xsl:variable name="object.index"> + <xsl:call-template name="select.mediaobject.index"> + <xsl:with-param name="olist" select="$olist"/> + <xsl:with-param name="count" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="object" select="$olist[position() = $object.index]"/> + + <xsl:value-of select="$object/imagedata[@align][1]/@align"/> + </xsl:if> + </xsl:variable> + + + <xsl:variable name="figure"> + <xsl:choose> + <xsl:when test="$align != ''"> + <fo:block> + <xsl:attribute name="text-align"> + <xsl:value-of select="$align"/> + </xsl:attribute> + <xsl:call-template name="formal.object"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:otherwise> <xsl:call-template name="formal.object"> <xsl:with-param name="placement" select="$placement"/> </xsl:call-template> - </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="@float and @float != 0"> + <fo:float> + <xsl:attribute name="float"> + <xsl:choose> + <xsl:when test="@float = 1"> + <xsl:value-of select="$default.float.class"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@float"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:copy-of select="$figure"/> + </fo:float> </xsl:when> <xsl:otherwise> - <xsl:call-template name="formal.object"> - <xsl:with-param name="placement" select="$placement"/> - </xsl:call-template> + <xsl:copy-of select="$figure"/> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -110,9 +257,46 @@ </xsl:choose> </xsl:variable> - <xsl:call-template name="formal.object"> - <xsl:with-param name="placement" select="$placement"/> - </xsl:call-template> + <!-- Get align value from internal mediaobject --> + <xsl:variable name="align"> + <xsl:if test="mediaobject"> + <xsl:variable name="olist" select="mediaobject/imageobject + |mediaobject/imageobjectco + |mediaobject/videoobject + |mediaobject/audioobject + |mediaobject/textobject"/> + + <xsl:variable name="object.index"> + <xsl:call-template name="select.mediaobject.index"> + <xsl:with-param name="olist" select="$olist"/> + <xsl:with-param name="count" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="object" select="$olist[position() = $object.index]"/> + + <xsl:value-of select="$object/imagedata[@align][1]/@align"/> + </xsl:if> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$align != ''"> + <fo:block> + <xsl:attribute name="text-align"> + <xsl:value-of select="$align"/> + </xsl:attribute> + <xsl:call-template name="formal.object"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="formal.object"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:template> <xsl:template name="table.frame"> @@ -127,63 +311,113 @@ <xsl:choose> <xsl:when test="$frame='all'"> - <xsl:attribute name="border-left-style">solid</xsl:attribute> - <xsl:attribute name="border-right-style">solid</xsl:attribute> - <xsl:attribute name="border-top-style">solid</xsl:attribute> - <xsl:attribute name="border-bottom-style">solid</xsl:attribute> + <xsl:attribute name="border-left-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-right-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-top-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> <xsl:attribute name="border-left-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> </xsl:attribute> <xsl:attribute name="border-right-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> </xsl:attribute> <xsl:attribute name="border-top-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> </xsl:attribute> <xsl:attribute name="border-bottom-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-left-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-right-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-top-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-color"> + <xsl:value-of select="$table.frame.border.color"/> </xsl:attribute> </xsl:when> <xsl:when test="$frame='bottom'"> <xsl:attribute name="border-left-style">none</xsl:attribute> <xsl:attribute name="border-right-style">none</xsl:attribute> <xsl:attribute name="border-top-style">none</xsl:attribute> - <xsl:attribute name="border-bottom-style">solid</xsl:attribute> + <xsl:attribute name="border-bottom-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> <xsl:attribute name="border-bottom-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-color"> + <xsl:value-of select="$table.frame.border.color"/> </xsl:attribute> </xsl:when> <xsl:when test="$frame='sides'"> - <xsl:attribute name="border-left-style">solid</xsl:attribute> - <xsl:attribute name="border-right-style">solid</xsl:attribute> + <xsl:attribute name="border-left-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-right-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> <xsl:attribute name="border-top-style">none</xsl:attribute> <xsl:attribute name="border-bottom-style">none</xsl:attribute> <xsl:attribute name="border-left-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> </xsl:attribute> <xsl:attribute name="border-right-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-left-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-right-color"> + <xsl:value-of select="$table.frame.border.color"/> </xsl:attribute> </xsl:when> <xsl:when test="$frame='top'"> <xsl:attribute name="border-left-style">none</xsl:attribute> <xsl:attribute name="border-right-style">none</xsl:attribute> - <xsl:attribute name="border-top-style">solid</xsl:attribute> + <xsl:attribute name="border-top-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> <xsl:attribute name="border-bottom-style">none</xsl:attribute> <xsl:attribute name="border-top-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-top-color"> + <xsl:value-of select="$table.frame.border.color"/> </xsl:attribute> </xsl:when> <xsl:when test="$frame='topbot'"> <xsl:attribute name="border-left-style">none</xsl:attribute> <xsl:attribute name="border-right-style">none</xsl:attribute> - <xsl:attribute name="border-top-style">solid</xsl:attribute> - <xsl:attribute name="border-bottom-style">solid</xsl:attribute> + <xsl:attribute name="border-top-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-style"> + <xsl:value-of select="$table.frame.border.style"/> + </xsl:attribute> <xsl:attribute name="border-top-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> </xsl:attribute> <xsl:attribute name="border-bottom-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.frame.border.thickness"/> + </xsl:attribute> + <xsl:attribute name="border-top-color"> + <xsl:value-of select="$table.frame.border.color"/> + </xsl:attribute> + <xsl:attribute name="border-bottom-color"> + <xsl:value-of select="$table.frame.border.color"/> </xsl:attribute> </xsl:when> <xsl:when test="$frame='none'"> @@ -226,39 +460,62 @@ </xsl:choose> </xsl:variable> - <xsl:variable name="prop-columns" - select=".//colspec[contains(@colwidth, '*')]"/> - <xsl:variable name="table.content"> <fo:block id="{$id}" - xsl:use-attribute-sets="formal.object.properties" - keep-together.within-column="1"> + xsl:use-attribute-sets="formal.object.properties"> <xsl:if test="$placement = 'before'"> - <xsl:call-template name="formal.object.heading"/> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> </xsl:if> - <fo:table border-collapse="collapse"> - <xsl:call-template name="table.frame"/> - <xsl:if test="count($prop-columns) != 0"> - <xsl:attribute name="table-layout">fixed</xsl:attribute> - </xsl:if> - <xsl:apply-templates select="tgroup"/> - </fo:table> + <xsl:for-each select="tgroup"> + <xsl:variable name="prop-columns" + select=".//colspec[contains(@colwidth, '*')]"/> + <fo:table border-collapse="collapse"> + <xsl:call-template name="table.frame"/> + <xsl:if test="following-sibling::tgroup"> + <xsl:attribute name="border-bottom-width">0pt</xsl:attribute> + <xsl:attribute name="border-bottom-style">none</xsl:attribute> + <xsl:attribute name="padding-bottom">0pt</xsl:attribute> + <xsl:attribute name="margin-bottom">0pt</xsl:attribute> + <xsl:attribute name="space-after">0pt</xsl:attribute> + <xsl:attribute name="space-after.minimum">0pt</xsl:attribute> + <xsl:attribute name="space-after.optimum">0pt</xsl:attribute> + <xsl:attribute name="space-after.maximum">0pt</xsl:attribute> + </xsl:if> + <xsl:if test="preceding-sibling::tgroup"> + <xsl:attribute name="border-top-width">0pt</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="padding-top">0pt</xsl:attribute> + <xsl:attribute name="margin-top">0pt</xsl:attribute> + <xsl:attribute name="space-before">0pt</xsl:attribute> + <xsl:attribute name="space-before.minimum">0pt</xsl:attribute> + <xsl:attribute name="space-before.optimum">0pt</xsl:attribute> + <xsl:attribute name="space-before.maximum">0pt</xsl:attribute> + </xsl:if> + <xsl:if test="count($prop-columns) != 0"> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + </xsl:if> + <xsl:apply-templates select="."/> + </fo:table> + </xsl:for-each> <xsl:if test="$placement != 'before'"> - <xsl:call-template name="formal.object.heading"/> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="placement" select="$placement"/> + </xsl:call-template> </xsl:if> </fo:block> </xsl:variable> <xsl:variable name="footnotes"> - <xsl:if test=".//footnote"> + <xsl:if test="tgroup//footnote"> <fo:block font-family="{$body.font.family}" font-size="{$footnote.font.size}" - keep-together.within-column="1" keep-with-previous="always"> - <xsl:apply-templates select=".//footnote" mode="table.footnote.mode"/> + <xsl:apply-templates select="tgroup//footnote" mode="table.footnote.mode"/> </fo:block> </xsl:if> </xsl:variable> @@ -316,10 +573,14 @@ </xsl:template> <xsl:template match="figure/title"></xsl:template> +<xsl:template match="figure/titleabbrev"></xsl:template> <xsl:template match="table/title"></xsl:template> +<xsl:template match="table/titleabbrev"></xsl:template> <xsl:template match="table/textobject"></xsl:template> <xsl:template match="example/title"></xsl:template> +<xsl:template match="example/titleabbrev"></xsl:template> <xsl:template match="equation/title"></xsl:template> +<xsl:template match="equation/titleabbrev"></xsl:template> <xsl:template match="informalfigure"> <xsl:call-template name="informal.object"/> @@ -333,28 +594,49 @@ <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> - <xsl:variable name="prop-columns" - select=".//colspec[contains(@colwidth, '*')]"/> <xsl:variable name="table.content"> - <fo:table id="{$id}" - border-collapse="collapse" - xsl:use-attribute-sets="informal.object.properties"> - <xsl:call-template name="table.frame"/> - <xsl:if test="count($prop-columns) != 0"> - <xsl:attribute name="table-layout">fixed</xsl:attribute> - </xsl:if> - <xsl:apply-templates select="tgroup"/> - </fo:table> + <xsl:for-each select="tgroup"> + <xsl:variable name="prop-columns" + select=".//colspec[contains(@colwidth, '*')]"/> + <fo:table id="{$id}" + border-collapse="collapse" + xsl:use-attribute-sets="informal.object.properties"> + <xsl:call-template name="table.frame"/> + <xsl:if test="following-sibling::tgroup"> + <xsl:attribute name="border-bottom-width">0pt</xsl:attribute> + <xsl:attribute name="border-bottom-style">none</xsl:attribute> + <xsl:attribute name="padding-bottom">0pt</xsl:attribute> + <xsl:attribute name="margin-bottom">0pt</xsl:attribute> + <xsl:attribute name="space-after">0pt</xsl:attribute> + <xsl:attribute name="space-after.minimum">0pt</xsl:attribute> + <xsl:attribute name="space-after.optimum">0pt</xsl:attribute> + <xsl:attribute name="space-after.maximum">0pt</xsl:attribute> + </xsl:if> + <xsl:if test="preceding-sibling::tgroup"> + <xsl:attribute name="border-top-width">0pt</xsl:attribute> + <xsl:attribute name="border-top-style">none</xsl:attribute> + <xsl:attribute name="padding-top">0pt</xsl:attribute> + <xsl:attribute name="margin-top">0pt</xsl:attribute> + <xsl:attribute name="space-before">0pt</xsl:attribute> + <xsl:attribute name="space-before.minimum">0pt</xsl:attribute> + <xsl:attribute name="space-before.optimum">0pt</xsl:attribute> + <xsl:attribute name="space-before.maximum">0pt</xsl:attribute> + </xsl:if> + <xsl:if test="count($prop-columns) != 0"> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + </xsl:if> + <xsl:apply-templates select="."/> + </fo:table> + </xsl:for-each> </xsl:variable> <xsl:variable name="footnotes"> - <xsl:if test=".//footnote"> + <xsl:if test="tgroup//footnote"> <fo:block font-family="{$body.font.family}" font-size="{$footnote.font.size}" - keep-together.within-column="1" keep-with-previous="always"> - <xsl:apply-templates select=".//footnote" mode="table.footnote.mode"/> + <xsl:apply-templates select="tgroup//footnote" mode="table.footnote.mode"/> </fo:block> </xsl:if> </xsl:variable> Index: phpdoc/xsl/docbook/fo/glossary.xsl diff -u phpdoc/xsl/docbook/fo/glossary.xsl:1.1 phpdoc/xsl/docbook/fo/glossary.xsl:1.2 --- phpdoc/xsl/docbook/fo/glossary.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/glossary.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: glossary.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: glossary.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -15,56 +15,99 @@ <!-- ==================================================================== --> -<xsl:variable name="glossterm-width">2in</xsl:variable> -<xsl:variable name="glossterm-sep">0.25in</xsl:variable> - -<!-- ==================================================================== --> - <xsl:template match="glossary"> - <xsl:variable name="divs" select="glossdiv"/> - <xsl:variable name="entries" select="glossentry"/> - <xsl:variable name="preamble" - select="*[not(self::title - or self::subtitle - or self::glossdiv - or self::glossentry)]"/> - <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> - <fo:block id="{$id}"> - <xsl:call-template name="component.separator"/> + <xsl:call-template name="make-glossary"/> + </fo:block> +</xsl:template> - <xsl:call-template name="glossary.titlepage"/> +<xsl:template match="glossdiv/title"/> +<xsl:template match="glossdiv/subtitle"/> +<xsl:template match="glossdiv/titleabbrev"/> - <xsl:if test="$preamble"> - <xsl:apply-templates select="$preamble"/> - </xsl:if> +<!-- ==================================================================== --> - <xsl:if test="$divs"> - <xsl:apply-templates select="$divs"/> - </xsl:if> +<xsl:template name="make-glossary"> + <xsl:param name="divs" select="glossdiv"/> + <xsl:param name="entries" select="glossentry"/> + <xsl:param name="preamble" select="*[not(self::title + or self::subtitle + or self::glossdiv + or self::glossentry)]"/> + + <xsl:variable name="presentation"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glossary-presentation'"/> + </xsl:call-template> + </xsl:variable> - <xsl:if test="$entries"> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:apply-templates select="$entries"/> - </fo:list-block> - </xsl:if> - </fo:block> -</xsl:template> + <xsl:variable name="term-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glossterm-width'"/> + </xsl:call-template> + </xsl:variable> -<xsl:template match="book/glossary"> - <xsl:variable name="divs" select="glossdiv"/> - <xsl:variable name="entries" select="glossentry"/> - <xsl:variable name="preamble" - select="*[not(self::title - or self::subtitle - or self::glossdiv - or self::glossentry)]"/> + <xsl:variable name="width"> + <xsl:choose> + <xsl:when test="$term-width = ''"> + <xsl:value-of select="$glossterm.width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$term-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:call-template name="glossary.titlepage"/> + + <xsl:if test="$preamble"> + <xsl:apply-templates select="$preamble"/> + </xsl:if> + <xsl:choose> + <xsl:when test="$presentation = 'list'"> + <xsl:apply-templates select="$divs" mode="glossary.as.list"> + <xsl:with-param name="width" select="$width"/> + </xsl:apply-templates> + <xsl:if test="$entries"> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:apply-templates select="$entries" mode="glossary.as.list"/> + </fo:list-block> + </xsl:if> + </xsl:when> + <xsl:when test="$presentation = 'blocks'"> + <xsl:apply-templates select="$divs" mode="glossary.as.blocks"/> + <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/> + </xsl:when> + <xsl:when test="$glossary.as.blocks != 0"> + <xsl:apply-templates select="$divs" mode="glossary.as.blocks"/> + <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$divs" mode="glossary.as.list"> + <xsl:with-param name="width" select="$width"/> + </xsl:apply-templates> + <xsl:if test="$entries"> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:apply-templates select="$entries" mode="glossary.as.list"/> + </fo:list-block> + </xsl:if> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="book/glossary|/glossary" priority="2"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> @@ -79,8 +122,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -91,23 +137,7 @@ </xsl:apply-templates> <fo:flow flow-name="xsl-region-body"> - <xsl:call-template name="glossary.titlepage"/> - - <xsl:if test="$preamble"> - <xsl:apply-templates select="$preamble"/> - </xsl:if> - - <xsl:if test="$divs"> - <xsl:apply-templates select="$divs"/> - </xsl:if> - - <xsl:if test="$entries"> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:apply-templates select="$entries"/> - </fo:list-block> - </xsl:if> + <xsl:call-template name="make-glossary"/> </fo:flow> </fo:page-sequence> </xsl:template> @@ -117,60 +147,329 @@ <xsl:template match="glossary/subtitle"></xsl:template> <xsl:template match="glossary/titleabbrev"></xsl:template> -<xsl:template match="glossary/title" mode="component.title.mode"> - <fo:block font-size="18pt" - font-weight="bold" - keep-with-next.within-column="always" - hyphenate="false"> - <xsl:apply-templates/> - </fo:block> +<!-- ==================================================================== --> + +<xsl:template match="glosslist"> + <xsl:variable name="presentation"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glosslist-presentation'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="term-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glossterm-width'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="width"> + <xsl:choose> + <xsl:when test="$term-width = ''"> + <xsl:value-of select="$glossterm.width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$term-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$presentation = 'list'"> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:apply-templates mode="glossary.as.list"/> + </fo:list-block> + </xsl:when> + <xsl:when test="$presentation = 'blocks'"> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:when> + <xsl:when test="$glosslist.as.blocks != 0"> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:when> + <xsl:otherwise> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:apply-templates mode="glossary.as.list"/> + </fo:list-block> + </xsl:otherwise> + </xsl:choose> </xsl:template> -<xsl:template match="glossary/subtitle" mode="component.title.mode"> - <fo:block font-size="16pt" - font-weight="bold" - font-style="italic" - keep-with-next.within-column="always" - hyphenate="false"> - <xsl:apply-templates/> +<!-- ==================================================================== --> +<!-- Glossary collection --> + +<xsl:template match="glossary[@role='auto']" priority="2"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + <xsl:if test="$glossary.collection = ''"> + <xsl:message> + <xsl:text>Warning: processing automatic glossary </xsl:text> + <xsl:text>without a glossary.collection file.</xsl:text> + </xsl:message> + </xsl:if> + + <fo:block id="{$id}"> + <xsl:call-template name="make-auto-glossary"/> </fo:block> </xsl:template> -<!-- ==================================================================== --> +<xsl:template name="make-auto-glossary"> + <xsl:param name="collection" select="document($glossary.collection, .)"/> + <xsl:param name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/> + <xsl:param name="preamble" select="*[not(self::title + or self::subtitle + or self::glossdiv + or self::glossentry)]"/> + + <xsl:variable name="presentation"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glossary-presentation'"/> + </xsl:call-template> + </xsl:variable> -<xsl:template match="glosslist"> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:apply-templates/> - </fo:list-block> + <xsl:variable name="term-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'glossterm-width'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="width"> + <xsl:choose> + <xsl:when test="$term-width = ''"> + <xsl:value-of select="$glossterm.width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$term-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:if test="$glossary.collection = ''"> + <xsl:message> + <xsl:text>Warning: processing automatic glossary </xsl:text> + <xsl:text>without a glossary.collection file.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:call-template name="glossary.titlepage"/> + + <xsl:if test="$preamble"> + <xsl:apply-templates select="$preamble"/> + </xsl:if> + + <xsl:choose> + <xsl:when test="glossdiv and $collection//glossdiv"> + <xsl:for-each select="$collection//glossdiv"> + <!-- first see if there are any in this div --> + <xsl:variable name="exist.test"> + <xsl:for-each select="glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:value-of select="glossterm"/> + </xsl:if> + </xsl:for-each> + </xsl:variable> + + <xsl:if test="$exist.test != ''"> + <xsl:choose> + <xsl:when test="$presentation = 'list'"> + <xsl:apply-templates select="." mode="auto-glossary-as-list"> + <xsl:with-param name="width" select="$width"/> + <xsl:with-param name="terms" select="$terms"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="$presentation = 'blocks'"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"> + <xsl:with-param name="terms" select="$terms"/> + </xsl:apply-templates> + </xsl:when> + <xsl:when test="$glossary.as.blocks != 0"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"> + <xsl:with-param name="terms" select="$terms"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="." mode="auto-glossary-as-list"> + <xsl:with-param name="width" select="$width"/> + <xsl:with-param name="terms" select="$terms"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$presentation = 'list'"> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:for-each select="$collection//glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-list"/> + </xsl:if> + </xsl:for-each> + </fo:list-block> + </xsl:when> + <xsl:when test="$presentation = 'blocks'"> + <xsl:for-each select="$collection//glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/> + </xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:when test="$glossary.as.blocks != 0"> + <xsl:for-each select="$collection//glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/> + </xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:for-each select="$collection//glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-list"/> + </xsl:if> + </xsl:for-each> + </fo:list-block> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> </xsl:template> -<!-- ==================================================================== --> +<xsl:template match="book/glossary[@role='auto']|/glossary[@role='auto']" priority="2.5"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <xsl:if test="$glossary.collection = ''"> + <xsl:message> + <xsl:text>Warning: processing automatic glossary </xsl:text> + <xsl:text>without a glossary.collection file.</xsl:text> + </xsl:message> + </xsl:if> + + <fo:page-sequence id="{$id}" + hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + <xsl:if test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:if> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="make-auto-glossary"/> + </fo:flow> + </fo:page-sequence> +</xsl:template> + +<xsl:template match="glossdiv" mode="auto-glossary-as-list"> + <xsl:param name="width" select="$glossterm.width"/> + <xsl:param name="terms" select="."/> -<xsl:template match="glossdiv"> - <xsl:variable name="entries" select="glossentry"/> <xsl:variable name="preamble" select="*[not(self::title or self::subtitle or self::glossentry)]"/> - <xsl:apply-templates select="title|subtitle"/> + <xsl:call-template name="glossdiv.titlepage"/> + <xsl:apply-templates select="$preamble"/> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" + + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" xsl:use-attribute-sets="normal.para.spacing"> - <xsl:apply-templates select="$entries"/> + <xsl:for-each select="glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-list"/> + </xsl:if> + </xsl:for-each> </fo:list-block> </xsl:template> -<xsl:template match="glossdiv/title"> - <fo:block font-size="16pt" font-weight="bold"> - <xsl:apply-templates/> - </fo:block> +<xsl:template match="glossentry" mode="auto-glossary-as-list"> + <xsl:apply-templates select="." mode="glossary.as.list"/> +</xsl:template> + +<xsl:template match="glossdiv" mode="auto-glossary-as-blocks"> + <xsl:param name="terms" select="."/> + + <xsl:variable name="preamble" + select="*[not(self::title + or self::subtitle + or self::glossentry)]"/> + + <xsl:call-template name="glossdiv.titlepage"/> + + <xsl:apply-templates select="$preamble"/> + + <xsl:for-each select="glossentry"> + <xsl:variable name="cterm" select="glossterm"/> + <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> + <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/> + </xsl:if> + </xsl:for-each> +</xsl:template> + +<xsl:template match="glossentry" mode="auto-glossary-as-blocks"> + <xsl:apply-templates select="." mode="glossary.as.blocks"/> </xsl:template> <!-- ==================================================================== --> +<!-- Format glossary as a list --> + +<xsl:template match="glossdiv" mode="glossary.as.list"> + <xsl:param name="width" select="$glossterm.width"/> + + <xsl:variable name="entries" select="glossentry"/> + <xsl:variable name="preamble" + select="*[not(self::title + or self::subtitle + or self::glossentry)]"/> + + <xsl:call-template name="glossdiv.titlepage"/> + + <xsl:apply-templates select="$preamble"/> + + <fo:list-block provisional-distance-between-starts="{$width}" + provisional-label-separation="{$glossterm.separation}" + xsl:use-attribute-sets="normal.para.spacing"> + <xsl:apply-templates select="$entries" mode="glossary.as.list"/> + </fo:list-block> +</xsl:template> <!-- GlossEntry ::= @@ -180,7 +479,7 @@ (GlossSee | GlossDef+) --> -<xsl:template match="glossentry"> +<xsl:template match="glossentry" mode="glossary.as.list"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> @@ -195,82 +494,133 @@ </xsl:choose> </xsl:with-param> </xsl:call-template> - <xsl:apply-templates/> + + <fo:list-item-label end-indent="label-end()"> + <fo:block> + <xsl:choose> + <xsl:when test="$glossentry.show.acronym = 'primary'"> + <xsl:choose> + <xsl:when test="acronym|abbrev"> + <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.list"/> + <xsl:text> (</xsl:text> + <xsl:apply-templates select="glossterm" mode="glossary.as.list"/> + <xsl:text>)</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossterm" mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:when test="$glossentry.show.acronym = 'yes'"> + <xsl:apply-templates select="glossterm" mode="glossary.as.list"/> + + <xsl:if test="acronym|abbrev"> + <xsl:text> (</xsl:text> + <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.list"/> + <xsl:text>)</xsl:text> + </xsl:if> + </xsl:when> + + <xsl:otherwise> + <xsl:apply-templates select="glossterm" mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates select="indexterm"/> + </fo:block> + </fo:list-item-label> + + <fo:list-item-body start-indent="body-start()"> + <xsl:apply-templates select="glosssee|glossdef" mode="glossary.as.list"/> + </fo:list-item-body> </fo:list-item> </xsl:template> -<xsl:template match="glossentry/glossterm"> - <fo:list-item-label end-indent="label-end()"> - <fo:block> - <xsl:apply-templates/> - </fo:block> - </fo:list-item-label> +<xsl:template match="glossentry/glossterm" mode="glossary.as.list"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::glossterm">, </xsl:if> </xsl:template> -<xsl:template match="glossentry/acronym"> +<xsl:template match="glossentry/acronym" mode="glossary.as.list"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if> </xsl:template> -<xsl:template match="glossentry/abbrev"> +<xsl:template match="glossentry/abbrev" mode="glossary.as.list"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if> </xsl:template> -<xsl:template match="glossentry/revhistory"> +<xsl:template match="glossentry/revhistory" mode="glossary.as.list"> </xsl:template> -<xsl:template match="glossentry/glosssee"> +<xsl:template match="glossentry/glosssee" mode="glossary.as.list"> <xsl:variable name="otherterm" select="@otherterm"/> <xsl:variable name="targets" select="//node()[@id=$otherterm]"/> <xsl:variable name="target" select="$targets[1]"/> - <fo:list-item-body start-indent="body-start()"> + + <fo:block> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'glossary'"/> + <xsl:with-param name="name" select="'see'"/> + </xsl:call-template> + <xsl:choose> + <xsl:when test="$target"> + <xsl:apply-templates select="$target" mode="xref"/> + </xsl:when> + <xsl:when test="$otherterm != '' and not($target)"> + <xsl:message> + <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text> + <xsl:value-of select="$otherterm"/> + </xsl:message> + <xsl:apply-templates mode="glossary.as.list"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="glossary.as.list"/> + </xsl:otherwise> + </xsl:choose> + <xsl:text>.</xsl:text> + </fo:block> +</xsl:template> + +<xsl:template match="glossentry/glossdef" mode="glossary.as.list"> + <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/> + <xsl:if test="glossseealso"> <fo:block> <xsl:call-template name="gentext.template"> <xsl:with-param name="context" select="'glossary'"/> - <xsl:with-param name="name" select="'see'"/> + <xsl:with-param name="name" select="'seealso'"/> </xsl:call-template> - <xsl:choose> - <xsl:when test="@otherterm"> - <xsl:apply-templates select="$target" mode="xref"/> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates/> - </xsl:otherwise> - </xsl:choose> - <xsl:text>.</xsl:text> + <xsl:apply-templates select="glossseealso" mode="glossary.as.list"/> </fo:block> - </fo:list-item-body> -</xsl:template> - -<xsl:template match="glossentry/glossdef"> - <fo:list-item-body start-indent="body-start()"> - <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/> - <xsl:if test="glossseealso"> - <fo:block> - <xsl:call-template name="gentext.template"> - <xsl:with-param name="context" select="'glossary'"/> - <xsl:with-param name="name" select="'seealso'"/> - </xsl:call-template> - <xsl:apply-templates select="glossseealso"/> - </fo:block> - </xsl:if> - </fo:list-item-body> + </xsl:if> </xsl:template> -<xsl:template match="glossentry/glossdef/para[1]"> +<xsl:template match="glossentry/glossdef/para[1]|glossentry/glossdef/simpara[1]" + mode="glossary.as.list"> <fo:block> <xsl:apply-templates/> </fo:block> </xsl:template> -<xsl:template match="glossseealso"> +<xsl:template match="glossseealso" mode="glossary.as.list"> <xsl:variable name="otherterm" select="@otherterm"/> <xsl:variable name="targets" select="//node()[@id=$otherterm]"/> <xsl:variable name="target" select="$targets[1]"/> <xsl:choose> - <xsl:when test="@otherterm"> + <xsl:when test="$target"> <xsl:apply-templates select="$target" mode="xref"/> </xsl:when> + <xsl:when test="$otherterm != '' and not($target)"> + <xsl:message> + <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text> + <xsl:value-of select="$otherterm"/> + </xsl:message> + <xsl:apply-templates mode="glossary.as.list"/> + </xsl:when> <xsl:otherwise> - <xsl:apply-templates/> + <xsl:apply-templates mode="glossary.as.list"/> </xsl:otherwise> </xsl:choose> @@ -285,216 +635,175 @@ </xsl:template> <!-- ==================================================================== --> +<!-- Format glossary blocks --> -<xsl:template match="glossentry" mode="xref"> - <xsl:apply-templates select="./glossterm[1]" mode="xref"/> -</xsl:template> - -<xsl:template match="glossterm" mode="xref"> - <xsl:variable name="id"> - <xsl:call-template name="object.id"> - <xsl:with-param name="object" select="parent::glossentry"/> - </xsl:call-template> - </xsl:variable> - - <fo:basic-link internal-destination="{$id}" - xsl:use-attribute-sets="xref.properties"> - <xsl:apply-templates/> - <xsl:call-template name="insert.page.citation"> - <xsl:with-param name="id" select="$id"/> - </xsl:call-template> - </fo:basic-link> -</xsl:template> - - -<!-- ==================================================================== --> - -<!-- Glossary collection --> - -<xsl:template match="glossary[@role='auto']" priority="2"> - <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> - <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/> - <xsl:variable name="collection" select="document($glossary.collection, .)"/> - +<xsl:template match="glossdiv" mode="glossary.as.blocks"> + <xsl:variable name="entries" select="glossentry"/> <xsl:variable name="preamble" select="*[not(self::title or self::subtitle - or self::glossdiv or self::glossentry)]"/> - <xsl:if test="$glossary.collection = ''"> - <xsl:message> - <xsl:text>Warning: processing automatic glossary </xsl:text> - <xsl:text>without a glossary.collection file.</xsl:text> - </xsl:message> - </xsl:if> + <xsl:call-template name="glossdiv.titlepage"/> - <fo:block id="{$id}"> - <xsl:call-template name="component.separator"/> + <xsl:apply-templates select="$preamble"/> - <xsl:call-template name="glossary.titlepage"/> + <xsl:apply-templates select="$entries" mode="glossary.as.blocks"/> +</xsl:template> - <xsl:if test="$preamble"> - <xsl:apply-templates select="$preamble"/> - </xsl:if> +<!-- +GlossEntry ::= + GlossTerm, Acronym?, Abbrev?, + (IndexTerm)*, + RevHistory?, + (GlossSee | GlossDef+) +--> + +<xsl:template match="glossentry" mode="glossary.as.blocks"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block xsl:use-attribute-sets="list.block.spacing"> + <xsl:call-template name="anchor"> + <xsl:with-param name="conditional"> + <xsl:choose> + <xsl:when test="$glossterm.auto.link != 0 + or $glossary.collection != ''">0</xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> <xsl:choose> - <xsl:when test="glossdiv and $collection//glossdiv"> - <xsl:for-each select="$collection//glossdiv"> - <!-- first see if there are any in this div --> - <xsl:variable name="exist.test"> - <xsl:for-each select="glossentry"> - <xsl:variable name="cterm" select="glossterm"/> - <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> - <xsl:value-of select="glossterm"/> - </xsl:if> - </xsl:for-each> - </xsl:variable> + <xsl:when test="$glossentry.show.acronym = 'primary'"> + <xsl:choose> + <xsl:when test="acronym|abbrev"> + <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.blocks"/> + <xsl:text> (</xsl:text> + <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/> + <xsl:text>)</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:when test="$glossentry.show.acronym = 'yes'"> + <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/> - <xsl:if test="$exist.test != ''"> - <xsl:apply-templates select="." mode="auto-glossary"> - <xsl:with-param name="terms" select="$terms"/> - </xsl:apply-templates> - </xsl:if> - </xsl:for-each> + <xsl:if test="acronym|abbrev"> + <xsl:text> (</xsl:text> + <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.blocks"/> + <xsl:text>)</xsl:text> + </xsl:if> </xsl:when> + <xsl:otherwise> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:for-each select="$collection//glossentry"> - <xsl:variable name="cterm" select="glossterm"/> - <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> - <xsl:apply-templates select="." mode="auto-glossary"/> - </xsl:if> - </xsl:for-each> - </fo:list-block> + <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/> </xsl:otherwise> </xsl:choose> - </fo:block> -</xsl:template> - -<xsl:template match="book/glossary[@role='auto']" priority="2.5"> - <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> - <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/> - <xsl:variable name="collection" select="document($glossary.collection, .)"/> - <xsl:variable name="preamble" - select="*[not(self::title - or self::subtitle - or self::glossdiv - or self::glossentry)]"/> - - <xsl:variable name="master-reference"> - <xsl:call-template name="select.pagemaster"/> - </xsl:variable> + <xsl:apply-templates select="indexterm"/> + </fo:block> - <xsl:if test="$glossary.collection = ''"> - <xsl:message> - <xsl:text>Warning: processing automatic glossary </xsl:text> - <xsl:text>without a glossary.collection file.</xsl:text> - </xsl:message> - </xsl:if> + <fo:block margin-left="0.25in"> + <xsl:apply-templates select="glosssee|glossdef" mode="glossary.as.blocks"/> + </fo:block> +</xsl:template> - <fo:page-sequence id="{$id}" - hyphenate="{$hyphenate}" - master-reference="{$master-reference}"> - <xsl:attribute name="language"> - <xsl:call-template name="l10n.language"/> - </xsl:attribute> - <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> - </xsl:if> +<xsl:template match="glossentry/glossterm" mode="glossary.as.blocks"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::glossterm">, </xsl:if> +</xsl:template> - <xsl:apply-templates select="." mode="running.head.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> - </xsl:apply-templates> - <xsl:apply-templates select="." mode="running.foot.mode"> - <xsl:with-param name="master-reference" select="$master-reference"/> - </xsl:apply-templates> +<xsl:template match="glossentry/acronym" mode="glossary.as.blocks"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if> +</xsl:template> - <fo:flow flow-name="xsl-region-body"> - <fo:block id="{$id}"> - <xsl:call-template name="glossary.titlepage"/> +<xsl:template match="glossentry/abbrev" mode="glossary.as.blocks"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if> +</xsl:template> - <xsl:if test="$preamble"> - <xsl:apply-templates select="$preamble"/> - </xsl:if> +<xsl:template match="glossentry/glosssee" mode="glossary.as.blocks"> + <xsl:variable name="otherterm" select="@otherterm"/> + <xsl:variable name="targets" select="//node()[@id=$otherterm]"/> + <xsl:variable name="target" select="$targets[1]"/> - <xsl:choose> - <xsl:when test="glossdiv and $collection//glossdiv"> - <xsl:for-each select="$collection//glossdiv"> - <!-- first see if there are any in this div --> - <xsl:variable name="exist.test"> - <xsl:for-each select="glossentry"> - <xsl:variable name="cterm" select="glossterm"/> - <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> - <xsl:value-of select="glossterm"/> - </xsl:if> - </xsl:for-each> - </xsl:variable> - - <xsl:if test="$exist.test != ''"> - <xsl:apply-templates select="." mode="auto-glossary"> - <xsl:with-param name="terms" select="$terms"/> - </xsl:apply-templates> - </xsl:if> - </xsl:for-each> - </xsl:when> - <xsl:otherwise> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:for-each select="$collection//glossentry"> - <xsl:variable name="cterm" select="glossterm"/> - <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> - <xsl:apply-templates select="." mode="auto-glossary"/> - </xsl:if> - </xsl:for-each> - </fo:list-block> - </xsl:otherwise> - </xsl:choose> - </fo:block> - </fo:flow> - </fo:page-sequence> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'glossary'"/> + <xsl:with-param name="name" select="'see'"/> + </xsl:call-template> + <xsl:choose> + <xsl:when test="$target"> + <xsl:apply-templates select="$target" mode="xref"/> + </xsl:when> + <xsl:when test="$otherterm != '' and not($target)"> + <xsl:message> + <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text> + <xsl:value-of select="$otherterm"/> + </xsl:message> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + <xsl:text>.</xsl:text> </xsl:template> -<xsl:template match="*" mode="auto-glossary"> - <!-- pop back out to the default mode for most elements --> - <xsl:apply-templates select="."/> +<xsl:template match="glossentry/glossdef" mode="glossary.as.blocks"> + <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/> + <xsl:if test="glossseealso"> + <fo:block> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'glossary'"/> + <xsl:with-param name="name" select="'seealso'"/> + </xsl:call-template> + <xsl:apply-templates select="glossseealso" mode="glossary.as.blocks"/> + </fo:block> + </xsl:if> </xsl:template> -<xsl:template match="glossdiv" mode="auto-glossary"> - <xsl:param name="terms" select="."/> - - <xsl:variable name="preamble" - select="*[not(self::title - or self::subtitle - or self::glossentry)]"/> - - <xsl:apply-templates select="title|subtitle"/> - <xsl:apply-templates select="$preamble"/> - <fo:list-block provisional-distance-between-starts="{$glossterm-width}" - provisional-label-separation="{$glossterm-sep}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:for-each select="glossentry"> - <xsl:variable name="cterm" select="glossterm"/> - <xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> - <xsl:apply-templates select="." mode="auto-glossary"/> - </xsl:if> - </xsl:for-each> - </fo:list-block> +<xsl:template match="glossentry/glossdef/para[1]|glossentry/glossdef/simpara[1]" + mode="glossary.as.blocks"> + <fo:block> + <xsl:apply-templates/> + </fo:block> </xsl:template> -<xsl:template match="glossentry" mode="auto-glossary"> - <xsl:variable name="id"> - <xsl:call-template name="object.id"/> - </xsl:variable> +<xsl:template match="glossseealso" mode="glossary.as.blocks"> + <xsl:variable name="otherterm" select="@otherterm"/> + <xsl:variable name="targets" select="//node()[@id=$otherterm]"/> + <xsl:variable name="target" select="$targets[1]"/> - <fo:list-item id="gl.{$id}" - xsl:use-attribute-sets="normal.para.spacing"> - <xsl:apply-templates/> - </fo:list-item> + <xsl:choose> + <xsl:when test="$target"> + <xsl:apply-templates select="$target" mode="xref"/> + </xsl:when> + <xsl:when test="$otherterm != '' and not($target)"> + <xsl:message> + <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text> + <xsl:value-of select="$otherterm"/> + </xsl:message> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="glossary.as.blocks"/> + </xsl:otherwise> + </xsl:choose> + + <xsl:choose> + <xsl:when test="position() = last()"> + <xsl:text>.</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>, </xsl:text> + </xsl:otherwise> + </xsl:choose> </xsl:template> <!-- ==================================================================== --> Index: phpdoc/xsl/docbook/fo/graphics.xsl diff -u phpdoc/xsl/docbook/fo/graphics.xsl:1.1 phpdoc/xsl/docbook/fo/graphics.xsl:1.2 --- phpdoc/xsl/docbook/fo/graphics.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/graphics.xsl Sun Mar 9 09:54:48 2003 @@ -10,7 +10,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: graphics.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: graphics.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -26,36 +26,56 @@ <!-- ==================================================================== --> <!-- Graphic format tests for the FO backend --> -<!-- -FIXME: make is.graphic.* work correctly depending on the backend! -<xsl:param name="passivetex.extensions" select="0" doc:type='boolean'/> -<xsl:param name="fop.extensions" select="0" doc:type='boolean'/> ---> +<xsl:param name="graphic.notations"> + <!-- n.b. exactly one leading space, one trailing space, and one inter-word space --> + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0"> + <xsl:text> PNG PDF JPG JPEG linespecific </xsl:text> + </xsl:when> + <xsl:when test="$fop.extensions != 0"> + <xsl:text> SVG PNG PDF JPG JPEG linespecific </xsl:text> + </xsl:when> + <xsl:when test="$arbortext.extensions != 0"> + <xsl:text> PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text> + </xsl:when> + <xsl:when test="$xep.extensions != 0"> + <xsl:text> SVG PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text> PNG PDF JPG JPEG linespecific GIF GIF87a GIF89a TIFF BMP </xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:param> <xsl:template name="is.graphic.format"> - <xsl:param name="format"></xsl:param> - <xsl:if test="$format = 'PNG' - or $format = 'PDF' - or $format = 'JPG' - or $format = 'JPEG' - or $format = 'linespecific' - or $format = 'GIF' - or $format = 'GIF87a' - or $format = 'GIF89a' - or $format = 'TIFF' - or $format = 'BMP'">1</xsl:if> + <xsl:param name="format"/> + <xsl:if test="contains($graphic.notations, concat(' ',$format,' '))">1</xsl:if> </xsl:template> +<xsl:param name="graphic.extensions"> + <!-- n.b. exactly one leading space, one trailing space, and one inter-word space --> + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0"> + <xsl:text> png pdf jpg jpeg </xsl:text> + </xsl:when> + <xsl:when test="$fop.extensions != 0"> + <xsl:text> svg png pdf jpg jpeg </xsl:text> + </xsl:when> + <xsl:when test="$arbortext.extensions != 0"> + <xsl:text> png pdf jpg jpeg gif tif tiff bmp </xsl:text> + </xsl:when> + <xsl:when test="$xep.extensions != 0"> + <xsl:text> svg png pdf jpg jpeg gif tif tiff bmp </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text> png pdf jpg jpeg gif tif tiff bmp </xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:param> + <xsl:template name="is.graphic.extension"> - <xsl:param name="ext"></xsl:param> - <xsl:if test="$ext = 'png' - or $ext = 'pdf' - or $ext = 'jpeg' - or $ext = 'jpg' - or $ext = 'gif' - or $ext = 'tif' - or $ext = 'tiff' - or $ext = 'bmp'">1</xsl:if> + <xsl:param name="ext"/> + <xsl:if test="contains($graphic.extensions, concat(' ', $ext, ' '))">1</xsl:if> </xsl:template> <!-- ==================================================================== --> @@ -73,123 +93,6 @@ <!-- Override these templates for FO --> <!-- ==================================================================== --> -<xsl:template name="X.process.image"> - <!-- When this template is called, the current node should be --> - <!-- a graphic, inlinegraphic, imagedata, or videodata. All --> - <!-- those elements have the same set of attributes, so we can --> - <!-- handle them all in one place. --> - <xsl:variable name="filename"> - <xsl:choose> - <xsl:when test="local-name(.) = 'graphic' - or local-name(.) = 'inlinegraphic'"> - <!-- handle legacy graphic and inlinegraphic by new template --> - <xsl:call-template name="mediaobject.filename"> - <xsl:with-param name="object" select="."/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <!-- imagedata, videodata, audiodata --> - <xsl:call-template name="mediaobject.filename"> - <xsl:with-param name="object" select=".."/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="scale"> - <xsl:choose> - <xsl:when test="@scale"><xsl:value-of select="@scale"/>%</xsl:when> - <xsl:otherwise>auto</xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="width"> - <xsl:choose> - <xsl:when test="@width"> - <xsl:call-template name="length-spec"> - <xsl:with-param name="length" select="@width"/> - <xsl:with-param name="default.units" select="$default.units"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise>auto</xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="height"> - <xsl:choose> - <xsl:when test="@depth"> - <xsl:call-template name="length-spec"> - <xsl:with-param name="length" select="@depth"/> - <xsl:with-param name="default.units" select="$default.units"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise>auto</xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <!-- DocBook has four attributes related to image size: width, depth, - scalefit, and scale. Width and depth identify the desired dimensions - of the image (what CALS calls the repro area dimensions). Scale - indicates the percentage by which the image should be scaled, and - scalefit indicates whether or not the actual image should be scaled - to fit the specified width and/or depth. It is illogical to specify - both scale and scalefit: scale wins. My thanks to Paul Grosso for - analyzing this situation with me. --> - - <xsl:variable name="scalefit"> - <xsl:choose> - <xsl:when test="@scalefit"> - <xsl:value-of select="@scalefit"/> - </xsl:when> - <xsl:otherwise>0</xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <!-- if scalefit != 0, set both content-height and content-width to - scale-to-fit elseif scale != auto, set both content-height and - content-width to it else set both content-height and - content-width to auto. --> - - <xsl:variable name="content-width"> - <xsl:choose> - <xsl:when test="$scale != 'auto'"> - <xsl:value-of select="$scale"/> - </xsl:when> - <xsl:when test="$scalefit != '0'">scale-to-fit</xsl:when> - <xsl:otherwise>auto</xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="content-height"> - <xsl:choose> - <xsl:when test="$scale != 'auto'"> - <xsl:value-of select="$scale"/> - </xsl:when> - <xsl:when test="$scalefit != '0'">scale-to-fit</xsl:when> - <xsl:otherwise>auto</xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:choose> - <xsl:when test="$passivetex.extensions != 0 - or $fop.extensions != 0 - or $arbortext.extensions != 0"> - <fo:external-graphic src="{$filename}" - width="{$width}" - height="{$height}" - content-width="{$content-width}" - content-height="{$content-height}"/> - </xsl:when> - <xsl:otherwise> - <fo:external-graphic src="url({$filename})" - width="{$width}" - height="{$height}" - content-width="{$content-width}" - content-height="{$content-height}"/> - </xsl:otherwise> - </xsl:choose> -</xsl:template> - <xsl:template name="process.image"> <!-- When this template is called, the current node should be --> <!-- a graphic, inlinegraphic, imagedata, or videodata. All --> @@ -198,6 +101,7 @@ <xsl:variable name="scalefit"> <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">0</xsl:when> <xsl:when test="@contentwidth or @contentdepth">0</xsl:when> <xsl:when test="@scale">0</xsl:when> <xsl:when test="@scalefit"><xsl:value-of select="@scalefit"/></xsl:when> @@ -208,6 +112,7 @@ <xsl:variable name="scale"> <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">0</xsl:when> <xsl:when test="@contentwidth or @contentdepth">1.0</xsl:when> <xsl:when test="@scale"> <xsl:value-of select="@scale div 100.0"/> @@ -244,20 +149,14 @@ <fo:external-graphic> <xsl:attribute name="src"> - <xsl:choose> - <xsl:when test="$passivetex.extensions != 0 - or $fop.extensions != 0 - or $arbortext.extensions != 0"> - <xsl:value-of select="$filename"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="concat('url(', $filename, ')')"/> - </xsl:otherwise> - </xsl:choose> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$filename"/> + </xsl:call-template> </xsl:attribute> <xsl:attribute name="width"> <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when> <xsl:when test="contains(@width,'%')"> <xsl:value-of select="@width"/> </xsl:when> @@ -273,6 +172,7 @@ <xsl:attribute name="height"> <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when> <xsl:when test="contains(@depth,'%')"> <xsl:value-of select="@depth"/> </xsl:when> @@ -288,6 +188,7 @@ <xsl:attribute name="content-width"> <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when> <xsl:when test="contains(@contentwidth,'%')"> <xsl:value-of select="@contentwidth"/> </xsl:when> @@ -297,7 +198,7 @@ <xsl:with-param name="default.units" select="'px'"/> </xsl:call-template> </xsl:when> - <xsl:when test="$scale != 1.0"> + <xsl:when test="number($scale) != 1.0"> <xsl:value-of select="$scale * 100"/> <xsl:text>%</xsl:text> </xsl:when> @@ -307,6 +208,7 @@ <xsl:attribute name="content-height"> <xsl:choose> + <xsl:when test="$ignore.image.scaling != 0">auto</xsl:when> <xsl:when test="contains(@contentdepth,'%')"> <xsl:value-of select="@contentdepth"/> </xsl:when> @@ -316,7 +218,7 @@ <xsl:with-param name="default.units" select="'px'"/> </xsl:call-template> </xsl:when> - <xsl:when test="$scale != 1.0"> + <xsl:when test="number($scale) != 1.0"> <xsl:value-of select="$scale * 100"/> <xsl:text>%</xsl:text> </xsl:when> @@ -358,6 +260,11 @@ </xsl:when> <xsl:otherwise> <fo:block> + <xsl:if test="@align"> + <xsl:attribute name="text-align"> + <xsl:value-of select="@align"/> + </xsl:attribute> + </xsl:if> <xsl:call-template name="process.image"/> </fo:block> </xsl:otherwise> @@ -412,8 +319,32 @@ <!-- ==================================================================== --> <xsl:template match="mediaobject|mediaobjectco"> + + <xsl:variable name="olist" select="imageobject|imageobjectco + |videoobject|audioobject + |textobject"/> + + <xsl:variable name="object.index"> + <xsl:call-template name="select.mediaobject.index"> + <xsl:with-param name="olist" select="$olist"/> + <xsl:with-param name="count" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="object" select="$olist[position() = $object.index]"/> + + <xsl:variable name="align"> + <xsl:value-of select="$object/imagedata[@align][1]/@align"/> + </xsl:variable> + <fo:block> - <xsl:call-template name="select.mediaobject"/> + <xsl:if test="$align != '' "> + <xsl:attribute name="text-align"> + <xsl:value-of select="$align"/> + </xsl:attribute> + </xsl:if> + + <xsl:apply-templates select="$object"/> <xsl:apply-templates select="caption"/> </fo:block> </xsl:template> @@ -430,9 +361,35 @@ </xsl:template> <xsl:template match="imageobject"> - <xsl:apply-templates select="imagedata"/> + <xsl:choose> + <xsl:when test="imagedata"> + <xsl:apply-templates select="imagedata"/> + </xsl:when> + <xsl:otherwise> + <fo:instream-foreign-object> + <xsl:apply-templates mode="copy-all"/> + </fo:instream-foreign-object> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="copy-all"> + <xsl:copy> + <xsl:for-each select="@*"> + <xsl:copy/> + </xsl:for-each> + <xsl:apply-templates mode="copy-all"/> + </xsl:copy> </xsl:template> +<xsl:template match="text()|comment()|processing-instruction()" mode="copy-all"> + <xsl:copy/> +</xsl:template> + +<!-- ==================================================================== --> + <xsl:template match="imagedata"> <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> <xsl:variable name="filename"> @@ -499,12 +456,65 @@ <xsl:apply-templates/> </xsl:template> +<xsl:template match="textdata"> + <xsl:variable name="filename"> + <xsl:choose> + <xsl:when test="@entityref"> + <xsl:value-of select="unparsed-entity-uri(@entityref)"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@fileref"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$use.extensions != '0' + and $textinsert.extension != '0'"> + <xsl:choose> + <xsl:when test="element-available('stext:insertfile')"> + <stext:insertfile href="{$filename}"/> + </xsl:when> + <xsl:when test="element-available('xtext:insertfile')"> + <xtext:insertfile href="{$filename}"/> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>No insertfile extension available.</xsl:text> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" + href="{$filename}"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + <!-- ==================================================================== --> <xsl:template match="caption"> <fo:block> <xsl:apply-templates/> </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="fo-external-image"> + <xsl:param name="filename"/> + + <xsl:choose> + <xsl:when test="$passivetex.extensions != 0 + or $fop.extensions != 0 + or $arbortext.extensions != 0"> + <xsl:value-of select="$filename"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="concat('url(', $filename, ')')"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> </xsl:stylesheet> Index: phpdoc/xsl/docbook/fo/index.xsl diff -u phpdoc/xsl/docbook/fo/index.xsl:1.1 phpdoc/xsl/docbook/fo/index.xsl:1.2 --- phpdoc/xsl/docbook/fo/index.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/index.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: index.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: index.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -20,24 +20,41 @@ <xsl:call-template name="object.id"/> </xsl:variable> - <fo:block id="{$id}"> - <xsl:call-template name="component.separator"/> - <xsl:call-template name="index.titlepage"/> - <xsl:apply-templates/> - <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0"> - <xsl:call-template name="generate-index"/> - </xsl:if> - </fo:block> + <xsl:if test="$generate.index != 0"> + <xsl:choose> + <xsl:when test="$make.index.markup != 0"> + <fo:block> + <xsl:call-template name="generate-index-markup"> + <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block id="{$id}"> + <xsl:call-template name="index.titlepage"/> + <xsl:apply-templates/> + <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0"> + <xsl:call-template name="generate-index"> + <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/> + </xsl:call-template> + </xsl:if> + </fo:block> + </xsl:otherwise> + </xsl:choose> + </xsl:if> </xsl:template> -<xsl:template match="book/index"> +<xsl:template match="book/index|part/index"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> + + <xsl:if test="$generate.index != 0"> <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"> - <xsl:with-param name="column.count" - select="$column.count.of.index"/> + <xsl:with-param name="pageclass"> + <xsl:if test="$make.index.markup != 0">body</xsl:if> + </xsl:with-param> </xsl:call-template> </xsl:variable> @@ -47,8 +64,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -62,10 +82,99 @@ <xsl:call-template name="index.titlepage"/> <xsl:apply-templates/> <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0"> - <xsl:call-template name="generate-index"/> + + <xsl:choose> + <xsl:when test="$make.index.markup != 0"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + xsl:use-attribute-sets="monospace.verbatim.properties" + linefeed-treatment="preserve"> + <xsl:call-template name="generate-index-markup"> + <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:when test="indexentry|indexdiv/indexentry"> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="generate-index"> + <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </fo:flow> + </fo:page-sequence> + </xsl:if> +</xsl:template> + +<xsl:template match="setindex"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:if test="$generate.index != 0"> + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"> + <xsl:with-param name="pageclass"> + <xsl:choose> + <xsl:when test="$make.index.markup != 0">body</xsl:when> + <xsl:otherwise>index</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:variable> + + <fo:page-sequence id="{$id}" + hyphenate="{$hyphenate}" + master-reference="{$master-reference}"> + <xsl:attribute name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> + <xsl:if test="$double.sided != 0"> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> + </xsl:if> + + <xsl:apply-templates select="." mode="running.head.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + <xsl:apply-templates select="." mode="running.foot.mode"> + <xsl:with-param name="master-reference" select="$master-reference"/> + </xsl:apply-templates> + + <fo:flow flow-name="xsl-region-body"> + <xsl:call-template name="setindex.titlepage"/> + <xsl:apply-templates/> + <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0"> + + <xsl:choose> + <xsl:when test="$make.index.markup != 0"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + xsl:use-attribute-sets="monospace.verbatim.properties" + linefeed-treatment="preserve"> + <xsl:call-template name="generate-index-markup"> + <xsl:with-param name="scope" select="/"/> + </xsl:call-template> + </fo:block> + </xsl:when> + <xsl:when test="indexentry|indexdiv/indexentry"> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="generate-index"> + <xsl:with-param name="scope" select="/"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> </xsl:if> </fo:flow> </fo:page-sequence> + </xsl:if> </xsl:template> <xsl:template match="index/title"></xsl:template> @@ -74,23 +183,42 @@ <!-- ==================================================================== --> -<xsl:template match="indexdiv"> - <fo:block> - <xsl:apply-templates/> +<xsl:template name="indexdiv.title"> + <xsl:param name="title"/> + <xsl:param name="titlecontent"/> + + <fo:block margin-left="{$title.margin.left}" + font-size="14.4pt" + font-family="{$title.font.family}" + font-weight="bold" + keep-with-next.within-column="always" + space-before.optimum="{$body.font.master}pt" + space-before.minimum="{$body.font.master * 0.8}pt" + space-before.maximum="{$body.font.master * 1.2}pt"> + <xsl:choose> + <xsl:when test="$title"> + <xsl:apply-templates select="$title" mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$titlecontent"/> + </xsl:otherwise> + </xsl:choose> </fo:block> </xsl:template> -<xsl:template match="indexdiv/title"> - <xsl:variable name="id"> - <xsl:call-template name="object.id"> - <xsl:with-param name="object" select=".."/> - </xsl:call-template> - </xsl:variable> - <fo:block font-size="16pt" font-weight="bold"> +<xsl:template match="indexdiv"> + <fo:block> + <xsl:call-template name="indexdiv.titlepage"/> <xsl:apply-templates/> </fo:block> </xsl:template> +<xsl:template match="indexdiv/title"/> +<xsl:template match="indexdiv/subtitle"/> +<xsl:template match="indexdiv/titleabbrev"/> + <!-- ==================================================================== --> <xsl:template match="indexterm"> @@ -99,20 +227,100 @@ <xsl:call-template name="object.id"/> </xsl:attribute> <xsl:comment> - <xsl:value-of select="primary"/> - <xsl:if test="secondary"> - <xsl:text>, </xsl:text> - <xsl:value-of select="secondary"/> - </xsl:if> - <xsl:if test="tertiary"> - <xsl:text>, </xsl:text> - <xsl:value-of select="tertiary"/> - </xsl:if> + <xsl:call-template name="comment-escape-string"> + <xsl:with-param name="string"> + <xsl:value-of select="primary"/> + <xsl:if test="secondary"> + <xsl:text>, </xsl:text> + <xsl:value-of select="secondary"/> + </xsl:if> + <xsl:if test="tertiary"> + <xsl:text>, </xsl:text> + <xsl:value-of select="tertiary"/> + </xsl:if> + </xsl:with-param> + </xsl:call-template> </xsl:comment> </fo:wrapper> </xsl:template> +<!-- ==================================================================== --> + <xsl:template match="indexentry"> + <fo:block> + <!-- don't process 'seeie's from here --> + <xsl:apply-templates select="primaryie|secondaryie|tertiaryie|seealsoie"/> + </fo:block> +</xsl:template> + +<xsl:template match="primaryie"> + <fo:block> + <xsl:apply-templates/> + <xsl:if test="following-sibling::seeie"> + <xsl:text> (</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'see'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates select="following-sibling::seeie"/> + <xsl:text>)</xsl:text> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="secondaryie"> + <fo:block start-indent="1pc"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::seeie"> + <xsl:text> (</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'see'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates select="following-sibling::seeie"/> + <xsl:text>)</xsl:text> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="tertiaryie"> + <fo:block start-indent="2pc"> + <xsl:apply-templates/> + <xsl:if test="following-sibling::seeie"> + <xsl:text> (</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'see'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates select="following-sibling::seeie"/> + <xsl:text>)</xsl:text> + </xsl:if> + </fo:block> +</xsl:template> + +<xsl:template match="seeie"> + <fo:inline> + <xsl:apply-templates/> + </fo:inline> +</xsl:template> + +<xsl:template match="seealsoie"> + <fo:block> + <xsl:attribute name="start-indent"> + <xsl:choose> + <xsl:when test="preceding-sibling::tertiaryie">3pc</xsl:when> + <xsl:when test="preceding-sibling::secondaryie">2pc</xsl:when> + <xsl:otherwise>1pc</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:text>(</xsl:text> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'seealso'"/> + </xsl:call-template> + <xsl:text> </xsl:text> + <xsl:apply-templates/> + <xsl:text>)</xsl:text> + </fo:block> </xsl:template> </xsl:stylesheet> Index: phpdoc/xsl/docbook/fo/info.xsl diff -u phpdoc/xsl/docbook/fo/info.xsl:1.1 phpdoc/xsl/docbook/fo/info.xsl:1.2 --- phpdoc/xsl/docbook/fo/info.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/info.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: info.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: info.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. Index: phpdoc/xsl/docbook/fo/inline.xsl diff -u phpdoc/xsl/docbook/fo/inline.xsl:1.1 phpdoc/xsl/docbook/fo/inline.xsl:1.2 --- phpdoc/xsl/docbook/fo/inline.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/inline.xsl Sun Mar 9 09:54:48 2003 @@ -6,7 +6,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: inline.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: inline.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -88,7 +88,7 @@ <xsl:param name="content"> <xsl:apply-templates/> </xsl:param> - <fo:inline font-family="{$monospace.font.family}"> + <fo:inline xsl:use-attribute-sets="monospace.properties"> <xsl:copy-of select="$content"/> </fo:inline> </xsl:template> @@ -115,7 +115,7 @@ <xsl:param name="content"> <xsl:apply-templates/> </xsl:param> - <fo:inline font-weight="bold" font-family="{$monospace.font.family}"> + <fo:inline font-weight="bold" xsl:use-attribute-sets="monospace.properties"> <xsl:copy-of select="$content"/> </fo:inline> </xsl:template> @@ -124,7 +124,7 @@ <xsl:param name="content"> <xsl:apply-templates/> </xsl:param> - <fo:inline font-style="italic" font-family="{$monospace.font.family}"> + <fo:inline font-style="italic" xsl:use-attribute-sets="monospace.properties"> <xsl:copy-of select="$content"/> </fo:inline> </xsl:template> @@ -148,6 +148,25 @@ </xsl:template> <!-- ==================================================================== --> +<!-- some special cases --> + +<xsl:template match="author"> + <xsl:call-template name="person.name"/> +</xsl:template> + +<xsl:template match="editor"> + <xsl:call-template name="person.name"/> +</xsl:template> + +<xsl:template match="othercredit"> + <xsl:call-template name="person.name"/> +</xsl:template> + +<xsl:template match="authorinitials"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + +<!-- ==================================================================== --> <xsl:template match="accel"> <xsl:call-template name="inline.charseq"/> @@ -205,6 +224,10 @@ <xsl:call-template name="inline.charseq"/> </xsl:template> +<xsl:template match="errortext"> + <xsl:call-template name="inline.charseq"/> +</xsl:template> + <xsl:template match="envar"> <xsl:call-template name="inline.monoseq"/> </xsl:template> @@ -469,7 +492,9 @@ </xsl:template> <xsl:template match="lineannotation"> - <xsl:call-template name="inline.charseq"/> + <fo:inline font-style="italic"> + <xsl:call-template name="inline.charseq"/> + </fo:inline> </xsl:template> <xsl:template match="superscript"> @@ -591,7 +616,7 @@ </xsl:choose> </xsl:when> <xsl:otherwise> - <xsl:call-template name="inline.charseq"/> + <xsl:call-template name="inline.italicseq"/> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -764,9 +789,11 @@ <xsl:choose> <xsl:when test="name($node)='guimenuitem' or name($node)='guisubmenu'"> - <xsl:text>-></xsl:text> + <xsl:value-of select="$menuchoice.menu.separator"/> </xsl:when> - <xsl:otherwise>+</xsl:otherwise> + <xsl:otherwise> + <xsl:value-of select="$menuchoice.separator"/> + </xsl:otherwise> </xsl:choose> <xsl:apply-templates select="$node"/> <xsl:call-template name="process.menuchoice"> Index: phpdoc/xsl/docbook/fo/keywords.xsl diff -u phpdoc/xsl/docbook/fo/keywords.xsl:1.1 phpdoc/xsl/docbook/fo/keywords.xsl:1.2 --- phpdoc/xsl/docbook/fo/keywords.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/keywords.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: keywords.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: keywords.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. Index: phpdoc/xsl/docbook/fo/lists.xsl diff -u phpdoc/xsl/docbook/fo/lists.xsl:1.1 phpdoc/xsl/docbook/fo/lists.xsl:1.2 --- phpdoc/xsl/docbook/fo/lists.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/lists.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: lists.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: lists.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -16,16 +16,35 @@ <!-- ==================================================================== --> <xsl:template match="itemizedlist"> - <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="label-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'label-width'"/> + </xsl:call-template> + </xsl:variable> <xsl:if test="title"> <xsl:apply-templates select="title" mode="list.title.mode"/> </xsl:if> + <xsl:apply-templates select="*[not(self::listitem or self::title)]"/> + <fo:list-block id="{$id}" xsl:use-attribute-sets="list.block.spacing" - provisional-distance-between-starts="1.5em" provisional-label-separation="0.2em"> - <xsl:apply-templates/> + <xsl:attribute name="provisional-distance-between-starts"> + <xsl:choose> + <xsl:when test="$label-width != ''"> + <xsl:value-of select="$label-width"/> + </xsl:when> + <xsl:otherwise>1.5em</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:apply-templates select="listitem"/> </fo:list-block> </xsl:template> @@ -87,22 +106,39 @@ </xsl:template> <xsl:template match="orderedlist"> - <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:variable name="label-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'label-width'"/> + </xsl:call-template> + </xsl:variable> <xsl:if test="title"> <xsl:apply-templates select="title" mode="list.title.mode"/> </xsl:if> + <xsl:apply-templates select="*[not(self::listitem or self::title)]"/> + <fo:list-block id="{$id}" xsl:use-attribute-sets="list.block.spacing" - provisional-distance-between-starts="2em" provisional-label-separation="0.2em"> - <xsl:apply-templates/> + <xsl:attribute name="provisional-distance-between-starts"> + <xsl:choose> + <xsl:when test="$label-width != ''"> + <xsl:value-of select="$label-width"/> + </xsl:when> + <xsl:otherwise>2em</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:apply-templates select="listitem"/> </fo:list-block> </xsl:template> -<xsl:template match="orderedlist/listitem"> - <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> - +<xsl:template match="orderedlist/listitem" mode="item-number"> <xsl:variable name="numeration"> <xsl:call-template name="list.numeration"> <xsl:with-param name="node" select="parent::orderedlist"/> @@ -127,17 +163,26 @@ </xsl:choose> </xsl:variable> + <xsl:variable name="item-number"> + <xsl:call-template name="orderedlist-item-number"/> + </xsl:variable> + + <xsl:if test="parent::orderedlist/@inheritnum='inherit' + and ancestor::listitem[parent::orderedlist]"> + <xsl:apply-templates select="ancestor::listitem[parent::orderedlist][1]" + mode="item-number"/> + </xsl:if> + + <xsl:number value="$item-number" format="{$type}"/> +</xsl:template> + +<xsl:template match="orderedlist/listitem"> + <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> + <xsl:variable name="item.contents"> <fo:list-item-label end-indent="label-end()"> <fo:block> - <xsl:choose> - <xsl:when test="@override"> - <xsl:number value="@override" format="{$type}"/> - </xsl:when> - <xsl:otherwise> - <xsl:number count="listitem" format="{$type}"/> - </xsl:otherwise> - </xsl:choose> + <xsl:apply-templates select="." mode="item-number"/> </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start()"> @@ -159,14 +204,18 @@ </xsl:choose> </xsl:template> -<xsl:template match="listitem/para[1] - |listitem/simpara[1] - |listitem/formalpara[1] - |callout/para[1] - |callout/simpara[1] - |callout/formalpara[1]" +<xsl:template match="listitem/*[1][local-name()='para' or + local-name()='simpara' or + local-name()='formalpara'] + |step/*[1][local-name()='para' or + local-name()='simpara' or + local-name()='formalpara'] + |callout/*[1][local-name()='para' or + local-name()='simpara' or + local-name()='formalpara']" priority="2"> <fo:block> + <xsl:call-template name="anchor"/> <xsl:apply-templates/> </fo:block> </xsl:template> @@ -275,14 +324,14 @@ <xsl:call-template name="longest.term"> <xsl:with-param name="longest" select="string-length($terms[1])"/> <xsl:with-param name="maxlength" select="$maxlength"/> - <xsl:with-param name="terms" select="terms[position() > 1]"/> + <xsl:with-param name="terms" select="$terms[position() > 1]"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="longest.term"> <xsl:with-param name="longest" select="$longest"/> <xsl:with-param name="maxlength" select="$maxlength"/> - <xsl:with-param name="terms" select="terms[position() > 1]"/> + <xsl:with-param name="terms" select="$terms[position() > 1]"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> @@ -321,7 +370,9 @@ <xsl:template match="varlistentry" mode="vl.as.blocks"> <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> - <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"> + <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing" + keep-together.within-column="always" + keep-with-next.within-column="always"> <xsl:apply-templates select="term"/> </fo:block> @@ -345,17 +396,26 @@ <!-- ==================================================================== --> <xsl:template match="title" mode="list.title.mode"> - <fo:block font-size="12pt" font-weight="bold" - xsl:use-attribute-sets="list.block.spacing"> - <xsl:apply-templates/> - </fo:block> + <xsl:call-template name="formal.object.heading"> + <xsl:with-param name="object" select=".."/> + </xsl:call-template> </xsl:template> <!-- ==================================================================== --> <xsl:template match="simplelist"> <!-- with no type specified, the default is 'vert' --> - <fo:table> + <fo:table xsl:use-attribute-sets="normal.para.spacing"> + <xsl:call-template name="simplelist.table.columns"> + <xsl:with-param name="cols"> + <xsl:choose> + <xsl:when test="@columns"> + <xsl:value-of select="@columns"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> <fo:table-body> <xsl:call-template name="simplelist.vert"> <xsl:with-param name="cols"> @@ -376,7 +436,17 @@ </xsl:template> <xsl:template match="simplelist[@type='horiz']"> - <fo:table> + <fo:table xsl:use-attribute-sets="normal.para.spacing"> + <xsl:call-template name="simplelist.table.columns"> + <xsl:with-param name="cols"> + <xsl:choose> + <xsl:when test="@columns"> + <xsl:value-of select="@columns"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> <fo:table-body> <xsl:call-template name="simplelist.horiz"> <xsl:with-param name="cols"> @@ -393,7 +463,17 @@ </xsl:template> <xsl:template match="simplelist[@type='vert']"> - <fo:table> + <fo:table xsl:use-attribute-sets="normal.para.spacing"> + <xsl:call-template name="simplelist.table.columns"> + <xsl:with-param name="cols"> + <xsl:choose> + <xsl:when test="@columns"> + <xsl:value-of select="@columns"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> <fo:table-body> <xsl:call-template name="simplelist.vert"> <xsl:with-param name="cols"> @@ -409,6 +489,18 @@ </fo:table> </xsl:template> +<xsl:template name="simplelist.table.columns"> + <xsl:param name="cols" select="1"/> + <xsl:param name="curcol" select="1"/> + <fo:table-column column-number="{$curcol}"/> + <xsl:if test="$curcol < $cols"> + <xsl:call-template name="simplelist.table.columns"> + <xsl:with-param name="cols" select="$cols"/> + <xsl:with-param name="curcol" select="$curcol + 1"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + <xsl:template name="simplelist.horiz"> <xsl:param name="cols">1</xsl:param> <xsl:param name="cell">1</xsl:param> @@ -546,16 +638,9 @@ <fo:block id="{$id}" xsl:use-attribute-sets="list.block.spacing"> <xsl:if test="./title and $placement = 'before'"> - <xsl:choose> - <xsl:when test="$formal.procedures != 0"> - <xsl:call-template name="formal.object.heading"/> - </xsl:when> - <xsl:otherwise> - <fo:block font-weight="bold"> - <xsl:apply-templates select="./title" mode="procedure.title.mode"/> - </fo:block> - </xsl:otherwise> - </xsl:choose> + <!-- n.b. gentext code tests for $formal.procedures and may make an "informal" --> + <!-- heading even though we called formal.object.heading. odd but true. --> + <xsl:call-template name="formal.object.heading"/> </xsl:if> <xsl:apply-templates select="$preamble"/> @@ -567,16 +652,9 @@ </fo:list-block> <xsl:if test="./title and $placement != 'before'"> - <xsl:choose> - <xsl:when test="$formal.procedures != 0"> - <xsl:call-template name="formal.object.heading"/> - </xsl:when> - <xsl:otherwise> - <fo:block font-weight="bold"> - <xsl:apply-templates select="./title" mode="procedure.title.mode"/> - </fo:block> - </xsl:otherwise> - </xsl:choose> + <!-- n.b. gentext code tests for $formal.procedures and may make an "informal" --> + <!-- heading even though we called formal.object.heading. odd but true. --> + <xsl:call-template name="formal.object.heading"/> </xsl:if> </fo:block> </xsl:template> @@ -584,10 +662,6 @@ <xsl:template match="procedure/title"> </xsl:template> -<xsl:template match="procedure/title" mode="procedure.title.mode"> - <xsl:apply-templates/> -</xsl:template> - <xsl:template match="substeps"> <fo:list-block xsl:use-attribute-sets="list.block.spacing" provisional-distance-between-starts="2em" @@ -601,9 +675,9 @@ <xsl:call-template name="object.id"/> </xsl:variable> - <fo:list-item> + <fo:list-item xsl:use-attribute-sets="list.item.spacing"> <fo:list-item-label end-indent="label-end()"> - <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"> + <fo:block id="{$id}"> <!-- dwc: fix for one step procedures. Use a bullet if there's no step 2 --> <xsl:choose> <xsl:when test="count(../step) = 1"> @@ -624,7 +698,7 @@ </xsl:template> <xsl:template match="step/title"> - <fo:block font-weight="bold" xsl:use-attribute-sets="list.item.spacing"> + <fo:block font-weight="bold"> <xsl:apply-templates/> </fo:block> </xsl:template> @@ -657,9 +731,7 @@ </xsl:template> <xsl:template match="segmentedlist/title"> - <fo:block font-weight="bold"> - <xsl:apply-templates/> - </fo:block> + <xsl:apply-templates select="." mode="list.title.mode" /> </xsl:template> <xsl:template match="segtitle"> @@ -695,8 +767,10 @@ </xsl:template> <xsl:template match="segmentedlist" mode="seglist-table"> - <xsl:apply-templates select="title" mode="seglist-table"/> + <xsl:apply-templates select="title" mode="list.title.mode" /> <fo:table> + <fo:table-column column-number="1"/> + <fo:table-column column-number="2"/> <fo:table-header> <fo:table-row> <xsl:apply-templates select="segtitle" mode="seglist-table"/> @@ -736,10 +810,8 @@ <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable> <fo:block id="{$id}"> - <xsl:if test="./title"> - <fo:block xsl:use-attribute-sets="formal.title.properties"> - <xsl:apply-templates select="./title" mode="calloutlist.title.mode"/> - </fo:block> + <xsl:if test="title"> + <xsl:apply-templates select="title" mode="list.title.mode"/> </xsl:if> <fo:list-block space-before.optimum="1em" @@ -753,10 +825,6 @@ </xsl:template> <xsl:template match="calloutlist/title"> -</xsl:template> - -<xsl:template match="calloutlist/title" mode="calloutlist.title.mode"> - <xsl:apply-templates/> </xsl:template> <xsl:template match="callout"> Index: phpdoc/xsl/docbook/fo/math.xsl diff -u phpdoc/xsl/docbook/fo/math.xsl:1.1 phpdoc/xsl/docbook/fo/math.xsl:1.2 --- phpdoc/xsl/docbook/fo/math.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/math.xsl Sun Mar 9 09:54:48 2003 @@ -5,7 +5,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: math.xsl,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: math.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -43,8 +43,31 @@ <xsl:template match="equation/mediaobject | informalequation/mediaobject"> <xsl:if test="$passivetex.extensions = 0 or $tex.math.in.alt = ''"> + <xsl:variable name="olist" select="imageobject|imageobjectco + |videoobject|audioobject + |textobject"/> + + <xsl:variable name="object.index"> + <xsl:call-template name="select.mediaobject.index"> + <xsl:with-param name="olist" select="$olist"/> + <xsl:with-param name="count" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="object" select="$olist[position() = $object.index]"/> + + <xsl:variable name="align"> + <xsl:value-of select="$object/imagedata[@align][1]/@align"/> + </xsl:variable> + <fo:block> - <xsl:call-template name="select.mediaobject"/> + <xsl:if test="$align != '' "> + <xsl:attribute name="text-align"> + <xsl:value-of select="$align"/> + </xsl:attribute> + </xsl:if> + + <xsl:apply-templates select="$object"/> <xsl:apply-templates select="caption"/> </fo:block> </xsl:if> Index: phpdoc/xsl/docbook/fo/pagesetup.xsl diff -u phpdoc/xsl/docbook/fo/pagesetup.xsl:1.1 phpdoc/xsl/docbook/fo/pagesetup.xsl:1.2 --- phpdoc/xsl/docbook/fo/pagesetup.xsl:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/pagesetup.xsl Sun Mar 9 09:54:48 2003 @@ -3,48 +3,64 @@ xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> +<!-- ******************************************************************** + $Id: pagesetup.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + and other information. + + ******************************************************************** --> + <!-- ==================================================================== --> <xsl:template name="setup.pagemasters"> <fo:layout-master-set> - <!-- one sided, single column --> + <!-- blank pages --> <fo:simple-page-master master-name="blank" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" - margin-left="{$page.margin.inner}" - margin-right="{$page.margin.outer}"> - <fo:region-body + margin-left="{$page.margin.outer}" + margin-right="{$page.margin.inner}"> + <fo:region-body display-align="center" margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> + margin-top="{$body.margin.top}"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="region-name">blank-body</xsl:attribute> + </xsl:if> + </fo:region-body> <fo:region-before region-name="xsl-region-before-blank" extent="{$region.before.extent}" - display-align="after"/> + display-align="before"/> <fo:region-after region-name="xsl-region-after-blank" extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- one sided, single column --> - <fo:simple-page-master master-name="simple1" + <!-- title pages --> + <fo:simple-page-master master-name="titlepage-first" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> - <fo:region-body - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> - <fo:region-before extent="{$region.before.extent}" - display-align="after"/> - <fo:region-after extent="{$region.after.extent}" + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.titlepage}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- one sided, single column, draft mode --> - <fo:simple-page-master master-name="draft1" + <fo:simple-page-master master-name="titlepage-odd" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" @@ -52,83 +68,115 @@ margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> <fo:region-body margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"> - <xsl:if test="$draft.watermark.image != '' - and $fop.extensions = 0"> - <xsl:attribute name="background-image"> - <xsl:value-of select="$draft.watermark.image"/> - </xsl:attribute> - <xsl:attribute name="background-attachment">fixed</xsl:attribute> - <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> - <xsl:attribute name="background-position-horizontal">center</xsl:attribute> - <xsl:attribute name="background-position-vertical">center</xsl:attribute> - </xsl:if> + margin-top="{$body.margin.top}" + column-count="{$column.count.titlepage}"> </fo:region-body> - <fo:region-before extent="{$region.before.extent}" - display-align="after"/> - <fo:region-after extent="{$region.after.extent}" + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- for left-hand/even pages in twosided mode, single column --> - <fo:simple-page-master master-name="left1" + <fo:simple-page-master master-name="titlepage-even" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" - margin-left="{$page.margin.outer}" - margin-right="{$page.margin.inner}"> - <fo:region-body - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> - <fo:region-before region-name="xsl-region-before-left" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.titlepage}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" display-align="after"/> - <fo:region-after region-name="xsl-region-after-left" + </fo:simple-page-master> + + <!-- list-of-title pages --> + <fo:simple-page-master master-name="lot-first" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.lot}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- for right-hand/odd pages in twosided mode, single column --> - <fo:simple-page-master master-name="right1" + <fo:simple-page-master master-name="lot-odd" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> - <fo:region-body - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> - <fo:region-before region-name="xsl-region-before-right" + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.lot}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" display-align="after"/> - <fo:region-after region-name="xsl-region-after-right" + </fo:simple-page-master> + + <fo:simple-page-master master-name="lot-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.lot}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- special case of first page in either mode, single column --> - <fo:simple-page-master master-name="first1" + <!-- frontmatter pages --> + <fo:simple-page-master master-name="front-first" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> - <fo:region-body - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.front}"> + </fo:region-body> <fo:region-before region-name="xsl-region-before-first" extent="{$region.before.extent}" - display-align="after"/> + display-align="before"/> <fo:region-after region-name="xsl-region-after-first" extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- for pages in one-side mode, 2 column --> - <fo:simple-page-master master-name="simple2" + <fo:simple-page-master master-name="front-odd" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" @@ -136,149 +184,977 @@ margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> <fo:region-body margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"> - <xsl:attribute name="column-count"> - <!-- FIXME: how bad is this hack? If the overall column.count is 1, - use 2 here. Otherwise, use whatever is specified. This allows - some pages to be 2 column and others to be 1 column. Perhaps - this should always be 2 and if you want a 3 column page, you should - make a new pagemaster? Or maybe if you want to mix single and multi- - column pages, you should write another pagemaster for the ones - you want to be two column... --> - <xsl:choose> - <xsl:when test="$column.count < 2">2</xsl:when> - <xsl:otherwise> - <xsl:value-of select="$column.count"/> - </xsl:otherwise> - </xsl:choose> - </xsl:attribute> + margin-top="{$body.margin.top}" + column-count="{$column.count.front}"> </fo:region-body> - - <fo:region-before extent="{$region.before.extent}" - display-align="after"/> - <fo:region-after extent="{$region.after.extent}" + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- for left-hand/even pages in twosided mode, 2 column --> - <fo:simple-page-master master-name="left2" + <fo:simple-page-master master-name="front-even" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" - margin-left="{$page.margin.outer}" - margin-right="{$page.margin.inner}"> - <fo:region-body - column-count="{$column.count}" - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> - <fo:region-before region-name="xsl-region-before-left" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.front}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" extent="{$region.before.extent}" - display-align="after"/> - <fo:region-after region-name="xsl-region-after-left" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" extent="{$region.after.extent}" display-align="after"/> </fo:simple-page-master> - <!-- for right-hand/odd pages in twosided mode, 2 column --> - <fo:simple-page-master master-name="right2" + <!-- body pages --> + <fo:simple-page-master master-name="body-first" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> - <fo:region-body - column-count="{$column.count}" - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> - <fo:region-before region-name="xsl-region-before-right" + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.body}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" extent="{$region.before.extent}" - display-align="after"/> - <fo:region-after region-name="xsl-region-after-right" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" extent="{$region.after.extent}" - display-align="after"/> + display-align="after"/> </fo:simple-page-master> - <!-- special case of first page in either mode --> - <fo:simple-page-master master-name="first2" + <fo:simple-page-master master-name="body-odd" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$page.margin.inner}" margin-right="{$page.margin.outer}"> - <fo:region-body - column-count="1" - margin-bottom="{$body.margin.bottom}" - margin-top="{$body.margin.top}"/> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.body}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="body-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.body}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- backmatter pages --> + <fo:simple-page-master master-name="back-first" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.back}"> + </fo:region-body> <fo:region-before region-name="xsl-region-before-first" extent="{$region.before.extent}" - display-align="after"/> + display-align="before"/> <fo:region-after region-name="xsl-region-after-first" extent="{$region.after.extent}" - display-align="after"/> + display-align="after"/> </fo:simple-page-master> - <!-- setup for title-page, 1 column --> - <fo:page-sequence-master master-name="titlepage1"> - <fo:repeatable-page-master-alternatives> - <fo:conditional-page-master-reference master-reference="first1"/> - </fo:repeatable-page-master-alternatives> - </fo:page-sequence-master> + <fo:simple-page-master master-name="back-odd" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.back}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="back-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.back}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- index pages --> + <fo:simple-page-master master-name="index-first" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.index}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="index-odd" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.index}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="index-even" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.index}"> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> - <!-- setup for single-sided, 1 column --> - <fo:page-sequence-master master-name="oneside1"> + <xsl:if test="$draft.mode != 'no'"> + <!-- draft blank pages --> + <fo:simple-page-master master-name="blank-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.outer}" + margin-right="{$page.margin.inner}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-blank" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-blank" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft title pages --> + <fo:simple-page-master master-name="titlepage-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.titlepage}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="titlepage-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.titlepage}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="titlepage-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.titlepage}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft list-of-title pages --> + <fo:simple-page-master master-name="lot-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.lot}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="lot-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.lot}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="lot-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.lot}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft frontmatter pages --> + <fo:simple-page-master master-name="front-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.front}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="front-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.front}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="front-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.front}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft body pages --> + <fo:simple-page-master master-name="body-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.body}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="body-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.body}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="body-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.body}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft backmatter pages --> + <fo:simple-page-master master-name="back-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.back}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="back-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.back}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="back-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.back}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <!-- draft index pages --> + <fo:simple-page-master master-name="index-first-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.index}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-first" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-first" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="index-odd-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-left="{$page.margin.inner}" + margin-right="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.index}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-odd" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-odd" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + + <fo:simple-page-master master-name="index-even-draft" + page-width="{$page.width}" + page-height="{$page.height}" + margin-top="{$page.margin.top}" + margin-bottom="{$page.margin.bottom}" + margin-right="{$page.margin.inner}" + margin-left="{$page.margin.outer}"> + <fo:region-body margin-bottom="{$body.margin.bottom}" + margin-top="{$body.margin.top}" + column-count="{$column.count.index}"> + <xsl:if test="$draft.watermark.image != '' + and $fop.extensions = 0"> + <xsl:attribute name="background-image"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="$draft.watermark.image"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="background-attachment">fixed</xsl:attribute> + <xsl:attribute name="background-repeat">no-repeat</xsl:attribute> + <xsl:attribute name="background-position-horizontal">center</xsl:attribute> + <xsl:attribute name="background-position-vertical">center</xsl:attribute> + </xsl:if> + </fo:region-body> + <fo:region-before region-name="xsl-region-before-even" + extent="{$region.before.extent}" + display-align="before"/> + <fo:region-after region-name="xsl-region-after-even" + extent="{$region.after.extent}" + display-align="after"/> + </fo:simple-page-master> + </xsl:if> + + <!-- setup for title page(s) --> + <fo:page-sequence-master master-name="titlepage"> <fo:repeatable-page-master-alternatives> - <fo:conditional-page-master-reference master-reference="simple1"/> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="titlepage-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="titlepage-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="titlepage-even" + odd-or-even="even"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> - <!-- setup for single-sided, 1 column --> - <fo:page-sequence-master master-name="onesidedraft1"> + <!-- setup for lots --> + <fo:page-sequence-master master-name="lot"> <fo:repeatable-page-master-alternatives> - <fo:conditional-page-master-reference master-reference="draft1"/> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="lot-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="lot-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="lot-even" + odd-or-even="even"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> - <!-- setup for double-sided, 1 column --> - <fo:page-sequence-master master-name="twoside1"> + <!-- setup front matter --> + <fo:page-sequence-master master-name="front"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/> - <fo:conditional-page-master-reference master-reference="right1" + <fo:conditional-page-master-reference master-reference="front-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="front-odd" odd-or-even="odd"/> - <fo:conditional-page-master-reference master-reference="left1" + <fo:conditional-page-master-reference master-reference="front-even" odd-or-even="even"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> - <!-- setup for title-page, 2 column --> - <fo:page-sequence-master master-name="titlepage2"> + <!-- setup for body pages --> + <fo:page-sequence-master master-name="body"> <fo:repeatable-page-master-alternatives> - <fo:conditional-page-master-reference master-reference="first2"/> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="body-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="body-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="body-even" + odd-or-even="even"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> - <!-- setup for single-sided, 2 column --> - <fo:page-sequence-master master-name="oneside2"> + <!-- setup back matter --> + <fo:page-sequence-master master-name="back"> <fo:repeatable-page-master-alternatives> - <fo:conditional-page-master-reference master-reference="simple2"/> + <fo:conditional-page-master-reference master-reference="blank" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="back-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="back-odd" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="back-even" + odd-or-even="even"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> - <!-- setup for double-sided, 2 column --> - <fo:page-sequence-master master-name="twoside2"> + <!-- setup back matter --> + <fo:page-sequence-master master-name="index"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/> - <fo:conditional-page-master-reference master-reference="right2" + <fo:conditional-page-master-reference master-reference="index-first" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="index-odd" odd-or-even="odd"/> - <fo:conditional-page-master-reference master-reference="left2" + <fo:conditional-page-master-reference master-reference="index-even" odd-or-even="even"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> + <xsl:if test="$draft.mode != 'no'"> + <!-- setup for draft title page(s) --> + <fo:page-sequence-master master-name="titlepage-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="titlepage-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="titlepage-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="titlepage-even-draft" + odd-or-even="even"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup for draft lots --> + <fo:page-sequence-master master-name="lot-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="lot-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="lot-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="lot-even-draft" + odd-or-even="even"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup draft front matter --> + <fo:page-sequence-master master-name="front-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="front-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="front-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="front-even-draft" + odd-or-even="even"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup for draft body pages --> + <fo:page-sequence-master master-name="body-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="body-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="body-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="body-even-draft" + odd-or-even="even"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup draft back matter --> + <fo:page-sequence-master master-name="back-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="back-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="back-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="back-even-draft" + odd-or-even="even"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + + <!-- setup draft index pages --> + <fo:page-sequence-master master-name="index-draft"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="blank-draft" + blank-or-not-blank="blank"/> + <fo:conditional-page-master-reference master-reference="index-first-draft" + page-position="first"/> + <fo:conditional-page-master-reference master-reference="index-odd-draft" + odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="index-even-draft" + odd-or-even="even"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + </xsl:if> + <xsl:call-template name="user.pagemasters"/> </fo:layout-master-set> @@ -290,231 +1166,532 @@ <!-- ==================================================================== --> -<!-- $double.sided, $column.count, and context --> - <xsl:template name="select.pagemaster"> <xsl:param name="element" select="local-name(.)"/> - <!-- column.count is a param so it can be selected dynamically; see index.xsl --> - <xsl:param name="column.count" select="$column.count"/> + <xsl:param name="pageclass" select="''"/> - <xsl:choose> - <xsl:when test="$double.sided != 0"> - <xsl:choose> - <xsl:when test="$column.count > 1"> - <xsl:call-template name="select.doublesided.multicolumn.pagemaster"> - <xsl:with-param name="element" select="$element"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:call-template name="select.doublesided.pagemaster"> - <xsl:with-param name="element" select="$element"/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </xsl:when> - <xsl:otherwise> - <xsl:choose> - <xsl:when test="$column.count > 1"> - <xsl:call-template name="select.singlesided.multicolumn.pagemaster"> - <xsl:with-param name="element" select="$element"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:call-template name="select.singlesided.pagemaster"> - <xsl:with-param name="element" select="$element"/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </xsl:otherwise> - </xsl:choose> -</xsl:template> + <xsl:variable name="pagemaster"> + <xsl:choose> + <xsl:when test="$pageclass != ''"> + <xsl:value-of select="$pageclass"/> + </xsl:when> + <xsl:when test="$pageclass = 'lot'">lot</xsl:when> + <xsl:when test="$element = 'dedication'">front</xsl:when> + <xsl:when test="$element = 'preface'">front</xsl:when> + <xsl:when test="$element = 'appendix'">back</xsl:when> + <xsl:when test="$element = 'glossary'">back</xsl:when> + <xsl:when test="$element = 'bibliography'">back</xsl:when> + <xsl:when test="$element = 'index'">index</xsl:when> + <xsl:when test="$element = 'colophon'">back</xsl:when> + <xsl:otherwise>body</xsl:otherwise> + </xsl:choose> + + <xsl:choose> + <xsl:when test="$draft.mode = 'yes'"> + <xsl:text>-draft</xsl:text> + </xsl:when> + <xsl:when test="$draft.mode = 'no'"> + <!-- nop --> + </xsl:when> + <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'"> + <xsl:text>-draft</xsl:text> + </xsl:when> + <xsl:otherwise> + <!-- nop --> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> -<xsl:template name="select.doublesided.multicolumn.pagemaster"> - <xsl:param name="element" select="local-name(.)"/> - <xsl:choose> - <xsl:when test="$element='set' or $element='book' or $element='part'"> - <xsl:text>titlepage2</xsl:text> - </xsl:when> - <xsl:otherwise>twoside2</xsl:otherwise> - </xsl:choose> + <xsl:call-template name="select.user.pagemaster"> + <xsl:with-param name="element" select="$element"/> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="default-pagemaster" select="$pagemaster"/> + </xsl:call-template> </xsl:template> -<xsl:template name="select.doublesided.pagemaster"> - <xsl:param name="element" select="local-name(.)"/> - <xsl:choose> - <xsl:when test="$element='set' or $element='book' or $element='part'"> - <xsl:text>titlepage1</xsl:text> - </xsl:when> - <xsl:otherwise>twoside1</xsl:otherwise> - </xsl:choose> +<xsl:template name="select.user.pagemaster"> + <xsl:param name="element"/> + <xsl:param name="pageclass"/> + <xsl:param name="default-pagemaster"/> + + <!-- by default, return the default. But if you've created your own + pagemasters in user.pagemasters, you might want to select one here. --> + <xsl:value-of select="$default-pagemaster"/> </xsl:template> -<xsl:template name="select.singlesided.multicolumn.pagemaster"> - <xsl:param name="element" select="local-name(.)"/> - <xsl:choose> - <xsl:when test="$element='set' or $element='book' or $element='part'"> - <xsl:text>titlepage2</xsl:text> - </xsl:when> - <xsl:otherwise>oneside2</xsl:otherwise> - </xsl:choose> +<!-- ==================================================================== --> + +<xsl:template name="head.sep.rule"> + <xsl:if test="$header.rule != 0"> + <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute> + <xsl:attribute name="border-bottom-style">solid</xsl:attribute> + <xsl:attribute name="border-bottom-color">black</xsl:attribute> + </xsl:if> </xsl:template> -<xsl:template name="select.singlesided.pagemaster"> - <xsl:param name="element" select="local-name(.)"/> - <xsl:choose> - <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'"> - <xsl:text>onesidedraft1</xsl:text> - </xsl:when> - <xsl:when test="$element='set' or $element='book' or $element='part'"> - <xsl:text>titlepage1</xsl:text> - </xsl:when> - <xsl:otherwise>oneside1</xsl:otherwise> - </xsl:choose> +<xsl:template name="foot.sep.rule"> + <xsl:if test="$footer.rule != 0"> + <xsl:attribute name="border-top-width">0.5pt</xsl:attribute> + <xsl:attribute name="border-top-style">solid</xsl:attribute> + <xsl:attribute name="border-top-color">black</xsl:attribute> + </xsl:if> </xsl:template> <!-- ==================================================================== --> <xsl:template match="*" mode="running.head.mode"> <xsl:param name="master-reference" select="'unknown'"/> - <!-- by default, nothing --> + <xsl:param name="gentext-key" select="name(.)"/> + + <!-- remove -draft from reference --> + <xsl:variable name="pageclass"> + <xsl:choose> + <xsl:when test="contains($master-reference, '-draft')"> + <xsl:value-of select="substring-before($master-reference, '-draft')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$master-reference"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <fo:static-content flow-name="xsl-region-before-first"> + <fo:block xsl:use-attribute-sets="header.content.properties"> + <xsl:call-template name="header.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'first'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-before-odd"> + <fo:block xsl:use-attribute-sets="header.content.properties"> + <xsl:call-template name="header.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'odd'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-before-even"> + <fo:block xsl:use-attribute-sets="header.content.properties"> + <xsl:call-template name="header.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'even'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-before-blank"> + <fo:block xsl:use-attribute-sets="header.content.properties"> + <xsl:call-template name="header.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'blank'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <xsl:if test="$fop.extensions = 0"> + <xsl:call-template name="footnote-separator"/> + <xsl:call-template name="blank.page.content"/> + </xsl:if> +</xsl:template> + +<xsl:template name="footnote-separator"> + <fo:static-content flow-name="xsl-footnote-separator"> + <fo:block> + <fo:leader color="black" leader-pattern="rule" leader-length="1in"/> + </fo:block> + </fo:static-content> +</xsl:template> + +<xsl:template name="blank.page.content"> + <fo:static-content flow-name="blank-body"> + <fo:block text-align="center"/> + </fo:static-content> +</xsl:template> + +<xsl:template name="header.table"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="gentext-key" select="''"/> + + <!-- default is a single table style for all headers --> + <!-- Customize it for different page classes or sequence location --> + + <xsl:variable name="candidate"> + <fo:table table-layout="fixed" width="100%"> + <xsl:call-template name="head.sep.rule"/> + <fo:table-column column-number="1" column-width="proportional-column-width(1)"/> + <fo:table-column column-number="2" column-width="proportional-column-width(1)"/> + <fo:table-column column-number="3" column-width="proportional-column-width(1)"/> + <fo:table-body> + <fo:table-row height="14pt"> + <fo:table-cell text-align="left" + display-align="before"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="header.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'left'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="center" + display-align="before"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="header.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'center'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="right" + display-align="before"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="header.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'right'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </xsl:variable> + + <!-- Really output a header? --> <xsl:choose> - <xsl:when test="$master-reference='titlepage1'"> - </xsl:when> - <xsl:when test="$master-reference='oneside1'"> - </xsl:when> - <xsl:when test="$master-reference='twoside1'"> - </xsl:when> - <xsl:when test="$master-reference='titlepage2'"> - </xsl:when> - <xsl:when test="$master-reference='oneside2'"> + <xsl:when test="$pageclass = 'titlepage' and $gentext-key = 'book' + and $sequence='first'"> + <!-- no, book titlepages have no headers at all --> </xsl:when> - <xsl:when test="$master-reference='twoside2'"> + <xsl:when test="$sequence = 'blank' and $headers.on.blank.pages = 0"> + <!-- no output --> </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$candidate"/> + </xsl:otherwise> </xsl:choose> </xsl:template> -<xsl:template match="chapter|appendix" mode="running.head.mode"> - <xsl:param name="master-reference" select="'unknown'"/> - <xsl:variable name="head"> - <fo:block font-size="{$body.font.size}"> - <xsl:apply-templates select="." mode="object.title.markup"/> - </fo:block> - </xsl:variable> +<xsl:template name="header.content"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="position" select="''"/> + <xsl:param name="gentext-key" select="''"/> + +<!-- + <fo:block> + <xsl:value-of select="$pageclass"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$sequence"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$position"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$gentext-key"/> + </fo:block> +--> + + <fo:block> + + <!-- sequence can be odd, even, first, blank --> + <!-- position can be left, center, right --> + <xsl:choose> + <xsl:when test="$sequence = 'blank'"> + <!-- nothing --> + </xsl:when> + + <xsl:when test="$position='left'"> + <!-- Same for odd, even, empty, and blank sequences --> + <xsl:call-template name="draft.text"/> + </xsl:when> + + <xsl:when test="($sequence='odd' or $sequence='even') and $position='center'"> + <xsl:if test="$pageclass != 'titlepage'"> + <xsl:choose> + <xsl:when test="ancestor::book and ($double.sided != 0)"> + <fo:retrieve-marker retrieve-class-name="section.head.marker" + retrieve-position="first-including-carryover" + retrieve-boundary="page-sequence"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="." mode="titleabbrev.markup"/> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </xsl:when> + + <xsl:when test="$position='center'"> + <!-- nothing for empty and blank sequences --> + </xsl:when> + + <xsl:when test="$position='right'"> + <!-- Same for odd, even, empty, and blank sequences --> + <xsl:call-template name="draft.text"/> + </xsl:when> + + <xsl:when test="$sequence = 'first'"> + <!-- nothing for first pages --> + </xsl:when> + + <xsl:when test="$sequence = 'blank'"> + <!-- nothing for blank pages --> + </xsl:when> + </xsl:choose> + </fo:block> +</xsl:template> +<xsl:template name="draft.text"> <xsl:choose> - <xsl:when test="$master-reference='titlepage1'"></xsl:when> - <xsl:when test="$master-reference='oneside1'"> - <fo:static-content flow-name="xsl-region-before"> - <fo:block text-align="center"> - <xsl:copy-of select="$head"/> - </fo:block> - </fo:static-content> + <xsl:when test="$draft.mode = 'yes'"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Draft'"/> + </xsl:call-template> </xsl:when> - <xsl:when test="$master-reference='twoside1'"> - <fo:static-content flow-name="xsl-region-before-left"> - <fo:block text-align="right"> - <xsl:copy-of select="$head"/> - </fo:block> - </fo:static-content> - <fo:static-content flow-name="xsl-region-before-right"> - <fo:block text-align="left"> - <xsl:copy-of select="$head"/> - </fo:block> - </fo:static-content> + <xsl:when test="$draft.mode = 'no'"> + <!-- nop --> </xsl:when> - <xsl:when test="$master-reference='titlepage2'"></xsl:when> - <xsl:when test="$master-reference='oneside2'"> - <fo:static-content flow-name="xsl-region-before"> - <fo:block text-align="center"> - <xsl:copy-of select="$head"/> - </fo:block> - </fo:static-content> - </xsl:when> - <xsl:when test="$master-reference='twoside2'"> - <fo:static-content flow-name="xsl-region-before-left"> - <fo:block text-align="right"> - <xsl:copy-of select="$head"/> - </fo:block> - </fo:static-content> - <fo:static-content flow-name="xsl-region-before-right"> - <fo:block text-align="left"> - <xsl:copy-of select="$head"/> - </fo:block> - </fo:static-content> + <xsl:when test="ancestor-or-self::*[@status][1]/@status = 'draft'"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Draft'"/> + </xsl:call-template> </xsl:when> <xsl:otherwise> - <xsl:message> - <xsl:text>Unexpected master-reference (</xsl:text> - <xsl:value-of select="$master-reference"/> - <xsl:text>) in running.head.mode for </xsl:text> - <xsl:value-of select="name(.)"/> - <xsl:text>. No header generated.</xsl:text> - </xsl:message> + <!-- nop --> </xsl:otherwise> </xsl:choose> </xsl:template> +<!-- ==================================================================== --> + <xsl:template match="*" mode="running.foot.mode"> <xsl:param name="master-reference" select="'unknown'"/> - <xsl:variable name="foot"> - <fo:page-number/> + <xsl:param name="gentext-key" select="name(.)"/> + + <!-- remove -draft from reference --> + <xsl:variable name="pageclass"> + <xsl:choose> + <xsl:when test="contains($master-reference, '-draft')"> + <xsl:value-of select="substring-before($master-reference, '-draft')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$master-reference"/> + </xsl:otherwise> + </xsl:choose> </xsl:variable> - <!-- by default, the page number --> + + <fo:static-content flow-name="xsl-region-after-first"> + <fo:block xsl:use-attribute-sets="footer.content.properties"> + <xsl:call-template name="footer.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'first'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-after-odd"> + <fo:block xsl:use-attribute-sets="footer.content.properties"> + <xsl:call-template name="footer.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'odd'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-after-even"> + <fo:block xsl:use-attribute-sets="footer.content.properties"> + <xsl:call-template name="footer.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'even'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> + + <fo:static-content flow-name="xsl-region-after-blank"> + <fo:block xsl:use-attribute-sets="footer.content.properties"> + <xsl:call-template name="footer.table"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="'blank'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:static-content> +</xsl:template> + +<xsl:template name="footer.table"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="gentext-key" select="''"/> + + <!-- default is a single table style for all footers --> + <!-- Customize it for different page classes or sequence location --> + + <xsl:variable name="candidate"> + <fo:table table-layout="fixed" width="100%"> + <xsl:call-template name="foot.sep.rule"/> + <fo:table-column column-number="1" column-width="proportional-column-width(1)"/> + <fo:table-column column-number="2" column-width="proportional-column-width(1)"/> + <fo:table-column column-number="3" column-width="proportional-column-width(1)"/> + <fo:table-body> + <fo:table-row height="14pt"> + <fo:table-cell text-align="left" + display-align="after"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="footer.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'left'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="center" + display-align="after"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="footer.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'center'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + <fo:table-cell text-align="right" + display-align="after"> + <xsl:if test="$fop.extensions = 0"> + <xsl:attribute name="relative-align">baseline</xsl:attribute> + </xsl:if> + <fo:block> + <xsl:call-template name="footer.content"> + <xsl:with-param name="pageclass" select="$pageclass"/> + <xsl:with-param name="sequence" select="$sequence"/> + <xsl:with-param name="position" select="'right'"/> + <xsl:with-param name="gentext-key" select="$gentext-key"/> + </xsl:call-template> + </fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </xsl:variable> + + <!-- Really output a footer? --> <xsl:choose> - <xsl:when test="$master-reference='titlepage1'"></xsl:when> - <xsl:when test="$master-reference='oneside1'"> - <fo:static-content flow-name="xsl-region-after"> - <fo:block text-align="center" font-size="{$body.font.size}"> - <xsl:copy-of select="$foot"/> - </fo:block> - </fo:static-content> - </xsl:when> - <xsl:when test="$master-reference='twoside1'"> - <fo:static-content flow-name="xsl-region-after-left"> - <fo:block text-align="left" font-size="{$body.font.size}"> - <xsl:copy-of select="$foot"/> - </fo:block> - </fo:static-content> - <fo:static-content flow-name="xsl-region-after-right"> - <fo:block text-align="right" font-size="{$body.font.size}"> - <xsl:copy-of select="$foot"/> - </fo:block> - </fo:static-content> + <xsl:when test="$pageclass='titlepage' and $gentext-key='book' + and $sequence='first'"> + <!-- no, book titlepages have no footers at all --> </xsl:when> - <xsl:when test="$master-reference='titlepage2'"></xsl:when> - <xsl:when test="$master-reference='oneside2'"> - <fo:static-content flow-name="xsl-after-before"> - <fo:block text-align="center" font-size="{$body.font.size}"> - <xsl:copy-of select="$foot"/> - </fo:block> - </fo:static-content> - </xsl:when> - <xsl:when test="$master-reference='twoside2'"> - <fo:static-content flow-name="xsl-region-after-left"> - <fo:block text-align="left" font-size="{$body.font.size}"> - <xsl:copy-of select="$foot"/> - </fo:block> - </fo:static-content> - <fo:static-content flow-name="xsl-region-after-right"> - <fo:block text-align="right" font-size="{$body.font.size}"> - <xsl:copy-of select="$foot"/> - </fo:block> - </fo:static-content> + <xsl:when test="$sequence = 'blank' and $footers.on.blank.pages = 0"> + <!-- no output --> </xsl:when> <xsl:otherwise> - <xsl:message> - <xsl:text>Unexpected master-reference (</xsl:text> - <xsl:value-of select="$master-reference"/> - <xsl:text>) in running.foot.mode for </xsl:text> - <xsl:value-of select="name(.)"/> - <xsl:text>. No footer generated.</xsl:text> - </xsl:message> + <xsl:copy-of select="$candidate"/> </xsl:otherwise> </xsl:choose> </xsl:template> -<xsl:template match="set|book|part|reference" mode="running.foot.mode"> - <!-- nothing --> +<xsl:template name="footer.content"> + <xsl:param name="pageclass" select="''"/> + <xsl:param name="sequence" select="''"/> + <xsl:param name="position" select="''"/> + <xsl:param name="gentext-key" select="''"/> + +<!-- + <fo:block> + <xsl:value-of select="$pageclass"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$sequence"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$position"/> + <xsl:text>, </xsl:text> + <xsl:value-of select="$gentext-key"/> + </fo:block> +--> + + <fo:block> + <!-- pageclass can be front, body, back --> + <!-- sequence can be odd, even, first, blank --> + <!-- position can be left, center, right --> + <xsl:choose> + <xsl:when test="$pageclass = 'titlepage'"> + <!-- nop; no footer on title pages --> + </xsl:when> + + <xsl:when test="$double.sided != 0 and $sequence = 'even' + and $position='left'"> + <fo:page-number/> + </xsl:when> + + <xsl:when test="$double.sided != 0 and ($sequence = 'odd' or $sequence = 'first') + and $position='right'"> + <fo:page-number/> + </xsl:when> + + <xsl:when test="$double.sided = 0 and $position='center'"> + <fo:page-number/> + </xsl:when> + + <xsl:when test="$sequence='blank'"> + <xsl:choose> + <xsl:when test="$double.sided != 0 and $position = 'left'"> + <fo:page-number/> + </xsl:when> + <xsl:when test="$double.sided = 0 and $position = 'center'"> + <fo:page-number/> + </xsl:when> + <xsl:otherwise> + <!-- nop --> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + + <xsl:otherwise> + <!-- nop --> + </xsl:otherwise> + </xsl:choose> + </fo:block> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template name="page.number.format"> + <xsl:param name="element" select="local-name(.)"/> + + <xsl:choose> + <xsl:when test="$element = 'toc'">i</xsl:when> + <xsl:when test="$element = 'preface'">i</xsl:when> + <xsl:when test="$element = 'dedication'">i</xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> </xsl:template> <!-- ==================================================================== --> Index: phpdoc/xsl/docbook/fo/param.ent diff -u phpdoc/xsl/docbook/fo/param.ent:1.1 phpdoc/xsl/docbook/fo/param.ent:1.2 --- phpdoc/xsl/docbook/fo/param.ent:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/param.ent Sun Mar 9 09:54:48 2003 @@ -27,16 +27,24 @@ <!ENTITY callout.unicode.start.character SYSTEM "../params/callout.unicode.start.character.xml"> <!ENTITY callouts.extension SYSTEM "../params/callouts.extension.xml"> <!ENTITY chapter.autolabel SYSTEM "../params/chapter.autolabel.xml"> -<!ENTITY column.count SYSTEM "../params/column.count.xml"> -<!ENTITY column.count.of.index SYSTEM "../params/column.count.of.index.xml"> +<!ENTITY column.count.back SYSTEM "../params/column.count.back.xml"> +<!ENTITY column.count.body SYSTEM "../params/column.count.body.xml"> +<!ENTITY column.count.front SYSTEM "../params/column.count.front.xml"> +<!ENTITY column.count.index SYSTEM "../params/column.count.index.xml"> +<!ENTITY column.count.lot SYSTEM "../params/column.count.lot.xml"> +<!ENTITY column.count.titlepage SYSTEM "../params/column.count.titlepage.xml"> <!ENTITY compact.list.item.spacing SYSTEM "../params/compact.list.item.spacing.xml"> <!ENTITY component.title.properties SYSTEM "../params/component.title.properties.xml"> +<!ENTITY current.docid SYSTEM "../params/current.docid.xml"> <!ENTITY default.table.width SYSTEM "../params/default.table.width.xml"> <!ENTITY default.units SYSTEM "../params/default.units.xml"> <!ENTITY dingbat.font.family SYSTEM "../params/dingbat.font.family.xml"> <!ENTITY double.sided SYSTEM "../params/double.sided.xml"> +<!ENTITY draft.mode SYSTEM "../params/draft.mode.xml"> <!ENTITY draft.watermark.image SYSTEM "../params/draft.watermark.image.xml"> <!ENTITY firstterm.only.link SYSTEM "../params/firstterm.only.link.xml"> +<!ENTITY footer.rule SYSTEM "../params/footer.rule.xml"> +<!ENTITY footers.on.blank.pages SYSTEM "../params/footers.on.blank.pages.xml"> <!ENTITY footnote.font.size SYSTEM "../params/footnote.font.size.xml"> <!ENTITY fop.extensions SYSTEM "../params/fop.extensions.xml"> <!ENTITY formal.object.properties SYSTEM "../params/formal.object.properties.xml"> @@ -48,9 +56,15 @@ <!ENTITY function.parens SYSTEM "../params/function.parens.xml"> <!ENTITY generate.index SYSTEM "../params/generate.index.xml"> <!ENTITY generate.toc SYSTEM "../params/generate.toc.xml"> +<!ENTITY glossary.as.blocks SYSTEM "../params/glossary.as.blocks.xml"> <!ENTITY glossary.collection SYSTEM "../params/glossary.collection.xml"> +<!ENTITY glosslist.as.blocks SYSTEM "../params/glosslist.as.blocks.xml"> <!ENTITY glossterm.auto.link SYSTEM "../params/glossterm.auto.link.xml"> +<!ENTITY glossterm.separation SYSTEM "../params/glossterm.separation.xml"> +<!ENTITY glossterm.width SYSTEM "../params/glossterm.width.xml"> <!ENTITY graphic.default.extension SYSTEM "../params/graphic.default.extension.xml"> +<!ENTITY header.rule SYSTEM "../params/header.rule.xml"> +<!ENTITY headers.on.blank.pages SYSTEM "../params/headers.on.blank.pages.xml"> <!ENTITY hyphenate SYSTEM "../params/hyphenate.xml"> <!ENTITY informal.object.properties SYSTEM "../params/informal.object.properties.xml"> <!ENTITY insert.xref.page.number SYSTEM "../params/insert.xref.page.number.xml"> @@ -68,6 +82,7 @@ <!ENTITY monospace.verbatim.properties SYSTEM "../params/monospace.verbatim.properties.xml"> <!ENTITY nominal.table.width SYSTEM "../params/nominal.table.width.xml"> <!ENTITY normal.para.spacing SYSTEM "../params/normal.para.spacing.xml"> +<!ENTITY olink.doctitle SYSTEM "../params/olink.doctitle.xml"> <!ENTITY page.height SYSTEM "../params/page.height.xml"> <!ENTITY page.height.portrait SYSTEM "../params/page.height.portrait.xml"> <!ENTITY page.margin.bottom SYSTEM "../params/page.margin.bottom.xml"> @@ -81,9 +96,11 @@ <!ENTITY part.autolabel SYSTEM "../params/part.autolabel.xml"> <!ENTITY passivetex.extensions SYSTEM "../params/passivetex.extensions.xml"> <!ENTITY preface.autolabel SYSTEM "../params/preface.autolabel.xml"> +<!ENTITY preferred.mediaobject.role SYSTEM "../params/preferred.mediaobject.role.xml"> <!ENTITY process.empty.source.toc SYSTEM "../params/process.empty.source.toc.xml"> <!ENTITY process.source.toc SYSTEM "../params/process.source.toc.xml"> <!ENTITY profile.arch SYSTEM "../params/profile.arch.xml"> +<!ENTITY profile.attribute SYSTEM "../params/profile.attribute.xml"> <!ENTITY profile.condition SYSTEM "../params/profile.condition.xml"> <!ENTITY profile.conformance SYSTEM "../params/profile.conformance.xml"> <!ENTITY profile.lang SYSTEM "../params/profile.lang.xml"> @@ -92,16 +109,16 @@ <!ENTITY profile.revisionflag SYSTEM "../params/profile.revisionflag.xml"> <!ENTITY profile.role SYSTEM "../params/profile.role.xml"> <!ENTITY profile.security SYSTEM "../params/profile.security.xml"> +<!ENTITY profile.separator SYSTEM "../params/profile.separator.xml"> <!ENTITY profile.userlevel SYSTEM "../params/profile.userlevel.xml"> -<!ENTITY profile.vendor SYSTEM "../params/profile.vendor.xml"> -<!ENTITY profile.attribute SYSTEM "../params/profile.attribute.xml"> <!ENTITY profile.value SYSTEM "../params/profile.value.xml"> -<!ENTITY profile.separator SYSTEM "../params/profile.separator.xml"> +<!ENTITY profile.vendor SYSTEM "../params/profile.vendor.xml"> <!ENTITY punct.honorific SYSTEM "../params/punct.honorific.xml"> <!ENTITY qanda.inherit.numeration SYSTEM "../params/qanda.inherit.numeration.xml"> <!ENTITY qandadiv.autolabel SYSTEM "../params/qandadiv.autolabel.xml"> <!ENTITY refentry.generate.name SYSTEM "../params/refentry.generate.name.xml"> <!ENTITY refentry.generate.title SYSTEM "../params/refentry.generate.title.xml"> +<!ENTITY refentry.title.properties SYSTEM "../params/refentry.title.properties.xml"> <!ENTITY refentry.xref.manvolnum SYSTEM "../params/refentry.xref.manvolnum.xml"> <!ENTITY region.after.extent SYSTEM "../params/region.after.extent.xml"> <!ENTITY region.before.extent SYSTEM "../params/region.before.extent.xml"> @@ -111,30 +128,71 @@ <!ENTITY sans.font.family SYSTEM "../params/sans.font.family.xml"> <!ENTITY section.autolabel SYSTEM "../params/section.autolabel.xml"> <!ENTITY section.label.includes.component.label SYSTEM "../params/section.label.includes.component.label.xml"> +<!ENTITY section.title.properties SYSTEM "../params/section.title.properties.xml"> <!ENTITY segmentedlist.as.table SYSTEM "../params/segmentedlist.as.table.xml"> <!ENTITY shade.verbatim SYSTEM "../params/shade.verbatim.xml"> <!ENTITY shade.verbatim.style SYSTEM "../params/shade.verbatim.style.xml"> <!ENTITY show.comments SYSTEM "../params/show.comments.xml"> -<!ENTITY table.border.color SYSTEM "../params/table.border.color.xml"> -<!ENTITY table.border.style SYSTEM "../params/table.border.style.xml"> -<!ENTITY table.border.thickness SYSTEM "../params/table.border.thickness.xml"> <!ENTITY table.cell.padding SYSTEM "../params/table.cell.padding.xml"> -<!ENTITY table.entry.padding SYSTEM "../params/table.entry.padding.xml"> <!ENTITY tablecolumns.extension SYSTEM "../params/tablecolumns.extension.xml"> -<!ENTITY textinsert.extension SYSTEM "../params/textinsert.extension.xml"> +<!ENTITY target.database.document SYSTEM "../params/target.database.document.xml"> <!ENTITY tex.math.delims SYSTEM "../params/tex.math.delims.xml"> <!ENTITY tex.math.in.alt SYSTEM "../params/tex.math.in.alt.xml"> +<!ENTITY textinsert.extension SYSTEM "../params/textinsert.extension.xml"> <!ENTITY title.font.family SYSTEM "../params/title.font.family.xml"> <!ENTITY title.margin.left SYSTEM "../params/title.margin.left.xml"> <!ENTITY toc.indent.width SYSTEM "../params/toc.indent.width.xml"> <!ENTITY toc.margin.properties SYSTEM "../params/toc.margin.properties.xml"> <!ENTITY toc.section.depth SYSTEM "../params/toc.section.depth.xml"> -<!ENTITY use.extensions SYSTEM "../params/use.extensions.xml"> -<!ENTITY use.svg SYSTEM "../params/use.svg.xml"> <!ENTITY ulink.footnotes SYSTEM "../params/ulink.footnotes.xml"> <!ENTITY ulink.hyphenate SYSTEM "../params/ulink.hyphenate.xml"> <!ENTITY ulink.show SYSTEM "../params/ulink.show.xml"> +<!ENTITY use.extensions SYSTEM "../params/use.extensions.xml"> +<!ENTITY use.local.olink.style SYSTEM "../params/use.local.olink.style.xml"> +<!ENTITY use.role.as.xrefstyle SYSTEM "../params/use.role.as.xrefstyle.xml"> +<!ENTITY use.role.for.mediaobject SYSTEM "../params/use.role.for.mediaobject.xml"> +<!ENTITY use.svg SYSTEM "../params/use.svg.xml"> <!ENTITY variablelist.as.blocks SYSTEM "../params/variablelist.as.blocks.xml"> <!ENTITY verbatim.properties SYSTEM "../params/verbatim.properties.xml"> <!ENTITY xep.extensions SYSTEM "../params/xep.extensions.xml"> <!ENTITY xref.properties SYSTEM "../params/xref.properties.xml"> +<!ENTITY sidebar.properties SYSTEM "../params/sidebar.properties.xml"> +<!ENTITY menuchoice.separator SYSTEM "../params/menuchoice.separator.xml"> +<!ENTITY menuchoice.menu.separator SYSTEM "../params/menuchoice.menu.separator.xml"> +<!ENTITY bibliography.numbered SYSTEM "../params/bibliography.numbered.xml"> +<!ENTITY section.title.level1.properties SYSTEM "../params/section.title.level1.properties.xml"> +<!ENTITY section.title.level2.properties SYSTEM "../params/section.title.level2.properties.xml"> +<!ENTITY section.title.level3.properties SYSTEM "../params/section.title.level3.properties.xml"> +<!ENTITY section.title.level4.properties SYSTEM "../params/section.title.level4.properties.xml"> +<!ENTITY section.title.level5.properties SYSTEM "../params/section.title.level5.properties.xml"> +<!ENTITY section.title.level6.properties SYSTEM "../params/section.title.level6.properties.xml"> +<!ENTITY monospace.properties SYSTEM "../params/monospace.properties.xml"> +<!ENTITY make.index.markup SYSTEM "../params/make.index.markup.xml"> +<!ENTITY l10n.gentext.language SYSTEM "../params/l10n.gentext.language.xml"> +<!ENTITY l10n.gentext.default.language SYSTEM "../params/l10n.gentext.default.language.xml"> +<!ENTITY l10n.gentext.use.xref.language SYSTEM "../params/l10n.gentext.use.xref.language.xml"> +<!ENTITY default.image.width SYSTEM "../params/default.image.width.xml"> +<!ENTITY default.float.class SYSTEM "../params/default.float.class.xml"> +<!ENTITY bridgehead.in.toc SYSTEM "../params/bridgehead.in.toc.xml"> +<!ENTITY generate.section.toc.level SYSTEM "../params/generate.section.toc.level.xml"> +<!ENTITY table.cell.border.color SYSTEM "../params/table.cell.border.color.xml"> +<!ENTITY table.cell.border.style SYSTEM "../params/table.cell.border.style.xml"> +<!ENTITY table.cell.border.thickness SYSTEM "../params/table.cell.border.thickness.xml"> +<!ENTITY table.frame.border.color SYSTEM "../params/table.frame.border.color.xml"> +<!ENTITY table.frame.border.style SYSTEM "../params/table.frame.border.style.xml"> +<!ENTITY table.frame.border.thickness SYSTEM "../params/table.frame.border.thickness.xml"> +<!ENTITY header.content.properties SYSTEM "../params/header.content.properties.xml"> +<!ENTITY footer.content.properties SYSTEM "../params/footer.content.properties.xml"> +<!ENTITY ignore.image.scaling SYSTEM "../params/ignore.image.scaling.xml"> +<!ENTITY figure.properties SYSTEM "../params/figure.properties.xml"> +<!ENTITY example.properties SYSTEM "../params/example.properties.xml"> +<!ENTITY equation.properties SYSTEM "../params/equation.properties.xml"> +<!ENTITY table.properties SYSTEM "../params/table.properties.xml"> +<!ENTITY procedure.properties SYSTEM "../params/procedure.properties.xml"> +<!ENTITY footnote.number.format SYSTEM "../params/footnote.number.format.xml"> +<!ENTITY table.footnote.number.format SYSTEM "../params/table.footnote.number.format.xml"> +<!ENTITY footnote.number.symbols SYSTEM "../params/footnote.number.symbols.xml"> +<!ENTITY table.footnote.number.symbols SYSTEM "../params/table.footnote.number.symbols.xml"> +<!ENTITY glossentry.show.acronym SYSTEM "../params/glossentry.show.acronym.xml"> +<!ENTITY ulink.footnote.number.format SYSTEM "../params/ulink.footnote.number.format.xml"> +<!ENTITY xref.with.number.and.title SYSTEM "../params/xref.with.number.and.title.xml"> Index: phpdoc/xsl/docbook/fo/param.xml diff -u phpdoc/xsl/docbook/fo/param.xml:1.1 phpdoc/xsl/docbook/fo/param.xml:1.2 --- phpdoc/xsl/docbook/fo/param.xml:1.1 Tue Aug 13 11:45:39 2002 +++ phpdoc/xsl/docbook/fo/param.xml Sun Mar 9 09:54:48 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- This file was generated by weave.xsl version 0.00+. Do not edit! --> +<!-- This file was generated by weave.xsl version 1.0. Do not edit! --> <!-- See http://sourceforge.net/projects/docbook/ --> <!DOCTYPE book PUBLIC "-//DocBook Open Repository//DTD DocBook Literate Programming V0.0//EN" "http://docbook.sourceforge.net/release/litprog/current/dtd/ldocbook.dtd"> @@ -7,7 +7,7 @@ <bookinfo> <title>FO Parameter Reference</title> <releaseinfo role="meta"> -$Id: param.xml,v 1.1 2002/08/13 15:45:39 goba Exp $ +$Id: param.xml,v 1.2 2003/03/09 14:54:48 tom Exp $ </releaseinfo> <author> <surname>Walsh</surname> @@ -146,7 +146,7 @@ </refsynopsisdiv> <refsect1><title>Description</title> <para>How do you want admonitions titles styled? </para> -<para>Set the font-size, weight etc to the style required</para> +<para>Set the font-size, weight etc to the style required.</para> </refsect1> </refentry> @@ -162,7 +162,7 @@ </refsynopsisdiv> <refsect1><title>Description</title> <para>How do you want admonitions styled? </para> -<para>Set the font-size, weight etc to the style required</para> +<para>Set the font-size, weight, etc. to the style required</para> </refsect1> </refentry> @@ -510,17 +510,23 @@ <refsynopsisdiv> <src:fragment id="generate.toc.frag"> <xsl:param name="generate.toc"> -/appendix toc -/article toc -book toc,figure,table,example,equation -/chapter toc -part toc -/preface toc +/appendix toc,title +article/appendix nop +/article toc,title +book toc,title,figure,table,example,equation +/chapter toc,title +part toc,title +/preface toc,title qandadiv toc qandaset toc -reference toc +reference toc,title +/sect1 toc +/sect2 toc +/sect3 toc +/sect4 toc +/sect5 toc /section toc -set toc +set toc,title </xsl:param></src:fragment> </refsynopsisdiv> @@ -569,6 +575,11 @@ without a matching value. That'd be just begging the silly little path/value parser to get confused.</para> +<para>Section ToCs are further controlled by the +<parameter moreinfo="none">generate.section.toc.level</parameter> parameter. +For a given section level to have a ToC, it must have both an entry in +<parameter moreinfo="none">generate.toc</parameter> and be within the range enabled by +<parameter moreinfo="none">generate.section.toc.level</parameter>.</para> </refsect1> </refentry> @@ -594,6 +605,74 @@ </refsect1> </refentry> +<refentry id="make.index.markup"> +<refmeta> +<refentrytitle>make.index.markup</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>make.index.markup</refname> +<refpurpose>Generate XML index markup in the index?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="make.index.markup.frag"><xsl:param name="make.index.markup" + select="0"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>This parameter enables a very neat trick for getting properly +merged, collated back-of-the-book indexes. G. Ken Holman suggested +this trick at Extreme Markup Languages 2002 and I'm indebted to him +for it.</para> + +<para>Jeni Tennison's excellent code in +<filename moreinfo="none">autoidx.xsl</filename> does a great job of merging and +sorting <sgmltag>indexterm</sgmltag>s in the document and building a +back-of-the-book index. However, there's one thing that it cannot +reasonably be expected to do: merge page numbers into ranges. (I would +not have thought that it could collate and suppress duplicate page +numbers, but in fact it appears to manage that task somehow.)</para> + +<para>Ken's trick is to produce a document in which the index at the +back of the book is <quote>displayed</quote> in XML. Because the index +is generated by the FO processor, all of the page numbers have been resolved. +It's a bit hard to explain, but what it boils down to is that instead of having +an index at the back of the book that looks like this:</para> + +<blockquote> +<formalpara><title>A</title> +<para>ap1, 1, 2, 3</para> +</formalpara> +</blockquote> + +<para>you get one that looks like this:</para> + +<blockquote> +<programlisting format="linespecific"><indexdiv>A</indexdiv> +<indexentry> +<primaryie>ap1</primaryie>, +<phrase role="pageno">1</phrase>, +<phrase role="pageno">2</phrase>, +<phrase role="pageno">3</phrase> +</indexentry></programlisting> +</blockquote> + +<para>After building a PDF file with this sort of odd-looking index, you can +extract the text from the PDF file and the result is a proper index expressed in +XML.</para> + +<para>Now you have data that's amenable to processing and a simple Perl script +(such as <filename moreinfo="none">fo/pdf2index</filename>) can +merge page ranges and generate a proper index.</para> + +<para>Finally, reformat your original document using this literal index instead of +an automatically generated one and <quote>bingo</quote>!</para> + +</refsect1> +</refentry> + <refentry id="toc.section.depth"> <refmeta> <refentrytitle>toc.section.depth</refentrytitle> @@ -649,7 +728,7 @@ <refentry id="toc.margin.properties"> <refnamediv> <refname>toc.margin.properties</refname> -<refpurpose>FIXME:</refpurpose> +<refpurpose>Margin properties used on Tables of Contents</refpurpose> </refnamediv> <refsynopsisdiv> @@ -662,8 +741,65 @@ <xsl:attribute name="space-after.maximum">2em</xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>FIXME:</para> +<para>This attribute set is used on Tables of Contents. These attributes are set +on the wrapper that surrounds the ToC block, not on each individual lines.</para> +</refsect1> +</refentry> + +<refentry id="bridgehead.in.toc"> +<refmeta> +<refentrytitle>bridgehead.in.toc</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>bridgehead.in.toc</refname> +<refpurpose>Should bridgehead elements appear in the TOC?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="bridgehead.in.toc.frag"><xsl:param name="bridgehead.in.toc" + select="0"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero, bridgeheads appear in the TOC. Note that this option +is not fully supported and may be removed in a future version of the +stylesheets. +</para> + +</refsect1> +</refentry> + +<refentry id="generate.section.toc.level"> +<refmeta> +<refentrytitle>generate.section.toc.level</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>generate.section.toc.level</refname> +<refpurpose>Control depth of TOC generation in sections</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="generate.section.toc.level.frag"><xsl:param name="generate.section.toc.level" + select="0"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The <parameter moreinfo="none">generate.section.toc.level</parameter> parameter +controls the depth of section in which TOCs will be generated. Note +that this is related to, but not the same as +<parameter moreinfo="none">toc.section.depth</parameter>, which controls the depth to +which TOC entries will be generated in a given TOC.</para> +<para>If, for example, <parameter moreinfo="none">generate.section.toc.level</parameter> +is <literal moreinfo="none">3</literal>, TOCs will be generated in first, second, and third +level sections, but not in fourth level sections. +</para> + </refsect1> </refentry> @@ -1410,7 +1546,10 @@ <para>If true (non-zero), a "NAME" section title is output before the list of 'RefName's. This parameter and -<parameter moreinfo="none">refentry.generate.title</parameter> are mutually exclusive. +<parameter moreinfo="none">refentry.generate.title</parameter> are mutually +exclusive. This means that if you change this parameter to zero, you +should set <parameter moreinfo="none">refentry.generate.title</parameter> to 1 unless +you want get quite strange output. </para> </refsect1> @@ -1436,8 +1575,43 @@ <para>If true (non-zero), the reference page title or first name is output before the list of 'RefName's. This parameter and <parameter moreinfo="none">refentry.generate.name</parameter> are mutually exclusive. -</para> +This means that if you change this parameter to 1, you +should set <parameter moreinfo="none">refentry.generate.name</parameter> to 0 unless +you want get quite strange output.</para> + + +</refsect1> +</refentry> + +<refentry id="refentry.title.properties"> +<refmeta> +<refentrytitle>refentry.title.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> +</refmeta> +<refnamediv> +<refname>refentry.title.properties</refname> +<refpurpose>Title properties for a refentry title</refpurpose> +</refnamediv> +<refsynopsisdiv> +<src:fragment id="refentry.title.properties.frag"><xsl:attribute-set name="refentry.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"/> + </xsl:attribute> + <xsl:attribute name="font-size">18pt</xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="space-after">1em</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> + <xsl:attribute name="space-after.maximum">0.6em</xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>FIXME:</para> </refsect1> </refentry> @@ -1520,45 +1694,90 @@ </refsect1> </refentry> -<refentry id="table.border.thickness"> +<refentry id="table.cell.padding"> <refmeta> -<refentrytitle>table.border.thickness</refentrytitle> +<refentrytitle>table.cell.padding</refentrytitle> <refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>table.border.thickness</refname> +<refname>table.cell.padding</refname> <refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="table.border.thickness.frag"><xsl:param name="table.border.thickness" +<src:fragment id="table.cell.padding.frag"><xsl:attribute-set name="table.cell.padding"> + <xsl:attribute name="padding-left">2pt</xsl:attribute> + <xsl:attribute name="padding-right">2pt</xsl:attribute> + <xsl:attribute name="padding-top">2pt</xsl:attribute> + <xsl:attribute name="padding-bottom">2pt</xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>FIXME:</para> + +</refsect1> +</refentry> + +<refentry id="table.frame.border.thickness"> +<refmeta> +<refentrytitle>table.frame.border.thickness</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>table.frame.border.thickness</refname> +<refpurpose>Specifies the thickness of the frame border</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="table.frame.border.thickness.frag"><xsl:param name="table.frame.border.thickness" select="'0.5pt'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> +<para>Specifies the thickness of the border on the table's frame.</para> + +</refsect1> +</refentry> + +<refentry id="table.frame.border.style"> +<refmeta> +<refentrytitle>table.frame.border.style</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>table.frame.border.style</refname> +<refpurpose/> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="table.frame.border.style.frag"><xsl:param name="table.frame.border.style" + select="'solid'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + <para>FIXME:</para> </refsect1> </refentry> -<refentry id="table.cell.padding"> +<refentry id="table.frame.border.color"> <refmeta> -<refentrytitle>table.cell.padding</refentrytitle> +<refentrytitle>table.frame.border.color</refentrytitle> <refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>table.cell.padding</refname> +<refname>table.frame.border.color</refname> <refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="table.cell.padding.frag"><xsl:attribute-set name="table.cell.padding"> - <xsl:attribute name="padding-left">2pt</xsl:attribute> - <xsl:attribute name="padding-right">2pt</xsl:attribute> - <xsl:attribute name="padding-top">2pt</xsl:attribute> - <xsl:attribute name="padding-bottom">2pt</xsl:attribute> -</xsl:attribute-set></src:fragment> +<src:fragment id="table.frame.border.color.frag"> +<xsl:param name="table.frame.border.color" + select="'black'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> @@ -1568,19 +1787,19 @@ </refsect1> </refentry> -<refentry id="table.border.style"> +<refentry id="table.cell.border.thickness"> <refmeta> -<refentrytitle>table.border.style</refentrytitle> +<refentrytitle>table.cell.border.thickness</refentrytitle> <refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>table.border.style</refname> +<refname>table.cell.border.thickness</refname> <refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="table.border.style.frag"><xsl:param name="table.border.style" - select="'solid'"/></src:fragment> +<src:fragment id="table.cell.border.thickness.frag"><xsl:param name="table.cell.border.thickness" + select="'0.5pt'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> @@ -1590,19 +1809,19 @@ </refsect1> </refentry> -<refentry id="table.border.color"> +<refentry id="table.cell.border.style"> <refmeta> -<refentrytitle>table.border.color</refentrytitle> +<refentrytitle>table.cell.border.style</refentrytitle> <refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>table.border.color</refname> +<refname>table.cell.border.style</refname> <refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="table.border.color.frag"><xsl:param name="table.border.color" - select="'black'"/></src:fragment> +<src:fragment id="table.cell.border.style.frag"><xsl:param name="table.cell.border.style" + select="'solid'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> @@ -1612,19 +1831,20 @@ </refsect1> </refentry> -<refentry id="table.entry.padding"> +<refentry id="table.cell.border.color"> <refmeta> -<refentrytitle>table.entry.padding</refentrytitle> +<refentrytitle>table.cell.border.color</refentrytitle> <refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>table.entry.padding</refname> +<refname>table.cell.border.color</refname> <refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="table.entry.padding.frag"><xsl:param name="table.entry.padding" - select="'2pt'"/></src:fragment> +<src:fragment id="table.cell.border.color.frag"> +<xsl:param name="table.cell.border.color" + select="'black'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> @@ -1636,6 +1856,104 @@ </reference> +<reference><title>Linking</title> +<refentry id="target.database.document"> +<refmeta> +<refentrytitle>target.database.document</refentrytitle> +<refmiscinfo role="type">uri</refmiscinfo> +</refmeta> +<refnamediv> +<refname>target.database.document</refname> +<refpurpose>Name of master database file for resolving +olinks</refpurpose> +</refnamediv> +<refsynopsisdiv> <src:fragment id="target.database.document.frag"><xsl:param name="target.database.document" + select="''"/></src:fragment> +</refsynopsisdiv> +<refsect1> +<title>Description</title> +<para> +To resolve olinks between documents, the stylesheets use +a master database document that identifies the target datafiles for all the documents within the scope +of the olinks. This parameter value is the URI of +the master document to be read during processing to resolve olinks. +The default value is <filename moreinfo="none">olinkdb.xml</filename>.</para> +<para>The data structure of the file is defined in the <filename moreinfo="none">targetdatabase.dtd</filename> DTD. The database file provides the high level elements to record the identifiers, locations, and relationships of documents. The cross reference data for individual documents is generally pulled into the database using system entity references or XIncludes. See also <parameter moreinfo="none">targets.filename</parameter>. + +</para> +</refsect1> +</refentry> + +<refentry id="use.local.olink.style"> +<refmeta> +<refentrytitle>use.local.olink.style</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>use.local.olink.style</refname> +<refpurpose>Process olinks using xref style of current +document</refpurpose> +</refnamediv> +<refsynopsisdiv> <src:fragment id="use.local.olink.style.frag"><xsl:param name="use.local.olink.style" + select="0"/> </src:fragment> +</refsynopsisdiv> +<refsect1> +<title>Description</title> +<para>When cross reference data is collected for use by olinks, the data for each potential target includes one field containing a completely assembled cross reference string, as if it were an xref generated in that document. Other fields record the separate title, number, and element name of each target. When an olink is formed to a target from another document, the olink resolves to that preassembled string by default. If the <parameter moreinfo="none">use.local.olink.style</parameter> parameter is set to non-zero, then instead the cross +reference string is formed again from the target title, number, and +element name, using the stylesheet processing the targeting document. +Then olinks will match the xref style in the targeting document +rather than in the target document. If both documents are processed +with the same stylesheet, then the results will be the same.</para> +</refsect1> +</refentry> + +<refentry id="current.docid"> +<refmeta> +<refentrytitle>current.docid</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>current.docid</refname> +<refpurpose>targetdoc identifier for the document being +processed</refpurpose> +</refnamediv> +<refsynopsisdiv> <src:fragment id="current.docid.frag"><xsl:param name="current.docid" + select="''"/> </src:fragment> +</refsynopsisdiv> +<refsect1> +<title>Description</title> +<para>When olinks between documents are resolved for HTML output, the stylesheet can compute the relative path between the current document and the target document. The stylesheet needs to know the <literal moreinfo="none">targetdoc</literal> identifiers for both documents, as they appear in the <parameter moreinfo="none">target.database.document</parameter> database file. This parameter passes to the stylesheet +the targetdoc identifier of the current document, since that +identifier does not appear in the document itself. </para> +<para>This parameter can also be used for print output. If an olink's <literal moreinfo="none">targetdoc</literal> id differs from the <literal moreinfo="none">current.docid</literal>, then the stylesheet can append the target document's title to the generated olink text. That identifies to the reader that the link is to a different document, not the current document. See also <parameter moreinfo="none">olink.doctitle</parameter> to enable that feature.</para> +</refsect1> +</refentry> + +<refentry id="olink.doctitle"> +<refmeta> +<refentrytitle>olink.doctitle</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>olink.doctitle</refname> +<refpurpose>show the document title for external olinks?</refpurpose> + +</refnamediv> +<refsynopsisdiv> <src:fragment id="olink.doctitle.frag"><xsl:param name="olink.doctitle" + select="0"/> </src:fragment> +</refsynopsisdiv> +<refsect1> +<title>Description</title> +<para>When olinks between documents are resolved for print output, the generated text may not make it clear that the reference is to another document. It is possible for the stylesheets to append the other document's title to external olinks. For this to happen, two parameters must be set. The <parameter moreinfo="none">olink.doctitle</parameter> parameter should be set to nonzero to enable this +feature. And you should set the <parameter moreinfo="none">current.docid</parameter> parameter to the document id for the document currently +being processed for output. If an olink's <literal moreinfo="none">targetdoc</literal> id differs from the <literal moreinfo="none">current.docid</literal>, then the stylesheet can append the target document's +title to the generated olink text. </para> +</refsect1> +</refentry> + +</reference> + <reference><title>QAndASet</title> <refentry id="qandadiv.autolabel"> <refmeta> @@ -1807,6 +2125,28 @@ </refsect1> </refentry> +<refentry id="bibliography.numbered"> +<refmeta> +<refentrytitle>bibliography.numbered</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>bibliography.numbered</refname> +<refpurpose>Should bibliography entries be numbered?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="bibliography.numbered.frag"><xsl:param name="bibliography.numbered" + select="0"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero bibliography entries will be numbered</para> + +</refsect1> +</refentry> + </reference> <reference><title>Glossary</title> @@ -2048,143 +2388,306 @@ <para>The stylesheets will format the glossary in your document as if all of the entries implicilty referenced appeared there literally.</para> </refsect2> + +<refsect2><title>Limitations</title> + +<para>Glossary cross-references <emphasis>within the glossary</emphasis> are +not supported. For example, this <emphasis>will not</emphasis> work:</para> + +<informalexample> +<programlisting format="linespecific"><glossentry> +<glossterm>gloss-1</glossterm> +<glossdef><para>A description that references <glossterm>gloss-2</glossterm>.</para> +<glossseealso>gloss-2</glossseealso> +</glossdef> +</glossentry></programlisting> +</informalexample> + +<para>If you put glossary cross-references in your glossary that way, +you'll get the cryptic error: <computeroutput moreinfo="none">Warning: +glossary.collection specified, but there are 0 automatic +glossaries</computeroutput>.</para> + +<para>Instead, you must do two things:</para> + +<orderedlist inheritnum="ignore" continuation="restarts"> +<listitem> +<para>Markup your glossary using <sgmltag>glossseealso</sgmltag>:</para> + +<informalexample> +<programlisting format="linespecific"><glossentry> +<glossterm>gloss-1</glossterm> +<glossdef><para>A description that references <glossterm>gloss-2</glossterm>.</para> +<glossseealso>gloss-2</glossseealso> +</glossdef> +</glossentry></programlisting> +</informalexample> +</listitem> + +<listitem> +<para>Make sure there is at least one <sgmltag>glossterm</sgmltag> reference to +<glossterm>gloss-2</glossterm> <emphasis>in your document</emphasis>. The +easiest way to do that is probably within a <sgmltag>remark</sgmltag> in your +automatic glossary:</para> + +<informalexample> +<programlisting format="linespecific"><glossary role="auto"> +<remark>Make sure there's a reference to <glossterm>gloss-2</glossterm>.</remark> +<glossentry> +<glossterm>Irrelevant</glossterm> +<glossdef> +<para>If you can see this, the document was processed incorrectly. Use +the <parameter>glossary.collection</parameter> parameter.</para> +</glossdef> +</glossentry> +</glossary></programlisting> +</informalexample> +</listitem> +</orderedlist> +</refsect2> + </refsect1> </refentry> -</reference> - -<reference><title>Miscellaneous</title> -<refentry id="graphic.default.extension"> +<refentry id="glossterm.separation"> <refmeta> -<refentrytitle>graphic.default.extension</refentrytitle> -<refmiscinfo role="type">string</refmiscinfo> +<refentrytitle>glossterm.separation</refentrytitle> +<refmiscinfo role="type">length</refmiscinfo> </refmeta> <refnamediv> -<refname>graphic.default.extension</refname> -<refpurpose>Default extension for graphic filenames</refpurpose> +<refname>glossterm.separation</refname> +<refpurpose>Separation between glossary terms and descriptions in list mode</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="graphic.default.extension.frag"><xsl:param name="graphic.default.extension"/></src:fragment> +<src:fragment id="glossterm.separation.frag"><xsl:param name="glossterm.separation" + select="'0.25in'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>If a <sgmltag>graphic</sgmltag> or <sgmltag>mediaobject</sgmltag> -includes a reference to a filename that does not include an extension, -and the <sgmltag class="attribute">format</sgmltag> attribute is -<emphasis>unspecified</emphasis>, the default extension will be used. -</para> +<para>Specifies the separation between glossary terms and descriptions when +glossarys are presented using lists.</para> </refsect1> </refentry> -<refentry id="formal.procedures"> +<refentry id="glossterm.width"> <refmeta> -<refentrytitle>formal.procedures</refentrytitle> -<refmiscinfo role="type">boolean</refmiscinfo> +<refentrytitle>glossterm.width</refentrytitle> +<refmiscinfo role="type">length</refmiscinfo> </refmeta> <refnamediv> -<refname>formal.procedures</refname> -<refpurpose>Selects formal or informal procedures</refpurpose> +<refname>glossterm.width</refname> +<refpurpose>Width of glossterm in list presentation mode</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="formal.procedures.frag"><xsl:param name="formal.procedures" - select="1"/></src:fragment> +<src:fragment id="glossterm.width.frag"><xsl:param name="glossterm.width" + select="'2in'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>Formal procedures are numbered and always have a title. -</para> +<para>This parameter specifies the width reserved for glossary terms when +a list presentation is used.</para> </refsect1> </refentry> -<refentry id="formal.title.placement"> +<refentry id="glossary.as.blocks"> <refmeta> -<refentrytitle>formal.title.placement</refentrytitle> -<refmiscinfo role="type"/> +<refentrytitle>glossary.as.blocks</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>formal.title.placement</refname> -<refpurpose/> +<refname>glossary.as.blocks</refname> +<refpurpose>Present glossarys using blocks instead of lists?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="formal.title.placement.frag"><xsl:param name="formal.title.placement"> -figure before -example before -equation before -table before -procedure before -</xsl:param></src:fragment> +<src:fragment id="glossary.as.blocks.frag"><xsl:param name="glossary.as.blocks" + select="0"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>Specifies where formal object titles should occur. For each formal object -type (<sgmltag>figure</sgmltag>, -<sgmltag>example</sgmltag>, -<sgmltag>equation</sgmltag>, -<sgmltag>table</sgmltag>, and <sgmltag>procedure</sgmltag>) -you can specify either the keyword -<quote><literal moreinfo="none">before</literal></quote> or -<quote><literal moreinfo="none">after</literal></quote>.</para> +<para>If non-zero, <sgmltag>glossary</sgmltag>s will be formatted as +blocks.</para> + +<para>If you have long <sgmltag>glossterm</sgmltag>s, proper list +markup in the FO case may produce unattractive lists. By setting this +parameter, you can force the stylesheets to produce block markup +instead of proper lists.</para> + +<para>You can override this setting with a processing instruction as the +child of <sgmltag>glossary</sgmltag>: <sgmltag class="pi">dbfo +glossary-presentation="blocks"</sgmltag> or <sgmltag class="pi">dbfo +glossary-presentation="list"</sgmltag></para> </refsect1> </refentry> -<refentry id="runinhead.default.title.end.punct"> +<refentry id="glosslist.as.blocks"> <refmeta> -<refentrytitle>runinhead.default.title.end.punct</refentrytitle> -<refmiscinfo role="type">string</refmiscinfo> +<refentrytitle>glosslist.as.blocks</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>runinhead.default.title.end.punct</refname> -<refpurpose>Default punctuation character on a run-in-head</refpurpose> +<refname>glosslist.as.blocks</refname> +<refpurpose>Use blocks for glosslists?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="runinhead.default.title.end.punct.frag"><xsl:param name="runinhead.default.title.end.punct" - select="'.'"/></src:fragment> +<src:fragment id="glosslist.as.blocks.frag"><xsl:param name="glosslist.as.blocks" + select="0"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>FIXME: -</para> +<para>See <parameter moreinfo="none">glossary.as.blocks</parameter>.</para> </refsect1> </refentry> -<refentry id="runinhead.title.end.punct"> +<refentry id="glossentry.show.acronym"> <refmeta> -<refentrytitle>runinhead.title.end.punct</refentrytitle> -<refmiscinfo role="type">string</refmiscinfo> +<refentrytitle>glossentry.show.acronym</refentrytitle> +<refmiscinfo role="type">list</refmiscinfo> </refmeta> <refnamediv> -<refname>runinhead.title.end.punct</refname> -<refpurpose>Characters that count as punctuation on a run-in-head</refpurpose> +<refname>glossentry.show.acronym</refname> +<refpurpose>Display <sgmltag>glossentry</sgmltag> acronyms?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="runinhead.title.end.punct.frag"><xsl:param name="runinhead.title.end.punct" - select="'.!?:'"/></src:fragment> +<src:fragment id="glossentry.show.acronym.frag"><xsl:param name="glossentry.show.acronym" + select="'no'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>FIXME: -</para> +<para>A setting of <quote>yes</quote> means they should be displayed; +<quote>no</quote> means they shouldn't. If <quote>primary</quote> is used, +then they are shown as the primary text for the entry.</para> + +<note> +<para>This setting controls both <sgmltag>acronym</sgmltag> and +<sgmltag>abbrev</sgmltag> elements in the <sgmltag>glossentry</sgmltag>.</para> +</note> </refsect1> </refentry> -<refentry id="show.comments"> -<refmeta> -<refentrytitle>show.comments</refentrytitle> +</reference> + +<reference><title>Miscellaneous</title> +<refentry id="formal.procedures"> +<refmeta> +<refentrytitle>formal.procedures</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>formal.procedures</refname> +<refpurpose>Selects formal or informal procedures</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="formal.procedures.frag"><xsl:param name="formal.procedures" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Formal procedures are numbered and always have a title. +</para> + +</refsect1> +</refentry> + +<refentry id="formal.title.placement"> +<refmeta> +<refentrytitle>formal.title.placement</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>formal.title.placement</refname> +<refpurpose/> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="formal.title.placement.frag"><xsl:param name="formal.title.placement"> +figure before +example before +equation before +table before +procedure before +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Specifies where formal object titles should occur. For each formal object +type (<sgmltag>figure</sgmltag>, +<sgmltag>example</sgmltag>, +<sgmltag>equation</sgmltag>, +<sgmltag>table</sgmltag>, and <sgmltag>procedure</sgmltag>) +you can specify either the keyword +<quote><literal moreinfo="none">before</literal></quote> or +<quote><literal moreinfo="none">after</literal></quote>.</para> + +</refsect1> +</refentry> + +<refentry id="runinhead.default.title.end.punct"> +<refmeta> +<refentrytitle>runinhead.default.title.end.punct</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>runinhead.default.title.end.punct</refname> +<refpurpose>Default punctuation character on a run-in-head</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="runinhead.default.title.end.punct.frag"><xsl:param name="runinhead.default.title.end.punct" + select="'.'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>FIXME: +</para> + +</refsect1> +</refentry> + +<refentry id="runinhead.title.end.punct"> +<refmeta> +<refentrytitle>runinhead.title.end.punct</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>runinhead.title.end.punct</refname> +<refpurpose>Characters that count as punctuation on a run-in-head</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="runinhead.title.end.punct.frag"><xsl:param name="runinhead.title.end.punct" + select="'.!?:'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>FIXME: +</para> + +</refsect1> +</refentry> + +<refentry id="show.comments"> +<refmeta> +<refentrytitle>show.comments</refentrytitle> <refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> @@ -2277,7 +2780,24 @@ unattractive lists. By setting this parameter, you can force the stylesheets to produce block markup instead of proper lists.</para> +<para>You can override this setting with a processing instruction as the +child of <sgmltag>variablelist</sgmltag>: <sgmltag class="pi">dbfo +list-presentation="blocks"</sgmltag> or <sgmltag class="pi">dbfo +list-presentation="list"</sgmltag></para> + +<programlisting format="linespecific"> <variablelist> + <?dbfo list-presentation="list"?> + <varlistentry> + <term>list</term> + <listitem> + <para> + Formatted as a list even if variablelist.as.blocks is set to 1. + </para> + </listitem> + </varlistentry> + </variablelist></programlisting> </refsect1> + </refentry> <refentry id="blockquote.properties"> @@ -2346,12 +2866,35 @@ <refsect1><title>Description</title> <para>If non-zero, the URL of each <sgmltag>ULink</sgmltag> will -appear as a footnote. <emphasis>Not yet implemented!</emphasis> +appear as a footnote. </para> </refsect1> </refentry> +<refentry id="ulink.footnote.number.format"> +<refmeta> +<refentrytitle>ulink.footnote.number.format</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>ulink.footnote.number.format</refname> +<refpurpose>Identifies the format used for <sgmltag>ulink</sgmltag> footnote numbers</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="ulink.footnote.number.format.frag"><xsl:param name="ulink.footnote.number.format" + select="'1'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The <parameter moreinfo="none">ulink.footnote.number.format</parameter> specifies the format +to use for footnote numeration (1, i, I, a, or A).</para> + +</refsect1> +</refentry> + <refentry id="ulink.hyphenate"> <refmeta> <refentrytitle>ulink.hyphenate</refentrytitle> @@ -2451,1184 +2994,2268 @@ </refsect1> </refentry> -</reference> +<refentry id="use.role.as.xrefstyle"> +<refmeta> +<refentrytitle>use.role.as.xrefstyle</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>use.role.as.xrefstyle</refname> +<refpurpose>Use <sgmltag class="attribute">role</sgmltag> attribute for +<sgmltag class="attribute">xrefstyle</sgmltag> on <sgmltag>xref</sgmltag>?</refpurpose> +</refnamediv> -<reference><title>Pagination and General Styles</title> -<partintro> -<section><title>Understanding XSL FO Margins</title> +<refsynopsisdiv> +<src:fragment id="use.role.as.xrefstyle.frag"><xsl:param name="use.role.as.xrefstyle" + select="1"/></src:fragment> +</refsynopsisdiv> -<para>In order for the parameters in this section to make sense, it is useful to -consider <xref linkend="fig.pagemodel"/>.</para> +<refsect1><title>Description</title> -<figure id="fig.pagemodel" float="0"> -<mediaobject> -<imageobject> -<imagedata fileref="page.png"/> -</imageobject> -<textobject><phrase>Figure showing page margins</phrase></textobject> -<textobject> -<para>This figure shows the physical page with the various FO page regions -identified.</para> -</textobject> -</mediaobject> -</figure> +<para>If non-zero, the <sgmltag class="attribute">role</sgmltag> attribute on +<sgmltag>xref</sgmltag> will be used to select the cross reference style. +The <ulink url="http://www.oasis-open.org/docbook/">DocBook +Technical Committee</ulink> recently added an +<sgmltag class="attribute">xrefstyle</sgmltag> attribute for this purpose. +If the <sgmltag class="attribute">xrefstyle</sgmltag> attribute +is present, <sgmltag class="attribute">role</sgmltag> will be ignored, regardless +of this setting.</para> -<para>First, let's consider the regions on the page.</para> +<para>Until an official DocBook release that includes the new +attribute, this flag allows <sgmltag class="attribute">role</sgmltag> +to serve that purpose.</para> -<para>The white region is the physical page. Its dimensions are determined by -the <parameter moreinfo="none">page.height</parameter> and <parameter moreinfo="none">page.width</parameter> -parameters.</para> +</refsect1> -<para>The yellow region is the region-body. The size and placement of -the region body is constrained by the dimensions labelled in the -figure.</para> +<refsect1><title>Example</title> -<para>The pink region at the top of the page is the region-before. The -darker area inside the region-before is the header text. In XSL, the default -display alignment for the region-before is <literal moreinfo="none">before</literal>, but -the DocBook stylesheets explicitly make it <literal moreinfo="none">after</literal>. That's -why the darker area is at the bottom.</para> +<para>The following small stylesheet shows how to configure the stylesheets to make +use of the cross reference style:</para> -<para>The pink region at the bottom of the page is the region-after. -The darker area is the footer text. In XSL, the default display -alignment for the region-after is <literal moreinfo="none">before</literal> (really!), -but the DocBook stylesheets explicitly make it -<literal moreinfo="none">after</literal>. That's why the darker area is at the bottom.</para> +<programlisting format="linespecific"><?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> -<para>The dimensions in the figure are:</para> +<xsl:import href="../xsl/html/docbook.xsl"/> -<orderedlist numeration="upperalpha" inheritnum="ignore" continuation="restarts"> -<listitem><para>The page-master margin-top. -</para></listitem> -<listitem><para>The region-before extent. -</para></listitem> -<listitem><para>The region-body margin-top. -</para></listitem> -<listitem><para>The region-after extent. -</para></listitem> -<listitem><para>The page-master margin-bottom. -</para></listitem> -<listitem><para>The region-body margin-bottom. -</para></listitem> -<listitem><para>The sum of the page-master margin-left and the -region-body margin-left. In DocBook, the region-body margin-left is -zero by default, so this is simply the page-master region-left. -</para></listitem> -<listitem><para>The sum of the page-master margin-right and the -region-body margin-right. In DocBook, the region-body margin-right is -zero by default, so this is simply the page-master region-left. -</para></listitem> -</orderedlist> +<xsl:output method="html"/> -</section> -</partintro> +<xsl:param name="local.l10n.xml" select="document('')"/> +<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> + <l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en"> + <l:context name="xref"> + <l:template name="chapter" style="title" text="Chapter %n, %t"/> + <l:template name="chapter" text="Chapter %n"/> + </l:context> + </l:l10n> +</l:i18n> -<refentry id="page.height"> -<refmeta> -<refentrytitle>page.height</refentrytitle> +</xsl:stylesheet></programlisting> + +<para>With this stylesheet, the cross references in the following document:</para> + +<programlisting format="linespecific"><?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> +<book id="book"><title>Book</title> + +<preface> +<title>Preface</title> + +<para>Normal: <xref linkend="ch1"/>.</para> +<para>Title: <xref xrefstyle="title" linkend="ch1"/>.</para> + +</preface> + +<chapter id="ch1"> +<title>First Chapter</title> + +<para>Irrelevant.</para> + +</chapter> +</book></programlisting> + +<para>will appear as:</para> + +<informalexample> +<para>Normal: Chapter 1.</para> +<para>Title: Chapter 1, <emphasis>First Chapter</emphasis>.</para> +</informalexample> +</refsect1> + +</refentry> +<refentry id="menuchoice.separator"> +<refmeta> +<refentrytitle>menuchoice.separator</refentrytitle> +<refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>page.height</refname> -<refpurpose>The height of the physical page</refpurpose> +<refname>menuchoice.separator</refname> +<refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.height.frag"><xsl:param name="page.height"> - <xsl:choose> - <xsl:when test="$page.orientation = 'portrait'"> - <xsl:value-of select="$page.height.portrait"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$page.width.portrait"/> - </xsl:otherwise> - </xsl:choose> -</xsl:param></src:fragment> +<src:fragment id="menuchoice.separator.frag"><xsl:param name="menuchoice.separator" + select="'+'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The page height is generally calculated from the -<literal moreinfo="none">paper.type</literal> and -<literal moreinfo="none">page.orientation</literal>. +<para>Separator used to connect items of a <sgmltag>menuchoice</sgmltag> other +than <sgmltag>guimenuitem</sgmltag> and <sgmltag>guisubmenu</sgmltag>. The latter +elements are linked with <parameter moreinfo="none">menuchoice.menu.separator</parameter>. </para> </refsect1> </refentry> -<refentry id="page.height.portrait"> +<refentry id="menuchoice.menu.separator"> <refmeta> -<refentrytitle>page.height.portrait</refentrytitle> +<refentrytitle>menuchoice.menu.separator</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>menuchoice.menu.separator</refname> +<refpurpose/> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="menuchoice.menu.separator.frag"><xsl:param name="menuchoice.menu.separator" + select="'->'"/></src:fragment> +</refsynopsisdiv> +<refsect1><title>Description</title> + +<para>Separator used to connect items of a <sgmltag>menuchoice</sgmltag> with +<sgmltag>guimenuitem</sgmltag> or <sgmltag>guisubmenu</sgmltag>. Other elements +are linked with <parameter moreinfo="none">menuchoice.separator</parameter>. +</para> + +</refsect1> +</refentry> + +<refentry id="default.float.class"> +<refmeta> +<refentrytitle>default.float.class</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> </refmeta> <refnamediv> -<refname>page.height.portrait</refname> -<refpurpose>Specify the physical size of the long edge of the page</refpurpose> +<refname>default.float.class</refname> +<refpurpose>Specifies the default float class</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.height.portrait.frag"><xsl:param name="page.height.portrait"> - <xsl:choose> - <xsl:when test="$paper.type = 'A4landscape'">210mm</xsl:when> - <xsl:when test="$paper.type = 'USletter'">11in</xsl:when> - <xsl:when test="$paper.type = 'USlandscape'">8.5in</xsl:when> - <xsl:when test="$paper.type = '4A0'">2378mm</xsl:when> - <xsl:when test="$paper.type = '2A0'">1682mm</xsl:when> - <xsl:when test="$paper.type = 'A0'">1189mm</xsl:when> - <xsl:when test="$paper.type = 'A1'">841mm</xsl:when> - <xsl:when test="$paper.type = 'A2'">594mm</xsl:when> - <xsl:when test="$paper.type = 'A3'">420mm</xsl:when> - <xsl:when test="$paper.type = 'A4'">297mm</xsl:when> - <xsl:when test="$paper.type = 'A5'">210mm</xsl:when> - <xsl:when test="$paper.type = 'A6'">148mm</xsl:when> - <xsl:when test="$paper.type = 'A7'">105mm</xsl:when> - <xsl:when test="$paper.type = 'A8'">74mm</xsl:when> - <xsl:when test="$paper.type = 'A9'">52mm</xsl:when> - <xsl:when test="$paper.type = 'A10'">37mm</xsl:when> - <xsl:when test="$paper.type = 'B0'">1414mm</xsl:when> - <xsl:when test="$paper.type = 'B1'">1000mm</xsl:when> - <xsl:when test="$paper.type = 'B2'">707mm</xsl:when> - <xsl:when test="$paper.type = 'B3'">500mm</xsl:when> - <xsl:when test="$paper.type = 'B4'">353mm</xsl:when> - <xsl:when test="$paper.type = 'B5'">250mm</xsl:when> - <xsl:when test="$paper.type = 'B6'">176mm</xsl:when> - <xsl:when test="$paper.type = 'B7'">125mm</xsl:when> - <xsl:when test="$paper.type = 'B8'">88mm</xsl:when> - <xsl:when test="$paper.type = 'B9'">62mm</xsl:when> - <xsl:when test="$paper.type = 'B10'">44mm</xsl:when> - <xsl:when test="$paper.type = 'C0'">1297mm</xsl:when> - <xsl:when test="$paper.type = 'C1'">917mm</xsl:when> - <xsl:when test="$paper.type = 'C2'">648mm</xsl:when> - <xsl:when test="$paper.type = 'C3'">458mm</xsl:when> - <xsl:when test="$paper.type = 'C4'">324mm</xsl:when> - <xsl:when test="$paper.type = 'C5'">229mm</xsl:when> - <xsl:when test="$paper.type = 'C6'">162mm</xsl:when> - <xsl:when test="$paper.type = 'C7'">114mm</xsl:when> - <xsl:when test="$paper.type = 'C8'">81mm</xsl:when> - <xsl:when test="$paper.type = 'C9'">57mm</xsl:when> - <xsl:when test="$paper.type = 'C10'">40mm</xsl:when> - <xsl:otherwise>11in</xsl:otherwise> - </xsl:choose> -</xsl:param></src:fragment> +<src:fragment id="default.float.class.frag"><xsl:param name="default.float.class" + select="'before'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The portrait page height is the length of the long -edge of the physical page. -</para> +<para>FIXME:</para> </refsect1> </refentry> -<refentry id="page.margin.bottom"> +<refentry id="footnote.number.format"> <refmeta> -<refentrytitle>page.margin.bottom</refentrytitle> - +<refentrytitle>footnote.number.format</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> </refmeta> <refnamediv> -<refname>page.margin.bottom</refname> -<refpurpose>The bottom margin of the page</refpurpose> +<refname>footnote.number.format</refname> +<refpurpose>Identifies the format used for footnote numbers</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.margin.bottom.frag"><xsl:param name="page.margin.bottom">0.5in</xsl:param></src:fragment> +<src:fragment id="footnote.number.format.frag"><xsl:param name="footnote.number.format" + select="'1'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The bottom page margin is the distance from the bottom of the region-after -to the physical bottom of the page. -</para> +<para>The <parameter moreinfo="none">footnote.number.format</parameter> specifies the format +to use for footnote numeration (1, i, I, a, or A).</para> </refsect1> </refentry> -<refentry id="page.margin.inner"> +<refentry id="table.footnote.number.format"> <refmeta> -<refentrytitle>page.margin.inner</refentrytitle> - +<refentrytitle>table.footnote.number.format</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> </refmeta> <refnamediv> -<refname>page.margin.inner</refname> -<refpurpose>The inner page margin</refpurpose> +<refname>table.footnote.number.format</refname> +<refpurpose>Identifies the format used for footnote numbers in tables</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.margin.inner.frag"><xsl:param name="page.margin.inner"> - <xsl:choose> - <xsl:when test="$double.sided != 0">1.25in</xsl:when> - <xsl:otherwise>1in</xsl:otherwise> - </xsl:choose> -</xsl:param></src:fragment> +<src:fragment id="table.footnote.number.format.frag"><xsl:param name="table.footnote.number.format" + select="'a'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The inner page margin is the distance from binding edge of the -page to the first column of text. In the left-to-right, top-to-bottom writing -direction, this is the left margin of recto pages.</para> -<para>The inner and outer margins are usually the same unless the output -is double-sided. -</para> +<para>The <parameter moreinfo="none">table.footnote.number.format</parameter> specifies the format +to use for footnote numeration (1, i, I, a, or A) in tables.</para> </refsect1> </refentry> -<refentry id="page.margin.outer"> +<refentry id="footnote.number.symbols"> <refmeta> -<refentrytitle>page.margin.outer</refentrytitle> - +<refentrytitle>footnote.number.symbols</refentrytitle> +<refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>page.margin.outer</refname> -<refpurpose>The outer page margin</refpurpose> +<refname>footnote.number.symbols</refname> +<refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.margin.outer.frag"><xsl:param name="page.margin.outer"> - <xsl:choose> - <xsl:when test="$double.sided != 0">0.75in</xsl:when> - <xsl:otherwise>1in</xsl:otherwise> - </xsl:choose> -</xsl:param></src:fragment> +<src:fragment id="footnote.number.symbols.frag"><xsl:param name="footnote.number.symbols" + select="''"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The outer page margin is the distance from non-binding edge of the -page to the last column of text. In the left-to-right, top-to-bottom writing -direction, this is the right margin of recto pages.</para> -<para>The inner and outer margins are usually the same unless the output -is double-sided. -</para> +<para>If <parameter moreinfo="none">footnote.number.symbols</parameter> is not the empty string, +footnotes will use the characters it contains as footnote symbols. For example, +<quote>*&#x2020;&#x2021;&#x25CA;&#x2720;</quote> will identify +footnotes with <quote>*</quote>, <quote>â </quote>, <quote>â¡</quote>, +<quote>â</quote>, and <quote>â </quote>. If there are more footnotes +than symbols, the stylesheets will fall back to numbered footnotes using +<parameter moreinfo="none">footnote.number.format</parameter>.</para> + +<para>The use of symbols for footnotes depends on the ability of your +processor (or browser) to render the symbols you select. Not all systems are +capable of displaying the full range of Unicode characters. If the quoted characters +in the preceding paragraph are not displayed properly, that's a good indicator +that you may have trouble using those symbols for footnotes.</para> </refsect1> </refentry> -<refentry id="page.margin.top"> +<refentry id="table.footnote.number.symbols"> <refmeta> -<refentrytitle>page.margin.top</refentrytitle> - +<refentrytitle>table.footnote.number.symbols</refentrytitle> +<refmiscinfo role="type"/> </refmeta> <refnamediv> -<refname>page.margin.top</refname> -<refpurpose>The top margin of the page</refpurpose> +<refname>table.footnote.number.symbols</refname> +<refpurpose/> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.margin.top.frag"><xsl:param name="page.margin.top">0in</xsl:param></src:fragment> +<src:fragment id="table.footnote.number.symbols.frag"><xsl:param name="table.footnote.number.symbols" + select="''"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The top page margin is the distance from the physical top of the -page to the top of the region-before.</para> +<para>If <parameter moreinfo="none">table.footnote.number.symbols</parameter> is not the empty string, +table footnotes will use the characters it contains as footnote symbols. For example, +<quote>*&#x2020;&#x2021;&#x25CA;&#x2720;</quote> will identify +footnotes with <quote>*</quote>, <quote>â </quote>, <quote>â¡</quote>, +<quote>â</quote>, and <quote>â </quote>. If there are more footnotes +than symbols, the stylesheets will fall back to numbered footnotes using +<parameter moreinfo="none">table.footnote.number.format</parameter>.</para> + +<para>The use of symbols for footnotes depends on the ability of your +processor (or browser) to render the symbols you select. Not all systems are +capable of displaying the full range of Unicode characters. If the quoted characters +in the preceding paragraph are not displayed properly, that's a good indicator +that you may have trouble using those symbols for footnotes.</para> </refsect1> </refentry> -<refentry id="page.orientation"> +<refentry id="xref.with.number.and.title"> <refmeta> -<refentrytitle>page.orientation</refentrytitle> - +<refentrytitle>xref.with.number.and.title</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>page.orientation</refname> -<refpurpose>Select the page orientation</refpurpose> +<refname>xref.with.number.and.title</refname> +<refpurpose>Use number and title in cross references</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.orientation.frag"><xsl:param name="page.orientation" - select="'portrait'"/></src:fragment> +<src:fragment id="xref.with.number.and.title.frag"><xsl:param name="xref.with.number.and.title" + select="1"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>In portrait orientation, the short edge is horizontal; in -landscape orientation, it is vertical. -</para> +<para>FIXME:</para> </refsect1> </refentry> -<refentry id="page.width"> -<refmeta> -<refentrytitle>page.width</refentrytitle> +</reference> +<reference><title>Graphics</title> +<refentry id="graphic.default.extension"> +<refmeta> +<refentrytitle>graphic.default.extension</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> </refmeta> <refnamediv> -<refname>page.width</refname> -<refpurpose>The width of the physical page</refpurpose> +<refname>graphic.default.extension</refname> +<refpurpose>Default extension for graphic filenames</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.width.frag"><xsl:param name="page.width"> - <xsl:choose> - <xsl:when test="$page.orientation = 'portrait'"> - <xsl:value-of select="$page.width.portrait"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$page.height.portrait"/> - </xsl:otherwise> - </xsl:choose> -</xsl:param></src:fragment> +<src:fragment id="graphic.default.extension.frag"><xsl:param name="graphic.default.extension"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The page width is generally calculated from the -<literal moreinfo="none">paper.type</literal> and <literal moreinfo="none">page.orientation</literal>. +<para>If a <sgmltag>graphic</sgmltag> or <sgmltag>mediaobject</sgmltag> +includes a reference to a filename that does not include an extension, +and the <sgmltag class="attribute">format</sgmltag> attribute is +<emphasis>unspecified</emphasis>, the default extension will be used. </para> </refsect1> </refentry> -<refentry id="page.width.portrait"> +<refentry id="default.image.width"> <refmeta> -<refentrytitle>page.width.portrait</refentrytitle> - +<refentrytitle>default.image.width</refentrytitle> +<refmiscinfo role="type">length</refmiscinfo> </refmeta> <refnamediv> -<refname>page.width.portrait</refname> -<refpurpose>Specify the physical size of the short edge of the page</refpurpose> +<refname>default.image.width</refname> +<refpurpose>The default width of images</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="page.width.portrait.frag"><xsl:param name="page.width.portrait"> - <xsl:choose> - <xsl:when test="$paper.type = 'USletter'">8.5in</xsl:when> - <xsl:when test="$paper.type = '4A0'">1682mm</xsl:when> - <xsl:when test="$paper.type = '2A0'">1189mm</xsl:when> - <xsl:when test="$paper.type = 'A0'">841mm</xsl:when> - <xsl:when test="$paper.type = 'A1'">594mm</xsl:when> - <xsl:when test="$paper.type = 'A2'">420mm</xsl:when> - <xsl:when test="$paper.type = 'A3'">297mm</xsl:when> - <xsl:when test="$paper.type = 'A4'">210mm</xsl:when> - <xsl:when test="$paper.type = 'A5'">148mm</xsl:when> - <xsl:when test="$paper.type = 'A6'">105mm</xsl:when> - <xsl:when test="$paper.type = 'A7'">74mm</xsl:when> - <xsl:when test="$paper.type = 'A8'">52mm</xsl:when> - <xsl:when test="$paper.type = 'A9'">37mm</xsl:when> - <xsl:when test="$paper.type = 'A10'">26mm</xsl:when> - <xsl:when test="$paper.type = 'B0'">1000mm</xsl:when> - <xsl:when test="$paper.type = 'B1'">707mm</xsl:when> - <xsl:when test="$paper.type = 'B2'">500mm</xsl:when> - <xsl:when test="$paper.type = 'B3'">353mm</xsl:when> - <xsl:when test="$paper.type = 'B4'">250mm</xsl:when> - <xsl:when test="$paper.type = 'B5'">176mm</xsl:when> - <xsl:when test="$paper.type = 'B6'">125mm</xsl:when> - <xsl:when test="$paper.type = 'B7'">88mm</xsl:when> - <xsl:when test="$paper.type = 'B8'">62mm</xsl:when> - <xsl:when test="$paper.type = 'B9'">44mm</xsl:when> - <xsl:when test="$paper.type = 'B10'">31mm</xsl:when> - <xsl:when test="$paper.type = 'C0'">917mm</xsl:when> - <xsl:when test="$paper.type = 'C1'">648mm</xsl:when> - <xsl:when test="$paper.type = 'C2'">458mm</xsl:when> - <xsl:when test="$paper.type = 'C3'">324mm</xsl:when> - <xsl:when test="$paper.type = 'C4'">229mm</xsl:when> - <xsl:when test="$paper.type = 'C5'">162mm</xsl:when> - <xsl:when test="$paper.type = 'C6'">114mm</xsl:when> - <xsl:when test="$paper.type = 'C7'">81mm</xsl:when> - <xsl:when test="$paper.type = 'C8'">57mm</xsl:when> - <xsl:when test="$paper.type = 'C9'">40mm</xsl:when> - <xsl:when test="$paper.type = 'C10'">28mm</xsl:when> - <xsl:otherwise>8.5in</xsl:otherwise> - </xsl:choose> -</xsl:param></src:fragment> +<src:fragment id="default.image.width.frag"><xsl:param name="default.image.width" + select="''"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The portrait page width is the length of the short -edge of the physical page. -</para> +<para>If specified, this value will be used for the +<sgmltag class="attribute">width</sgmltag> attribute on +images that do not specify any +<ulink url="http://docbook.org/tdg/en/html/imagedata.html#viewport.area">viewport +dimensions</ulink>.</para> </refsect1> </refentry> -<refentry id="paper.type"> +<refentry id="preferred.mediaobject.role"> <refmeta> -<refentrytitle>paper.type</refentrytitle> - +<refentrytitle>preferred.mediaobject.role</refentrytitle> </refmeta> <refnamediv> -<refname>paper.type</refname> -<refpurpose>Select the paper type</refpurpose> +<refname>preferred.mediaobject.role</refname> +<refpurpose>Select which mediaobject to use based on +this value of an object's <sgmltag class="attribute">role</sgmltag> attribute. +</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="paper.type.frag"><xsl:param name="paper.type" - select="'USletter'"/></src:fragment> +<src:fragment id="preferred.mediaobject.role.frag"><xsl:param name="preferred.mediaobject.role"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The paper type is a convenient way to specify the paper size. -The list of known paper sizes includes USletter and most of the A, -B, and C sizes. See <literal moreinfo="none">page.width.portrait</literal>, for example. +<para>A mediaobject may contain several objects such as imageobjects. +If the parameter <parameter moreinfo="none">use.role.for.mediaobject</parameter> +is non-zero, then the <sgmltag class="attribute">role</sgmltag> attribute on +<sgmltag>imageobject</sgmltag>s and other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be +used. If one of the objects has a role value that matches the +preferred.mediaobject.role parameter, then it has first +priority for selection. If more than one has such a +role value, the first one is used. </para> - +<para> +See the <parameter moreinfo="none">use.role.for.mediaobject</parameter> parameter +for the sequence of selection.</para> </refsect1> </refentry> -<refentry id="double.sided"> +<refentry id="use.role.for.mediaobject"> <refmeta> -<refentrytitle>double.sided</refentrytitle> - +<refentrytitle>use.role.for.mediaobject</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>double.sided</refname> -<refpurpose>Is the document to be printed double sided?</refpurpose> +<refname>use.role.for.mediaobject</refname> +<refpurpose>Use <sgmltag class="attribute">role</sgmltag> attribute +value for selecting which of several objects within a mediaobject to use. +</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="double.sided.frag"><xsl:param name="double.sided" - select="'0'"/></src:fragment> +<src:fragment id="use.role.for.mediaobject.frag"><xsl:param name="use.role.for.mediaobject" + select="1"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>Double-sided documents are printed with a slightly wider margin -on the binding edge of the page. +<para>If non-zero, the <sgmltag class="attribute">role</sgmltag> attribute on +<sgmltag>imageobject</sgmltag>s or other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be +used. +</para> +<para> +The order of selection when then parameter is non-zero is: +</para> +<orderedlist inheritnum="ignore" continuation="restarts"> +<listitem> + <para>If the stylesheet parameter <parameter moreinfo="none">preferred.mediaojbect.role</parameter> has a value, then the object whose role equals that value is selected.</para> +</listitem> +<listitem> +<para>Else if an object's role attribute has a value of +<literal moreinfo="none">html</literal> for HTML processing or +<literal moreinfo="none">fo</literal> for FO output, then the first +of such objects is selected. +</para> +</listitem> +<listitem> +<para>Else the first suitable object is selected.</para> +</listitem> +</orderedlist> +<para> +If the value of +<parameter moreinfo="none">use.role.for.mediaobject</parameter> +is zero, then role attributes are not considered +and the first suitable object +with or without a role value is used. </para> -<para>FIXME: The current set of parameters does not take writing direction -into account.</para> - </refsect1> </refentry> -<refentry id="body.margin.bottom"> +<refentry id="ignore.image.scaling"> <refmeta> -<refentrytitle>body.margin.bottom</refentrytitle> - +<refentrytitle>ignore.image.scaling</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>body.margin.bottom</refname> -<refpurpose>The bottom margin of the body text</refpurpose> +<refname>ignore.image.scaling</refname> +<refpurpose>Tell the stylesheets to ignore the author's image scaling attributes</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="body.margin.bottom.frag"><xsl:param name="body.margin.bottom">0.5in</xsl:param></src:fragment> +<src:fragment id="ignore.image.scaling.frag"><xsl:param name="ignore.image.scaling" + select="0"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The body bottom margin is the distance from the last line of text -in the page body to the bottom of the region-after. -</para> +<para>If non-zero, the scaling attributes on graphics and media objects are +ignored.</para> </refsect1> </refentry> -<refentry id="body.margin.top"> -<refmeta> -<refentrytitle>body.margin.top</refentrytitle> - -</refmeta> -<refnamediv> -<refname>body.margin.top</refname> -<refpurpose>To specify the size of the top margin of a page</refpurpose> -</refnamediv> - -<refsynopsisdiv> -<src:fragment id="body.margin.top.frag"><xsl:param name="body.margin.top">1in</xsl:param></src:fragment> -</refsynopsisdiv> - -<refsect1><title>Description</title> +</reference> -<para>The body top margin is the distance from the top of the region-before -to the first line of text in the page body. -</para> +<reference><title>Pagination and General Styles</title> +<partintro> +<section><title>Understanding XSL FO Margins</title> -</refsect1> -</refentry> +<para>In order for the parameters in this section to make sense, it is useful to +consider <xref linkend="fig.pagemodel"/>.</para> + +<figure id="fig.pagemodel" float="0"> +<mediaobject> +<imageobject> +<imagedata fileref="page.png"/> +</imageobject> +<textobject><phrase>Figure showing page margins</phrase></textobject> +<textobject> +<para>This figure shows the physical page with the various FO page regions +identified.</para> +</textobject> +</mediaobject> +</figure> + +<para>First, let's consider the regions on the page.</para> + +<para>The white region is the physical page. Its dimensions are determined by +the <parameter moreinfo="none">page.height</parameter> and <parameter moreinfo="none">page.width</parameter> +parameters.</para> + +<para>The yellow region is the region-body. The size and placement of +the region body is constrained by the dimensions labelled in the +figure.</para> + +<para>The pink region at the top of the page is the region-before. The +darker area inside the region-before is the header text. In XSL, the default +display alignment for a region is <literal moreinfo="none">before</literal>, but the +DocBook stylesheets still explicitly make it <literal moreinfo="none">before</literal>. That's +why the darker area is at the top.</para> + +<para>The pink region at the bottom of the page is the region-after. +The darker area is the footer text. In XSL, the default display +alignment for a region is <literal moreinfo="none">before</literal>, +but the DocBook stylesheets explicitly make it +<literal moreinfo="none">after</literal>. That's why the darker area is at the bottom.</para> + +<para>The dimensions in the figure are:</para> + +<orderedlist numeration="upperalpha" inheritnum="ignore" continuation="restarts"> +<listitem><para>The page-master margin-top. +</para></listitem> +<listitem><para>The region-before extent. +</para></listitem> +<listitem><para>The region-body margin-top. +</para></listitem> +<listitem><para>The region-after extent. +</para></listitem> +<listitem><para>The page-master margin-bottom. +</para></listitem> +<listitem><para>The region-body margin-bottom. +</para></listitem> +<listitem><para>The sum of the page-master margin-left and the +region-body margin-left. In DocBook, the region-body margin-left is +zero by default, so this is simply the page-master region-left. +</para></listitem> +<listitem><para>The sum of the page-master margin-right and the +region-body margin-right. In DocBook, the region-body margin-right is +zero by default, so this is simply the page-master region-left. +</para></listitem> +</orderedlist> + +</section> +</partintro> + +<refentry id="page.height"> +<refmeta> +<refentrytitle>page.height</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.height</refname> +<refpurpose>The height of the physical page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.height.frag"><xsl:param name="page.height"> + <xsl:choose> + <xsl:when test="$page.orientation = 'portrait'"> + <xsl:value-of select="$page.height.portrait"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$page.width.portrait"/> + </xsl:otherwise> + </xsl:choose> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The page height is generally calculated from the +<literal moreinfo="none">paper.type</literal> and +<literal moreinfo="none">page.orientation</literal>. +</para> + +</refsect1> +</refentry> + +<refentry id="page.height.portrait"> +<refmeta> +<refentrytitle>page.height.portrait</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.height.portrait</refname> +<refpurpose>Specify the physical size of the long edge of the page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.height.portrait.frag"><xsl:param name="page.height.portrait"> + <xsl:choose> + <xsl:when test="$paper.type = 'A4landscape'">210mm</xsl:when> + <xsl:when test="$paper.type = 'USletter'">11in</xsl:when> + <xsl:when test="$paper.type = 'USlandscape'">8.5in</xsl:when> + <xsl:when test="$paper.type = '4A0'">2378mm</xsl:when> + <xsl:when test="$paper.type = '2A0'">1682mm</xsl:when> + <xsl:when test="$paper.type = 'A0'">1189mm</xsl:when> + <xsl:when test="$paper.type = 'A1'">841mm</xsl:when> + <xsl:when test="$paper.type = 'A2'">594mm</xsl:when> + <xsl:when test="$paper.type = 'A3'">420mm</xsl:when> + <xsl:when test="$paper.type = 'A4'">297mm</xsl:when> + <xsl:when test="$paper.type = 'A5'">210mm</xsl:when> + <xsl:when test="$paper.type = 'A6'">148mm</xsl:when> + <xsl:when test="$paper.type = 'A7'">105mm</xsl:when> + <xsl:when test="$paper.type = 'A8'">74mm</xsl:when> + <xsl:when test="$paper.type = 'A9'">52mm</xsl:when> + <xsl:when test="$paper.type = 'A10'">37mm</xsl:when> + <xsl:when test="$paper.type = 'B0'">1414mm</xsl:when> + <xsl:when test="$paper.type = 'B1'">1000mm</xsl:when> + <xsl:when test="$paper.type = 'B2'">707mm</xsl:when> + <xsl:when test="$paper.type = 'B3'">500mm</xsl:when> + <xsl:when test="$paper.type = 'B4'">353mm</xsl:when> + <xsl:when test="$paper.type = 'B5'">250mm</xsl:when> + <xsl:when test="$paper.type = 'B6'">176mm</xsl:when> + <xsl:when test="$paper.type = 'B7'">125mm</xsl:when> + <xsl:when test="$paper.type = 'B8'">88mm</xsl:when> + <xsl:when test="$paper.type = 'B9'">62mm</xsl:when> + <xsl:when test="$paper.type = 'B10'">44mm</xsl:when> + <xsl:when test="$paper.type = 'C0'">1297mm</xsl:when> + <xsl:when test="$paper.type = 'C1'">917mm</xsl:when> + <xsl:when test="$paper.type = 'C2'">648mm</xsl:when> + <xsl:when test="$paper.type = 'C3'">458mm</xsl:when> + <xsl:when test="$paper.type = 'C4'">324mm</xsl:when> + <xsl:when test="$paper.type = 'C5'">229mm</xsl:when> + <xsl:when test="$paper.type = 'C6'">162mm</xsl:when> + <xsl:when test="$paper.type = 'C7'">114mm</xsl:when> + <xsl:when test="$paper.type = 'C8'">81mm</xsl:when> + <xsl:when test="$paper.type = 'C9'">57mm</xsl:when> + <xsl:when test="$paper.type = 'C10'">40mm</xsl:when> + <xsl:otherwise>11in</xsl:otherwise> + </xsl:choose> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The portrait page height is the length of the long +edge of the physical page. +</para> + +</refsect1> +</refentry> + +<refentry id="page.margin.bottom"> +<refmeta> +<refentrytitle>page.margin.bottom</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.margin.bottom</refname> +<refpurpose>The bottom margin of the page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.margin.bottom.frag"><xsl:param name="page.margin.bottom" + select="'0.5in'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The bottom page margin is the distance from the bottom of the region-after +to the physical bottom of the page. +</para> + +</refsect1> +</refentry> + +<refentry id="page.margin.inner"> +<refmeta> +<refentrytitle>page.margin.inner</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.margin.inner</refname> +<refpurpose>The inner page margin</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.margin.inner.frag"><xsl:param name="page.margin.inner"> + <xsl:choose> + <xsl:when test="$double.sided != 0">1.25in</xsl:when> + <xsl:otherwise>1in</xsl:otherwise> + </xsl:choose> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The inner page margin is the distance from binding edge of the +page to the first column of text. In the left-to-right, top-to-bottom writing +direction, this is the left margin of recto pages.</para> +<para>The inner and outer margins are usually the same unless the output +is double-sided. +</para> + +</refsect1> +</refentry> + +<refentry id="page.margin.outer"> +<refmeta> +<refentrytitle>page.margin.outer</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.margin.outer</refname> +<refpurpose>The outer page margin</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.margin.outer.frag"><xsl:param name="page.margin.outer"> + <xsl:choose> + <xsl:when test="$double.sided != 0">0.75in</xsl:when> + <xsl:otherwise>1in</xsl:otherwise> + </xsl:choose> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The outer page margin is the distance from non-binding edge of the +page to the last column of text. In the left-to-right, top-to-bottom writing +direction, this is the right margin of recto pages.</para> +<para>The inner and outer margins are usually the same unless the output +is double-sided. +</para> + +</refsect1> +</refentry> + +<refentry id="page.margin.top"> +<refmeta> +<refentrytitle>page.margin.top</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.margin.top</refname> +<refpurpose>The top margin of the page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.margin.top.frag"><xsl:param name="page.margin.top" + select="'0.5in'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The top page margin is the distance from the physical top of the +page to the top of the region-before.</para> + +</refsect1> +</refentry> + +<refentry id="page.orientation"> +<refmeta> +<refentrytitle>page.orientation</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.orientation</refname> +<refpurpose>Select the page orientation</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.orientation.frag"><xsl:param name="page.orientation" + select="'portrait'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>In portrait orientation, the short edge is horizontal; in +landscape orientation, it is vertical. +</para> + +</refsect1> +</refentry> + +<refentry id="page.width"> +<refmeta> +<refentrytitle>page.width</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.width</refname> +<refpurpose>The width of the physical page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.width.frag"><xsl:param name="page.width"> + <xsl:choose> + <xsl:when test="$page.orientation = 'portrait'"> + <xsl:value-of select="$page.width.portrait"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$page.height.portrait"/> + </xsl:otherwise> + </xsl:choose> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The page width is generally calculated from the +<literal moreinfo="none">paper.type</literal> and <literal moreinfo="none">page.orientation</literal>. +</para> + +</refsect1> +</refentry> + +<refentry id="page.width.portrait"> +<refmeta> +<refentrytitle>page.width.portrait</refentrytitle> + +</refmeta> +<refnamediv> +<refname>page.width.portrait</refname> +<refpurpose>Specify the physical size of the short edge of the page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="page.width.portrait.frag"><xsl:param name="page.width.portrait"> + <xsl:choose> + <xsl:when test="$paper.type = 'USletter'">8.5in</xsl:when> + <xsl:when test="$paper.type = '4A0'">1682mm</xsl:when> + <xsl:when test="$paper.type = '2A0'">1189mm</xsl:when> + <xsl:when test="$paper.type = 'A0'">841mm</xsl:when> + <xsl:when test="$paper.type = 'A1'">594mm</xsl:when> + <xsl:when test="$paper.type = 'A2'">420mm</xsl:when> + <xsl:when test="$paper.type = 'A3'">297mm</xsl:when> + <xsl:when test="$paper.type = 'A4'">210mm</xsl:when> + <xsl:when test="$paper.type = 'A5'">148mm</xsl:when> + <xsl:when test="$paper.type = 'A6'">105mm</xsl:when> + <xsl:when test="$paper.type = 'A7'">74mm</xsl:when> + <xsl:when test="$paper.type = 'A8'">52mm</xsl:when> + <xsl:when test="$paper.type = 'A9'">37mm</xsl:when> + <xsl:when test="$paper.type = 'A10'">26mm</xsl:when> + <xsl:when test="$paper.type = 'B0'">1000mm</xsl:when> + <xsl:when test="$paper.type = 'B1'">707mm</xsl:when> + <xsl:when test="$paper.type = 'B2'">500mm</xsl:when> + <xsl:when test="$paper.type = 'B3'">353mm</xsl:when> + <xsl:when test="$paper.type = 'B4'">250mm</xsl:when> + <xsl:when test="$paper.type = 'B5'">176mm</xsl:when> + <xsl:when test="$paper.type = 'B6'">125mm</xsl:when> + <xsl:when test="$paper.type = 'B7'">88mm</xsl:when> + <xsl:when test="$paper.type = 'B8'">62mm</xsl:when> + <xsl:when test="$paper.type = 'B9'">44mm</xsl:when> + <xsl:when test="$paper.type = 'B10'">31mm</xsl:when> + <xsl:when test="$paper.type = 'C0'">917mm</xsl:when> + <xsl:when test="$paper.type = 'C1'">648mm</xsl:when> + <xsl:when test="$paper.type = 'C2'">458mm</xsl:when> + <xsl:when test="$paper.type = 'C3'">324mm</xsl:when> + <xsl:when test="$paper.type = 'C4'">229mm</xsl:when> + <xsl:when test="$paper.type = 'C5'">162mm</xsl:when> + <xsl:when test="$paper.type = 'C6'">114mm</xsl:when> + <xsl:when test="$paper.type = 'C7'">81mm</xsl:when> + <xsl:when test="$paper.type = 'C8'">57mm</xsl:when> + <xsl:when test="$paper.type = 'C9'">40mm</xsl:when> + <xsl:when test="$paper.type = 'C10'">28mm</xsl:when> + <xsl:otherwise>8.5in</xsl:otherwise> + </xsl:choose> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The portrait page width is the length of the short +edge of the physical page. +</para> + +</refsect1> +</refentry> + +<refentry id="paper.type"> +<refmeta> +<refentrytitle>paper.type</refentrytitle> + +</refmeta> +<refnamediv> +<refname>paper.type</refname> +<refpurpose>Select the paper type</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="paper.type.frag"><xsl:param name="paper.type" + select="'USletter'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The paper type is a convenient way to specify the paper size. +The list of known paper sizes includes USletter and most of the A, +B, and C sizes. See <literal moreinfo="none">page.width.portrait</literal>, for example. +</para> + +</refsect1> +</refentry> + +<refentry id="double.sided"> +<refmeta> +<refentrytitle>double.sided</refentrytitle> + +</refmeta> +<refnamediv> +<refname>double.sided</refname> +<refpurpose>Is the document to be printed double sided?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="double.sided.frag"><xsl:param name="double.sided" + select="0"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Double-sided documents are printed with a slightly wider margin +on the binding edge of the page. +</para> +<para>FIXME: The current set of parameters does not take writing direction +into account.</para> + +</refsect1> +</refentry> + +<refentry id="body.margin.bottom"> +<refmeta> +<refentrytitle>body.margin.bottom</refentrytitle> + +</refmeta> +<refnamediv> +<refname>body.margin.bottom</refname> +<refpurpose>The bottom margin of the body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="body.margin.bottom.frag"><xsl:param name="body.margin.bottom" + select="'0.5in'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The body bottom margin is the distance from the last line of text +in the page body to the bottom of the region-after. +</para> + +</refsect1> +</refentry> + +<refentry id="body.margin.top"> +<refmeta> +<refentrytitle>body.margin.top</refentrytitle> + +</refmeta> +<refnamediv> +<refname>body.margin.top</refname> +<refpurpose>To specify the size of the top margin of a page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="body.margin.top.frag"><xsl:param name="body.margin.top" + select="'0.5in'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The body top margin is the distance from the top of the region-before +to the first line of text in the page body. +</para> + +</refsect1> +</refentry> <refentry id="alignment"> <refmeta> -<refentrytitle>alignment</refentrytitle> +<refentrytitle>alignment</refentrytitle> + +</refmeta> +<refnamediv> +<refname>alignment</refname> +<refpurpose>Specify the default text alignment</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="alignment.frag"><xsl:param name="alignment">justify</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The default text alignment is used for most body text. +</para> + +</refsect1> +</refentry> + +<refentry id="hyphenate"> +<refmeta> +<refentrytitle>hyphenate</refentrytitle> + +</refmeta> +<refnamediv> +<refname>hyphenate</refname> +<refpurpose>Specify hyphenation behavior</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="hyphenate.frag"><xsl:param name="hyphenate">true</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If true, words may be hyphenated. Otherwise, they may not. +</para> + +</refsect1> +</refentry> + +<refentry id="line-height"> +<refmeta> +<refentrytitle>line-height</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>line-height</refname> +<refpurpose>Specify the line-height property</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="line-height.frag"><xsl:param name="line-height" + select="'normal'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Sets the line-height property.</para> + +</refsect1> +</refentry> + +<refentry id="column.count.back"> +<refmeta> +<refentrytitle>column.count.back</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.back</refname> +<refpurpose>Number of columns on back matter pages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="column.count.back.frag"><xsl:param name="column.count.back" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Number of columns on back matter (appendix, glossary, etc.) pages.</para> + +</refsect1> +</refentry> + +<refentry id="column.count.body"> +<refmeta> +<refentrytitle>column.count.body</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.body</refname> +<refpurpose>Number of columns on body pages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="column.count.body.frag"><xsl:param name="column.count.body" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Number of columns on body pages.</para> + +</refsect1> +</refentry> + +<refentry id="column.count.front"> +<refmeta> +<refentrytitle>column.count.front</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.front</refname> +<refpurpose>Number of columns on front matter pages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="column.count.front.frag"><xsl:param name="column.count.front" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Number of columns on front matter (dedication, preface, etc.) pages.</para> + +</refsect1> +</refentry> + +<refentry id="column.count.index"> +<refmeta> +<refentrytitle>column.count.index</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.index</refname> +<refpurpose>Number of columns on index pages</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="column.count.index.frag"><xsl:param name="column.count.index" + select="2"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Number of columns on index pages.</para> + +</refsect1> +</refentry> + +<refentry id="column.count.lot"> +<refmeta> +<refentrytitle>column.count.lot</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.lot</refname> +<refpurpose>Number of columns on a 'List-of-Titles' page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="column.count.lot.frag"><xsl:param name="column.count.lot" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Number of columns on a page sequence containing the Table of Contents, +List of Figures, etc.</para> + +</refsect1> +</refentry> + +<refentry id="column.count.titlepage"> +<refmeta> +<refentrytitle>column.count.titlepage</refentrytitle> +<refmiscinfo role="type">integer</refmiscinfo> +</refmeta> +<refnamediv> +<refname>column.count.titlepage</refname> +<refpurpose>Number of columns on a title page</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="column.count.titlepage.frag"><xsl:param name="column.count.titlepage" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Number of columns on a title page</para> + +</refsect1> +</refentry> + +<refentry id="region.after.extent"> +<refmeta> +<refentrytitle>region.after.extent</refentrytitle> + +</refmeta> +<refnamediv> +<refname>region.after.extent</refname> +<refpurpose>Specifies the height of the footer.</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="region.after.extent.frag"><xsl:param name="region.after.extent" + select="'0.4in'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The region after extent is the height of the area where footers +are printed. +</para> + +</refsect1> +</refentry> + +<refentry id="region.before.extent"> +<refmeta> +<refentrytitle>region.before.extent</refentrytitle> + +</refmeta> +<refnamediv> +<refname>region.before.extent</refname> +<refpurpose>Specifies the height of the header</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="region.before.extent.frag"><xsl:param name="region.before.extent" + select="'0.4in'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The region before extent is the height of the area where headers +are printed. +</para> + +</refsect1> +</refentry> + +<refentry id="default.units"> +<refmeta> +<refentrytitle>default.units</refentrytitle> +<refmiscinfo role="type">list</refmiscinfo> +<refmiscinfo role="value">cm</refmiscinfo> +<refmiscinfo role="value">mm</refmiscinfo> +<refmiscinfo role="value">in</refmiscinfo> +<refmiscinfo role="value">pt</refmiscinfo> +<refmiscinfo role="value">pc</refmiscinfo> +<refmiscinfo role="value">px</refmiscinfo> +<refmiscinfo role="value">em</refmiscinfo> +</refmeta> +<refnamediv> +<refname>default.units</refname> +<refpurpose>Default units for an unqualified dimension</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="default.units.frag"><xsl:param name="default.units" + select="'pt'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If an unqualified dimension is encountered (for example, in a +graphic width), the <parameter moreinfo="none">default-units</parameter> will be used for the +units. Unqualified dimensions are not allowed in XSL Formatting Objects. +</para> + +</refsect1> +</refentry> + +<refentry id="normal.para.spacing"> +<refnamediv> +<refname>normal.para.spacing</refname> +<refpurpose>What space do you want between normal paragraphs</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="normal.para.spacing.frag"><xsl:attribute-set name="normal.para.spacing"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> +<refsect1><title>Description</title> +<para>Specify the spacing required between normal paragraphs</para> +</refsect1> +</refentry> + +<refentry id="body.font.master"> +<refmeta> +<refentrytitle>body.font.master</refentrytitle> + +</refmeta> +<refnamediv> +<refname>body.font.master</refname> +<refpurpose>Specifies the default point size for body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="body.font.master.frag"><xsl:param name="body.font.master">10</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The body font size is specified in two parameters +(<varname>body.font.master</varname> and <varname>body.font.size</varname>) +so that math can be performed on the font size by XSLT. +</para> + +</refsect1> +</refentry> + +<refentry id="body.font.size"> +<refmeta> +<refentrytitle>body.font.size</refentrytitle> + +</refmeta> +<refnamediv> +<refname>body.font.size</refname> +<refpurpose>Specifies the default font size for body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="body.font.size.frag"><xsl:param name="body.font.size"> + <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text> +</xsl:param></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The body font size is specified in two parameters +(<varname>body.font.master</varname> and <varname>body.font.size</varname>) +so that math can be performed on the font size by XSLT. +</para> + +</refsect1> +</refentry> + +<refentry id="footnote.font.size"> +<refmeta> +<refentrytitle>footnote.font.size</refentrytitle> </refmeta> <refnamediv> -<refname>alignment</refname> -<refpurpose>Specify the default text alignment</refpurpose> +<refname>footnote.font.size</refname> +<refpurpose>The font size for footnotes</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="alignment.frag"><xsl:param name="alignment">justify</xsl:param></src:fragment> +<src:fragment id="footnote.font.size.frag"><xsl:param name="footnote.font.size"> + <xsl:value-of select="$body.font.master * 0.8"/><xsl:text>pt</xsl:text> +</xsl:param></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The default text alignment is used for most body text. +<para>The footnote font size is used for...footnotes! </para> </refsect1> </refentry> -<refentry id="hyphenate"> +<refentry id="title.margin.left"> <refmeta> -<refentrytitle>hyphenate</refentrytitle> +<refentrytitle>title.margin.left</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>title.margin.left</refname> +<refpurpose>Adjust the left margin for titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="title.margin.left.frag"><xsl:param name="title.margin.left" + select="'-4pc'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>This parameter adjusts the left margin for titles. +</para> +</refsect1> +</refentry> + +<refentry id="draft.mode"> +<refmeta> +<refentrytitle>draft.mode</refentrytitle> +<refmiscinfo role="type">list</refmiscinfo> </refmeta> <refnamediv> -<refname>hyphenate</refname> -<refpurpose>Specify hyphenation behavior</refpurpose> +<refname>draft.mode</refname> +<refpurpose>Select draft mode</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="hyphenate.frag"><xsl:param name="hyphenate">true</xsl:param></src:fragment> +<src:fragment id="draft.mode.frag"><xsl:param name="draft.mode" + select="'maybe'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>If true, words may be hyphenated. Otherwise, they may not. +<para>Selects draft mode. If <parameter moreinfo="none">draft.mode</parameter> is +<quote><literal moreinfo="none">yes</literal></quote>, the entire document will be treated +as a draft. If it is <quote><literal moreinfo="none">no</literal></quote>, the entire document +will be treated as a final copy. If it is <quote><literal moreinfo="none">maybe</literal></quote>, +individual sections will be treated as draft or final independently, depending +on how their <sgmltag class="attribute">status</sgmltag> attribute is set. </para> </refsect1> </refentry> -<refentry id="line-height"> +<refentry id="draft.watermark.image"> <refmeta> -<refentrytitle>line-height</refentrytitle> -<refmiscinfo role="type">string</refmiscinfo> +<refentrytitle>draft.watermark.image</refentrytitle> +<refmiscinfo role="type">uri</refmiscinfo> </refmeta> <refnamediv> -<refname>line-height</refname> -<refpurpose>Specify the line-height property</refpurpose> +<refname>draft.watermark.image</refname> +<refpurpose>The URI of the image to be used for draft watermarks</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="line-height.frag"><xsl:param name="line-height" - select="'normal'"/></src:fragment> +<src:fragment id="draft.watermark.image.frag"><xsl:param name="draft.watermark.image" + select="'http://docbook.sourceforge.net/release/images/draft.png'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>Sets the line-height property.</para> +<para>The image to be used for draft watermarks.</para> </refsect1> </refentry> -<refentry id="column.count"> +<refentry id="headers.on.blank.pages"> <refmeta> -<refentrytitle>column.count</refentrytitle> +<refentrytitle>headers.on.blank.pages</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>headers.on.blank.pages</refname> +<refpurpose>Put headers on blank pages?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="headers.on.blank.pages.frag"><xsl:param name="headers.on.blank.pages" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero, headers will be placed on blank pages.</para> +</refsect1> +</refentry> + +<refentry id="footers.on.blank.pages"> +<refmeta> +<refentrytitle>footers.on.blank.pages</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>column.count</refname> -<refpurpose>Specifies the number of columns of text on the page</refpurpose> +<refname>footers.on.blank.pages</refname> +<refpurpose>Put footers on blank pages?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="column.count.frag"><xsl:param name="column.count" - select="'1'"/></src:fragment> +<src:fragment id="footers.on.blank.pages.frag"><xsl:param name="footers.on.blank.pages" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero, footers will be placed on blank pages.</para> + +</refsect1> +</refentry> + +<refentry id="header.rule"> +<refmeta> +<refentrytitle>header.rule</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>header.rule</refname> +<refpurpose>Rule under headers?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="header.rule.frag"><xsl:param name="header.rule" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero, a rule will be drawn below the page headers.</para> + +</refsect1> +</refentry> + +<refentry id="footer.rule"> +<refmeta> +<refentrytitle>footer.rule</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>footer.rule</refname> +<refpurpose>Rule over footers?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="footer.rule.frag"><xsl:param name="footer.rule" + select="1"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero, a rule will be drawn above the page footers.</para> + +</refsect1> +</refentry> + +<refentry id="header.content.properties"> +<refmeta> +<refentrytitle>header.content.properties</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>header.content.properties</refname> +<refpurpose/> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="header.content.properties.frag"><xsl:attribute-set name="header.content.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.font.family"/> + </xsl:attribute> + <xsl:attribute name="margin-left"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> + <xsl:attribute name="margin-right"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Properties of page header content.</para> + +</refsect1> +</refentry> + +<refentry id="footer.content.properties"> +<refmeta> +<refentrytitle>footer.content.properties</refentrytitle> +<refmiscinfo role="type"/> +</refmeta> +<refnamediv> +<refname>footer.content.properties</refname> +<refpurpose/> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="footer.content.properties.frag"><xsl:attribute-set name="footer.content.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.font.family"/> + </xsl:attribute> + <xsl:attribute name="margin-left"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> + <xsl:attribute name="margin-right"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Properties of page footer content.</para> + +</refsect1> +</refentry> + +</reference> + +<reference><title>Font Families</title> +<refentry id="body.font.family"> +<refmeta> +<refentrytitle>body.font.family</refentrytitle> + +</refmeta> +<refnamediv> +<refname>body.font.family</refname> +<refpurpose>The default font family for body text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="body.font.family.frag"><xsl:param name="body.font.family" + select="'serif'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The specified number of columns of text will appear on each page. +<para>The body font family is the default font used for text in the page body. </para> </refsect1> </refentry> -<refentry id="column.count.of.index"> +<refentry id="dingbat.font.family"> <refmeta> -<refentrytitle>column.count.of.index</refentrytitle> -<refmiscinfo role="type">integer</refmiscinfo> +<refentrytitle>dingbat.font.family</refentrytitle> + </refmeta> <refnamediv> -<refname>column.count.of.index</refname> -<refpurpose>Number of columns in the index</refpurpose> +<refname>dingbat.font.family</refname> +<refpurpose>The font family for copyright, quotes, and other symbols</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="column.count.of.index.frag"><xsl:param name="column.count.of.index" - select="$column.count"/></src:fragment> +<src:fragment id="dingbat.font.family.frag"><xsl:param name="dingbat.font.family" + select="'serif'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>This parameter specifies the number of columns on pages in the index. -The default is the same as the <parameter moreinfo="none">column.count</parameter>.</para> +<para>The dingbat font family is used for dingbats. If it is defined +as the empty string, no font change is effected around dingbats. +</para> </refsect1> </refentry> -<refentry id="region.after.extent"> +<refentry id="monospace.font.family"> <refmeta> -<refentrytitle>region.after.extent</refentrytitle> +<refentrytitle>monospace.font.family</refentrytitle> </refmeta> <refnamediv> -<refname>region.after.extent</refname> -<refpurpose>Specifies the height of the footer.</refpurpose> +<refname>monospace.font.family</refname> +<refpurpose>The default font family for monospace environments</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="region.after.extent.frag"><xsl:param name="region.after.extent" - select="'0.5in'"/></src:fragment> +<src:fragment id="monospace.font.family.frag"><xsl:param name="monospace.font.family" + select="'monospace'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The region after extent is the height of the area where footers -are printed. +<para>The monospace font family is used for verbatim environments +(program listings, screens, etc.). </para> </refsect1> </refentry> -<refentry id="region.before.extent"> +<refentry id="sans.font.family"> <refmeta> -<refentrytitle>region.before.extent</refentrytitle> +<refentrytitle>sans.font.family</refentrytitle> </refmeta> <refnamediv> -<refname>region.before.extent</refname> -<refpurpose>Specifies the height of the header</refpurpose> +<refname>sans.font.family</refname> +<refpurpose>The default sans-serif font family</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="region.before.extent.frag"><xsl:param name="region.before.extent" - select="'0.5in'"/></src:fragment> +<src:fragment id="sans.font.family.frag"><xsl:param name="sans.font.family" + select="'sans-serif'"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The region before extent is the height of the area where headers -are printed. +<para>The default sans-serif font family. At the present, this isn't +actually used by the stylesheets. </para> </refsect1> </refentry> -<refentry id="default.units"> +<refentry id="title.font.family"> <refmeta> -<refentrytitle>default.units</refentrytitle> -<refmiscinfo role="type">list</refmiscinfo> -<refmiscinfo role="value">cm</refmiscinfo> -<refmiscinfo role="value">mm</refmiscinfo> -<refmiscinfo role="value">in</refmiscinfo> -<refmiscinfo role="value">pt</refmiscinfo> -<refmiscinfo role="value">pc</refmiscinfo> -<refmiscinfo role="value">px</refmiscinfo> -<refmiscinfo role="value">em</refmiscinfo> +<refentrytitle>title.font.family</refentrytitle> + </refmeta> <refnamediv> -<refname>default.units</refname> -<refpurpose>Default units for an unqualified dimension</refpurpose> +<refname>title.font.family</refname> +<refpurpose>The default font family for titles</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="title.font.family.frag"><xsl:param name="title.font.family" + select="'sans-serif'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The title font family is used for titles (chapter, section, figure, +etc.) +</para> + +</refsect1> +</refentry> + +</reference> + +<reference><title>Lists</title> +<refentry id="list.block.spacing"> +<refnamediv> +<refname>list.block.spacing</refname> +<refpurpose>What spacing do you want before and after lists?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="default.units.frag"><xsl:param name="default.units" - select="'pt'"/></src:fragment> +<src:fragment id="list.block.spacing.frag"><xsl:attribute-set name="list.block.spacing"> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> - <refsect1><title>Description</title> - -<para>If an unqualified dimension is encountered (for example, in a -graphic width), the <parameter moreinfo="none">default-units</parameter> will be used for the -units. Unqualified dimensions are not allowed in XSL Formatting Objects. -</para> - +<para>Specify the spacing required before and after a list. It is necessary to specify the space after a list block because lists can come inside of paras. </para> </refsect1> </refentry> -<refentry id="normal.para.spacing"> +<refentry id="list.item.spacing"> <refnamediv> -<refname>normal.para.spacing</refname> -<refpurpose>What space do you want between normal paragraphs</refpurpose> +<refname>list.item.spacing</refname> +<refpurpose>What space do you want between list items?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="normal.para.spacing.frag"><xsl:attribute-set name="normal.para.spacing"> +<src:fragment id="list.item.spacing.frag"><xsl:attribute-set name="list.item.spacing"> <xsl:attribute name="space-before.optimum">1em</xsl:attribute> <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>Specify the spacing required between normal paragraphs</para> +<para>Specify what spacing you want between each list item.</para> </refsect1> </refentry> -<refentry id="body.font.master"> -<refmeta> -<refentrytitle>body.font.master</refentrytitle> - -</refmeta> +<refentry id="compact.list.item.spacing"> <refnamediv> -<refname>body.font.master</refname> -<refpurpose>Specifies the default point size for body text</refpurpose> +<refname>compact.list.item.spacing</refname> +<refpurpose>What space do you want between list items (when spacing=compact)?</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="body.font.master.frag"><xsl:param name="body.font.master">10</xsl:param></src:fragment> +<src:fragment id="compact.list.item.spacing.frag"><xsl:attribute-set name="compact.list.item.spacing"> + <xsl:attribute name="space-before.optimum">0em</xsl:attribute> + <xsl:attribute name="space-before.minimum">0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> - <refsect1><title>Description</title> - -<para>The body font size is specified in two parameters -(<varname>body.font.master</varname> and <varname>body.font.size</varname>) -so that math can be performed on the font size by XSLT. -</para> - +<para>Specify what spacing you want between each list item when +<sgmltag class="attribute">spacing</sgmltag> is +<quote><literal moreinfo="none">compact</literal></quote>.</para> </refsect1> </refentry> -<refentry id="body.font.size"> -<refmeta> -<refentrytitle>body.font.size</refentrytitle> +</reference> +<reference><title>Cross References</title> +<refentry id="insert.xref.page.number"> +<refmeta> +<refentrytitle>insert.xref.page.number</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname>body.font.size</refname> -<refpurpose>Specifies the default font size for body text</refpurpose> +<refname>insert.xref.page.number</refname> +<refpurpose>Turns page numbers in xrefs on and off</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="body.font.size.frag"><xsl:param name="body.font.size"> - <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text> -</xsl:param></src:fragment> +<src:fragment id="insert.xref.page.number.frag"><xsl:param name="insert.xref.page.number" + select="0"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The body font size is specified in two parameters -(<varname>body.font.master</varname> and <varname>body.font.size</varname>) -so that math can be performed on the font size by XSLT. +<para>If non-zero, cross references (<sgmltag>xref</sgmltag>s) will +include page number citations. </para> </refsect1> </refentry> -<refentry id="footnote.font.size"> -<refmeta> -<refentrytitle>footnote.font.size</refentrytitle> - -</refmeta> +<refentry id="xref.properties"> <refnamediv> -<refname>footnote.font.size</refname> -<refpurpose>The font size for footnotes</refpurpose> +<refname>xref.properties</refname> +<refpurpose>Properties associated with cross-reference text</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="footnote.font.size.frag"><xsl:param name="footnote.font.size"> - <xsl:value-of select="$body.font.master * 0.8"/><xsl:text>pt</xsl:text> -</xsl:param></src:fragment> +<src:fragment id="xref.properties.frag"><xsl:attribute-set name="xref.properties"> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The footnote font size is used for...footnotes! -</para> +<para>This attribute set is used on cross reference text.</para> </refsect1> </refentry> -<refentry id="title.margin.left"> -<refmeta> -<refentrytitle>title.margin.left</refentrytitle> -<refmiscinfo role="type"/> -</refmeta> +</reference> + +<reference><title>Property Sets</title> +<refentry id="component.title.properties"> <refnamediv> -<refname>title.margin.left</refname> -<refpurpose>Adjust the left margin for titles</refpurpose> +<refname>component.title.properties</refname> +<refpurpose>Specify the styling for the title elements of a component.</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="title.margin.left.frag"><xsl:param name="title.margin.left" - select="'-4pc'"/></src:fragment> +<src:fragment id="component.title.properties.frag"><xsl:attribute-set name="component.title.properties"> + <xsl:attribute name="space-before.optimum">2em</xsl:attribute> + <xsl:attribute name="space-before.minimum">1.8em</xsl:attribute> + <xsl:attribute name="space-before.maximum">2.2em</xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="font-size">18pt</xsl:attribute> + <xsl:attribute name="space-after.optimum">1.5em</xsl:attribute> + <xsl:attribute name="space-after.minimum">1.3em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.8em</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> - <refsect1><title>Description</title> -<para>This parameter adjusts the left margin for titles. -</para> +<para>A set of attributes are used to style the title of a +component (chapters, appendixes, articles, etc.). Components are usually +printed in the <parameter moreinfo="none">title.font.family</parameter>. +Spacing before and after, font size etc are specified +using this parameter.</para> </refsect1> </refentry> -<refentry id="draft.watermark.image"> -<refmeta> -<refentrytitle>draft.watermark.image</refentrytitle> -<refmiscinfo role="type">uri</refmiscinfo> -</refmeta> +<refentry id="formal.object.properties"> <refnamediv> -<refname>draft.watermark.image</refname> -<refpurpose>The URI of the image to be used for draft watermarks</refpurpose> +<refname>formal.object.properties</refname> +<refpurpose>Properties associated with a formal object such as a figure, or other component that has a title</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="draft.watermark.image.frag"><xsl:param name="draft.watermark.image" - select="'http://docbook.sourceforge.net/release/images/draft.png'"/></src:fragment> +<src:fragment id="formal.object.properties.frag"><xsl:attribute-set name="formal.object.properties"> + <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">2em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The image to be used for draft watermarks.</para> +<para>The styling for formal objects in docbook. Specify the spacing +before and after the object.</para> </refsect1> </refentry> -</reference> - -<reference><title>Font Families</title> -<refentry id="body.font.family"> -<refmeta> -<refentrytitle>body.font.family</refentrytitle> - -</refmeta> +<refentry id="formal.title.properties"> <refnamediv> -<refname>body.font.family</refname> -<refpurpose>The default font family for body text</refpurpose> +<refname>formal.title.properties</refname> +<refpurpose>Style the title element of formal object such as a figure.</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="body.font.family.frag"><xsl:param name="body.font.family">Times Roman</xsl:param></src:fragment> +<src:fragment id="formal.title.properties.frag"><xsl:attribute-set name="formal.title.properties" + use-attribute-sets="normal.para.spacing"> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> + <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute> + <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> - <refsect1><title>Description</title> +<para>Specify how the title should be styled. Specify the font size and weight of the title of the formal object.</para> +</refsect1> +</refentry> -<para>The body font family is the default font used for text in the page body. -</para> +<refentry id="informal.object.properties"> +<refnamediv> +<refname>informal.object.properties</refname> +<refpurpose>Properties associated with a formal object such as a figure, or other component that has a title</refpurpose> +</refnamediv> +<refsynopsisdiv> +<src:fragment id="informal.object.properties.frag"><xsl:attribute-set name="informal.object.properties"> + <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">2em</xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> +<refsect1><title>Description</title> +<para>The styling for informal objects in docbook. Specify the spacing before and after the object.</para> </refsect1> </refentry> -<refentry id="dingbat.font.family"> +<refentry id="monospace.properties"> <refmeta> -<refentrytitle>dingbat.font.family</refentrytitle> - +<refentrytitle>monospace.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> </refmeta> <refnamediv> -<refname>dingbat.font.family</refname> -<refpurpose>The font family for copyright, quotes, and other symbols</refpurpose> +<refname>monospace.properties</refname> +<refpurpose>Properties of monospaced content</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="dingbat.font.family.frag"><xsl:param name="dingbat.font.family">Times Roman</xsl:param></src:fragment> +<src:fragment id="monospace.properties.frag"><xsl:attribute-set name="monospace.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$monospace.font.family"/> + </xsl:attribute> + <xsl:attribute name="font-size">0.9em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The dingbat font family is used for dingbats. If it is defined -as the empty string, no font change is effected around dingbats. -</para> +<para>Specifies the font name and size for monospaced output.</para> </refsect1> </refentry> -<refentry id="monospace.font.family"> -<refmeta> -<refentrytitle>monospace.font.family</refentrytitle> - -</refmeta> +<refentry id="verbatim.properties"> <refnamediv> -<refname>monospace.font.family</refname> -<refpurpose>The default font family for monospace environments</refpurpose> +<refname>verbatim.properties</refname> +<refpurpose>Properties associated with verbatim text</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="monospace.font.family.frag"><xsl:param name="monospace.font.family">Courier</xsl:param></src:fragment> +<src:fragment id="verbatim.properties.frag"><xsl:attribute-set name="verbatim.properties"> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> +<para>This attribute set is used on all verbatim environments.</para> +</refsect1> -<para>The monospace font family is used for verbatim environments -(program listings, screens, etc.). -</para> +</refentry> + +<refentry id="monospace.verbatim.properties"> +<refnamediv> +<refname>monospace.verbatim.properties</refname> +<refpurpose>What font and size do you want for monospaced content?</refpurpose> +</refnamediv> +<refsynopsisdiv> +<src:fragment id="monospace.verbatim.properties.frag"><xsl:attribute-set name="monospace.verbatim.properties" + use-attribute-sets="verbatim.properties monospace.properties"> + <xsl:attribute name="text-align">start</xsl:attribute> +</xsl:attribute-set></src:fragment> +</refsynopsisdiv> +<refsect1><title>Description</title> +<para>Specify the font name and size you want for monospaced output</para> </refsect1> </refentry> -<refentry id="sans.font.family"> +<refentry id="sidebar.properties"> <refmeta> -<refentrytitle>sans.font.family</refentrytitle> - +<refentrytitle>sidebar.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> </refmeta> <refnamediv> -<refname>sans.font.family</refname> -<refpurpose>The default sans-serif font family</refpurpose> +<refname>sidebar.properties</refname> +<refpurpose>Attribute set for sidebar properties</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="sans.font.family.frag"><xsl:param name="sans.font.family">Helvetica</xsl:param></src:fragment> +<src:fragment id="sidebar.properties.frag"><xsl:attribute-set name="sidebar.properties" + use-attribute-sets="formal.object.properties"> + <xsl:attribute name="border-style">solid</xsl:attribute> + <xsl:attribute name="border-width">1pt</xsl:attribute> + <xsl:attribute name="border-color">black</xsl:attribute> + <xsl:attribute name="background-color">#DDDDDD</xsl:attribute> + <xsl:attribute name="padding-left">12pt</xsl:attribute> + <xsl:attribute name="padding-right">12pt</xsl:attribute> + <xsl:attribute name="padding-top">6pt</xsl:attribute> + <xsl:attribute name="padding-bottom">6pt</xsl:attribute> +<!-- + <xsl:attribute name="margin-left">12pt</xsl:attribute> + <xsl:attribute name="margin-right">12pt</xsl:attribute> + <xsl:attribute name="margin-top">6pt</xsl:attribute> + <xsl:attribute name="margin-bottom">6pt</xsl:attribute> +--> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The default sans-serif font family. At the present, this isn't -actually used by the stylesheets. -</para> +<para>The styling for sidebars.</para> </refsect1> </refentry> -<refentry id="title.font.family"> +<refentry id="section.title.properties"> <refmeta> -<refentrytitle>title.font.family</refentrytitle> - +<refentrytitle>section.title.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> </refmeta> <refnamediv> -<refname>title.font.family</refname> -<refpurpose>The default font family for titles</refpurpose> +<refname>section.title.properties</refname> +<refpurpose>Properties for section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="title.font.family.frag"><xsl:param name="title.font.family">Helvetica</xsl:param></src:fragment> +<src:fragment id="section.title.properties.frag"><xsl:attribute-set name="section.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"/> + </xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <!-- font size is calculated dynamically by section.heading template --> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>The title font family is used for titles (chapter, section, figure, -etc.) -</para> +<para>The properties common to all section titles.</para> </refsect1> </refentry> -</reference> - -<reference><title>Lists</title> -<refentry id="list.block.spacing"> +<refentry id="section.title.level1.properties"> +<refmeta> +<refentrytitle>section.title.level1.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> +</refmeta> <refnamediv> -<refname>list.block.spacing</refname> -<refpurpose>What spacing do you want before lists?</refpurpose> +<refname>section.title.level1.properties</refname> +<refpurpose>Properties for level-1 section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="list.block.spacing.frag"><xsl:attribute-set name="list.block.spacing"> - <xsl:attribute name="space-before.optimum">1em</xsl:attribute> - <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> - <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +<src:fragment id="section.title.level1.properties.frag"><xsl:attribute-set name="section.title.level1.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 2.0736"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>Specify the spacing required before a list. </para> + +<para>The properties of level-1 section titles.</para> + </refsect1> </refentry> -<refentry id="list.item.spacing"> +<refentry id="section.title.level2.properties"> +<refmeta> +<refentrytitle>section.title.level2.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> +</refmeta> <refnamediv> -<refname>list.item.spacing</refname> -<refpurpose>What space do you want between list items?</refpurpose> +<refname>section.title.level2.properties</refname> +<refpurpose>Properties for level-1 section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="list.item.spacing.frag"><xsl:attribute-set name="list.item.spacing"> - <xsl:attribute name="space-before.optimum">1em</xsl:attribute> - <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> - <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +<src:fragment id="section.title.level2.properties.frag"><xsl:attribute-set name="section.title.level2.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.728"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>Specify what spacing you want between each list item.</para> + +<para>The properties of level-2 section titles.</para> + </refsect1> </refentry> -<refentry id="compact.list.item.spacing"> +<refentry id="section.title.level3.properties"> +<refmeta> +<refentrytitle>section.title.level3.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> +</refmeta> <refnamediv> -<refname>compact.list.item.spacing</refname> -<refpurpose>What space do you want between list items (when spacing=compact)?</refpurpose> +<refname>section.title.level3.properties</refname> +<refpurpose>Properties for level-1 section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="compact.list.item.spacing.frag"><xsl:attribute-set name="compact.list.item.spacing"> - <xsl:attribute name="space-before.optimum">0em</xsl:attribute> - <xsl:attribute name="space-before.minimum">0em</xsl:attribute> - <xsl:attribute name="space-before.maximum">0.2em</xsl:attribute> +<src:fragment id="section.title.level3.properties.frag"><xsl:attribute-set name="section.title.level3.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.44"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>Specify what spacing you want between each list item when -<sgmltag class="attribute">spacing</sgmltag> is -<quote><literal moreinfo="none">compact</literal></quote>.</para> + +<para>The properties of level-3 section titles.</para> + </refsect1> </refentry> -</reference> - -<reference><title>Cross References</title> -<refentry id="insert.xref.page.number"> +<refentry id="section.title.level4.properties"> <refmeta> -<refentrytitle>insert.xref.page.number</refentrytitle> -<refmiscinfo role="type">boolean</refmiscinfo> +<refentrytitle>section.title.level4.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> </refmeta> <refnamediv> -<refname>insert.xref.page.number</refname> -<refpurpose>Turns page numbers in xrefs on and off</refpurpose> +<refname>section.title.level4.properties</refname> +<refpurpose>Properties for level-1 section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="insert.xref.page.number.frag"><xsl:param name="insert.xref.page.number" - select="0"/></src:fragment> +<src:fragment id="section.title.level4.properties.frag"><xsl:attribute-set name="section.title.level4.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>When equal to 1, this parameter triggers generation of page -number citations after xrefs. -</para> +<para>The properties of level-4 section titles.</para> </refsect1> </refentry> -<refentry id="xref.properties"> +<refentry id="section.title.level5.properties"> +<refmeta> +<refentrytitle>section.title.level5.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> +</refmeta> <refnamediv> -<refname>xref.properties</refname> -<refpurpose>FIXME:</refpurpose> +<refname>section.title.level5.properties</refname> +<refpurpose>Properties for level-1 section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="xref.properties.frag"><xsl:attribute-set name="xref.properties"> - +<src:fragment id="section.title.level5.properties.frag"><xsl:attribute-set name="section.title.level5.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>FIXME:</para> + +<para>The properties of level-5 section titles.</para> + </refsect1> </refentry> -</reference> - -<reference><title>Property Sets</title> -<refentry id="component.title.properties"> +<refentry id="section.title.level6.properties"> +<refmeta> +<refentrytitle>section.title.level6.properties</refentrytitle> +<refmiscinfo role="type">attribute set</refmiscinfo> +</refmeta> <refnamediv> -<refname>component.title.properties</refname> -<refpurpose>Specify the styling for the title elements of a component.</refpurpose> +<refname>section.title.level6.properties</refname> +<refpurpose>Properties for level-1 section titles</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="component.title.properties.frag"><xsl:attribute-set name="component.title.properties"> - <xsl:attribute name="space-before.optimum">2em</xsl:attribute> - <xsl:attribute name="space-before.minimum">1.8em</xsl:attribute> - <xsl:attribute name="space-before.maximum">2.2em</xsl:attribute> - <xsl:attribute name="font-weight">bold</xsl:attribute> - <xsl:attribute name="font-size">18pt</xsl:attribute> - <xsl:attribute name="space-after.optimum">1.5em</xsl:attribute> - <xsl:attribute name="space-after.minimum">1.3em</xsl:attribute> - <xsl:attribute name="space-after.maximum">1.8em</xsl:attribute> - <xsl:attribute name="hyphenate">false</xsl:attribute> - <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> +<src:fragment id="section.title.level6.properties.frag"><xsl:attribute-set name="section.title.level6.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>A set of attributes are used to style the title of a -component (chapters, appendixes, articles, etc.). Components are usually -printed in the <parameter moreinfo="none">title.font.family</parameter>. -Spacing before and after, font size etc are specified -using this parameter.</para> +<para>The properties of level-6 section titles. This property set is actually +used for all titles below level 5.</para> </refsect1> </refentry> -<refentry id="formal.object.properties"> +<refentry id="figure.properties"> <refnamediv> -<refname>formal.object.properties</refname> -<refpurpose>Properties associated with a formal object such as a figure, or other component that has a title</refpurpose> +<refname>figure.properties</refname> +<refpurpose>Properties associated with a figure</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="formal.object.properties.frag"><xsl:attribute-set name="formal.object.properties"> - <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> - <xsl:attribute name="space-before.optimum">1em</xsl:attribute> - <xsl:attribute name="space-before.maximum">2em</xsl:attribute> - <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> - <xsl:attribute name="space-after.optimum">1em</xsl:attribute> - <xsl:attribute name="space-after.maximum">2em</xsl:attribute> -</xsl:attribute-set></src:fragment> +<src:fragment id="figure.properties.frag"><xsl:attribute-set name="figure.properties" + use-attribute-sets="formal.object.properties"/></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>The styling for formal objects in docbook. Specify the spacing before and after the object.</para> + +<para>The styling for figures.</para> + </refsect1> </refentry> -<refentry id="formal.title.properties"> +<refentry id="example.properties"> <refnamediv> -<refname>formal.title.properties</refname> -<refpurpose>Style the title element of formal object such as a figure.</refpurpose> +<refname>example.properties</refname> +<refpurpose>Properties associated with a example</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="formal.title.properties.frag"><xsl:attribute-set name="formal.title.properties" - use-attribute-sets="normal.para.spacing"> - <xsl:attribute name="font-weight">bold</xsl:attribute> - <xsl:attribute name="font-size">12pt</xsl:attribute> - <xsl:attribute name="hyphenate">false</xsl:attribute> - <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> - <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> - <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute> - <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute> -</xsl:attribute-set></src:fragment> +<src:fragment id="example.properties.frag"><xsl:attribute-set name="example.properties" + use-attribute-sets="formal.object.properties"/></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>Specify how the title should be styled. Specify the font size and weight of the title of the formal object.</para> + +<para>The styling for examples.</para> + </refsect1> </refentry> -<refentry id="informal.object.properties"> +<refentry id="equation.properties"> <refnamediv> -<refname>informal.object.properties</refname> -<refpurpose>Properties associated with a formal object such as a figure, or other component that has a title</refpurpose> +<refname>equation.properties</refname> +<refpurpose>Properties associated with a equation</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="informal.object.properties.frag"><xsl:attribute-set name="informal.object.properties"> - <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> - <xsl:attribute name="space-before.optimum">1em</xsl:attribute> - <xsl:attribute name="space-before.maximum">2em</xsl:attribute> - <xsl:attribute name="space-after.minimum">0.5em</xsl:attribute> - <xsl:attribute name="space-after.optimum">1em</xsl:attribute> - <xsl:attribute name="space-after.maximum">2em</xsl:attribute> -</xsl:attribute-set></src:fragment> +<src:fragment id="equation.properties.frag"><xsl:attribute-set name="equation.properties" + use-attribute-sets="formal.object.properties"/></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>The styling for informal objects in docbook. Specify the spacing before and after the object.</para> + +<para>The styling for equations.</para> + </refsect1> </refentry> -<refentry id="monospace.verbatim.properties"> +<refentry id="table.properties"> <refnamediv> -<refname>monospace.verbatim.properties</refname> -<refpurpose>What font and size do you want for monospaced content?</refpurpose> +<refname>table.properties</refname> +<refpurpose>Properties associated with a table</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="monospace.verbatim.properties.frag"><xsl:attribute-set name="monospace.verbatim.properties" - use-attribute-sets="verbatim.properties"> - <xsl:attribute name="font-family"> - <xsl:value-of select="$monospace.font.family"/> - </xsl:attribute> - <xsl:attribute name="font-size"> - <xsl:value-of select="$body.font.master * 0.9"/> - <xsl:text>pt</xsl:text> - </xsl:attribute> -</xsl:attribute-set></src:fragment> +<src:fragment id="table.properties.frag"><xsl:attribute-set name="table.properties" + use-attribute-sets="formal.object.properties"/></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>Specify the font name and size you want for monospaced output</para> + +<para>The styling for tables.</para> + </refsect1> </refentry> -<refentry id="verbatim.properties"> +<refentry id="procedure.properties"> <refnamediv> -<refname>verbatim.properties</refname> -<refpurpose>FIXME:</refpurpose> +<refname>procedure.properties</refname> +<refpurpose>Properties associated with a procedure</refpurpose> </refnamediv> <refsynopsisdiv> -<src:fragment id="verbatim.properties.frag"><xsl:attribute-set name="verbatim.properties"> - <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> - <xsl:attribute name="space-before.optimum">1em</xsl:attribute> - <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> -</xsl:attribute-set></src:fragment> +<src:fragment id="procedure.properties.frag"><xsl:attribute-set name="procedure.properties" + use-attribute-sets="formal.object.properties"/></src:fragment> </refsynopsisdiv> + <refsect1><title>Description</title> -<para>FIXME:</para> + +<para>The styling for procedures.</para> + </refsect1> </refentry> @@ -3901,6 +5528,22 @@ ones (<filename moreinfo="none">docbook.xsl</filename>, <filename moreinfo="none">chunk.xsl</filename>, â¦).</para> +<warning> +<para>Note that <sgmltag class="attribute">role</sgmltag> is often +used for other purposes than profiling. For example it is commonly +used to get emphasize in bold font:</para> + +<programlisting format="linespecific"><emphasis role="bold">very important</emphasis></programlisting> + +<para>If you are using <sgmltag class="attribute">role</sgmltag> for +these purposes do not forget to add values like <literal moreinfo="none">bold</literal> to +value of this parameter. If you forgot you will get document with +small pieces missing which are very hard to track.</para> + +<para>For this reason it is not recommended to use <sgmltag class="attribute">role</sgmltag> attribute for profiling. You should +rather use profiling specific attributes like <sgmltag class="attribute">userlevel</sgmltag>, <sgmltag class="attribute">os</sgmltag>, <sgmltag class="attribute">arch</sgmltag>, <sgmltag class="attribute">condition</sgmltag>, etc.</para> +</warning> + </refsect1> </refentry> @@ -4090,6 +5733,109 @@ </reference> +<reference><title>Localization</title> +<refentry id="l10n.gentext.language"> +<refmeta> +<refentrytitle>l10n.gentext.language</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>l10n.gentext.language</refname> +<refpurpose>Sets the gentext language</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="l10n.gentext.language.frag"><xsl:param name="l10n.gentext.language" + select="''"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If this parameter is set to any value other than the empty string, its +value will be used as the value for the language when generating text. Setting +<parameter moreinfo="none">l10n.gentext.language</parameter> overrides any settings within the +document being formatted.</para> + +<para>It's much more likely that you might want to set the +<parameter moreinfo="none">l10n.gentext.default.language</parameter> parameter.</para> + +</refsect1> +</refentry> + +<refentry id="l10n.gentext.default.language"> +<refmeta> +<refentrytitle>l10n.gentext.default.language</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>l10n.gentext.default.language</refname> +<refpurpose>Sets the default language for generated text</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="l10n.gentext.default.language.frag"><xsl:param name="l10n.gentext.default.language" + select="'en'"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>The value of the <parameter moreinfo="none">l10n.gentext.default.language</parameter> +parameter is used as the language for generated text if no setting is provided +in the source document.</para> + +</refsect1> +</refentry> + +<refentry id="l10n.gentext.use.xref.language"> +<refmeta> +<refentrytitle>l10n.gentext.use.xref.language</refentrytitle> +<refmiscinfo role="type">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>l10n.gentext.use.xref.language</refname> +<refpurpose>Use the language of target when generating cross-reference text?</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id="l10n.gentext.use.xref.language.frag"><xsl:param name="l10n.gentext.use.xref.language" + select="0"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>If non-zero, the language of the target will be used when +generating cross reference text. Usually, the <quote>current</quote> +language is used when generating text (that is, the language of the +element that contains the cross-reference element). But setting this parameter +allows the language of the element <emphasis>pointed to</emphasis> to control +the generated text.</para> + +<para>Consider the following example:</para> + +<informalexample> +<programlisting format="linespecific"><para lang="en">See also <xref linkend="chap3"/>.</para> +</programlisting> +</informalexample> + +<para>Suppose that Chapter 3 happens to be written in German. +If <parameter moreinfo="none">l10n.gentext.use.xref.language</parameter> is non-zero, the +resulting text will be something like this:</para> + +<blockquote> +<para>See also Kapital 3.</para> +</blockquote> + +<para>Where the more traditional rendering would be:</para> + +<blockquote> +<para>See also Chapter 3.</para> +</blockquote> + +</refsect1> +</refentry> + +</reference> + <!-- <reference><title></title> </reference> @@ -4107,7 +5853,7 @@ <!-- This file is generated from param.xweb; do not edit this file! --> <!-- ******************************************************************** - $Id: param.xml,v 1.1 2002/08/13 15:45:39 goba Exp $ + $Id: param.xml,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -4128,12 +5874,14 @@ <src:fragref linkend="autotoc.label.separator.frag"/> <src:fragref linkend="biblioentry.item.separator.frag"/> <src:fragref linkend="bibliography.collection.frag"/> +<src:fragref linkend="bibliography.numbered.frag"/> <src:fragref linkend="blockquote.properties.frag"/> <src:fragref linkend="body.font.family.frag"/> <src:fragref linkend="body.font.master.frag"/> <src:fragref linkend="body.font.size.frag"/> <src:fragref linkend="body.margin.bottom.frag"/> <src:fragref linkend="body.margin.top.frag"/> +<src:fragref linkend="bridgehead.in.toc.frag"/> <src:fragref linkend="callout.defaultcolumn.frag"/> <src:fragref linkend="callout.graphics.extension.frag"/> <src:fragref linkend="callout.graphics.frag"/> @@ -4145,17 +5893,33 @@ <src:fragref linkend="callout.unicode.start.character.frag"/> <src:fragref linkend="callouts.extension.frag"/> <src:fragref linkend="chapter.autolabel.frag"/> -<src:fragref linkend="column.count.frag"/> -<src:fragref linkend="column.count.of.index.frag"/> +<src:fragref linkend="column.count.back.frag"/> +<src:fragref linkend="column.count.body.frag"/> +<src:fragref linkend="column.count.front.frag"/> +<src:fragref linkend="column.count.index.frag"/> +<src:fragref linkend="column.count.lot.frag"/> +<src:fragref linkend="column.count.titlepage.frag"/> <src:fragref linkend="compact.list.item.spacing.frag"/> <src:fragref linkend="component.title.properties.frag"/> +<src:fragref linkend="current.docid.frag"/> +<src:fragref linkend="default.float.class.frag"/> +<src:fragref linkend="default.image.width.frag"/> <src:fragref linkend="default.table.width.frag"/> <src:fragref linkend="default.units.frag"/> <src:fragref linkend="dingbat.font.family.frag"/> <src:fragref linkend="double.sided.frag"/> +<src:fragref linkend="draft.mode.frag"/> <src:fragref linkend="draft.watermark.image.frag"/> +<src:fragref linkend="equation.properties.frag"/> +<src:fragref linkend="example.properties.frag"/> +<src:fragref linkend="figure.properties.frag"/> <src:fragref linkend="firstterm.only.link.frag"/> +<src:fragref linkend="footer.content.properties.frag"/> +<src:fragref linkend="footer.rule.frag"/> +<src:fragref linkend="footers.on.blank.pages.frag"/> <src:fragref linkend="footnote.font.size.frag"/> +<src:fragref linkend="footnote.number.format.frag"/> +<src:fragref linkend="footnote.number.symbols.frag"/> <src:fragref linkend="fop.extensions.frag"/> <src:fragref linkend="formal.object.properties.frag"/> <src:fragref linkend="formal.procedures.frag"/> @@ -4165,13 +5929,26 @@ <src:fragref linkend="funcsynopsis.style.frag"/> <src:fragref linkend="function.parens.frag"/> <src:fragref linkend="generate.index.frag"/> +<src:fragref linkend="generate.section.toc.level.frag"/> <src:fragref linkend="generate.toc.frag"/> +<src:fragref linkend="glossary.as.blocks.frag"/> <src:fragref linkend="glossary.collection.frag"/> +<src:fragref linkend="glossentry.show.acronym.frag"/> +<src:fragref linkend="glosslist.as.blocks.frag"/> <src:fragref linkend="glossterm.auto.link.frag"/> +<src:fragref linkend="glossterm.separation.frag"/> +<src:fragref linkend="glossterm.width.frag"/> <src:fragref linkend="graphic.default.extension.frag"/> +<src:fragref linkend="header.content.properties.frag"/> +<src:fragref linkend="header.rule.frag"/> +<src:fragref linkend="headers.on.blank.pages.frag"/> <src:fragref linkend="hyphenate.frag"/> +<src:fragref linkend="ignore.image.scaling.frag"/> <src:fragref linkend="informal.object.properties.frag"/> <src:fragref linkend="insert.xref.page.number.frag"/> +<src:fragref linkend="l10n.gentext.default.language.frag"/> +<src:fragref linkend="l10n.gentext.language.frag"/> +<src:fragref linkend="l10n.gentext.use.xref.language.frag"/> <src:fragref linkend="label.from.part.frag"/> <src:fragref linkend="line-height.frag"/> <src:fragref linkend="linenumbering.everyNth.frag"/> @@ -4180,12 +5957,17 @@ <src:fragref linkend="linenumbering.width.frag"/> <src:fragref linkend="list.block.spacing.frag"/> <src:fragref linkend="list.item.spacing.frag"/> +<src:fragref linkend="make.index.markup.frag"/> <src:fragref linkend="make.single.year.ranges.frag"/> <src:fragref linkend="make.year.ranges.frag"/> +<src:fragref linkend="menuchoice.menu.separator.frag"/> +<src:fragref linkend="menuchoice.separator.frag"/> <src:fragref linkend="monospace.font.family.frag"/> +<src:fragref linkend="monospace.properties.frag"/> <src:fragref linkend="monospace.verbatim.properties.frag"/> <src:fragref linkend="nominal.table.width.frag"/> <src:fragref linkend="normal.para.spacing.frag"/> +<src:fragref linkend="olink.doctitle.frag"/> <src:fragref linkend="page.height.frag"/> <src:fragref linkend="page.height.portrait.frag"/> <src:fragref linkend="page.margin.bottom.frag"/> @@ -4199,9 +5981,12 @@ <src:fragref linkend="part.autolabel.frag"/> <src:fragref linkend="passivetex.extensions.frag"/> <src:fragref linkend="preface.autolabel.frag"/> +<src:fragref linkend="preferred.mediaobject.role.frag"/> +<src:fragref linkend="procedure.properties.frag"/> <src:fragref linkend="process.empty.source.toc.frag"/> <src:fragref linkend="process.source.toc.frag"/> <src:fragref linkend="profile.arch.frag"/> +<src:fragref linkend="profile.attribute.frag"/> <src:fragref linkend="profile.condition.frag"/> <src:fragref linkend="profile.conformance.frag"/> <src:fragref linkend="profile.lang.frag"/> @@ -4210,16 +5995,16 @@ <src:fragref linkend="profile.revisionflag.frag"/> <src:fragref linkend="profile.role.frag"/> <src:fragref linkend="profile.security.frag"/> +<src:fragref linkend="profile.separator.frag"/> <src:fragref linkend="profile.userlevel.frag"/> -<src:fragref linkend="profile.vendor.frag"/> -<src:fragref linkend="profile.attribute.frag"/> <src:fragref linkend="profile.value.frag"/> -<src:fragref linkend="profile.separator.frag"/> +<src:fragref linkend="profile.vendor.frag"/> <src:fragref linkend="punct.honorific.frag"/> <src:fragref linkend="qanda.inherit.numeration.frag"/> <src:fragref linkend="qandadiv.autolabel.frag"/> <src:fragref linkend="refentry.generate.name.frag"/> <src:fragref linkend="refentry.generate.title.frag"/> +<src:fragref linkend="refentry.title.properties.frag"/> <src:fragref linkend="refentry.xref.manvolnum.frag"/> <src:fragref linkend="region.after.extent.frag"/> <src:fragref linkend="region.before.extent.frag"/> @@ -4229,33 +6014,52 @@ <src:fragref linkend="sans.font.family.frag"/> <src:fragref linkend="section.autolabel.frag"/> <src:fragref linkend="section.label.includes.component.label.frag"/> +<src:fragref linkend="section.title.level1.properties.frag"/> +<src:fragref linkend="section.title.level2.properties.frag"/> +<src:fragref linkend="section.title.level3.properties.frag"/> +<src:fragref linkend="section.title.level4.properties.frag"/> +<src:fragref linkend="section.title.level5.properties.frag"/> +<src:fragref linkend="section.title.level6.properties.frag"/> +<src:fragref linkend="section.title.properties.frag"/> <src:fragref linkend="segmentedlist.as.table.frag"/> <src:fragref linkend="shade.verbatim.frag"/> <src:fragref linkend="shade.verbatim.style.frag"/> <src:fragref linkend="show.comments.frag"/> -<src:fragref linkend="table.border.color.frag"/> -<src:fragref linkend="table.border.style.frag"/> -<src:fragref linkend="table.border.thickness.frag"/> +<src:fragref linkend="sidebar.properties.frag"/> +<src:fragref linkend="table.cell.border.color.frag"/> +<src:fragref linkend="table.cell.border.style.frag"/> +<src:fragref linkend="table.cell.border.thickness.frag"/> <src:fragref linkend="table.cell.padding.frag"/> -<src:fragref linkend="table.entry.padding.frag"/> +<src:fragref linkend="table.footnote.number.format.frag"/> +<src:fragref linkend="table.footnote.number.symbols.frag"/> +<src:fragref linkend="table.frame.border.color.frag"/> +<src:fragref linkend="table.frame.border.style.frag"/> +<src:fragref linkend="table.frame.border.thickness.frag"/> +<src:fragref linkend="table.properties.frag"/> <src:fragref linkend="tablecolumns.extension.frag"/> -<src:fragref linkend="textinsert.extension.frag"/> -<src:fragref linkend="tex.math.in.alt.frag"/> +<src:fragref linkend="target.database.document.frag"/> <src:fragref linkend="tex.math.delims.frag"/> +<src:fragref linkend="tex.math.in.alt.frag"/> +<src:fragref linkend="textinsert.extension.frag"/> <src:fragref linkend="title.font.family.frag"/> <src:fragref linkend="title.margin.left.frag"/> <src:fragref linkend="toc.indent.width.frag"/> <src:fragref linkend="toc.margin.properties.frag"/> <src:fragref linkend="toc.section.depth.frag"/> -<src:fragref linkend="use.extensions.frag"/> -<src:fragref linkend="use.svg.frag"/> +<src:fragref linkend="ulink.footnote.number.format.frag"/> <src:fragref linkend="ulink.footnotes.frag"/> <src:fragref linkend="ulink.hyphenate.frag"/> <src:fragref linkend="ulink.show.frag"/> +<src:fragref linkend="use.extensions.frag"/> +<src:fragref linkend="use.local.olink.style.frag"/> +<src:fragref linkend="use.role.as.xrefstyle.frag"/> +<src:fragref linkend="use.role.for.mediaobject.frag"/> +<src:fragref linkend="use.svg.frag"/> <src:fragref linkend="variablelist.as.blocks.frag"/> <src:fragref linkend="verbatim.properties.frag"/> <src:fragref linkend="xep.extensions.frag"/> <src:fragref linkend="xref.properties.frag"/> +<src:fragref linkend="xref.with.number.and.title.frag"/> </xsl:stylesheet></src:fragment> Index: phpdoc/xsl/docbook/fo/param.xsl diff -u phpdoc/xsl/docbook/fo/param.xsl:1.1 phpdoc/xsl/docbook/fo/param.xsl:1.2 --- phpdoc/xsl/docbook/fo/param.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/param.xsl Sun Mar 9 09:54:48 2003 @@ -1,10 +1,9 @@ -<?xml version="1.0" encoding="utf-8"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" exclude-result-prefixes="src" version="1.0"> +<?xml version="1.0" encoding="utf-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" exclude-result-prefixes="src" version="1.0"> <!-- This file is generated from param.xweb; do not edit this file! --> <!-- ******************************************************************** - $Id: param.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: param.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -17,7 +16,6 @@ <xsl:param name="admon.graphics" select="0"/> <xsl:param name="admon.graphics.path">images/</xsl:param> <xsl:attribute-set name="admonition.properties"/> - <xsl:attribute-set name="admonition.title.properties"> <xsl:attribute name="font-size">14pt</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> @@ -31,7 +29,7 @@ <xsl:param name="autotoc.label.separator" select="'. '"/> <xsl:param name="biblioentry.item.separator">. </xsl:param> <xsl:param name="bibliography.collection" select="'http://docbook.sourceforge.net/release/bibliography/bibliography.xml'"/> - +<xsl:param name="bibliography.numbered" select="0"/> <xsl:attribute-set name="blockquote.properties"> <xsl:attribute name="start-indent">0.5in</xsl:attribute> <xsl:attribute name="end-indent">0.5in</xsl:attribute> @@ -39,18 +37,14 @@ <xsl:attribute name="space-after.optimum">1em</xsl:attribute> <xsl:attribute name="space-after.maximum">2em</xsl:attribute> </xsl:attribute-set> - -<xsl:param name="body.font.family">Times Roman</xsl:param> +<xsl:param name="body.font.family" select="'serif'"/> <xsl:param name="body.font.master">10</xsl:param> <xsl:param name="body.font.size"> <xsl:value-of select="$body.font.master"/><xsl:text>pt</xsl:text> </xsl:param> - -<xsl:param name="body.margin.bottom">0.5in</xsl:param> - - -<xsl:param name="body.margin.top">1in</xsl:param> - +<xsl:param name="body.margin.bottom" select="'0.5in'"/> +<xsl:param name="body.margin.top" select="'0.5in'"/> +<xsl:param name="bridgehead.in.toc" select="0"/> <xsl:param name="callout.defaultcolumn" select="'60'"/> <xsl:param name="callout.graphics.extension" select="'.png'"/> <xsl:param name="callout.graphics" select="'1'"/> @@ -62,10 +56,12 @@ <xsl:param name="callout.unicode.start.character" select="10102"/> <xsl:param name="callouts.extension" select="'1'"/> <xsl:param name="chapter.autolabel" select="1"/> -<xsl:param name="column.count" select="'1'"/> - -<xsl:param name="column.count.of.index" select="$column.count"/> - +<xsl:param name="column.count.back" select="1"/> +<xsl:param name="column.count.body" select="1"/> +<xsl:param name="column.count.front" select="1"/> +<xsl:param name="column.count.index" select="2"/> +<xsl:param name="column.count.lot" select="1"/> +<xsl:param name="column.count.titlepage" select="1"/> <xsl:attribute-set name="compact.list.item.spacing"> <xsl:attribute name="space-before.optimum">0em</xsl:attribute> <xsl:attribute name="space-before.minimum">0em</xsl:attribute> @@ -83,19 +79,37 @@ <xsl:attribute name="hyphenate">false</xsl:attribute> <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> </xsl:attribute-set> +<xsl:param name="current.docid" select="''"/> +<xsl:param name="default.float.class" select="'before'"/> +<xsl:param name="default.image.width" select="''"/> <xsl:param name="default.table.width" select="''"/> <xsl:param name="default.units" select="'pt'"/> -<xsl:param name="dingbat.font.family">Times Roman</xsl:param> -<xsl:param name="double.sided" select="'0'"/> - +<xsl:param name="dingbat.font.family" select="'serif'"/> +<xsl:param name="double.sided" select="0"/> +<xsl:param name="draft.mode" select="'maybe'"/> <xsl:param name="draft.watermark.image" select="'http://docbook.sourceforge.net/release/images/draft.png'"/> - - +<xsl:attribute-set name="equation.properties" use-attribute-sets="formal.object.properties"/> +<xsl:attribute-set name="example.properties" use-attribute-sets="formal.object.properties"/> +<xsl:attribute-set name="figure.properties" use-attribute-sets="formal.object.properties"/> <xsl:param name="firstterm.only.link" select="0"/> - +<xsl:attribute-set name="footer.content.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.font.family"/> + </xsl:attribute> + <xsl:attribute name="margin-left"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> + <xsl:attribute name="margin-right"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> +</xsl:attribute-set> +<xsl:param name="footer.rule" select="1"/> +<xsl:param name="footers.on.blank.pages" select="1"/> <xsl:param name="footnote.font.size"> <xsl:value-of select="$body.font.master * 0.8"/><xsl:text>pt</xsl:text> </xsl:param> +<xsl:param name="footnote.number.format" select="'1'"/> +<xsl:param name="footnote.number.symbols" select="''"/> <xsl:param name="fop.extensions" select="0"/> <xsl:attribute-set name="formal.object.properties"> <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> @@ -105,10 +119,7 @@ <xsl:attribute name="space-after.optimum">1em</xsl:attribute> <xsl:attribute name="space-after.maximum">2em</xsl:attribute> </xsl:attribute-set> - <xsl:param name="formal.procedures" select="1"/> - - <xsl:param name="formal.title.placement"> figure before example before @@ -116,44 +127,65 @@ table before procedure before </xsl:param> - - <xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing"> <xsl:attribute name="font-weight">bold</xsl:attribute> - <xsl:attribute name="font-size">12pt</xsl:attribute> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> <xsl:attribute name="hyphenate">false</xsl:attribute> - <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute> <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute> </xsl:attribute-set> - <xsl:param name="funcsynopsis.decoration" select="1"/> <xsl:param name="funcsynopsis.style">kr</xsl:param> <xsl:param name="function.parens">0</xsl:param> <xsl:param name="generate.index" select="1"/> - +<xsl:param name="generate.section.toc.level" select="0"/> <xsl:param name="generate.toc"> -/appendix toc -/article toc -book toc,figure,table,example,equation -/chapter toc -part toc -/preface toc +/appendix toc,title +article/appendix nop +/article toc,title +book toc,title,figure,table,example,equation +/chapter toc,title +part toc,title +/preface toc,title qandadiv toc qandaset toc -reference toc +reference toc,title +/sect1 toc +/sect2 toc +/sect3 toc +/sect4 toc +/sect5 toc /section toc -set toc +set toc,title </xsl:param> - - +<xsl:param name="glossary.as.blocks" select="0"/> <xsl:param name="glossary.collection" select="''"/> - +<xsl:param name="glossentry.show.acronym" select="'no'"/> +<xsl:param name="glosslist.as.blocks" select="0"/> <xsl:param name="glossterm.auto.link" select="'0'"/> +<xsl:param name="glossterm.separation" select="'0.25in'"/> +<xsl:param name="glossterm.width" select="'2in'"/> <xsl:param name="graphic.default.extension"/> +<xsl:attribute-set name="header.content.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$body.font.family"/> + </xsl:attribute> + <xsl:attribute name="margin-left"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> + <xsl:attribute name="margin-right"> + <xsl:value-of select="$title.margin.left"/> + </xsl:attribute> +</xsl:attribute-set> +<xsl:param name="header.rule" select="1"/> +<xsl:param name="headers.on.blank.pages" select="1"/> <xsl:param name="hyphenate">true</xsl:param> +<xsl:param name="ignore.image.scaling" select="0"/> <xsl:attribute-set name="informal.object.properties"> <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> <xsl:attribute name="space-before.optimum">1em</xsl:attribute> @@ -163,10 +195,11 @@ <xsl:attribute name="space-after.maximum">2em</xsl:attribute> </xsl:attribute-set> <xsl:param name="insert.xref.page.number" select="0"/> +<xsl:param name="l10n.gentext.default.language" select="'en'"/> +<xsl:param name="l10n.gentext.language" select="''"/> +<xsl:param name="l10n.gentext.use.xref.language" select="0"/> <xsl:param name="label.from.part" select="'0'"/> - <xsl:param name="line-height" select="'normal'"/> - <xsl:param name="linenumbering.everyNth" select="'5'"/> <xsl:param name="linenumbering.extension" select="'1'"/> <xsl:param name="linenumbering.separator" select="' '"/> @@ -175,23 +208,29 @@ <xsl:attribute name="space-before.optimum">1em</xsl:attribute> <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="list.item.spacing"> <xsl:attribute name="space-before.optimum">1em</xsl:attribute> <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> </xsl:attribute-set> +<xsl:param name="make.index.markup" select="0"/> <xsl:param name="make.single.year.ranges" select="0"/> <xsl:param name="make.year.ranges" select="0"/> -<xsl:param name="monospace.font.family">Courier</xsl:param> -<xsl:attribute-set name="monospace.verbatim.properties" use-attribute-sets="verbatim.properties"> +<xsl:param name="menuchoice.menu.separator" select="'->'"/> +<xsl:param name="menuchoice.separator" select="'+'"/> +<xsl:param name="monospace.font.family" select="'monospace'"/> +<xsl:attribute-set name="monospace.properties"> <xsl:attribute name="font-family"> <xsl:value-of select="$monospace.font.family"/> </xsl:attribute> - <xsl:attribute name="font-size"> - <xsl:value-of select="$body.font.master * 0.9"/> - <xsl:text>pt</xsl:text> - </xsl:attribute> + <xsl:attribute name="font-size">0.9em</xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="monospace.verbatim.properties" use-attribute-sets="verbatim.properties monospace.properties"> + <xsl:attribute name="text-align">start</xsl:attribute> </xsl:attribute-set> <xsl:param name="nominal.table.width" select="'6in'"/> <xsl:attribute-set name="normal.para.spacing"> @@ -199,6 +238,7 @@ <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> </xsl:attribute-set> +<xsl:param name="olink.doctitle" select="0"/> <xsl:param name="page.height"> <xsl:choose> <xsl:when test="$page.orientation = 'portrait'"> @@ -252,9 +292,7 @@ <xsl:otherwise>11in</xsl:otherwise> </xsl:choose> </xsl:param> - -<xsl:param name="page.margin.bottom">0.5in</xsl:param> - +<xsl:param name="page.margin.bottom" select="'0.5in'"/> <xsl:param name="page.margin.inner"> <xsl:choose> <xsl:when test="$double.sided != 0">1.25in</xsl:when> @@ -267,9 +305,7 @@ <xsl:otherwise>1in</xsl:otherwise> </xsl:choose> </xsl:param> - -<xsl:param name="page.margin.top">0in</xsl:param> - +<xsl:param name="page.margin.top" select="'0.5in'"/> <xsl:param name="page.orientation" select="'portrait'"/> <xsl:param name="page.width"> <xsl:choose> @@ -326,118 +362,146 @@ <xsl:param name="part.autolabel" select="1"/> <xsl:param name="passivetex.extensions" select="0"/> <xsl:param name="preface.autolabel" select="0"/> +<xsl:param name="preferred.mediaobject.role"/> +<xsl:attribute-set name="procedure.properties" use-attribute-sets="formal.object.properties"/> <xsl:param name="process.empty.source.toc" select="0"/> <xsl:param name="process.source.toc" select="0"/> - <xsl:param name="profile.arch" select="''"/> - - +<xsl:param name="profile.attribute" select="''"/> <xsl:param name="profile.condition" select="''"/> - - <xsl:param name="profile.conformance" select="''"/> - - <xsl:param name="profile.lang" select="''"/> - - <xsl:param name="profile.os" select="''"/> - - <xsl:param name="profile.revision" select="''"/> - - <xsl:param name="profile.revisionflag" select="''"/> - - <xsl:param name="profile.role" select="''"/> - - <xsl:param name="profile.security" select="''"/> - - +<xsl:param name="profile.separator" select="';'"/> <xsl:param name="profile.userlevel" select="''"/> - - -<xsl:param name="profile.vendor" select="''"/> - - -<xsl:param name="profile.attribute" select="''"/> - - <xsl:param name="profile.value" select="''"/> - - -<xsl:param name="profile.separator" select="';'"/> - - +<xsl:param name="profile.vendor" select="''"/> <xsl:param name="punct.honorific" select="'.'"/> - <xsl:param name="qanda.inherit.numeration" select="1"/> <xsl:param name="qandadiv.autolabel" select="1"/> <xsl:param name="refentry.generate.name" select="1"/> - <xsl:param name="refentry.generate.title" select="0"/> - +<xsl:attribute-set name="refentry.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"/> + </xsl:attribute> + <xsl:attribute name="font-size">18pt</xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <xsl:attribute name="space-after">1em</xsl:attribute> + <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> + <xsl:attribute name="space-after.maximum">0.6em</xsl:attribute> +</xsl:attribute-set> <xsl:param name="refentry.xref.manvolnum" select="1"/> - -<xsl:param name="region.after.extent" select="'0.5in'"/> - - -<xsl:param name="region.before.extent" select="'0.5in'"/> - +<xsl:param name="region.after.extent" select="'0.4in'"/> +<xsl:param name="region.before.extent" select="'0.4in'"/> <xsl:param name="rootid" select="''"/> <xsl:param name="runinhead.default.title.end.punct" select="'.'"/> <xsl:param name="runinhead.title.end.punct" select="'.!?:'"/> -<xsl:param name="sans.font.family">Helvetica</xsl:param> +<xsl:param name="sans.font.family" select="'sans-serif'"/> <xsl:param name="section.autolabel" select="0"/> <xsl:param name="section.label.includes.component.label" select="0"/> - +<xsl:attribute-set name="section.title.level1.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 2.0736"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level2.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.728"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level3.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.44"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level4.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master * 1.2"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level5.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.level6.properties"> + <xsl:attribute name="font-size"> + <xsl:value-of select="$body.font.master"/> + <xsl:text>pt</xsl:text> + </xsl:attribute> +</xsl:attribute-set> +<xsl:attribute-set name="section.title.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$title.font.family"/> + </xsl:attribute> + <xsl:attribute name="font-weight">bold</xsl:attribute> + <!-- font size is calculated dynamically by section.heading template --> + <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> + <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute> + <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> +</xsl:attribute-set> <xsl:param name="segmentedlist.as.table" select="0"/> - <xsl:param name="shade.verbatim" select="0"/> - <xsl:attribute-set name="shade.verbatim.style"> <xsl:attribute name="background-color">#E0E0E0</xsl:attribute> </xsl:attribute-set> - <xsl:param name="show.comments">1</xsl:param> - -<xsl:param name="table.border.color" select="'black'"/> - - -<xsl:param name="table.border.style" select="'solid'"/> - - -<xsl:param name="table.border.thickness" select="'0.5pt'"/> - - +<xsl:attribute-set name="sidebar.properties" use-attribute-sets="formal.object.properties"> + <xsl:attribute name="border-style">solid</xsl:attribute> + <xsl:attribute name="border-width">1pt</xsl:attribute> + <xsl:attribute name="border-color">black</xsl:attribute> + <xsl:attribute name="background-color">#DDDDDD</xsl:attribute> + <xsl:attribute name="padding-left">12pt</xsl:attribute> + <xsl:attribute name="padding-right">12pt</xsl:attribute> + <xsl:attribute name="padding-top">6pt</xsl:attribute> + <xsl:attribute name="padding-bottom">6pt</xsl:attribute> +<!-- + <xsl:attribute name="margin-left">12pt</xsl:attribute> + <xsl:attribute name="margin-right">12pt</xsl:attribute> + <xsl:attribute name="margin-top">6pt</xsl:attribute> + <xsl:attribute name="margin-bottom">6pt</xsl:attribute> +--> +</xsl:attribute-set> + +<xsl:param name="table.cell.border.color" select="'black'"/> +<xsl:param name="table.cell.border.style" select="'solid'"/> +<xsl:param name="table.cell.border.thickness" select="'0.5pt'"/> <xsl:attribute-set name="table.cell.padding"> <xsl:attribute name="padding-left">2pt</xsl:attribute> <xsl:attribute name="padding-right">2pt</xsl:attribute> <xsl:attribute name="padding-top">2pt</xsl:attribute> <xsl:attribute name="padding-bottom">2pt</xsl:attribute> </xsl:attribute-set> +<xsl:param name="table.footnote.number.format" select="'a'"/> +<xsl:param name="table.footnote.number.symbols" select="''"/> - -<xsl:param name="table.entry.padding" select="'2pt'"/> - +<xsl:param name="table.frame.border.color" select="'black'"/> +<xsl:param name="table.frame.border.style" select="'solid'"/> +<xsl:param name="table.frame.border.thickness" select="'0.5pt'"/> +<xsl:attribute-set name="table.properties" use-attribute-sets="formal.object.properties"/> <xsl:param name="tablecolumns.extension" select="'1'"/> -<xsl:param name="textinsert.extension" select="'1'"/> - -<xsl:param name="tex.math.in.alt" select="''"/> - - +<xsl:param name="target.database.document" select="''"/> <xsl:param name="tex.math.delims" select="'1'"/> - -<xsl:param name="title.font.family">Helvetica</xsl:param> - +<xsl:param name="tex.math.in.alt" select="''"/> +<xsl:param name="textinsert.extension" select="'1'"/> +<xsl:param name="title.font.family" select="'sans-serif'"/> <xsl:param name="title.margin.left" select="'-4pc'"/> - - <xsl:param name="toc.indent.width" select="24"/> - <xsl:attribute-set name="toc.margin.properties"> <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute> <xsl:attribute name="space-before.optimum">1em</xsl:attribute> @@ -447,31 +511,27 @@ <xsl:attribute name="space-after.maximum">2em</xsl:attribute> </xsl:attribute-set> <xsl:param name="toc.section.depth">2</xsl:param> -<xsl:param name="use.extensions" select="'0'"/> - -<xsl:param name="use.svg" select="1"/> - - +<xsl:param name="ulink.footnote.number.format" select="'1'"/> <xsl:param name="ulink.footnotes" select="0"/> - - <xsl:param name="ulink.hyphenate" select="''"/> - - <xsl:param name="ulink.show" select="1"/> - - +<xsl:param name="use.extensions" select="'0'"/> +<xsl:param name="use.local.olink.style" select="0"/> +<xsl:param name="use.role.as.xrefstyle" select="1"/> +<xsl:param name="use.role.for.mediaobject" select="1"/> +<xsl:param name="use.svg" select="1"/> <xsl:param name="variablelist.as.blocks" select="0"/> - - <xsl:attribute-set name="verbatim.properties"> <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.optimum">1em</xsl:attribute> <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> + <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute> + <xsl:attribute name="space-after.optimum">1em</xsl:attribute> + <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> </xsl:attribute-set> <xsl:param name="xep.extensions" select="0"/> <xsl:attribute-set name="xref.properties"> - </xsl:attribute-set> +<xsl:param name="xref.with.number.and.title" select="1"/> -</xsl:stylesheet> +</xsl:stylesheet> \ No newline at end of file Index: phpdoc/xsl/docbook/fo/param.xweb diff -u phpdoc/xsl/docbook/fo/param.xweb:1.1 phpdoc/xsl/docbook/fo/param.xweb:1.2 --- phpdoc/xsl/docbook/fo/param.xweb:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/param.xweb Sun Mar 9 09:54:48 2003 @@ -7,7 +7,7 @@ <bookinfo> <title>FO Parameter Reference</title> <releaseinfo role="meta"> -$Id: param.xweb,v 1.1 2002/08/13 15:45:40 goba Exp $ +$Id: param.xweb,v 1.2 2003/03/09 14:54:48 tom Exp $ </releaseinfo> <author> <surname>Walsh</surname> @@ -87,9 +87,12 @@ &process.source.toc; &generate.toc; &generate.index; +&make.index.markup; &toc.section.depth; &toc.indent.width; &toc.margin.properties; +&bridgehead.in.toc; +&generate.section.toc.level; <!-- annotate.toc; @@ -145,17 +148,27 @@ &function.parens; &refentry.generate.name; &refentry.generate.title; +&refentry.title.properties; &refentry.xref.manvolnum; </reference> <reference><title>Tables</title> &default.table.width; &nominal.table.width; -&table.border.thickness; &table.cell.padding; -&table.border.style; -&table.border.color; -&table.entry.padding; +&table.frame.border.thickness; +&table.frame.border.style; +&table.frame.border.color; +&table.cell.border.thickness; +&table.cell.border.style; +&table.cell.border.color; +</reference> + +<reference><title>Linking</title> +&target.database.document; +&use.local.olink.style; +¤t.docid; +&olink.doctitle; </reference> <reference><title>QAndASet</title> @@ -166,16 +179,21 @@ <reference><title>Bibliography</title> &biblioentry.item.separator; &bibliography.collection; +&bibliography.numbered; </reference> <reference><title>Glossary</title> &glossterm.auto.link; &firstterm.only.link; &glossary.collection; +&glossterm.separation; +&glossterm.width; +&glossary.as.blocks; +&glosslist.as.blocks; +&glossentry.show.acronym; </reference> <reference><title>Miscellaneous</title> -&graphic.default.extension; &formal.procedures; &formal.title.placement; &runinhead.default.title.end.punct; @@ -187,10 +205,28 @@ &blockquote.properties; &ulink.show; &ulink.footnotes; +&ulink.footnote.number.format; &ulink.hyphenate; &shade.verbatim; &shade.verbatim.style; &use.svg; +&use.role.as.xrefstyle; +&menuchoice.separator; +&menuchoice.menu.separator; +&default.float.class; +&footnote.number.format; +&table.footnote.number.format; +&footnote.number.symbols; +&table.footnote.number.symbols; +&xref.with.number.and.title; +</reference> + +<reference><title>Graphics</title> +&graphic.default.extension; +&default.image.width; +&preferred.mediaobject.role; +&use.role.for.mediaobject; +&ignore.image.scaling; </reference> <reference><title>Pagination and General Styles</title> @@ -225,13 +261,13 @@ <para>The pink region at the top of the page is the region-before. The darker area inside the region-before is the header text. In XSL, the default -display alignment for the region-before is <literal>before</literal>, but -the DocBook stylesheets explicitly make it <literal>after</literal>. That's -why the darker area is at the bottom.</para> +display alignment for a region is <literal>before</literal>, but the +DocBook stylesheets still explicitly make it <literal>before</literal>. That's +why the darker area is at the top.</para> <para>The pink region at the bottom of the page is the region-after. The darker area is the footer text. In XSL, the default display -alignment for the region-after is <literal>before</literal> (really!), +alignment for a region is <literal>before</literal>, but the DocBook stylesheets explicitly make it <literal>after</literal>. That's why the darker area is at the bottom.</para> @@ -279,8 +315,12 @@ &alignment; &hyphenate; &line-height; -&column.count; -&column.count.of.index; +&column.count.back; +&column.count.body; +&column.count.front; +&column.count.index; +&column.count.lot; +&column.count.titlepage; ®ion.after.extent; ®ion.before.extent; &default.units; @@ -289,7 +329,14 @@ &body.font.size; &footnote.font.size; &title.margin.left; +&draft.mode; &draft.watermark.image; +&headers.on.blank.pages; +&footers.on.blank.pages; +&header.rule; +&footer.rule; +&header.content.properties; +&footer.content.properties; </reference> <reference><title>Font Families</title> @@ -316,8 +363,22 @@ &formal.object.properties; &formal.title.properties; &informal.object.properties; -&monospace.verbatim.properties; +&monospace.properties; &verbatim.properties; +&monospace.verbatim.properties; +&sidebar.properties; +§ion.title.properties; +§ion.title.level1.properties; +§ion.title.level2.properties; +§ion.title.level3.properties; +§ion.title.level4.properties; +§ion.title.level5.properties; +§ion.title.level6.properties; +&figure.properties; +&example.properties; +&equation.properties; +&table.properties; +&procedure.properties; </reference> <reference><title>Profiling</title> @@ -343,6 +404,12 @@ &profile.separator; </reference> +<reference><title>Localization</title> +&l10n.gentext.language; +&l10n.gentext.default.language; +&l10n.gentext.use.xref.language; +</reference> + <!-- <reference><title></title> </reference> @@ -361,7 +428,7 @@ <!-- This file is generated from param.xweb; do not edit this file! --> <!-- ******************************************************************** - $Id: param.xweb,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: param.xweb,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -382,12 +449,14 @@ <src:fragref linkend="autotoc.label.separator.frag"/> <src:fragref linkend="biblioentry.item.separator.frag"/> <src:fragref linkend="bibliography.collection.frag"/> +<src:fragref linkend="bibliography.numbered.frag"/> <src:fragref linkend="blockquote.properties.frag"/> <src:fragref linkend="body.font.family.frag"/> <src:fragref linkend="body.font.master.frag"/> <src:fragref linkend="body.font.size.frag"/> <src:fragref linkend="body.margin.bottom.frag"/> <src:fragref linkend="body.margin.top.frag"/> +<src:fragref linkend="bridgehead.in.toc.frag"/> <src:fragref linkend="callout.defaultcolumn.frag"/> <src:fragref linkend="callout.graphics.extension.frag"/> <src:fragref linkend="callout.graphics.frag"/> @@ -399,17 +468,33 @@ <src:fragref linkend="callout.unicode.start.character.frag"/> <src:fragref linkend="callouts.extension.frag"/> <src:fragref linkend="chapter.autolabel.frag"/> -<src:fragref linkend="column.count.frag"/> -<src:fragref linkend="column.count.of.index.frag"/> +<src:fragref linkend="column.count.back.frag"/> +<src:fragref linkend="column.count.body.frag"/> +<src:fragref linkend="column.count.front.frag"/> +<src:fragref linkend="column.count.index.frag"/> +<src:fragref linkend="column.count.lot.frag"/> +<src:fragref linkend="column.count.titlepage.frag"/> <src:fragref linkend="compact.list.item.spacing.frag"/> <src:fragref linkend="component.title.properties.frag"/> +<src:fragref linkend="current.docid.frag"/> +<src:fragref linkend="default.float.class.frag"/> +<src:fragref linkend="default.image.width.frag"/> <src:fragref linkend="default.table.width.frag"/> <src:fragref linkend="default.units.frag"/> <src:fragref linkend="dingbat.font.family.frag"/> <src:fragref linkend="double.sided.frag"/> +<src:fragref linkend="draft.mode.frag"/> <src:fragref linkend="draft.watermark.image.frag"/> +<src:fragref linkend="equation.properties.frag"/> +<src:fragref linkend="example.properties.frag"/> +<src:fragref linkend="figure.properties.frag"/> <src:fragref linkend="firstterm.only.link.frag"/> +<src:fragref linkend="footer.content.properties.frag"/> +<src:fragref linkend="footer.rule.frag"/> +<src:fragref linkend="footers.on.blank.pages.frag"/> <src:fragref linkend="footnote.font.size.frag"/> +<src:fragref linkend="footnote.number.format.frag"/> +<src:fragref linkend="footnote.number.symbols.frag"/> <src:fragref linkend="fop.extensions.frag"/> <src:fragref linkend="formal.object.properties.frag"/> <src:fragref linkend="formal.procedures.frag"/> @@ -419,13 +504,26 @@ <src:fragref linkend="funcsynopsis.style.frag"/> <src:fragref linkend="function.parens.frag"/> <src:fragref linkend="generate.index.frag"/> +<src:fragref linkend="generate.section.toc.level.frag"/> <src:fragref linkend="generate.toc.frag"/> +<src:fragref linkend="glossary.as.blocks.frag"/> <src:fragref linkend="glossary.collection.frag"/> +<src:fragref linkend="glossentry.show.acronym.frag"/> +<src:fragref linkend="glosslist.as.blocks.frag"/> <src:fragref linkend="glossterm.auto.link.frag"/> +<src:fragref linkend="glossterm.separation.frag"/> +<src:fragref linkend="glossterm.width.frag"/> <src:fragref linkend="graphic.default.extension.frag"/> +<src:fragref linkend="header.content.properties.frag"/> +<src:fragref linkend="header.rule.frag"/> +<src:fragref linkend="headers.on.blank.pages.frag"/> <src:fragref linkend="hyphenate.frag"/> +<src:fragref linkend="ignore.image.scaling.frag"/> <src:fragref linkend="informal.object.properties.frag"/> <src:fragref linkend="insert.xref.page.number.frag"/> +<src:fragref linkend="l10n.gentext.default.language.frag"/> +<src:fragref linkend="l10n.gentext.language.frag"/> +<src:fragref linkend="l10n.gentext.use.xref.language.frag"/> <src:fragref linkend="label.from.part.frag"/> <src:fragref linkend="line-height.frag"/> <src:fragref linkend="linenumbering.everyNth.frag"/> @@ -434,12 +532,17 @@ <src:fragref linkend="linenumbering.width.frag"/> <src:fragref linkend="list.block.spacing.frag"/> <src:fragref linkend="list.item.spacing.frag"/> +<src:fragref linkend="make.index.markup.frag"/> <src:fragref linkend="make.single.year.ranges.frag"/> <src:fragref linkend="make.year.ranges.frag"/> +<src:fragref linkend="menuchoice.menu.separator.frag"/> +<src:fragref linkend="menuchoice.separator.frag"/> <src:fragref linkend="monospace.font.family.frag"/> +<src:fragref linkend="monospace.properties.frag"/> <src:fragref linkend="monospace.verbatim.properties.frag"/> <src:fragref linkend="nominal.table.width.frag"/> <src:fragref linkend="normal.para.spacing.frag"/> +<src:fragref linkend="olink.doctitle.frag"/> <src:fragref linkend="page.height.frag"/> <src:fragref linkend="page.height.portrait.frag"/> <src:fragref linkend="page.margin.bottom.frag"/> @@ -453,9 +556,12 @@ <src:fragref linkend="part.autolabel.frag"/> <src:fragref linkend="passivetex.extensions.frag"/> <src:fragref linkend="preface.autolabel.frag"/> +<src:fragref linkend="preferred.mediaobject.role.frag"/> +<src:fragref linkend="procedure.properties.frag"/> <src:fragref linkend="process.empty.source.toc.frag"/> <src:fragref linkend="process.source.toc.frag"/> <src:fragref linkend="profile.arch.frag"/> +<src:fragref linkend="profile.attribute.frag"/> <src:fragref linkend="profile.condition.frag"/> <src:fragref linkend="profile.conformance.frag"/> <src:fragref linkend="profile.lang.frag"/> @@ -464,16 +570,16 @@ <src:fragref linkend="profile.revisionflag.frag"/> <src:fragref linkend="profile.role.frag"/> <src:fragref linkend="profile.security.frag"/> +<src:fragref linkend="profile.separator.frag"/> <src:fragref linkend="profile.userlevel.frag"/> -<src:fragref linkend="profile.vendor.frag"/> -<src:fragref linkend="profile.attribute.frag"/> <src:fragref linkend="profile.value.frag"/> -<src:fragref linkend="profile.separator.frag"/> +<src:fragref linkend="profile.vendor.frag"/> <src:fragref linkend="punct.honorific.frag"/> <src:fragref linkend="qanda.inherit.numeration.frag"/> <src:fragref linkend="qandadiv.autolabel.frag"/> <src:fragref linkend="refentry.generate.name.frag"/> <src:fragref linkend="refentry.generate.title.frag"/> +<src:fragref linkend="refentry.title.properties.frag"/> <src:fragref linkend="refentry.xref.manvolnum.frag"/> <src:fragref linkend="region.after.extent.frag"/> <src:fragref linkend="region.before.extent.frag"/> @@ -483,33 +589,52 @@ <src:fragref linkend="sans.font.family.frag"/> <src:fragref linkend="section.autolabel.frag"/> <src:fragref linkend="section.label.includes.component.label.frag"/> +<src:fragref linkend="section.title.level1.properties.frag"/> +<src:fragref linkend="section.title.level2.properties.frag"/> +<src:fragref linkend="section.title.level3.properties.frag"/> +<src:fragref linkend="section.title.level4.properties.frag"/> +<src:fragref linkend="section.title.level5.properties.frag"/> +<src:fragref linkend="section.title.level6.properties.frag"/> +<src:fragref linkend="section.title.properties.frag"/> <src:fragref linkend="segmentedlist.as.table.frag"/> <src:fragref linkend="shade.verbatim.frag"/> <src:fragref linkend="shade.verbatim.style.frag"/> <src:fragref linkend="show.comments.frag"/> -<src:fragref linkend="table.border.color.frag"/> -<src:fragref linkend="table.border.style.frag"/> -<src:fragref linkend="table.border.thickness.frag"/> +<src:fragref linkend="sidebar.properties.frag"/> +<src:fragref linkend="table.cell.border.color.frag"/> +<src:fragref linkend="table.cell.border.style.frag"/> +<src:fragref linkend="table.cell.border.thickness.frag"/> <src:fragref linkend="table.cell.padding.frag"/> -<src:fragref linkend="table.entry.padding.frag"/> +<src:fragref linkend="table.footnote.number.format.frag"/> +<src:fragref linkend="table.footnote.number.symbols.frag"/> +<src:fragref linkend="table.frame.border.color.frag"/> +<src:fragref linkend="table.frame.border.style.frag"/> +<src:fragref linkend="table.frame.border.thickness.frag"/> +<src:fragref linkend="table.properties.frag"/> <src:fragref linkend="tablecolumns.extension.frag"/> -<src:fragref linkend="textinsert.extension.frag"/> -<src:fragref linkend="tex.math.in.alt.frag"/> +<src:fragref linkend="target.database.document.frag"/> <src:fragref linkend="tex.math.delims.frag"/> +<src:fragref linkend="tex.math.in.alt.frag"/> +<src:fragref linkend="textinsert.extension.frag"/> <src:fragref linkend="title.font.family.frag"/> <src:fragref linkend="title.margin.left.frag"/> <src:fragref linkend="toc.indent.width.frag"/> <src:fragref linkend="toc.margin.properties.frag"/> <src:fragref linkend="toc.section.depth.frag"/> -<src:fragref linkend="use.extensions.frag"/> -<src:fragref linkend="use.svg.frag"/> +<src:fragref linkend="ulink.footnote.number.format.frag"/> <src:fragref linkend="ulink.footnotes.frag"/> <src:fragref linkend="ulink.hyphenate.frag"/> <src:fragref linkend="ulink.show.frag"/> +<src:fragref linkend="use.extensions.frag"/> +<src:fragref linkend="use.local.olink.style.frag"/> +<src:fragref linkend="use.role.as.xrefstyle.frag"/> +<src:fragref linkend="use.role.for.mediaobject.frag"/> +<src:fragref linkend="use.svg.frag"/> <src:fragref linkend="variablelist.as.blocks.frag"/> <src:fragref linkend="verbatim.properties.frag"/> <src:fragref linkend="xep.extensions.frag"/> <src:fragref linkend="xref.properties.frag"/> +<src:fragref linkend="xref.with.number.and.title.frag"/> </xsl:stylesheet> </src:fragment> Index: phpdoc/xsl/docbook/fo/passivetex.xsl diff -u phpdoc/xsl/docbook/fo/passivetex.xsl:1.1 phpdoc/xsl/docbook/fo/passivetex.xsl:1.2 --- phpdoc/xsl/docbook/fo/passivetex.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/passivetex.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: passivetex.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: passivetex.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This extension stops PassiveTeX from merging subsequent '-' to dashes. You must set passivetex.extensions to '1' if you want get Index: phpdoc/xsl/docbook/fo/pi.xsl diff -u phpdoc/xsl/docbook/fo/pi.xsl:1.1 phpdoc/xsl/docbook/fo/pi.xsl:1.2 --- phpdoc/xsl/docbook/fo/pi.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/pi.xsl Sun Mar 9 09:54:48 2003 @@ -3,7 +3,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: pi.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: pi.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. Index: phpdoc/xsl/docbook/fo/profile-docbook.xsl diff -u phpdoc/xsl/docbook/fo/profile-docbook.xsl:1.1 phpdoc/xsl/docbook/fo/profile-docbook.xsl:1.2 --- phpdoc/xsl/docbook/fo/profile-docbook.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/profile-docbook.xsl Sun Mar 9 09:54:48 2003 @@ -9,7 +9,7 @@ <xsl:output method="xml" indent="no"/> <!-- ******************************************************************** - $Id: profile-docbook.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: profile-docbook.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -78,7 +78,12 @@ <xsl:template match="*"> <xsl:message> <xsl:value-of select="name(.)"/> - <xsl:text> encountered, but no template matches.</xsl:text> + <xsl:text> encountered</xsl:text> + <xsl:if test="parent::*"> + <xsl:text> in </xsl:text> + <xsl:value-of select="name(parent::*)"/> + </xsl:if> + <xsl:text>, but no template matches.</xsl:text> </xsl:message> <fo:block color="red"> <xsl:text><</xsl:text> @@ -92,19 +97,10 @@ </xsl:template> <xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xsl:template match="/"><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:apply-templates select="." mode="profile"/></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/> - <xsl:message> - <xsl:text>Making </xsl:text> - <xsl:value-of select="$page.orientation"/> - <xsl:text> pages on </xsl:text> - <xsl:value-of select="$paper.type"/> - <xsl:text> paper (</xsl:text> - <xsl:value-of select="$page.width"/> - <xsl:text>x</xsl:text> - <xsl:value-of select="$page.height"/> - <xsl:text>)</xsl:text> - </xsl:message> + <xsl:call-template name="root.messages"/> <xsl:variable name="document.element" select="*[1]"/> + <xsl:variable name="title"> <xsl:choose> <xsl:when test="$document.element/title[1]"> @@ -155,11 +151,11 @@ </xsl:when> <xsl:otherwise> <xsl:if test="$fop.extensions != 0"> - <xsl:apply-templates mode="fop.outline"/> + <xsl:apply-templates mode="fop.outline" select="$profiled-nodes/node()"/> </xsl:if> <xsl:if test="$xep.extensions != 0"> <xsl:variable name="bookmarks"> - <xsl:apply-templates mode="xep.outline"/> + <xsl:apply-templates mode="xep.outline" select="$profiled-nodes/node()"/> </xsl:variable> <xsl:if test="string($bookmarks) != ''"> <rx:outline xmlns:rx="http://www.renderx.com/XSL/Extensions"> @@ -167,11 +163,28 @@ </rx:outline> </xsl:if> </xsl:if> - <xsl:apply-templates/> + <xsl:apply-templates select="$profiled-nodes/node()"/> </xsl:otherwise> </xsl:choose> </fo:root> +</xsl:template> + + +<xsl:template name="root.messages"> + <!-- redefine this any way you'd like to output messages --> + <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE --> + <xsl:message> + <xsl:text>Making </xsl:text> + <xsl:value-of select="$page.orientation"/> + <xsl:text> pages on </xsl:text> + <xsl:value-of select="$paper.type"/> + <xsl:text> paper (</xsl:text> + <xsl:value-of select="$page.width"/> + <xsl:text>x</xsl:text> + <xsl:value-of select="$page.height"/> + <xsl:text>)</xsl:text> + </xsl:message> </xsl:template> <!-- ==================================================================== --> Index: phpdoc/xsl/docbook/fo/qandaset.xsl diff -u phpdoc/xsl/docbook/fo/qandaset.xsl:1.1 phpdoc/xsl/docbook/fo/qandaset.xsl:1.2 --- phpdoc/xsl/docbook/fo/qandaset.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/qandaset.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: qandaset.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: qandaset.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -60,7 +60,8 @@ </xsl:variable> <xsl:call-template name="section.heading"> - <xsl:with-param name="level" select="$sectlvl"/> + <xsl:with-param name="level" select="$sectlvl + 1"/> + <xsl:with-param name="marker" select="0"/> <xsl:with-param name="title"> <xsl:apply-templates/> </xsl:with-param> @@ -107,8 +108,8 @@ </xsl:variable> <xsl:call-template name="section.heading"> - <xsl:with-param name="level" - select="$sectlvl + count(ancestor::qandadiv)"/> + <xsl:with-param name="level" select="$sectlvl + 1 + count(ancestor::qandadiv)"/> + <xsl:with-param name="marker" select="0"/> <xsl:with-param name="title"> <xsl:apply-templates/> </xsl:with-param> Index: phpdoc/xsl/docbook/fo/refentry.xsl diff -u phpdoc/xsl/docbook/fo/refentry.xsl:1.1 phpdoc/xsl/docbook/fo/refentry.xsl:1.2 --- phpdoc/xsl/docbook/fo/refentry.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/refentry.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: refentry.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: refentry.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -30,8 +30,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -69,8 +72,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -90,7 +96,7 @@ </fo:page-sequence> </xsl:template> -<xsl:template match="reference/docinfo"></xsl:template> +<xsl:template match="reference/docinfo|refentry/refentryinfo"></xsl:template> <xsl:template match="reference/title"></xsl:template> <xsl:template match="reference/subtitle"></xsl:template> @@ -106,33 +112,24 @@ </xsl:variable> <xsl:variable name="refentry.content"> -<!-- FIXME: what should this be? - <fo:block font-size="20pt" font-weight="bold"> - <xsl:choose> - <xsl:when test="refmeta/refentrytitle"> - <xsl:apply-templates select="refmeta/refentrytitle" mode="title"/> - </xsl:when> - <xsl:when test="refnamediv/refname"> - <xsl:apply-templates select="refnamediv/refname" mode="title"/> - </xsl:when> - </xsl:choose> - </fo:block> ---> <fo:block id="{$id}"> <xsl:apply-templates/> </fo:block> </xsl:variable> <xsl:choose> - <xsl:when test="not(parent::*) or parent::reference"> + <xsl:when test="not(parent::*) or parent::reference or parent::part"> <!-- make a page sequence --> <fo:page-sequence hyphenate="{$hyphenate}" master-reference="{$master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -177,14 +174,15 @@ <fo:block> <xsl:choose> <xsl:when test="$refentry.generate.name != 0"> - <fo:block font-size="18pt" font-weight="bold"> + <fo:block xsl:use-attribute-sets="refentry.title.properties"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'RefName'"/> </xsl:call-template> </fo:block> </xsl:when> + <xsl:when test="$refentry.generate.title != 0"> - <fo:block font-size="18pt" font-weight="bold"> + <fo:block xsl:use-attribute-sets="refentry.title.properties"> <xsl:choose> <xsl:when test="../refmeta/refentrytitle"> <xsl:apply-templates select="../refmeta/refentrytitle"/> @@ -197,7 +195,7 @@ </xsl:when> </xsl:choose> - <fo:block> + <fo:block space-after="1em"> <xsl:choose> <xsl:when test="../refmeta/refentrytitle"> <xsl:apply-templates select="../refmeta/refentrytitle"/> @@ -248,49 +246,107 @@ </xsl:template> <xsl:template match="refsynopsisdiv"> - <fo:block> - <xsl:attribute name="id"> - <xsl:call-template name="object.id"/> - </xsl:attribute> - <fo:block font-size="18pt" font-weight="bold"> - <xsl:choose> - <xsl:when test="refsynopsisdiv/title|title"> - <xsl:apply-templates select="(refsynopsisdiv/title|title)[1]" - mode="titlepage.mode"/> - </xsl:when> - <xsl:otherwise> - <xsl:call-template name="gentext"> - <xsl:with-param name="key" select="'RefSynopsisDiv'"/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </fo:block> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="refsynopsisdiv.titlepage"/> <xsl:apply-templates/> </fo:block> </xsl:template> -<xsl:template match="refsynopsisdiv/title"> -</xsl:template> +<xsl:template match="refsection"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> -<xsl:template match="refsect1|refsect2|refsect3"> - <xsl:call-template name="block.object"/> + <fo:block id="{$id}"> + <xsl:call-template name="refsection.titlepage"/> + <xsl:apply-templates/> + </fo:block> </xsl:template> -<xsl:template match="refsect1/title"> - <fo:block font-size="18pt" font-weight="bold"> +<xsl:template match="refsect1"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="refsect1.titlepage"/> <xsl:apply-templates/> </fo:block> </xsl:template> -<xsl:template match="refsect2/title"> - <fo:block font-size="16pt" font-weight="bold"> +<xsl:template match="refsect2"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="refsect2.titlepage"/> <xsl:apply-templates/> </fo:block> </xsl:template> -<xsl:template match="refsect3/title"> - <fo:block font-size="14pt" font-weight="bold"> +<xsl:template match="refsect3"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <fo:block id="{$id}"> + <xsl:call-template name="refsect3.titlepage"/> <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="refsynopsisdiv/title + |refsection/title + |refsect1/title + |refsect2/title + |refsect3/title"> + <!-- nop; titlepage.mode instead --> +</xsl:template> + +<xsl:template match="refsynopsisdiv/title + |refsection/title + |refsect1/title + |refsect2/title + |refsect3/title" + mode="titlepage.mode" + priority="2"> + <xsl:variable name="section" select="parent::*"/> + <fo:block keep-with-next.within-column="always"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$section"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="level"> + <xsl:call-template name="section.level"> + <xsl:with-param name="node" select="$section"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="title"> + <xsl:apply-templates select="$section" mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> + </xsl:variable> + + <xsl:if test="$passivetex.extensions != 0"> + <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" + fotex-bookmark-level="{$level + 2}" + fotex-bookmark-label="{$id}"> + <xsl:value-of select="$title"/> + </fotex:bookmark> + </xsl:if> + + <xsl:call-template name="section.heading"> + <xsl:with-param name="level" select="$level"/> + <xsl:with-param name="title" select="$title"/> + </xsl:call-template> </fo:block> </xsl:template> Index: phpdoc/xsl/docbook/fo/sections.xsl diff -u phpdoc/xsl/docbook/fo/sections.xsl:1.1 phpdoc/xsl/docbook/fo/sections.xsl:1.2 --- phpdoc/xsl/docbook/fo/sections.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/sections.xsl Sun Mar 9 09:54:48 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: sections.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: sections.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -22,6 +22,21 @@ <fo:block id="{$id}"> <xsl:call-template name="section.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and (count(ancestor::section)+1) <= $generate.section.toc.level"> + <xsl:call-template name="section.toc"> + <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:block> </xsl:template> @@ -42,8 +57,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -55,6 +73,19 @@ <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="section.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and (count(ancestor::section)+1) <= $generate.section.toc.level"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:flow> </fo:page-sequence> @@ -89,17 +120,22 @@ </xsl:apply-templates> </xsl:variable> + <xsl:variable name="titleabbrev"> + <xsl:apply-templates select="$section" mode="titleabbrev.markup"/> + </xsl:variable> + <xsl:if test="$passivetex.extensions != 0"> <fotex:bookmark xmlns:fotex="http://www.tug.org/fotex" - fotex-bookmark-level="{$level + 1}" + fotex-bookmark-level="{$level + 2}" fotex-bookmark-label="{$id}"> - <xsl:value-of select="$title"/> + <xsl:value-of select="$titleabbrev"/> </fotex:bookmark> </xsl:if> <xsl:call-template name="section.heading"> <xsl:with-param name="level" select="$level"/> <xsl:with-param name="title" select="$title"/> + <xsl:with-param name="titleabbrev" select="$titleabbrev"/> </xsl:call-template> </fo:block> </xsl:template> @@ -111,6 +147,19 @@ <fo:block id="{$id}"> <xsl:call-template name="sect1.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 1"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:block> </xsl:template> @@ -131,8 +180,11 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"/> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -144,6 +196,19 @@ <fo:flow flow-name="xsl-region-body"> <xsl:call-template name="sect1.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 1"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:flow> </fo:page-sequence> @@ -156,6 +221,19 @@ <fo:block id="{$id}"> <xsl:call-template name="sect2.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 2"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:block> </xsl:template> @@ -167,6 +245,19 @@ <fo:block id="{$id}"> <xsl:call-template name="sect3.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 3"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:block> </xsl:template> @@ -178,6 +269,19 @@ <fo:block id="{$id}"> <xsl:call-template name="sect4.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 4"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:block> </xsl:template> @@ -189,6 +293,19 @@ <fo:block id="{$id}"> <xsl:call-template name="sect5.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') + and $generate.section.toc.level >= 5"> + <xsl:call-template name="section.toc"/> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> </fo:block> </xsl:template> @@ -241,28 +358,56 @@ <!-- ==================================================================== --> <xsl:template name="section.heading"> - <xsl:param name="level">1</xsl:param> - <xsl:param name="title"></xsl:param> - <xsl:variable name="fsize"> + <xsl:param name="level" select="1"/> + <xsl:param name="marker" select="1"/> + <xsl:param name="title"/> + <xsl:param name="titleabbrev"/> + + <fo:block xsl:use-attribute-sets="section.title.properties"> + <xsl:if test="$marker != 0"> + <fo:marker marker-class-name="section.head.marker"> + <xsl:choose> + <xsl:when test="$titleabbrev = ''"> + <xsl:value-of select="$title"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$titleabbrev"/> + </xsl:otherwise> + </xsl:choose> + </fo:marker> + </xsl:if> <xsl:choose> - <xsl:when test="$level=1">18</xsl:when> - <xsl:when test="$level=2">16</xsl:when> - <xsl:when test="$level=3">14</xsl:when> - <xsl:when test="$level=4">12</xsl:when> - <xsl:when test="$level=5">12</xsl:when> - <xsl:otherwise>10</xsl:otherwise> + <xsl:when test="$level=1"> + <fo:block xsl:use-attribute-sets="section.title.level1.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=2"> + <fo:block xsl:use-attribute-sets="section.title.level2.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=3"> + <fo:block xsl:use-attribute-sets="section.title.level3.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=4"> + <fo:block xsl:use-attribute-sets="section.title.level4.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:when test="$level=5"> + <fo:block xsl:use-attribute-sets="section.title.level5.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block xsl:use-attribute-sets="section.title.level6.properties"> + <xsl:copy-of select="$title"/> + </fo:block> + </xsl:otherwise> </xsl:choose> - </xsl:variable> - <fo:block font-size="{$fsize}pt" - font-weight="bold" - font-family="{$title.font.family}" - margin-left="4pc" - text-indent="-4pc" - keep-with-next.within-column="always" - space-before.minimum="1em" - space-before.optimum="1.5em" - space-before.maximum="2em"> - <xsl:copy-of select="$title"/> </fo:block> </xsl:template> Index: phpdoc/xsl/docbook/fo/synop.xsl diff -u phpdoc/xsl/docbook/fo/synop.xsl:1.1 phpdoc/xsl/docbook/fo/synop.xsl:1.2 --- phpdoc/xsl/docbook/fo/synop.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/synop.xsl Sun Mar 9 09:54:48 2003 @@ -8,7 +8,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: synop.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: synop.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -39,7 +39,7 @@ <xsl:text> </xsl:text> </xsl:template> -<xsl:template match="group|arg"> +<xsl:template match="group|arg" name="group-or-arg"> <xsl:variable name="choice" select="@choice"/> <xsl:variable name="rep" select="@rep"/> <xsl:variable name="sepchar"> @@ -99,11 +99,11 @@ <xsl:variable name="choice" select="@choice"/> <xsl:variable name="rep" select="@rep"/> <xsl:if test="position()>1"><xsl:value-of select="$arg.or.sep"/></xsl:if> - <xsl:apply-templates/> + <xsl:call-template name="group-or-arg"/> </xsl:template> <xsl:template match="sbr"> - <fo:inline linefeed-treatment="preserve">
</fo:inline> + <fo:block/> </xsl:template> <!-- ==================================================================== --> @@ -114,9 +114,14 @@ <xsl:apply-templates select="$target" mode="synopfragment.number"/> </xsl:variable> <fo:inline font-style="italic"> - <xsl:text>(</xsl:text> - <xsl:value-of select="$snum"/> - <xsl:text>)</xsl:text> + <fo:basic-link internal-destination="{@linkend}" + xsl:use-attribute-sets="xref.properties"> + <xsl:text>(</xsl:text> + <xsl:value-of select="$snum"/> + <xsl:text>)</xsl:text> + </fo:basic-link> + <xsl:text> </xsl:text> + <xsl:apply-templates/> </fo:inline> </xsl:template> @@ -135,7 +140,7 @@ <xsl:text> </xsl:text> <xsl:apply-templates/> </fo:block> -</xsl:template> +</xsl:template> <xsl:template match="funcsynopsis"> <xsl:call-template name="informal.object"/> Index: phpdoc/xsl/docbook/fo/table.xsl diff -u phpdoc/xsl/docbook/fo/table.xsl:1.1 phpdoc/xsl/docbook/fo/table.xsl:1.2 --- phpdoc/xsl/docbook/fo/table.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/table.xsl Sun Mar 9 09:54:48 2003 @@ -5,13 +5,14 @@ xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table" xmlns:xtbl="com.nwalsh.xalan.Table" xmlns:lxslt="http://xml.apache.org/xslt" - exclude-result-prefixes="doc stbl xtbl lxslt" + xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table" + exclude-result-prefixes="doc stbl xtbl lxslt ptbl" version='1.0'> <xsl:include href="../common/table.xsl"/> <!-- ******************************************************************** - $Id: table.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: table.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -23,7 +24,7 @@ <doc:reference xmlns=""> <referenceinfo> <releaseinfo role="meta"> -$Id: table.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ +$Id: table.xsl,v 1.2 2003/03/09 14:54:48 tom Exp $ </releaseinfo> <author><surname>Walsh</surname> <firstname>Norman</firstname></author> @@ -61,11 +62,10 @@ <xsl:template name="empty.table.cell"> <xsl:param name="colnum" select="0"/> - <xsl:variable name="frame" select="ancestor::tgroup/parent::*/@frame"/> - <xsl:variable name="rowsep"> <xsl:call-template name="inherited.table.attribute"> <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/> + <xsl:with-param name="row" select="ancestor-or-self::row[1]"/> <xsl:with-param name="colnum" select="$colnum"/> <xsl:with-param name="attribute" select="'rowsep'"/> </xsl:call-template> @@ -74,6 +74,7 @@ <xsl:variable name="colsep"> <xsl:call-template name="inherited.table.attribute"> <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/> + <xsl:with-param name="row" select="ancestor-or-self::row[1]"/> <xsl:with-param name="colnum" select="$colnum"/> <xsl:with-param name="attribute" select="'colsep'"/> </xsl:call-template> @@ -82,19 +83,24 @@ <fo:table-cell text-align="center" display-align="center" xsl:use-attribute-sets="table.cell.padding"> + <xsl:if test="$xep.extensions != 0"> + <!-- Suggested by RenderX to workaround a bug in their implementation --> + <xsl:attribute name="keep-together.within-column">always</xsl:attribute> + </xsl:if> <xsl:if test="$rowsep > 0"> <xsl:call-template name="border"> <xsl:with-param name="side" select="'bottom'"/> </xsl:call-template> </xsl:if> - <xsl:if test="$colsep > 0"> + <xsl:if test="$colsep > 0 and $colnum < ancestor::tgroup/@cols"> <xsl:call-template name="border"> <xsl:with-param name="side" select="'right'"/> </xsl:call-template> </xsl:if> - <fo:block/> <!-- fo:table-cell should not be empty --> + <!-- fo:table-cell should not be empty --> + <fo:block/> </fo:table-cell> </xsl:template> @@ -104,19 +110,19 @@ <xsl:param name="side" select="'left'"/> <xsl:attribute name="border-{$side}-width"> - <xsl:value-of select="$table.border.thickness"/> + <xsl:value-of select="$table.cell.border.thickness"/> </xsl:attribute> <xsl:attribute name="border-{$side}-style"> - <xsl:value-of select="$table.border.style"/> + <xsl:value-of select="$table.cell.border.style"/> </xsl:attribute> <xsl:attribute name="border-{$side}-color"> - <xsl:value-of select="$table.border.color"/> + <xsl:value-of select="$table.cell.border.color"/> </xsl:attribute> </xsl:template> <!-- ==================================================================== --> -<xsl:template match="tgroup"> +<xsl:template match="tgroup" name="tgroup"> <xsl:variable name="explicit.table.width"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" @@ -155,9 +161,14 @@ </xsl:choose> </xsl:variable> - <xsl:attribute name="width"> - <xsl:value-of select="$table.width"/> - </xsl:attribute> + <xsl:if test="position() = 1"> + <!-- If this is the first tgroup, output the width attribute for the --> + <!-- surrounding fo:table. (If this isn't the first tgroup, trying --> + <!-- to output the attribute will cause an error.) --> + <xsl:attribute name="width"> + <xsl:value-of select="$table.width"/> + </xsl:attribute> + </xsl:if> <xsl:choose> <xsl:when test="$use.extensions != 0 @@ -169,6 +180,9 @@ <xsl:when test="function-available('xtbl:adjustColumnWidths')"> <xsl:copy-of select="xtbl:adjustColumnWidths($colspecs)"/> </xsl:when> + <xsl:when test="function-available('ptbl:adjustColumnWidths')"> + <xsl:copy-of select="ptbl:adjustColumnWidths($colspecs)"/> + </xsl:when> <xsl:otherwise> <xsl:message terminate="yes"> <xsl:text>No adjustColumnWidths function available.</xsl:text> @@ -239,14 +253,14 @@ <fo:table-row> <xsl:call-template name="anchor"/> - <xsl:apply-templates select="entry[1]"> + <xsl:apply-templates select="(entry|entrytbl)[1]"> <xsl:with-param name="spans" select="$spans"/> </xsl:apply-templates> </fo:table-row> <xsl:if test="following-sibling::row"> <xsl:variable name="nextspans"> - <xsl:apply-templates select="entry[1]" mode="span"> + <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span"> <xsl:with-param name="spans" select="$spans"/> </xsl:apply-templates> </xsl:variable> @@ -257,7 +271,7 @@ </xsl:if> </xsl:template> -<xsl:template match="entry" name="entry"> +<xsl:template match="entry|entrytbl" name="entry"> <xsl:param name="col" select="1"/> <xsl:param name="spans"/> @@ -369,7 +383,114 @@ </xsl:when> <xsl:otherwise> + <xsl:variable name="cell.content"> + <fo:block> + <!-- highlight this entry? --> + <xsl:if test="ancestor::thead"> + <xsl:attribute name="font-weight">bold</xsl:attribute> + </xsl:if> + + <!-- are we missing any indexterms? --> + <xsl:if test="not(preceding-sibling::entry) + and not(parent::row/preceding-sibling::row)"> + <!-- this is the first entry of the first row --> + <xsl:if test="ancestor::thead or + (ancestor::tbody + and not(ancestor::tbody/preceding-sibling::thead + or ancestor::tbody/preceding-sibling::tbody))"> + <!-- of the thead or the first tbody --> + <xsl:apply-templates select="ancestor::tgroup/preceding-sibling::indexterm"/> + </xsl:if> + </xsl:if> + + <!-- + <xsl:text>(</xsl:text> + <xsl:value-of select="$rowsep"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$colsep"/> + <xsl:text>)</xsl:text> + --> + <xsl:choose> + <xsl:when test="$empty.cell"> + <xsl:text> </xsl:text> + </xsl:when> + <xsl:when test="self::entrytbl"> + <xsl:variable name="prop-columns" + select=".//colspec[contains(@colwidth, '*')]"/> + <fo:table border-collapse="collapse"> + <xsl:if test="count($prop-columns) != 0"> + <xsl:attribute name="table-layout">fixed</xsl:attribute> + </xsl:if> + <xsl:call-template name="tgroup"/> + </fo:table> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </fo:block> + </xsl:variable> + + <xsl:variable name="cell-orientation"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="ancestor-or-self::entry/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'orientation'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="row-orientation"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="ancestor-or-self::row/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'orientation'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="cell-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="ancestor-or-self::entry/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'rotated-width'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="row-width"> + <xsl:call-template name="dbfo-attribute"> + <xsl:with-param name="pis" + select="ancestor-or-self::row/processing-instruction('dbfo')"/> + <xsl:with-param name="attribute" select="'rotated-width'"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="orientation"> + <xsl:choose> + <xsl:when test="$cell-orientation != ''"> + <xsl:value-of select="$cell-orientation"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$row-orientation"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="rotated-width"> + <xsl:choose> + <xsl:when test="$cell-width != ''"> + <xsl:value-of select="$cell-width"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$row-width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <fo:table-cell xsl:use-attribute-sets="table.cell.padding"> + <xsl:if test="$xep.extensions != 0"> + <!-- Suggested by RenderX to workaround a bug in their implementation --> + <xsl:attribute name="keep-together.within-column">always</xsl:attribute> + </xsl:if> + <xsl:call-template name="anchor"/> <xsl:if test="$rowsep > 0"> @@ -378,7 +499,7 @@ </xsl:call-template> </xsl:if> - <xsl:if test="$colsep > 0"> + <xsl:if test="$colsep > 0 and $col < ancestor::tgroup/@cols"> <xsl:call-template name="border"> <xsl:with-param name="side" select="'right'"/> </xsl:call-template> @@ -434,41 +555,27 @@ </xsl:if> --> - <fo:block> - <!-- are we missing any indexterms? --> - <xsl:if test="not(preceding-sibling::entry) - and not(parent::row/preceding-sibling::row)"> - <!-- this is the first entry of the first row --> - <xsl:if test="ancestor::thead or - (ancestor::tbody - and not(ancestor::tbody/preceding-sibling::thead - or ancestor::tbody/preceding-sibling::tbody))"> - <!-- of the thead or the first tbody --> - <xsl:apply-templates select="ancestor::tgroup/preceding-sibling::indexterm"/> - </xsl:if> - </xsl:if> - - <!-- - <xsl:text>(</xsl:text> - <xsl:value-of select="$rowsep"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="$colsep"/> - <xsl:text>)</xsl:text> - --> - <xsl:choose> - <xsl:when test="$empty.cell"> - <xsl:text> </xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates/> - </xsl:otherwise> - </xsl:choose> - </fo:block> + <xsl:choose> + <xsl:when test="$xep.extensions != 0 and $orientation != ''"> + <fo:block-container reference-orientation="{$orientation}"> + <xsl:if test="$rotated-width != ''"> + <xsl:attribute name="width"> + <xsl:value-of select="$rotated-width"/> + </xsl:attribute> + </xsl:if> + <xsl:copy-of select="$cell.content"/> + </fo:block-container> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$cell.content"/> + </xsl:otherwise> + </xsl:choose> </fo:table-cell> <xsl:choose> - <xsl:when test="following-sibling::entry"> - <xsl:apply-templates select="following-sibling::entry[1]"> + <xsl:when test="following-sibling::entry|following-sibling::entrytbl"> + <xsl:apply-templates select="(following-sibling::entry + |following-sibling::entrytbl)[1]"> <xsl:with-param name="col" select="$col+$entry.colspan"/> <xsl:with-param name="spans" select="$following.spans"/> </xsl:apply-templates> @@ -484,7 +591,7 @@ </xsl:choose> </xsl:template> -<xsl:template match="entry" name="sentry" mode="span"> +<xsl:template match="entry|entrytbl" name="sentry" mode="span"> <xsl:param name="col" select="1"/> <xsl:param name="spans"/> @@ -541,8 +648,9 @@ </xsl:call-template> <xsl:choose> - <xsl:when test="following-sibling::entry"> - <xsl:apply-templates select="following-sibling::entry[1]" + <xsl:when test="following-sibling::entry|following-sibling::entrytbl"> + <xsl:apply-templates select="(following-sibling::entry + |following-sibling::entrytbl)[1]" mode="span"> <xsl:with-param name="col" select="$col+$entry.colspan"/> <xsl:with-param name="spans" select="$following.spans"/> Index: phpdoc/xsl/docbook/fo/titlepage.templates.xml diff -u phpdoc/xsl/docbook/fo/titlepage.templates.xml:1.1 phpdoc/xsl/docbook/fo/titlepage.templates.xml:1.2 --- phpdoc/xsl/docbook/fo/titlepage.templates.xml:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/titlepage.templates.xml Sun Mar 9 09:54:48 2003 @@ -17,62 +17,84 @@ xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<!-- ******************************************************************** + $Id: titlepage.templates.xml,v 1.2 2003/03/09 14:54:48 tom Exp $ + ******************************************************************** + + This file is part of the DocBook XSL Stylesheet distribution. + See ../README or http://docbook.sf.net/ for copyright + and other information. + + ******************************************************************** --> + <!-- ==================================================================== --> -<t:titlepage element="article" wrapper="fo:block"> - <t:titlepage-content side="recto"> - <title named-template="component.title" - param:node="ancestor-or-self::article[1]" - fo:text-align="center" - fo:keep-with-next="always" - fo:font-size="&hsize5;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> - <subtitle fo:font-family="{$title.font.family}" - fo:text-align="center"/> - <corpauthor fo:text-align="center"/> - <authorgroup fo:text-align="center"/> - <author fo:text-align="center" - fo:font-size="&hsize2;" - fo:font-weight="bold"/> - <othercredit fo:text-align="center"/> - <releaseinfo fo:text-align="center"/> - <copyright fo:text-align="center"/> - <legalnotice/> - <pubdate fo:text-align="center"/> - <revision fo:text-align="center"/> - <revhistory/> - <abstract/> +<t:titlepage t:element="article" t:wrapper="fo:block" + font-family="{$title.font.family}"> + + <t:titlepage-content t:side="recto" + text-align="center"> + + <title t:named-template="component.title" + param:node="ancestor-or-self::article[1]" + keep-with-next="always" + font-size="&hsize5;" + font-weight="bold"/> + + <subtitle/> + + <corpauthor space-before="0.5em" + font-size="&hsize2;"/> + <authorgroup space-before="0.5em" + font-size="&hsize2;"/> + <author space-before="0.5em" + font-size="&hsize2;"/> + + <othercredit space-before="0.5em"/> + <releaseinfo space-before="0.5em"/> + <copyright space-before="0.5em"/> + <legalnotice text-align="start" + margin-left="0.5in" + margin-right="0.5in" + font-family="{$body.font.family}"/> + <pubdate space-before="0.5em"/> + <revision space-before="0.5em"/> + <revhistory space-before="0.5em"/> + <abstract space-before="0.5em" + text-align="start" + margin-left="0.5in" + margin-right="0.5in" + font-family="{$body.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> -<t:titlepage element="set" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="set" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - named-template="division.title" + t:named-template="division.title" param:node="ancestor-or-self::set[1]" - fo:text-align="center" - fo:font-size="&hsize5;" - fo:space-before="&hsize5space;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize5;" + space-before="&hsize5space;" + font-weight="bold" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}" - fo:text-align="center"/> + font-family="{$title.font.family}" + text-align="center"/> <corpauthor/> <authorgroup/> <author/> @@ -86,121 +108,121 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="book" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="book" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - named-template="division.title" + t:named-template="division.title" param:node="ancestor-or-self::book[1]" - fo:text-align="center" - fo:font-size="&hsize5;" - fo:space-before="&hsize5space;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> - <subtitle - fo:text-align="center" - fo:font-size="&hsize4;" - fo:space-before="&hsize4space;" - fo:font-family="{$title.font.family}"/> - <corpauthor fo:font-size="&hsize3;" - fo:keep-with-next="always" - fo:space-before="2in"/> - <authorgroup fo:space-before="2in"/> - <author fo:font-size="&hsize3;" - fo:space-before="&hsize2space;" - fo:keep-with-next="always"/> - </t:titlepage-content> - - <t:titlepage-content side="verso"> - <title - named-template="book.verso.title" - fo:font-size="&hsize2;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize5;" + space-before="&hsize5space;" + font-weight="bold" + font-family="{$title.font.family}"/> + <subtitle + text-align="center" + font-size="&hsize4;" + space-before="&hsize4space;" + font-family="{$title.font.family}"/> + <corpauthor font-size="&hsize3;" + keep-with-next="always" + space-before="2in"/> + <authorgroup space-before="2in"/> + <author font-size="&hsize3;" + space-before="&hsize2space;" + keep-with-next="always"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + <title + t:named-template="book.verso.title" + font-size="&hsize2;" + font-weight="bold" + font-family="{$title.font.family}"/> <corpauthor/> - <authorgroup named-template="verso.authorgroup"/> + <authorgroup t:named-template="verso.authorgroup"/> <author/> <othercredit/> - <pubdate fo:space-before="1em"/> + <pubdate space-before="1em"/> <copyright/> <abstract/> - <legalnotice fo:font-size="8pt"/> + <legalnotice font-size="8pt"/> </t:titlepage-content> <t:titlepage-separator> <fo:block break-after="page"/> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> <fo:block break-after="page"/> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> -<t:titlepage element="part" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="part" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - named-template="division.title" + t:named-template="division.title" param:node="ancestor-or-self::part[1]" - fo:text-align="center" - fo:font-size="&hsize5;" - fo:space-before="&hsize5space;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize5;" + space-before="&hsize5space;" + font-weight="bold" + font-family="{$title.font.family}"/> <subtitle - fo:text-align="center" - fo:font-size="&hsize4;" - fo:space-before="&hsize4space;" - fo:font-weight='bold' - fo:font-style='italic' - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize4;" + space-before="&hsize4space;" + font-weight='bold' + font-style='italic' + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="partintro" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="partintro" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:text-align="center" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:space-before="1em" - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize5;" + font-weight="bold" + space-before="1em" + font-family="{$title.font.family}"/> <subtitle - fo:text-align="center" - fo:font-size="&hsize2;" - fo:font-weight="bold" - fo:font-style="italic" - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize2;" + font-weight="bold" + font-style="italic" + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -214,34 +236,34 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> -<t:titlepage element="reference" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="reference" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - named-template="division.title" + t:named-template="division.title" param:node="ancestor-or-self::reference[1]" - fo:text-align="center" - fo:font-size="&hsize5;" - fo:space-before="&hsize5space;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + text-align="center" + font-size="&hsize5;" + space-before="&hsize5space;" + font-weight="bold" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}" - fo:text-align="center"/> + font-family="{$title.font.family}" + text-align="center"/> <corpauthor/> <authorgroup/> <author/> @@ -255,62 +277,167 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refsynopsisdiv" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refsection" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refsect1" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + +<t:titlepage t:element="refsect2" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="dedication" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="refsect3" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="dedication" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="component.title" + t:force="1" + t:named-template="component.title" param:node="ancestor-or-self::dedication[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-family="{$title.font.family}" - fo:font-weight="bold"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="preface" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="preface" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="component.title" + t:force="1" + t:named-template="component.title" param:node="ancestor-or-self::preface[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-family="{$title.font.family}" - fo:font-weight="bold"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -324,40 +451,46 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="chapter" wrapper="fo:block"> - <t:titlepage-content side="recto"> - <title - named-template="component.title" + <t:titlepage t:element="chapter" t:wrapper="fo:block" + font-family="{$title.font.family}"> + <t:titlepage-content t:side="recto" margin-left="{$title.margin.left}"> + <title t:named-template="component.title" param:node="ancestor-or-self::chapter[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> - <subtitle - fo:space-before="0.5em" - fo:margin-left="{$title.margin.left}" - fo:font-style="italic" - fo:font-size="&hsize2;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> - <corpauthor/> - <authorgroup/> - <author/> + font-size="&hsize5;" + font-weight="bold"/> + + <subtitle space-before="0.5em" + font-style="italic" + font-size="&hsize2;" + font-weight="bold"/> + + <corpauthor space-before="0.5em" + space-after="0.5em" + font-size="&hsize2;"/> + + <authorgroup space-before="0.5em" + space-after="0.5em" + font-size="&hsize2;"/> + + <author space-before="0.5em" + space-after="0.5em" + font-size="&hsize2;"/> + <othercredit/> <releaseinfo/> <copyright/> @@ -368,32 +501,32 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="appendix" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="appendix" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - named-template="component.title" + t:named-template="component.title" param:node="ancestor-or-self::appendix[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-weight="bold" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -407,28 +540,28 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> -<t:titlepage element="section" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="section" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -442,26 +575,26 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="sect1" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="sect1" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -475,26 +608,26 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="sect2" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="sect2" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -508,26 +641,26 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="sect3" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="sect3" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -541,26 +674,26 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="sect4" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="sect4" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -574,26 +707,26 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="sect5" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="sect5" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -607,26 +740,26 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> -<t:titlepage element="simplesect" wrapper="fo:block"> - <t:titlepage-content side="recto"> +<t:titlepage t:element="simplesect" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - fo:margin-left="{$title.margin.left}" - fo:font-family="{$title.font.family}"/> + margin-left="{$title.margin.left}" + font-family="{$title.font.family}"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> <corpauthor/> <authorgroup/> <author/> @@ -640,291 +773,450 @@ <abstract/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="bibliography" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="bibliography" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="component.title" + t:force="1" + t:named-template="component.title" param:node="ancestor-or-self::bibliography[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-family="{$title.font.family}" - fo:font-weight="bold"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> + <subtitle + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="bibliodiv" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title t:named-template="component.title" + param:node="ancestor-or-self::bibliodiv[1]" + margin-left="{$title.margin.left}" + font-size="&hsize4;" + font-family="{$title.font.family}" + font-weight="bold"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="glossary" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="glossary" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="component.title" + t:force="1" + t:named-template="component.title" param:node="ancestor-or-self::glossary[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-family="{$title.font.family}" - fo:font-weight="bold"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="index" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="glossdiv" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title t:named-template="component.title" + param:node="ancestor-or-self::glossdiv[1]" + margin-left="{$title.margin.left}" + font-size="&hsize4;" + font-family="{$title.font.family}" + font-weight="bold"/> + <subtitle + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="index" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="component.title" + t:force="1" + t:named-template="component.title" param:node="ancestor-or-self::index[1]" param:pagewide="1" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-family="{$title.font.family}" - fo:font-weight="bold"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="colophon" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <!-- The indexdiv.title template is used so that manual and --> + <!-- automatically generated indexdiv titles get the same --> + <!-- formatting. --> + + <t:titlepage t:element="indexdiv" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title t:force="1" + t:named-template="indexdiv.title" + param:title="title"/> + <subtitle + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="setindex" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="component.title" + t:force="1" + t:named-template="component.title" + param:node="ancestor-or-self::setindex[1]" + param:pagewide="1" + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> + <subtitle + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + +<!-- ==================================================================== --> + + <t:titlepage t:element="colophon" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="component.title" param:node="ancestor-or-self::colophon[1]" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-family="{$title.font.family}" - fo:font-weight="bold"/> + margin-left="{$title.margin.left}" + font-size="&hsize5;" + font-family="{$title.font.family}" + font-weight="bold"/> <subtitle - fo:font-family="{$title.font.family}"/> + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> <!-- ==================================================================== --> - <t:titlepage element="table.of.contents" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="table.of.contents" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="gentext" + t:force="1" + t:named-template="gentext" param:key="'TableofContents'" - fo:space-after="1em" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> - <t:titlepage element="list.of.tables" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="list.of.tables" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="gentext" + t:force="1" + t:named-template="gentext" param:key="'ListofTables'" - fo:space-after="1em" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> - <t:titlepage element="list.of.figures" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="list.of.figures" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="gentext" + t:force="1" + t:named-template="gentext" param:key="'ListofFigures'" - fo:space-after="1em" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> - <t:titlepage element="list.of.examples" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="list.of.examples" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="gentext" + t:force="1" + t:named-template="gentext" param:key="'ListofExamples'" - fo:space-after="1em" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> - <t:titlepage element="list.of.equations" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="list.of.equations" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="gentext" + t:force="1" + t:named-template="gentext" param:key="'ListofEquations'" - fo:space-after="1em" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> + </t:titlepage> + + <t:titlepage t:element="list.of.procedures" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + t:force="1" + t:named-template="gentext" + param:key="'ListofProcedures'" + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> - <t:titlepage element="list.of.unknowns" wrapper="fo:block"> - <t:titlepage-content side="recto"> + <t:titlepage t:element="list.of.unknowns" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> <title - force="1" - named-template="gentext" + t:force="1" + t:named-template="gentext" param:key="'ListofUnknown'" - fo:space-after="1em" - fo:margin-left="{$title.margin.left}" - fo:font-size="&hsize3;" - fo:font-weight="bold" - fo:font-family="{$title.font.family}"/> + space-before.minimum="1em" + space-before.optimum="1.5em" + space-before.maximum="2em" + space-after="0.5em" + margin-left="{$title.margin.left}" + font-size="&hsize3;" + font-weight="bold" + font-family="{$title.font.family}"/> </t:titlepage-content> - <t:titlepage-content side="verso"> + <t:titlepage-content t:side="verso"> </t:titlepage-content> <t:titlepage-separator> </t:titlepage-separator> - <t:titlepage-before side="recto"> + <t:titlepage-before t:side="recto"> </t:titlepage-before> - <t:titlepage-before side="verso"> + <t:titlepage-before t:side="verso"> </t:titlepage-before> </t:titlepage> Index: phpdoc/xsl/docbook/fo/titlepage.templates.xsl diff -u phpdoc/xsl/docbook/fo/titlepage.templates.xsl:1.1 phpdoc/xsl/docbook/fo/titlepage.templates.xsl:1.2 --- phpdoc/xsl/docbook/fo/titlepage.templates.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/titlepage.templates.xsl Sun Mar 9 09:54:48 2003 @@ -64,11 +64,15 @@ </xsl:template> <xsl:template name="article.titlepage"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.font.family}"> + <fo:block text-align="center"> <xsl:call-template name="article.titlepage.before.recto"/> <xsl:call-template name="article.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="article.titlepage.before.verso"/> <xsl:call-template name="article.titlepage.verso"/> + </fo:block> <xsl:call-template name="article.titlepage.separator"/> </fo:block> </xsl:template> @@ -86,7 +90,7 @@ </xsl:template> <xsl:template match="title" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center" keep-with-next="always" font-size="24.8832pt" font-weight="bold" font-family="{$title.font.family}"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" keep-with-next="always" font-size="24.8832pt" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::article[1]"/> </xsl:call-template> @@ -94,73 +98,73 @@ </xsl:template> <xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" font-family="{$title.font.family}" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="author" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center" font-size="14.4pt" font-weight="bold"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="copyright" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.font.family}"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="revision" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="center"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="abstract" mode="article.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.font.family}"> <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> </fo:block> </xsl:template> @@ -211,10 +215,14 @@ <xsl:template name="set.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="set.titlepage.before.recto"/> <xsl:call-template name="set.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="set.titlepage.before.verso"/> <xsl:call-template name="set.titlepage.verso"/> + </fo:block> <xsl:call-template name="set.titlepage.separator"/> </fo:block> </xsl:template> @@ -366,10 +374,14 @@ <xsl:template name="book.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="book.titlepage.before.recto"/> <xsl:call-template name="book.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="book.titlepage.before.verso"/> <xsl:call-template name="book.titlepage.verso"/> + </fo:block> <xsl:call-template name="book.titlepage.separator"/> </fo:block> </xsl:template> @@ -515,10 +527,14 @@ <xsl:template name="part.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="part.titlepage.before.recto"/> <xsl:call-template name="part.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="part.titlepage.before.verso"/> <xsl:call-template name="part.titlepage.verso"/> + </fo:block> <xsl:call-template name="part.titlepage.separator"/> </fo:block> </xsl:template> @@ -612,10 +628,14 @@ <xsl:template name="partintro.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="partintro.titlepage.before.recto"/> <xsl:call-template name="partintro.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="partintro.titlepage.before.verso"/> <xsl:call-template name="partintro.titlepage.verso"/> + </fo:block> <xsl:call-template name="partintro.titlepage.separator"/> </fo:block> </xsl:template> @@ -633,7 +653,7 @@ </xsl:template> <xsl:template match="title" mode="partintro.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="17.28pt" font-weight="bold" space-before="1em" font-family="{$title.font.family}"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="24.8832pt" font-weight="bold" space-before="1em" font-family="{$title.font.family}"> <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/> </fo:block> </xsl:template> @@ -773,10 +793,14 @@ <xsl:template name="reference.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="reference.titlepage.before.recto"/> <xsl:call-template name="reference.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="reference.titlepage.before.verso"/> <xsl:call-template name="reference.titlepage.verso"/> + </fo:block> <xsl:call-template name="reference.titlepage.separator"/> </fo:block> </xsl:template> @@ -873,8 +897,303 @@ </fo:block> </xsl:template> +<xsl:template name="refsynopsisdiv.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsynopsisdivinfo/title"> + <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsynopsisdiv.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="refsynopsisdiv.titlepage.before.recto"/> + <xsl:call-template name="refsynopsisdiv.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="refsynopsisdiv.titlepage.before.verso"/> + <xsl:call-template name="refsynopsisdiv.titlepage.verso"/> + </fo:block> + <xsl:call-template name="refsynopsisdiv.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsynopsisdiv.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsynopsisdiv.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsynopsisdiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="refsection.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsectioninfo/title"> + <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsection.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsection.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsection.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsection.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsection.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="refsection.titlepage.before.recto"/> + <xsl:call-template name="refsection.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="refsection.titlepage.before.verso"/> + <xsl:call-template name="refsection.titlepage.verso"/> + </fo:block> + <xsl:call-template name="refsection.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsection.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsection.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsection.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsection.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="refsect1.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsect1info/title"> + <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsect1.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsect1.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsect1.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsect1.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsect1.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="refsect1.titlepage.before.recto"/> + <xsl:call-template name="refsect1.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="refsect1.titlepage.before.verso"/> + <xsl:call-template name="refsect1.titlepage.verso"/> + </fo:block> + <xsl:call-template name="refsect1.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsect1.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsect1.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsect1.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect1.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="refsect2.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsect2info/title"> + <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsect2.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsect2.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsect2.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsect2.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsect2.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="refsect2.titlepage.before.recto"/> + <xsl:call-template name="refsect2.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="refsect2.titlepage.before.verso"/> + <xsl:call-template name="refsect2.titlepage.verso"/> + </fo:block> + <xsl:call-template name="refsect2.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsect2.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsect2.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsect2.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect2.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="refsect3.titlepage.recto"> + <xsl:choose> + <xsl:when test="refsect3info/title"> + <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="refsect3.titlepage.verso"> +</xsl:template> + +<xsl:template name="refsect3.titlepage.separator"> +</xsl:template> + +<xsl:template name="refsect3.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="refsect3.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="refsect3.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="refsect3.titlepage.before.recto"/> + <xsl:call-template name="refsect3.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="refsect3.titlepage.before.verso"/> + <xsl:call-template name="refsect3.titlepage.verso"/> + </fo:block> + <xsl:call-template name="refsect3.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="refsect3.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="refsect3.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="refsect3.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect3.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + <xsl:template name="dedication.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-family="{$title.font.family}" font-weight="bold"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/> </xsl:call-template></fo:block> @@ -906,10 +1225,14 @@ <xsl:template name="dedication.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="dedication.titlepage.before.recto"/> <xsl:call-template name="dedication.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="dedication.titlepage.before.verso"/> <xsl:call-template name="dedication.titlepage.verso"/> + </fo:block> <xsl:call-template name="dedication.titlepage.separator"/> </fo:block> </xsl:template> @@ -933,7 +1256,7 @@ </xsl:template> <xsl:template name="preface.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-family="{$title.font.family}" font-weight="bold"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::preface[1]"/> </xsl:call-template></fo:block> @@ -987,10 +1310,14 @@ <xsl:template name="preface.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="preface.titlepage.before.recto"/> <xsl:call-template name="preface.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="preface.titlepage.before.verso"/> <xsl:call-template name="preface.titlepage.verso"/> + </fo:block> <xsl:call-template name="preface.titlepage.separator"/> </fo:block> </xsl:template> @@ -1141,11 +1468,15 @@ </xsl:template> <xsl:template name="chapter.titlepage"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.font.family}"> + <fo:block margin-left="{$title.margin.left}"> <xsl:call-template name="chapter.titlepage.before.recto"/> <xsl:call-template name="chapter.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="chapter.titlepage.before.verso"/> <xsl:call-template name="chapter.titlepage.verso"/> + </fo:block> <xsl:call-template name="chapter.titlepage.separator"/> </fo:block> </xsl:template> @@ -1163,7 +1494,7 @@ </xsl:template> <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" font-size="24.8832pt" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/> </xsl:call-template> @@ -1171,25 +1502,25 @@ </xsl:template> <xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" margin-left="{$title.margin.left}" font-style="italic" font-size="14.4pt" font-weight="bold" font-family="{$title.font.family}"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" font-style="italic" font-size="14.4pt" font-weight="bold"> <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt"> <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt"> <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> </fo:block> </xsl:template> <xsl:template match="author" mode="chapter.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt"> <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/> </fo:block> </xsl:template> @@ -1305,10 +1636,14 @@ <xsl:template name="appendix.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="appendix.titlepage.before.recto"/> <xsl:call-template name="appendix.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="appendix.titlepage.before.verso"/> <xsl:call-template name="appendix.titlepage.verso"/> + </fo:block> <xsl:call-template name="appendix.titlepage.separator"/> </fo:block> </xsl:template> @@ -1326,7 +1661,7 @@ </xsl:template> <xsl:template match="title" mode="appendix.titlepage.recto.auto.mode"> -<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::appendix[1]"/> </xsl:call-template> @@ -1451,10 +1786,14 @@ <xsl:template name="section.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="section.titlepage.before.recto"/> <xsl:call-template name="section.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="section.titlepage.before.verso"/> <xsl:call-template name="section.titlepage.verso"/> + </fo:block> <xsl:call-template name="section.titlepage.separator"/> </fo:block> </xsl:template> @@ -1595,10 +1934,14 @@ <xsl:template name="sect1.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="sect1.titlepage.before.recto"/> <xsl:call-template name="sect1.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="sect1.titlepage.before.verso"/> <xsl:call-template name="sect1.titlepage.verso"/> + </fo:block> <xsl:call-template name="sect1.titlepage.separator"/> </fo:block> </xsl:template> @@ -1739,10 +2082,14 @@ <xsl:template name="sect2.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="sect2.titlepage.before.recto"/> <xsl:call-template name="sect2.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="sect2.titlepage.before.verso"/> <xsl:call-template name="sect2.titlepage.verso"/> + </fo:block> <xsl:call-template name="sect2.titlepage.separator"/> </fo:block> </xsl:template> @@ -1883,10 +2230,14 @@ <xsl:template name="sect3.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="sect3.titlepage.before.recto"/> <xsl:call-template name="sect3.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="sect3.titlepage.before.verso"/> <xsl:call-template name="sect3.titlepage.verso"/> + </fo:block> <xsl:call-template name="sect3.titlepage.separator"/> </fo:block> </xsl:template> @@ -2027,10 +2378,14 @@ <xsl:template name="sect4.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="sect4.titlepage.before.recto"/> <xsl:call-template name="sect4.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="sect4.titlepage.before.verso"/> <xsl:call-template name="sect4.titlepage.verso"/> + </fo:block> <xsl:call-template name="sect4.titlepage.separator"/> </fo:block> </xsl:template> @@ -2171,10 +2526,14 @@ <xsl:template name="sect5.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="sect5.titlepage.before.recto"/> <xsl:call-template name="sect5.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="sect5.titlepage.before.verso"/> <xsl:call-template name="sect5.titlepage.verso"/> + </fo:block> <xsl:call-template name="sect5.titlepage.separator"/> </fo:block> </xsl:template> @@ -2332,10 +2691,14 @@ <xsl:template name="simplesect.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="simplesect.titlepage.before.recto"/> <xsl:call-template name="simplesect.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="simplesect.titlepage.before.verso"/> <xsl:call-template name="simplesect.titlepage.verso"/> + </fo:block> <xsl:call-template name="simplesect.titlepage.separator"/> </fo:block> </xsl:template> @@ -2431,7 +2794,7 @@ </xsl:template> <xsl:template name="bibliography.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-family="{$title.font.family}" font-weight="bold"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/> </xsl:call-template></fo:block> @@ -2463,10 +2826,14 @@ <xsl:template name="bibliography.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="bibliography.titlepage.before.recto"/> <xsl:call-template name="bibliography.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="bibliography.titlepage.before.verso"/> <xsl:call-template name="bibliography.titlepage.verso"/> + </fo:block> <xsl:call-template name="bibliography.titlepage.separator"/> </fo:block> </xsl:template> @@ -2489,8 +2856,87 @@ </fo:block> </xsl:template> +<xsl:template name="bibliodiv.titlepage.recto"> + <xsl:choose> + <xsl:when test="bibliodivinfo/title"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="bibliodivinfo/subtitle"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="bibliodiv.titlepage.verso"> +</xsl:template> + +<xsl:template name="bibliodiv.titlepage.separator"> +</xsl:template> + +<xsl:template name="bibliodiv.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="bibliodiv.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="bibliodiv.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="bibliodiv.titlepage.before.recto"/> + <xsl:call-template name="bibliodiv.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="bibliodiv.titlepage.before.verso"/> + <xsl:call-template name="bibliodiv.titlepage.verso"/> + </fo:block> + <xsl:call-template name="bibliodiv.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="bibliodiv.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="bibliodiv.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="bibliodiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.font.family}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::bibliodiv[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="bibliodiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + <xsl:template name="glossary.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-family="{$title.font.family}" font-weight="bold"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/> </xsl:call-template></fo:block> @@ -2522,10 +2968,14 @@ <xsl:template name="glossary.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="glossary.titlepage.before.recto"/> <xsl:call-template name="glossary.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="glossary.titlepage.before.verso"/> <xsl:call-template name="glossary.titlepage.verso"/> + </fo:block> <xsl:call-template name="glossary.titlepage.separator"/> </fo:block> </xsl:template> @@ -2548,8 +2998,87 @@ </fo:block> </xsl:template> +<xsl:template name="glossdiv.titlepage.recto"> + <xsl:choose> + <xsl:when test="glossdivinfo/title"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/title"/> + </xsl:when> + <xsl:when test="docinfo/title"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/title"/> + </xsl:when> + <xsl:when test="title"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="title"/> + </xsl:when> + </xsl:choose> + + <xsl:choose> + <xsl:when test="glossdivinfo/subtitle"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="glossdiv.titlepage.verso"> +</xsl:template> + +<xsl:template name="glossdiv.titlepage.separator"> +</xsl:template> + +<xsl:template name="glossdiv.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="glossdiv.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="glossdiv.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="glossdiv.titlepage.before.recto"/> + <xsl:call-template name="glossdiv.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="glossdiv.titlepage.before.verso"/> + <xsl:call-template name="glossdiv.titlepage.verso"/> + </fo:block> + <xsl:call-template name="glossdiv.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="glossdiv.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="glossdiv.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="title" mode="glossdiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.font.family}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::glossdiv[1]"/> +</xsl:call-template> +</fo:block> +</xsl:template> + +<xsl:template match="subtitle" mode="glossdiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + <xsl:template name="index.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-family="{$title.font.family}" font-weight="bold"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::index[1]"/> <xsl:with-param name="pagewide" select="1"/> @@ -2582,10 +3111,14 @@ <xsl:template name="index.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="index.titlepage.before.recto"/> <xsl:call-template name="index.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="index.titlepage.before.verso"/> <xsl:call-template name="index.titlepage.verso"/> + </fo:block> <xsl:call-template name="index.titlepage.separator"/> </fo:block> </xsl:template> @@ -2608,8 +3141,135 @@ </fo:block> </xsl:template> +<xsl:template name="indexdiv.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style"> +<xsl:call-template name="indexdiv.title"> +<xsl:with-param name="title" select="title"/> +</xsl:call-template></fo:block> + <xsl:choose> + <xsl:when test="indexdivinfo/subtitle"> + <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="indexdiv.titlepage.verso"> +</xsl:template> + +<xsl:template name="indexdiv.titlepage.separator"> +</xsl:template> + +<xsl:template name="indexdiv.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="indexdiv.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="indexdiv.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="indexdiv.titlepage.before.recto"/> + <xsl:call-template name="indexdiv.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="indexdiv.titlepage.before.verso"/> + <xsl:call-template name="indexdiv.titlepage.verso"/> + </fo:block> + <xsl:call-template name="indexdiv.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="indexdiv.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="indexdiv.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subtitle" mode="indexdiv.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + +<xsl:template name="setindex.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> +<xsl:call-template name="component.title"> +<xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/> +<xsl:with-param name="pagewide" select="1"/> +</xsl:call-template></fo:block> + <xsl:choose> + <xsl:when test="setindexinfo/subtitle"> + <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/> + </xsl:when> + <xsl:when test="docinfo/subtitle"> + <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/> + </xsl:when> + <xsl:when test="subtitle"> + <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/> + </xsl:when> + </xsl:choose> + +</xsl:template> + +<xsl:template name="setindex.titlepage.verso"> +</xsl:template> + +<xsl:template name="setindex.titlepage.separator"> +</xsl:template> + +<xsl:template name="setindex.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="setindex.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="setindex.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="setindex.titlepage.before.recto"/> + <xsl:call-template name="setindex.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="setindex.titlepage.before.verso"/> + <xsl:call-template name="setindex.titlepage.verso"/> + </fo:block> + <xsl:call-template name="setindex.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="setindex.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="setindex.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode"> +<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" font-family="{$title.font.family}"> +<xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/> +</fo:block> +</xsl:template> + <xsl:template name="colophon.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="17.28pt" font-family="{$title.font.family}" font-weight="bold"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.font.family}" font-weight="bold"> <xsl:call-template name="component.title"> <xsl:with-param name="node" select="ancestor-or-self::colophon[1]"/> </xsl:call-template></fo:block> @@ -2641,10 +3301,14 @@ <xsl:template name="colophon.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="colophon.titlepage.before.recto"/> <xsl:call-template name="colophon.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="colophon.titlepage.before.verso"/> <xsl:call-template name="colophon.titlepage.verso"/> + </fo:block> <xsl:call-template name="colophon.titlepage.separator"/> </fo:block> </xsl:template> @@ -2668,7 +3332,7 @@ </xsl:template> <xsl:template name="table.of.contents.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="table.of.contents.titlepage.recto.style" space-after="1em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="table.of.contents.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'TableofContents'"/> </xsl:call-template></fo:block> @@ -2688,10 +3352,14 @@ <xsl:template name="table.of.contents.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="table.of.contents.titlepage.before.recto"/> <xsl:call-template name="table.of.contents.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="table.of.contents.titlepage.before.verso"/> <xsl:call-template name="table.of.contents.titlepage.verso"/> + </fo:block> <xsl:call-template name="table.of.contents.titlepage.separator"/> </fo:block> </xsl:template> @@ -2709,7 +3377,7 @@ </xsl:template> <xsl:template name="list.of.tables.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.tables.titlepage.recto.style" space-after="1em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.tables.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'ListofTables'"/> </xsl:call-template></fo:block> @@ -2729,10 +3397,14 @@ <xsl:template name="list.of.tables.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="list.of.tables.titlepage.before.recto"/> <xsl:call-template name="list.of.tables.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="list.of.tables.titlepage.before.verso"/> <xsl:call-template name="list.of.tables.titlepage.verso"/> + </fo:block> <xsl:call-template name="list.of.tables.titlepage.separator"/> </fo:block> </xsl:template> @@ -2750,7 +3422,7 @@ </xsl:template> <xsl:template name="list.of.figures.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.figures.titlepage.recto.style" space-after="1em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.figures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'ListofFigures'"/> </xsl:call-template></fo:block> @@ -2770,10 +3442,14 @@ <xsl:template name="list.of.figures.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="list.of.figures.titlepage.before.recto"/> <xsl:call-template name="list.of.figures.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="list.of.figures.titlepage.before.verso"/> <xsl:call-template name="list.of.figures.titlepage.verso"/> + </fo:block> <xsl:call-template name="list.of.figures.titlepage.separator"/> </fo:block> </xsl:template> @@ -2791,7 +3467,7 @@ </xsl:template> <xsl:template name="list.of.examples.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.examples.titlepage.recto.style" space-after="1em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.examples.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'ListofExamples'"/> </xsl:call-template></fo:block> @@ -2811,10 +3487,14 @@ <xsl:template name="list.of.examples.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="list.of.examples.titlepage.before.recto"/> <xsl:call-template name="list.of.examples.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="list.of.examples.titlepage.before.verso"/> <xsl:call-template name="list.of.examples.titlepage.verso"/> + </fo:block> <xsl:call-template name="list.of.examples.titlepage.separator"/> </fo:block> </xsl:template> @@ -2832,7 +3512,7 @@ </xsl:template> <xsl:template name="list.of.equations.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.equations.titlepage.recto.style" space-after="1em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.equations.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'ListofEquations'"/> </xsl:call-template></fo:block> @@ -2852,10 +3532,14 @@ <xsl:template name="list.of.equations.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="list.of.equations.titlepage.before.recto"/> <xsl:call-template name="list.of.equations.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="list.of.equations.titlepage.before.verso"/> <xsl:call-template name="list.of.equations.titlepage.verso"/> + </fo:block> <xsl:call-template name="list.of.equations.titlepage.separator"/> </fo:block> </xsl:template> @@ -2872,8 +3556,53 @@ <xsl:apply-templates select="." mode="titlepage.mode"/> </xsl:template> +<xsl:template name="list.of.procedures.titlepage.recto"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.procedures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> +<xsl:call-template name="gentext"> +<xsl:with-param name="key" select="'ListofProcedures'"/> +</xsl:call-template></fo:block> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage.verso"> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage.separator"> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage.before.recto"> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage.before.verso"> +</xsl:template> + +<xsl:template name="list.of.procedures.titlepage"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> + <xsl:call-template name="list.of.procedures.titlepage.before.recto"/> + <xsl:call-template name="list.of.procedures.titlepage.recto"/> + </fo:block> + <fo:block> + <xsl:call-template name="list.of.procedures.titlepage.before.verso"/> + <xsl:call-template name="list.of.procedures.titlepage.verso"/> + </fo:block> + <xsl:call-template name="list.of.procedures.titlepage.separator"/> + </fo:block> +</xsl:template> + +<xsl:template match="*" mode="list.of.procedures.titlepage.recto.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="*" mode="list.of.procedures.titlepage.verso.mode"> + <!-- if an element isn't found in this mode, --> + <!-- try the generic titlepage.mode --> + <xsl:apply-templates select="." mode="titlepage.mode"/> +</xsl:template> + <xsl:template name="list.of.unknowns.titlepage.recto"> - <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.unknowns.titlepage.recto.style" space-after="1em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> + <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.unknowns.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" font-size="17.28pt" font-weight="bold" font-family="{$title.font.family}"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'ListofUnknown'"/> </xsl:call-template></fo:block> @@ -2893,10 +3622,14 @@ <xsl:template name="list.of.unknowns.titlepage"> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:block> <xsl:call-template name="list.of.unknowns.titlepage.before.recto"/> <xsl:call-template name="list.of.unknowns.titlepage.recto"/> + </fo:block> + <fo:block> <xsl:call-template name="list.of.unknowns.titlepage.before.verso"/> <xsl:call-template name="list.of.unknowns.titlepage.verso"/> + </fo:block> <xsl:call-template name="list.of.unknowns.titlepage.separator"/> </fo:block> </xsl:template> Index: phpdoc/xsl/docbook/fo/titlepage.xsl diff -u phpdoc/xsl/docbook/fo/titlepage.xsl:1.1 phpdoc/xsl/docbook/fo/titlepage.xsl:1.2 --- phpdoc/xsl/docbook/fo/titlepage.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/titlepage.xsl Sun Mar 9 09:54:49 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: titlepage.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: titlepage.xsl,v 1.2 2003/03/09 14:54:49 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -61,12 +61,24 @@ <xsl:attribute-set name="bibliography.titlepage.recto.style"/> <xsl:attribute-set name="bibliography.titlepage.verso.style"/> +<xsl:attribute-set name="bibliodiv.titlepage.recto.style"/> +<xsl:attribute-set name="bibliodiv.titlepage.verso.style"/> + <xsl:attribute-set name="glossary.titlepage.recto.style"/> <xsl:attribute-set name="glossary.titlepage.verso.style"/> +<xsl:attribute-set name="glossdiv.titlepage.recto.style"/> +<xsl:attribute-set name="glossdiv.titlepage.verso.style"/> + <xsl:attribute-set name="index.titlepage.recto.style"/> <xsl:attribute-set name="index.titlepage.verso.style"/> +<xsl:attribute-set name="setindex.titlepage.recto.style"/> +<xsl:attribute-set name="setindex.titlepage.verso.style"/> + +<xsl:attribute-set name="indexdiv.titlepage.recto.style"/> +<xsl:attribute-set name="indexdiv.titlepage.verso.style"/> + <xsl:attribute-set name="colophon.titlepage.recto.style"/> <xsl:attribute-set name="colophon.titlepage.verso.style"/> @@ -109,6 +121,31 @@ <xsl:attribute-set name="simplesect.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/> +<xsl:attribute-set name="refsynopsisdiv.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsynopsisdiv.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refsection.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsection.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refsect1.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsect1.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refsect2.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsect2.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + +<xsl:attribute-set name="refsect3.titlepage.recto.style" + use-attribute-sets="section.titlepage.recto.style"/> +<xsl:attribute-set name="refsect3.titlepage.verso.style" + use-attribute-sets="section.titlepage.verso.style"/> + <xsl:attribute-set name="table.of.contents.titlepage.recto.style"/> <xsl:attribute-set name="table.of.contents.titlepage.verso.style"/> @@ -124,6 +161,9 @@ <xsl:attribute-set name="list.of.examples.titlepage.recto.style"/> <xsl:attribute-set name="list.of.examples.contents.titlepage.verso.style"/> +<xsl:attribute-set name="list.of.procedures.titlepage.recto.style"/> +<xsl:attribute-set name="list.of.procedures.contents.titlepage.verso.style"/> + <xsl:attribute-set name="list.of.unknowns.titlepage.recto.style"/> <xsl:attribute-set name="list.of.unknowns.contents.titlepage.verso.style"/> @@ -176,7 +216,14 @@ <fo:block> <xsl:call-template name="anchor"/> <xsl:call-template name="person.name"/> - <xsl:apply-templates select="affiliation" mode="titlepage.mode"/> + <xsl:if test="affiliation/orgname"> + <xsl:text>, </xsl:text> + <xsl:apply-templates select="affiliation/orgname" mode="titlepage.mode"/> + </xsl:if> + <xsl:if test="email|affiliation/address/email"> + <xsl:text> </xsl:text> + <xsl:apply-templates select="(email|affiliation/address/email)[1]"/> + </xsl:if> </fo:block> </xsl:template> @@ -262,12 +309,7 @@ <xsl:apply-templates select="holder" mode="titlepage.mode"/> </xsl:template> - <xsl:template match="year" mode="titlepage.mode"> - <xsl:apply-templates/><xsl:text>, </xsl:text> -</xsl:template> - -<xsl:template match="year[position()=last()]" mode="titlepage.mode"> <xsl:apply-templates/> </xsl:template> @@ -384,9 +426,7 @@ </xsl:template> <xsl:template match="orgname" mode="titlepage.mode"> - <fo:block> - <xsl:apply-templates mode="titlepage.mode"/> - </fo:block> + <xsl:apply-templates mode="titlepage.mode"/> </xsl:template> <xsl:template match="othercredit" mode="titlepage.mode"> @@ -481,7 +521,7 @@ <xsl:variable name="revnumber" select=".//revnumber"/> <xsl:variable name="revdate" select=".//date"/> <xsl:variable name="revauthor" select=".//authorinitials"/> - <xsl:variable name="revremark" select=".//revremark"/> + <xsl:variable name="revremark" select=".//revremark|.//revdescription"/> <fo:table-row> <fo:table-cell> <fo:block> @@ -529,6 +569,10 @@ </xsl:template> <xsl:template match="revision/revremark" mode="titlepage.mode"> + <xsl:apply-templates mode="titlepage.mode"/> +</xsl:template> + +<xsl:template match="revision/revdescription" mode="titlepage.mode"> <xsl:apply-templates mode="titlepage.mode"/> </xsl:template> Index: phpdoc/xsl/docbook/fo/toc.xsl diff -u phpdoc/xsl/docbook/fo/toc.xsl:1.1 phpdoc/xsl/docbook/fo/toc.xsl:1.2 --- phpdoc/xsl/docbook/fo/toc.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/toc.xsl Sun Mar 9 09:54:49 2003 @@ -4,7 +4,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: toc.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: toc.xsl,v 1.2 2003/03/09 14:54:49 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -32,8 +32,13 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> @@ -59,8 +64,13 @@ <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> + <xsl:attribute name="format"> + <xsl:call-template name="page.number.format"> + <xsl:with-param name="element" select="'toc'"/> + </xsl:call-template> + </xsl:attribute> <xsl:if test="$double.sided != 0"> - <xsl:attribute name="force-page-count">end-on-even</xsl:attribute> + <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute> </xsl:if> <xsl:apply-templates select="." mode="running.head.mode"> Index: phpdoc/xsl/docbook/fo/verbatim.xsl diff -u phpdoc/xsl/docbook/fo/verbatim.xsl:1.1 phpdoc/xsl/docbook/fo/verbatim.xsl:1.2 --- phpdoc/xsl/docbook/fo/verbatim.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/verbatim.xsl Sun Mar 9 09:54:49 2003 @@ -8,7 +8,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: verbatim.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: verbatim.xsl,v 1.2 2003/03/09 14:54:49 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -42,28 +42,31 @@ </xsl:choose> </xsl:variable> - <fo:block wrap-option='no-wrap' - white-space-collapse='false' - linefeed-treatment="preserve" - xsl:use-attribute-sets="monospace.verbatim.properties"> - <xsl:choose> - <xsl:when test="$shade.verbatim != 0"> - <fo:block space-before="0pt" space-after="0pt" - xsl:use-attribute-sets="shade.verbatim.style"> - <xsl:copy-of select="$content"/> - </fo:block> - </xsl:when> - <xsl:otherwise> + <xsl:choose> + <xsl:when test="$shade.verbatim != 0"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style"> + <xsl:copy-of select="$content"/> - </xsl:otherwise> - </xsl:choose> - </fo:block> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="literallayout"> <xsl:param name="suppress-numbers" select="'0'"/> - <xsl:variable name="raw.content"> + <xsl:variable name="content"> <xsl:choose> <xsl:when test="$suppress-numbers = '0' and @linenumbering = 'numbered' @@ -81,36 +84,48 @@ </xsl:choose> </xsl:variable> - <xsl:variable name="content"> - <xsl:choose> - <xsl:when test="@class='monospaced' and $shade.verbatim != 0"> - <fo:block space-before="0pt" space-after="0pt" - xsl:use-attribute-sets="shade.verbatim.style"> - <xsl:copy-of select="$raw.content"/> - </fo:block> - </xsl:when> - <xsl:otherwise> - <xsl:copy-of select="$raw.content"/> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - <xsl:choose> <xsl:when test="@class='monospaced'"> - <fo:block wrap-option='no-wrap' - linefeed-treatment="preserve" - white-space-collapse='false' - xsl:use-attribute-sets="monospace.verbatim.properties"> - <xsl:copy-of select="$content"/> - </fo:block> + <xsl:choose> + <xsl:when test="$shade.verbatim != 0"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style"> + + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="monospace.verbatim.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> </xsl:when> <xsl:otherwise> - <fo:block wrap-option='no-wrap' - linefeed-treatment="preserve" - white-space-collapse='false' - xsl:use-attribute-sets="verbatim.properties"> - <xsl:copy-of select="$content"/> - </fo:block> + <xsl:choose> + <xsl:when test="$shade.verbatim != 0"> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="verbatim.properties shade.verbatim.style"> + + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:when> + <xsl:otherwise> + <fo:block wrap-option='no-wrap' + white-space-collapse='false' + linefeed-treatment="preserve" + xsl:use-attribute-sets="verbatim.properties"> + <xsl:copy-of select="$content"/> + </fo:block> + </xsl:otherwise> + </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> Index: phpdoc/xsl/docbook/fo/xep.xsl diff -u phpdoc/xsl/docbook/fo/xep.xsl:1.1 phpdoc/xsl/docbook/fo/xep.xsl:1.2 --- phpdoc/xsl/docbook/fo/xep.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/xep.xsl Sun Mar 9 09:54:49 2003 @@ -5,7 +5,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: xep.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: xep.xsl,v 1.2 2003/03/09 14:54:49 tom Exp $ ******************************************************************** (c) Stephane Bline Peregrine Systems 2001 Implementation of xep extensions: Index: phpdoc/xsl/docbook/fo/xref.xsl diff -u phpdoc/xsl/docbook/fo/xref.xsl:1.1 phpdoc/xsl/docbook/fo/xref.xsl:1.2 --- phpdoc/xsl/docbook/fo/xref.xsl:1.1 Tue Aug 13 11:45:40 2002 +++ phpdoc/xsl/docbook/fo/xref.xsl Sun Mar 9 09:54:49 2003 @@ -1,10 +1,12 @@ <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:exsl="http://exslt.org/common" + exclude-result-prefixes="exsl" version='1.0'> <!-- ******************************************************************** - $Id: xref.xsl,v 1.1 2002/08/13 15:45:40 goba Exp $ + $Id: xref.xsl,v 1.2 2003/03/09 14:54:49 tom Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -13,6 +15,11 @@ ******************************************************************** --> +<!-- Create keys for quickly looking up olink targets --> +<xsl:key name="targetdoc-key" match="document" use="@targetdoc" /> +<xsl:key name="targetptr-key" match="div|obj" + use="concat(ancestor::document/@targetdoc, '/', @targetptr)" /> + <!-- ==================================================================== --> <xsl:template match="anchor"> @@ -39,6 +46,27 @@ <xsl:text>???</xsl:text> </xsl:when> + <xsl:when test="@endterm"> + <fo:basic-link internal-destination="{@linkend}" + xsl:use-attribute-sets="xref.properties"> + <xsl:variable name="etargets" select="key('id',@endterm)"/> + <xsl:variable name="etarget" select="$etargets[1]"/> + <xsl:choose> + <xsl:when test="count($etarget) = 0"> + <xsl:message> + <xsl:value-of select="count($etargets)"/> + <xsl:text>Endterm points to nonexistent ID: </xsl:text> + <xsl:value-of select="@endterm"/> + </xsl:message> + <xsl:text>???</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$etarget" mode="endterm"/> + </xsl:otherwise> + </xsl:choose> + </fo:basic-link> + </xsl:when> + <xsl:when test="$target/@xreflabel"> <fo:basic-link internal-destination="{@linkend}" xsl:use-attribute-sets="xref.properties"> @@ -51,62 +79,96 @@ <xsl:otherwise> <fo:basic-link internal-destination="{@linkend}" xsl:use-attribute-sets="xref.properties"> - <xsl:choose> - <xsl:when test="@endterm"> - <xsl:variable name="etargets" select="key('id',@endterm)"/> - <xsl:variable name="etarget" select="$etargets[1]"/> - <xsl:choose> - <xsl:when test="count($etarget) = 0"> - <xsl:message> - <xsl:value-of select="count($etargets)"/> - <xsl:text>Endterm points to nonexistent ID: </xsl:text> - <xsl:value-of select="@endterm"/> - </xsl:message> - <xsl:text>???</xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates select="$etarget" mode="endterm"/> - </xsl:otherwise> - </xsl:choose> - </xsl:when> - - <xsl:otherwise> - <xsl:apply-templates select="$target" mode="xref-to"/> - </xsl:otherwise> - </xsl:choose> + <xsl:apply-templates select="$target" mode="xref-to"> + <xsl:with-param name="referrer" select="."/> + <xsl:with-param name="xrefstyle"> + <xsl:choose> + <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0"> + <xsl:value-of select="@role"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@xrefstyle"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:apply-templates> </fo:basic-link> </xsl:otherwise> </xsl:choose> + + <xsl:if test="$insert.xref.page.number != 0 or local-name($target) = 'para'"> + <xsl:apply-templates select="$target" mode="page.citation"> + <xsl:with-param name="id" select="@linkend"/> + </xsl:apply-templates> + </xsl:if> </xsl:template> +<!-- ==================================================================== --> + <xsl:template match="*" mode="endterm"> <!-- Process the children of the endterm element --> - <xsl:apply-templates select="child::node()"/> + <xsl:variable name="endterm"> + <xsl:apply-templates select="child::node()"/> + </xsl:variable> + + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"> + <xsl:apply-templates select="exsl:node-set($endterm)" mode="remove-ids"/> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$endterm"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="*" mode="remove-ids"> + <xsl:copy> + <xsl:for-each select="@*"> + <xsl:choose> + <xsl:when test="name(.) != 'id'"> + <xsl:copy/> + </xsl:when> + <xsl:otherwise> + <xsl:message>removing <xsl:value-of select="name(.)"/></xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> + <xsl:apply-templates mode="remove-ids"/> + </xsl:copy> </xsl:template> <!--- ==================================================================== --> <xsl:template match="*" mode="xref-to"> - <xsl:param name="target" select="."/> - <xsl:param name="refelem" select="local-name($target)"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> <xsl:message> <xsl:text>Don't know what gentext to create for xref to: "</xsl:text> - <xsl:value-of select="$refelem"/> + <xsl:value-of select="name(.)"/> <xsl:text>"</xsl:text> </xsl:message> <xsl:text>???</xsl:text> </xsl:template> <xsl:template match="title" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <!-- if you xref to a title, xref to the parent... --> <xsl:choose> <!-- FIXME: how reliable is this? --> <xsl:when test="contains(local-name(parent::*), 'info')"> - <xsl:apply-templates select="parent::*[2]" mode="xref-to"/> + <xsl:apply-templates select="parent::*[2]" mode="xref-to"> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + </xsl:apply-templates> </xsl:when> <xsl:otherwise> - <xsl:apply-templates select="parent::*" mode="xref-to"/> + <xsl:apply-templates select="parent::*" mode="xref-to"> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + </xsl:apply-templates> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -119,67 +181,93 @@ |productionset|qandadiv|refsynopsisdiv|segmentedlist |set|setindex|sidebar|tip|toc|variablelist|warning" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <!-- catch-all for things with (possibly optional) titles --> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="author|editor|othercredit|personname" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:call-template name="person.name"/> </xsl:template> <xsl:template match="authorgroup" mode="xref-to"> - <xsl:call-template name="person.name.list"/> -</xsl:template> - -<xsl:template match="figure" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> -<xsl:template match="example" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> - -<xsl:template match="table" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:call-template name="person.name.list"/> </xsl:template> -<xsl:template match="equation" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> +<xsl:template match="figure|example|table|equation" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="procedure" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="cmdsynopsis" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:apply-templates select="(.//command)[1]" mode="xref"/> </xsl:template> <xsl:template match="funcsynopsis" mode="xref-to"> - <xsl:apply-templates select="(.//function)[1]" mode="xref"/> -</xsl:template> - -<xsl:template match="dedication" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> -<xsl:template match="preface" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> - -<xsl:template match="chapter" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:apply-templates select="(.//function)[1]" mode="xref"/> </xsl:template> -<xsl:template match="appendix" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> +<xsl:template match="dedication|preface|chapter|appendix" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="bibliography" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="biblioentry|bibliomixed" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <!-- handles both biblioentry and bibliomixed --> <xsl:text>[</xsl:text> <xsl:choose> @@ -190,6 +278,10 @@ <xsl:choose> <xsl:when test="$entry"> <xsl:choose> + <xsl:when test="$bibliography.numbered != 0"> + <xsl:number from="bibliography" count="biblioentry|bibliomixed" + level="any" format="1"/> + </xsl:when> <xsl:when test="local-name($entry/*[1]) = 'abbrev'"> <xsl:apply-templates select="$entry/*[1]"/> </xsl:when> @@ -211,6 +303,10 @@ </xsl:when> <xsl:otherwise> <xsl:choose> + <xsl:when test="$bibliography.numbered != 0"> + <xsl:number from="bibliography" count="biblioentry|bibliomixed" + level="any" format="1"/> + </xsl:when> <xsl:when test="local-name(*[1]) = 'abbrev'"> <xsl:apply-templates select="*[1]"/> </xsl:when> @@ -224,58 +320,145 @@ </xsl:template> <xsl:template match="glossary" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="glossentry" mode="xref-to"> + <xsl:choose> + <xsl:when test="$glossentry.show.acronym = 'primary'"> + <xsl:choose> + <xsl:when test="acronym|abbrev"> + <xsl:apply-templates select="(acronym|abbrev)[1]"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossterm[1]" mode="xref-to"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="glossterm[1]" mode="xref-to"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="glossterm" mode="xref-to"> + <xsl:apply-templates/> </xsl:template> <xsl:template match="index" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="listitem" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="section|simplesect |sect1|sect2|sect3|sect4|sect5 |refsect1|refsect2|refsect3" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> <!-- What about "in Chapter X"? --> </xsl:template> <xsl:template match="bridgehead" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> <!-- What about "in Chapter X"? --> </xsl:template> <xsl:template match="qandaset" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> - -<xsl:template match="qandadiv" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> -<xsl:template match="qandaentry" mode="xref-to"> - <xsl:apply-templates select="question[1]" mode="object.xref.markup"/> + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> -<xsl:template match="question" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> +<xsl:template match="qandadiv" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> -<xsl:template match="answer" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> -<xsl:template match="part" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> -</xsl:template> +<xsl:template match="qandaentry" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> -<xsl:template match="reference" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:apply-templates select="question[1]" mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="question|answer" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="part|reference" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="refentry" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:choose> <xsl:when test="refmeta/refentrytitle"> <xsl:apply-templates select="refmeta/refentrytitle"/> @@ -288,14 +471,29 @@ </xsl:template> <xsl:template match="refnamediv" mode="xref-to"> - <xsl:apply-templates select="refname[1]" mode="xref-to"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="refname[1]" mode="xref-to"> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="refname" mode="xref-to"> - <xsl:apply-templates mode="xref-to"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates mode="xref-to"> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="step" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'Step'"/> </xsl:call-template> @@ -304,7 +502,13 @@ </xsl:template> <xsl:template match="varlistentry" mode="xref-to"> - <xsl:apply-templates select="term[1]" mode="xref-to"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="term[1]" mode="xref-to"> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> </xsl:template> <xsl:template match="varlistentry/term" mode="xref-to"> @@ -313,11 +517,59 @@ </xsl:template> <xsl:template match="co" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:apply-templates select="." mode="callout-bug"/> </xsl:template> <xsl:template match="book" mode="xref-to"> - <xsl:apply-templates select="." mode="object.xref.markup"/> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> +</xsl:template> + +<xsl:template match="para" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + + <xsl:variable name="context" select="(ancestor::simplesect + |ancestor::section + |ancestor::sect1 + |ancestor::sect2 + |ancestor::sect3 + |ancestor::sect4 + |ancestor::sect5 + |ancestor::refsection + |ancestor::refsect1 + |ancestor::refsect2 + |ancestor::refsect3 + |ancestor::chapter + |ancestor::appendix + |ancestor::preface + |ancestor::partintro + |ancestor::dedication + |ancestor::colophon + |ancestor::bibliography + |ancestor::index + |ancestor::glossary + |ancestor::glossentry + |ancestor::listitem + |ancestor::varlistentry)[last()]"/> + + <xsl:apply-templates select="$context" mode="xref-to"/> +<!-- + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + </xsl:apply-templates> +--> </xsl:template> <!-- ==================================================================== --> @@ -373,8 +625,13 @@ </xsl:template> <xsl:template match="ulink" name="ulink"> - <fo:basic-link external-destination="{@url}" - xsl:use-attribute-sets="xref.properties"> + <fo:basic-link xsl:use-attribute-sets="xref.properties"> + <xsl:attribute name="external-destination"> + <xsl:call-template name="fo-external-image"> + <xsl:with-param name="filename" select="@url"/> + </xsl:call-template> + </xsl:attribute> + <xsl:choose> <xsl:when test="count(child::node())=0"> <xsl:call-template name="hyphenate-url"> @@ -386,19 +643,51 @@ </xsl:otherwise> </xsl:choose> </fo:basic-link> + <xsl:if test="count(child::node()) != 0 and string(.) != @url and $ulink.show != 0"> - <fo:inline hyphenate="false"> - <xsl:text> [</xsl:text> - <xsl:call-template name="hyphenate-url"> - <xsl:with-param name="url" select="@url"/> - </xsl:call-template> - <xsl:text>]</xsl:text> - </fo:inline> + <!-- yes, show the URI --> + <xsl:choose> + <xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote)"> + <fo:footnote> + <xsl:call-template name="ulink.footnote.number"/> + <fo:footnote-body font-family="{$body.font.family}" + font-size="{$footnote.font.size}"> + <fo:block> + <xsl:call-template name="ulink.footnote.number"/> + <xsl:text> </xsl:text> + <fo:inline> + <xsl:value-of select="@url"/> + </fo:inline> + </fo:block> + </fo:footnote-body> + </fo:footnote> + </xsl:when> + <xsl:otherwise> + <fo:inline hyphenate="false"> + <xsl:text> [</xsl:text> + <xsl:call-template name="hyphenate-url"> + <xsl:with-param name="url" select="@url"/> + </xsl:call-template> + <xsl:text>]</xsl:text> + </fo:inline> + </xsl:otherwise> + </xsl:choose> </xsl:if> </xsl:template> +<xsl:template name="ulink.footnote.number"> + <fo:inline font-size="90%"> + <!-- FIXME: this isn't going to be perfect! --> + <xsl:text>[</xsl:text> + <xsl:number level="any" + from="chapter|appendix|preface|article|refentry" + format="{$ulink.footnote.number.format}"/> + <xsl:text>]</xsl:text> + </fo:inline> +</xsl:template> + <xsl:template name="hyphenate-url"> <xsl:param name="url" select="''"/> <xsl:choose> @@ -419,8 +708,152 @@ </xsl:choose> </xsl:template> -<xsl:template match="olink" name="olink"> - <xsl:apply-templates/> + +<xsl:template match="olink"> + <xsl:param name="target.database" + select="document($target.database.document, /)"/> + + <xsl:variable name="localinfo" select="@localinfo"/> + + <!-- Olink that points to internal id can be a link --> + <xsl:variable name="linkend"> + <xsl:choose> + <xsl:when test="@targetdoc and not(@targetptr)" > + <xsl:message>Olink missing @targetptr attribute value</xsl:message> + </xsl:when> + <xsl:when test="not(@targetdoc) and @targetptr" > + <xsl:message>Olink missing @targetdoc attribute value</xsl:message> + </xsl:when> + <xsl:when test="@targetdoc and @targetptr"> + <xsl:if test="$current.docid = @targetdoc"> + <xsl:if test="id(@targetptr)"> + <xsl:value-of select="@targetptr"/> + </xsl:if> + </xsl:if> + </xsl:when> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$linkend != ''"> + <fo:basic-link internal-destination="{$linkend}" + xsl:use-attribute-sets="xref.properties"> + <xsl:call-template name="olink.hottext"> + <xsl:with-param name="target.database" select="$target.database"/> + </xsl:call-template> + </fo:basic-link> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="olink.hottext"> + <xsl:with-param name="target.database" select="$target.database"/> + </xsl:call-template> + + <!-- Append other document title if appropriate --> + <xsl:if test="@targetdoc and @targetptr and $olink.doctitle != 0 + and $current.docid != '' and $current.docid != @targetdoc"> + <xsl:variable name="doctitle"> + <xsl:variable name="seek.targetdoc" select="@targetdoc"/> + <xsl:for-each select="$target.database" > + <xsl:value-of select="key('targetdoc-key', $seek.targetdoc)/div[1]/ttl" /> + </xsl:for-each> + </xsl:variable> + <xsl:if test="$doctitle != ''"> + <xsl:text> (</xsl:text><xsl:value-of select="$doctitle"/><xsl:text>)</xsl:text> + </xsl:if> + </xsl:if> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + + +<xsl:template name="olink.hottext"> + <xsl:param name="target.database"/> + + <xsl:choose> + <!-- If it has elements or text (not just PI or comment) --> + <xsl:when test="child::text() or child::*"> + <xsl:apply-templates/> + </xsl:when> + <xsl:when test="@targetdoc and @targetptr"> + <!-- Get the xref text for this record --> + <xsl:variable name="seek.targetdoc" select="@targetdoc"/> + <xsl:variable name="seek.targetptr" select="@targetptr"/> + <xsl:variable name="xref.text" > + <xsl:for-each select="$target.database" > + <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/xreftext"/> + </xsl:for-each> + </xsl:variable> + + <xsl:choose> + <xsl:when test="$use.local.olink.style != 0"> + <!-- Get the element name and lang for this targetptr --> + <xsl:variable name="element" > + <xsl:for-each select="$target.database" > + <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@element"/> + </xsl:for-each> + </xsl:variable> + + <xsl:variable name="lang"> + <xsl:variable name="candidate"> + <xsl:for-each select="$target.database" > + <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@lang"/> + </xsl:for-each> + </xsl:variable> + <xsl:choose> + <xsl:when test="$candidate != ''"> + <xsl:value-of select="$candidate"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="'en'"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="template"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'title'"/> + <xsl:with-param name="name" select="$element"/> + <xsl:with-param name="lang" select="$lang"/> + </xsl:call-template> + </xsl:variable> + <xsl:call-template name="substitute-markup"> + <xsl:with-param name="template" select="$template"/> + <xsl:with-param name="title"> + <xsl:for-each select="$target.database" > + <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/ttl"/> + </xsl:for-each> + </xsl:with-param> + <xsl:with-param name="label"> + <xsl:for-each select="$target.database" > + <xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@number"/> + </xsl:for-each> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="$xref.text !=''"> + <xsl:value-of select="$xref.text"/> + </xsl:when> + <xsl:otherwise> + <xsl:message>Olink error: no generated text for targetdoc/targetptr = <xsl:value-of select="@targetdoc"/>/<xsl:value-of select="@targetptr"/></xsl:message> + <xsl:text>????</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:text>????</xsl:text> +<!-- + <xsl:call-template name="olink.outline"> + <xsl:with-param name="outline.base.uri" + select="unparsed-entity-uri(@targetdocent)"/> + <xsl:with-param name="localinfo" select="@localinfo"/> + <xsl:with-param name="return" select="'xreftext'"/> + </xsl:call-template> +--> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="olink.outline"> + <xsl:message terminate="yes">Fatal error: what is this supposed to do?</xsl:message> </xsl:template> <!-- ==================================================================== --> @@ -480,24 +913,90 @@ <xsl:call-template name="inline.monoseq"/> </xsl:template> -<xsl:template name="insert.page.citation"> +<xsl:template match="*" mode="page.citation"> <xsl:param name="id" select="'???'"/> - <xsl:if test="$insert.xref.page.number"> - <xsl:text> </xsl:text> - <fo:inline keep-together.within-line="always"> - <xsl:text>[</xsl:text> - <xsl:call-template name="gentext"> - <xsl:with-param name="key" select="'page.citation'"/> - </xsl:call-template> - <xsl:text> </xsl:text> - <fo:page-number-citation ref-id="{$id}"/> - <xsl:text>]</xsl:text> - </fo:inline> - </xsl:if> + + <fo:inline keep-together.within-line="always"> + <xsl:call-template name="substitute-markup"> + <xsl:with-param name="template"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="name" select="'page.citation'"/> + <xsl:with-param name="context" select="'xref'"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </fo:inline> </xsl:template> <xsl:template match="*" mode="pagenumber.markup"> <fo:page-number-citation ref-id="{@id}"/> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="*" mode="insert.title.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="title"/> + + <xsl:choose> + <!-- FIXME: what about the case where titleabbrev is inside the info? --> + <xsl:when test="$purpose = 'xref' and titleabbrev"> + <xsl:apply-templates select="." mode="titleabbrev.markup"/> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$title"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="chapter|appendix" mode="insert.title.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="title"/> + + <xsl:choose> + <xsl:when test="$purpose = 'xref'"> + <fo:inline font-style="italic"> + <xsl:copy-of select="$title"/> + </fo:inline> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$title"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template match="*" mode="insert.subtitle.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="subtitle"/> + + <xsl:copy-of select="$subtitle"/> +</xsl:template> + +<xsl:template match="*" mode="insert.label.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="label"/> + + <xsl:copy-of select="$label"/> +</xsl:template> + +<xsl:template match="*" mode="insert.pagenumber.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="pagenumber"/> + + <xsl:copy-of select="$pagenumber"/> +</xsl:template> + +<xsl:template match="*" mode="insert.direction.markup"> + <xsl:param name="purpose"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="direction"/> + + <xsl:copy-of select="$direction"/> </xsl:template> </xsl:stylesheet>