diff options
| author | paultremblay <paultremblay@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2011-09-26 19:27:15 +0000 |
|---|---|---|
| committer | paultremblay <paultremblay@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2011-09-26 19:27:15 +0000 |
| commit | 8c616ca52509e49abfbb2b4013587fe62db2fd17 (patch) | |
| tree | 748eedfe3384265e78f5b00a49838702f8f2e17b /sandbox/paultremblay/python_interface/docs/xsl | |
| parent | 3929d5c5aa6463da2451c38fde34356318311dd6 (diff) | |
| download | docutils-8c616ca52509e49abfbb2b4013587fe62db2fd17.tar.gz | |
Creating a branch. The new branch will reflect the way to use the xsl
stylesheets with the pyton interface. I am now going to put a simpler
version of the XSL stylesheets in the trunk.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7131 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'sandbox/paultremblay/python_interface/docs/xsl')
27 files changed, 4638 insertions, 0 deletions
diff --git a/sandbox/paultremblay/python_interface/docs/xsl/admonitions.xsl b/sandbox/paultremblay/python_interface/docs/xsl/admonitions.xsl new file mode 100644 index 000000000..9977895cb --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/admonitions.xsl @@ -0,0 +1,169 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='default-admonition-outer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">block</xsl:with-param> + <xsl:with-param name="docutils">None</xsl:with-param> + </xsl:call-template> + <block> + Sets up the defaults for the outer blocks of all the admonitions. The + attributes of this block control the borders and prohibit the admonition + from breaking across a page. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='default-admonition-title-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">block</xsl:with-param> + <xsl:with-param name="docutils">None</xsl:with-param> + </xsl:call-template> + <block> + Sets up the defaults for the title blocks of all the admonitions. The + attributes of this block control the color (red) and font size. For certain + blocs, the color is set to black (see below). + </block> + </xsl:template> + + + + <xsl:template match= "xsl:attribute-set[@name='attention-block']" priority="3"> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">5</xsl:with-param> + <xsl:with-param name="text">admonitions outer block</xsl:with-param> + </xsl:call-template> + <block> + <xsl:text>:fo: fo:block</xsl:text> + </block> + <block first-line-indent="-9"> + <xsl:text>:docutils: attention | caution | danger | error | hint | important | note | tip | warning | admonitons[@classes='custorm']</xsl:text> + </block> + + + <block first-line-indent="-9"> + <xsl:text>:inherits: default-admonition-outer-block</xsl:text> + </block> + <block> + The following attribute sets are identical in nature: + </block> + <block>* attention-block</block> + <block>* caution-block</block> + <block>* danger-block</block> + <block>* error-block</block> + <block>* hint-block</block> + <block>* important-block</block> + <block>* note-block</block> + <block>* tip-block</block> + <block>* warning-block</block> + <block>* admonition-custom-block</block> + <block> + These attribute-sets format the outer block of all the admonitions. By default it puts + an border around the text. Use this attribute set to set the space before or after, the background + color, etc. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='caution-block']| + xsl:attribute-set[@name='danger-block']| + xsl:attribute-set[@name='error-block']| + xsl:attribute-set[@name='hint-block']| + xsl:attribute-set[@name='important-block']| + xsl:attribute-set[@name='note-block']| + xsl:attribute-set[@name='tip-block']| + xsl:attribute-set[@name='warning-block']| + xsl:attribute-set[@name='admonition-custom-block'] + " + priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='attention-title-block']" priority="3"> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">5</xsl:with-param> + <xsl:with-param name="text">admonitions title block</xsl:with-param> + </xsl:call-template> + <block> + <xsl:text>:fo: fo:block</xsl:text> + </block> + <block first-line-indent="-9"> + <xsl:text>:docutils: attention | caution | danger | error | hint | important | note | tip | warning | admonitons[@classes='custorm']</xsl:text> + </block> + + + <block first-line-indent="-9"> + <xsl:text>:inherits: default-admonition-title-block</xsl:text> + </block> + <block> + The following attribute sets are identical in nature: + </block> + <block>* attention-title-block</block> + <block>* caution-title-block</block> + <block>* danger-title-block</block> + <block>* error-title-block</block> + <block>* hint-title-block</block> + <block>* important-title-block</block> + <block>* note-title-block</block> + <block>* tip-title-block</block> + <block>* warning-title-block</block> + <block>* admonition-custom-title-block</block> + <block> + These attribute-sets format the title block of all the admonitions. It sets the + color to red. + </block> + <block> + The attribute-sets ``error-title-block``, ``hint-title-block``, ``important-title-block``, + ``note-title-block``, ``tip-title-block``, and ``admonition-custom-title-block`` resets + the color back to black. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='caution-title-block']| + xsl:attribute-set[@name='danger-title-block']| + xsl:attribute-set[@name='error-title-block']| + xsl:attribute-set[@name='hint-title-block']| + xsl:attribute-set[@name='important-title-block']| + xsl:attribute-set[@name='note-title-block']| + xsl:attribute-set[@name='tip-title-block']| + xsl:attribute-set[@name='warning-title-block']| + xsl:attribute-set[@name='admonition-custorm-title-block'] + " + priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='admonition-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">attention/paragraph|caution/paragraph|etc.</xsl:with-param> + </xsl:call-template> + <block> + Formats the paragraphs in the admonitions. A different attribute-set formats the first + paragraph (see below). + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='admonition-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">attention/paragraph|caution/paragraph|etc.</xsl:with-param> + </xsl:call-template> + <block> + Formats the paragraphs in the admonitions. A different attribute-set formats the first + paragraph (see below). + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='admonition-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">attention/paragraph[1]|caution/paragraph[1]|etc.</xsl:with-param> + </xsl:call-template> + <block> + Formats the first paragraphs in the admonitions. It inherits its attributes from the + ``admonition-paragraph-block`` and resets the ``space-before`` property to ``0pt``. It does not + make sense to modify the attributes in this set directly. + </block> + </xsl:template> + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/bibliographic_fields.xsl b/sandbox/paultremblay/python_interface/docs/xsl/bibliographic_fields.xsl new file mode 100644 index 000000000..98bac2dcf --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/bibliographic_fields.xsl @@ -0,0 +1,266 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='bibliographic-fields-list-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">list-block</xsl:with-param> + <xsl:with-param name="docutils">docinfo</xsl:with-param> + </xsl:call-template> + <block> + Formats the bibliographic fields as a list. Since this element contains all the other list + elements, it can be used to set values such as the font, background color, + line-height, etc, for the entire list, as well as the space after and + before. + </block> + <block> + "The provisional-distance-between-starts property of the list-block + specifies the distance bewteen the start of the label (the bullet, for + example) and the actual start of the list content" (Pawson, 100). In + this case, that means the distance between the label (such as "Version", + and the labels' value (such as "1.2"). + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='bibliographic-fields-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">docinfo/author|docinfo/authors|docinfo/organization|etc.</xsl:with-param> + </xsl:call-template> + <block> + For each item (author, authors, organization, contact, address, version, date, copyright, + custom field) in the bibliograhic fields. Use the 'space-after' attribute to control + the spacing between each item. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='bibliographic-fields-first-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">docinfo/author|docinfo/authors|docinfo/organization|etc.</xsl:with-param> + <xsl:with-param name="inherits">bibliographic-fields-list-item</xsl:with-param> + </xsl:call-template> + <block> + Same as above, but sets the space before to 0pt. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='bibliographic-fields-list-item-label']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item-label</xsl:with-param> + <xsl:with-param name="docutils">docinfo/author|docinfo/authors|docinfo/organization|etc.</xsl:with-param> + </xsl:call-template> + <block> + The default attribute end-indent = "label-end()" ensures that the label aligns properly. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='bibliographic-fields-item-label-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/author|docinfo/authors|docinfo/organization|etc.</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the the name of the field (such as Author, Version, etc). + </block> + </xsl:template> + + + + <xsl:template match= "xsl:attribute-set[@name='bibliographic-fields-item-body']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item-body</xsl:with-param> + <xsl:with-param name="docutils">docinfo/author|docinfo/authors|docinfo/organization|etc.</xsl:with-param> + </xsl:call-template> + <block> + The default of start-indent = "body-start()" ensures the correct + alignment of the labels. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='bibliographic-fields-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/author|docinfo/authors|docinfo/organization|etc.</xsl:with-param> + </xsl:call-template> + <block> + Formats the blocks (docutilis paragraphs) of the value of the field. Use the + 'space-after' attribute to control the spacing between a multi-paragraph + description. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='bibliographic-first-fields-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/author|docinfo/authors|docinfo/organization|etc.</xsl:with-param> + <xsl:with-param name="inherits">bibliographic-fields-block</xsl:with-param> + </xsl:call-template> + <block> + Same as above, but for the first such paragraph. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='address-value-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/address</xsl:with-param> + <xsl:with-param name="inherits">bibliographic-fields-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the blocks (docutilis paragraphs) of the address field, which has to preserve + the white space, according to the docutils specs. Since this inherits from the + bibliographic-fields-bloc, it doesn't make sense to change attributes here directly. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='author-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/author</xsl:with-param> + </xsl:call-template> + <block> + Formats the author element, when bibliograhic info is not formatted as a list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='authors-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/authors</xsl:with-param> + </xsl:call-template> + <block> + Formats the authors element, when bibliograhic info is not formatted as a list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='date-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/date</xsl:with-param> + </xsl:call-template> + <block> + Formats the date element, when bibliograhic info is not formatted as a list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='organization-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/organization</xsl:with-param> + </xsl:call-template> + <block> + Formats the organization element, when bibliograhic info is not formatted as a list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='contact-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/contact</xsl:with-param> + </xsl:call-template> + <block> + Formats the contact element, when bibliograhic info is not formatted as a list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='status-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/status</xsl:with-param> + </xsl:call-template> + <block> + Formats the status element, when bibliograhic info is not formatted as a list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='copyright-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/copyright</xsl:with-param> + </xsl:call-template> + <block> + Formats the copyright element, when bibliograhic info is not formatted as a list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='version-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/version</xsl:with-param> + </xsl:call-template> + <block> + Formats the version element, when bibliograhic info is not formatted as a list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='revision-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/revision</xsl:with-param> + </xsl:call-template> + <block> + Formats the revision element, when bibliograhic info is not formatted as a list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='address-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">docinfo/address</xsl:with-param> + </xsl:call-template> + <block> + Formats the address element, when bibliograhic info is not formatted as a list. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='custom-bib-info1']" priority="3"> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">5</xsl:with-param> + <xsl:with-param name="text">Custom bibliographic fields</xsl:with-param> + </xsl:call-template> + <block> + <xsl:text>:fo: fo:block</xsl:text> + </block> + <block first-line-indent="-9"> + <xsl:text>:docutils: docinfo/field</xsl:text> + </block> + <block> + The following attribute sets are identical in nature: + </block> + <block>* custom-bib-info1</block> + <block>* custom-bib-info2</block> + <block>* custom-bib-info3</block> + <block>* custom-bib-info4</block> + <block>* custom-bib-info5</block> + <block>* custom-bib-info6</block> + <block>* custom-bib-info7</block> + <block>* custom-bib-info8</block> + <block>* custom-bib-info9</block> + <block>* custom-bib-info10</block> + <block> + These attribute-sets format the custom bibliographic fields. ``'custom-bib-info1'`` refers to the first + occurrence of such a field, ``'custom-bib-info2'`` to the second, and so fourth. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='custom-bib-info2']| + xsl:attribute-set[@name='custom-bib-info3']| + xsl:attribute-set[@name='custom-bib-info4']| + xsl:attribute-set[@name='custom-bib-info5']| + xsl:attribute-set[@name='custom-bib-info6']| + xsl:attribute-set[@name='custom-bib-info7']| + xsl:attribute-set[@name='custom-bib-info8']| + xsl:attribute-set[@name='custom-bib-info9']| + xsl:attribute-set[@name='custom-bib-info10'] " priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='Some-custom-field']" priority = "3"/> + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/body_directives.xsl b/sandbox/paultremblay/python_interface/docs/xsl/body_directives.xsl new file mode 100644 index 000000000..e39f0e5f0 --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/body_directives.xsl @@ -0,0 +1,280 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <!--topic--> + <xsl:template match= "xsl:attribute-set[@name='topic-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic</xsl:with-param> + </xsl:call-template> + <block> + Formats the outermost block of the topic element, which contains blocks. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='topic-title-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic/title</xsl:with-param> + </xsl:call-template> + <block> + Formats the title of the topic. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='topic-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the paragraphs of the topic. A different set of attributes + formats the first paragraph. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='topic-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic/paragraph[1]</xsl:with-param> + <xsl:with-param name="inherits">topic-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the first paragraphs of the topic. + </block> + </xsl:template> + + <!--sidebar--> + + <xsl:template match= "xsl:attribute-set[@name='sidebar-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">sidebar</xsl:with-param> + </xsl:call-template> + <block> + Formats the outermost block of the sidebar element, which contains blocks. + Note that fop does not handle floats, so this element is formatted + just like a topic block. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='sidebar-title-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">sidebar/title</xsl:with-param> + </xsl:call-template> + <block> + Formats the title of the topic. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='sidebar-subtitle-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">sidebar/subtitle</xsl:with-param> + </xsl:call-template> + <block> + Formats the subtitle of the topic. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='sidebar-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">sidebar/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the paragraphs of the sidebar. A different set of attributes + formats the first paragraph. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='sidebar-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">sidebar/paragraph[1]</xsl:with-param> + <xsl:with-param name="inherits">sidebar-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the first paragraphs of the sidebar. + </block> + </xsl:template> + + + <!--rubric--> + <xsl:template match= "xsl:attribute-set[@name='rubric-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">rubric</xsl:with-param> + </xsl:call-template> + <block> + Formats the rubric. + </block> + </xsl:template> + + <!--epigraph--> + + <xsl:template match= "xsl:attribute-set[@name='epigraph-outer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">epigraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the outermost block of the epigraph element, which contains blocks. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='epigraph-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">epigraph/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the paragraphs of the epigraph. A different set of attributes + formats the first paragraph. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='epigraph-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">epigraph/paragraph[1]</xsl:with-param> + <xsl:with-param name="inherits">epigraph-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the first paragraphs of the epigraph. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='epigraph-attribution-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">epigraph/attribution</xsl:with-param> + </xsl:call-template> + <block> + Formats the attribution of the epigraph. The parameter + ``text-before-epigraph-attribution`` determines the text to + put before the attribtion. The default is '—' (an em-dash). To + put no text before, set this parameter to an empty string. + </block> + </xsl:template> + + <!--highlights--> + <xsl:template match= "xsl:attribute-set[@name='highlights-outer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">highlights</xsl:with-param> + </xsl:call-template> + <block> + Formats the outermost block of the epigraph element, which contains blocks. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='highlights-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">highlights/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the paragraphs of the highlights. A different set of attributes + formats the first paragraph. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='highlights-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">highlights/paragraph[1]</xsl:with-param> + <xsl:with-param name="inherits">highlights-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the first paragraphs of the highlights. + </block> + </xsl:template> + + <!--pull-quote--> + + <xsl:template match= "xsl:attribute-set[@name='pull-quote-outer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">pull-quote</xsl:with-param> + </xsl:call-template> + <block> + Formats the outermost block of the pull-quote element, which contains blocks. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='pull-quote-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">pull-quote/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the paragraphs of the pull-quote. A different set of attributes + formats the first paragraph. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='pull-quote-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">pull-quote/paragraph[1]</xsl:with-param> + <xsl:with-param name="inherits">pull-quote-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the first paragraphs of the pull-quote. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='pull-quote-attribution-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">pull-quote/attribution</xsl:with-param> + </xsl:call-template> + <block> + Formats the attribution of the pull-quote. The parameter + ``text-before-pull-quote-attribution`` determines the text to + put before the attribtion. The default is '—' (an em-dash). To + put no text before, set this parameter to an empty string. + </block> + </xsl:template> + + <!--container--> + <xsl:template match= "xsl:attribute-set[@name='container-outer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container</xsl:with-param> + </xsl:call-template> + <block> + Formats the outermost block of the container element, which contains blocks. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='container-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the paragraphs of the container. A different set of attributes + formats the first paragraph. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='container-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container/paragraph[1]</xsl:with-param> + <xsl:with-param name="inherits">container-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the first paragraphs of the container. + </block> + </xsl:template> + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/body_elements.xsl b/sandbox/paultremblay/python_interface/docs/xsl/body_elements.xsl new file mode 100644 index 000000000..a636c9608 --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/body_elements.xsl @@ -0,0 +1,132 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">document/paragrah|section/paragraph"</xsl:with-param> + </xsl:call-template> + <block> + Formats the default paragraph. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">document/paragrah|section/paragraph"</xsl:with-param> + <xsl:with-param name="inherits">paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the first default paragraph. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='literal-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">document/literal_block|section/literal_block"</xsl:with-param> + </xsl:call-template> + <block> + Formats the literal text. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='transition-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">document/transition|section/transition"</xsl:with-param> + </xsl:call-template> + <block> + Formats the transition block. The actutal text for this block is set by the 'transition-text' + parameter. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='document-title-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">document/title"</xsl:with-param> + </xsl:call-template> + <block> + Formats the title for the document. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='document-subtitle-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">document/subtitle"</xsl:with-param> + </xsl:call-template> + <block> + Formats the subtitle of the document. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='document-title-page-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">document/title|document/subtitle"</xsl:with-param> + </xsl:call-template> + <block> + The block that wraps both the title and subtitle. This block only gets written + if the title and subtitle occur in the front section, or TOC section. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='block-quote-outer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">block_quote</xsl:with-param> + </xsl:call-template> + <block> + The attribute set that formats the block that wraps the other blocks in a block quote. Use the attribute + set to format space after or space before, etc. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='block-quote-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">block_quote/paragraph</xsl:with-param> + </xsl:call-template> + <block> + The attribute set that formats the paragraphs in the block quote. A different set of attributes + controls the first paragraph (see below). Use this attribute set to set the space + between paragraphs with the 'space-before' attribute. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='block-quote-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">block_quote/paragraph[1]</xsl:with-param> + <xsl:with-param name="inherits">block-quote-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + The attribute set that formats the first paragraph in the block quote. + It inherits all the attributes from 'block-quote-first-paragraph-block' and + then sets the 'space-before' to 0. It does not make sense to modify + attributes in this attribute set directly. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='block-quote-attribution-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">block_quote/paragraph[1]</xsl:with-param> + <xsl:with-param name="inherits">block-quote-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + This attribute set the attribution in a block quote. + </block> + </xsl:template> + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/bullet_list.xsl b/sandbox/paultremblay/python_interface/docs/xsl/bullet_list.xsl new file mode 100644 index 000000000..724ae113e --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/bullet_list.xsl @@ -0,0 +1,138 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + + + <xsl:template match= "xsl:attribute-set[@name='bullet-list-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">list-block</xsl:with-param> + <xsl:with-param name="docutils">bullet_list</xsl:with-param> + </xsl:call-template> + <block> + For the bullet list. Since this element contains all the other list + elements, it can be used to set values such as the font, background color, + line-height, etc, for the entire list, as well as the space after and + before. + </block> + <block> + "The provisional-distance-between-starts property of the list-block + specifies the distance bewteen the start of the label (the bullet, for + example) and the actual start of the list content" (Pawson, 100) + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='bullet-level2-list-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">list-block</xsl:with-param> + <xsl:with-param name="docutils">bullet_list/bullet_list</xsl:with-param> + </xsl:call-template> + <block> + Same as for the bullet-list-block attribute. The default sets the + start-indent property to a greater value to indent this nested + list. + </block> + + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='bullet-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">bullet_list/list_item</xsl:with-param> + </xsl:call-template> + <block> + For the item in the bullet list. The attributes can control the + spacing between each item. A different set of attributes controls the spacing + of the first item (see below). + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='bullet-level2-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">bullet_list/bullet_list/list_item</xsl:with-param> + </xsl:call-template> + <block> + Same as above, except for a nested bullet list. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='bullet-first-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">bullet_list/list_item[1]</xsl:with-param> + <xsl:with-param name="inherits">bullet-list-item</xsl:with-param> + </xsl:call-template> + <block> + For the first item in the bullet list. This attribute set inherits + all the properties form 'bullet-list-item', and then re-defines the + space-before to 0pt. In order to get space between the first item and the + text before it, use the space-after attribute in the bullet-list attribute + set. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='bullet-level2-first-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">bullet_list/list_item[1]</xsl:with-param> + <xsl:with-param name="inherits">bullet-level2-list-item</xsl:with-param> + </xsl:call-template> + <block> + For the first item in a nested bullet list. This attribute set inherits + all the properties form 'bullet-list-item', and then re-defines the + space-before to 0pt. In order to get space between the first item and the + text before it, use the space-after attribute in the bullet-list attribute + set. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='bullet-list-item-label']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item-label</xsl:with-param> + <xsl:with-param name="docutils">bullet_list/list_item</xsl:with-param> + </xsl:call-template> + <block> + The default attribute end-indent = "label-end()" ensures + that the label aligns properly. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='bullet-list-item-label-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">bullet_list/list_item</xsl:with-param> + </xsl:call-template> + <block> + These attributes format the block that wraps the bullet. (FO requires such + a block, even for a small label like this.) + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='bullet-list-item-body']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item-body</xsl:with-param> + <xsl:with-param name="docutils">bullet_list/list_item</xsl:with-param> + </xsl:call-template> + <block> + The default of start-indent = "body-start()" ensures the correct + alignment of the labels. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='bullet-list-item-body-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">bullet_list/list_item/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the blocks (docutilis paragraphs) of the body of each item. + </block> + </xsl:template> + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/comment.xsl b/sandbox/paultremblay/python_interface/docs/xsl/comment.xsl new file mode 100644 index 000000000..7b69df65f --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/comment.xsl @@ -0,0 +1,39 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <!-- + <xsl:template match="comment()"> + <xsl:if test="contains(., '$Id: root.xsl')"> + <xsl:text>Root
</xsl:text> + <xsl:text>=====
</xsl:text> + <xsl:text>
</xsl:text> + <xsl:text>The attribue sets for the root elements, inlcuding document. These 
</xsl:text> + <xsl:text>attributes control the page sequences.
</xsl:text> + <xsl:text>
</xsl:text> + </xsl:if> + + <xsl:if test="contains(., '$Id: option_list.xsl')"> + +<xsl:text> +option list as list +====================== + +Since an option list can be rendered as either a traditonal list, or a +definition list, there are two sets of attribute sets. These attribute sets +are used for the options list when it is rendered as a list. + +</xsl:text> + + </xsl:if> + </xsl:template> + --> + + + + +</xsl:stylesheet> + diff --git a/sandbox/paultremblay/python_interface/docs/xsl/definition_list.xsl b/sandbox/paultremblay/python_interface/docs/xsl/definition_list.xsl new file mode 100644 index 000000000..7514bcb39 --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/definition_list.xsl @@ -0,0 +1,129 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + + + <xsl:template match= "xsl:attribute-set[@name='definition-list-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">block</xsl:with-param> + <xsl:with-param name="docutils">definition_list</xsl:with-param> + </xsl:call-template> + <block> + For the definition list. Since this element contains all the other + blocks in the list, it can be used to set values such as + the font, background color, line-height, etc, for the entire list, + as well as the space after and before. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='definition-list-item-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">definition_list/definition_list_item</xsl:with-param> + </xsl:call-template> + <block> + For the items in the definition list. The attributes can control the + spacing between each item. A different set of attributes controls the spacing + of the first item (see below). + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='definition-list-item-first-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">definition_list/definition_list_item</xsl:with-param> + <xsl:with-param name="inherits">definition-list-item-block</xsl:with-param> + </xsl:call-template> + <block> + For the first item in the definition list. This attribute set inherits + all the properties form 'definition-list-item', and then re-defines the + space-before to 0pt. In order to get space between the first item and the + text before it, use the space-after attribute in the option-list attribute + set. + </block> + <block> + It does not makes sense to change this set direclty. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='definition-term-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">definition_list/definition_list_item/term</xsl:with-param> + </xsl:call-template> + <block> + Formats the bock of the the term. Can be used to control spacing + between term and definition, but don't use with space before, or you + won't be able to control spacing before list + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='definition-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">definition_list/definition_list_item/definition</xsl:with-param> + </xsl:call-template> + <block> + Formats the bock of the of the defintion, that wraps the paragraph blocks. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='definition-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">definition_list/definition_list_item/definition/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the blocks (paragraphs in the defintion. Can be lsed to control + the space between paragraphs by setting the space-bfore attribute. Don't + use the space-after attribute, or you won't be able to contorl the spacing + between items + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='definition-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">definition_list/definition_list_item/definition/paragraph[1]</xsl:with-param> + <xsl:with-param name="inherits">definition-first-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + For the first paragraph in the definition list. This attribute set inherits + all the properties frorm 'definition-first-paragraph-block', and then re-defines the + space-before to 0pt. + </block> + <block> + It does not makes sense to change this set direclty. + </block> + </xsl:template> + + <!-- + <xsl:template match= "xsl:attribute-set[@name='definition-term-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">definition_list/definition_list_item/term</xsl:with-param> + </xsl:call-template> + <block> + For the inine properties of the term item. + </block> + </xsl:template> + --> + + <xsl:template match= "xsl:attribute-set[@name='classifier-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">definition_list/definition_list_item/classifier</xsl:with-param> + </xsl:call-template> + <block> + For the inine properties of the classifier item. + </block> + </xsl:template> + + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/document_parameters.xsl b/sandbox/paultremblay/python_interface/docs/xsl/document_parameters.xsl new file mode 100644 index 000000000..83533d01b --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/document_parameters.xsl @@ -0,0 +1,681 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:include href="comment.xsl"/> + <xsl:include href="utils.xsl"/> + + <xsl:output method="xml"/> + + <xsl:template match="xsl:stylesheet"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="/"> + <doc> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">1</xsl:with-param> + <xsl:with-param name="text">XSL-FO Documentation</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">2</xsl:with-param> + <xsl:with-param name="text">Parameters</xsl:with-param> + </xsl:call-template> + <block>.. contents:: Table of Contents</block> + <xsl:apply-templates/> + </doc> + </xsl:template> + + <xsl:template match="xsl:param[@name='page-layout']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>simple, first, odd-even, first-odd-even</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + This parameter determines the page layout for the document. A value of + ``simple`` will create a document with the same page layout for all + pages. A value of ``first`` creates a document with a dfferent page + layout for the first page and for the rest of the pages. A value of + ``odd-even`` creates a different layout for for odd and even pages. A value + of ``first-odd-even`` creates a different layout for the first page, for + odd pages, and for even pages. + </block> + <block> + Because restructured text only allows one footer and header, the footer and header + will be the same for bth odd and even pages. However, if the ``first`` or + ``first-odd-even`` values is chosen, you can suppress the first footer and + header (see below). + </block> + <block> + Using a value other than ``simple`` allows for different margins for different + page sequences, depending on the value. + </block> + </xsl:template> + + <!--not used anymore--> + <xsl:template match="xsl:param[@name='suppress-first-page-header']" priority = "3"/> + <xsl:template match="xsl:param[@name='suppress-first-page-header_old']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>True, False, ''</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + If set to True, and the ``page-layout`` is set to``first``, or ``page-layout`` + is set to ``first-odd-even``, no header will appear on the first page. If a value + of ``simple`` or ``odd-even`` is chosen for the ``page-layout``, this parameter will + have no effect, and the header will appear on all pages. + </block> + </xsl:template> + + <!--not used anymore--> + <xsl:template match="xsl:param[@name='suppress-first-page-footer']" priority = "3"/> + <xsl:template match="xsl:param[@name='suppress-first-page-footer_old']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>True, False, ''</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + If set to True, and the ``page-layout`` is set to ``first``, or ``page-layout`` + is set to ``first-odd-even``, no footer will appear on the first page. If a value + of ``simple`` or ``odd-even`` is chosen for the ``page-layout``, this parameter will + have no effect, and the footer will appear on all pages. + </block> + </xsl:template> + + + <!--not used anymore--> + <xsl:template match="xsl:param[@name='spacing-header']" priority = "3"/> + <xsl:template match="xsl:param[@name='spacing-header_old']" priority = "3"> + <xsl:call-template name="make-name"> + <xsl:with-param name="name">spacing-header and spacing-footer</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="possible-values"> + <xsl:with-param name="text" select="'Any Measure'"/> + </xsl:call-template> + <xsl:call-template name="p-defaults"/> + <block> + The parameters ``spacing-header`` and ``spacing-footer`` create the space for the + header and footer. Although the default is set to an empty string, the XSL + styelsheets will create a satisfactory space if a header or footer is found. Use + either of these parameters to change that default. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='spacing-footer']" priority = "3"/> + + <xsl:template match="xsl:param[@name='title-pagination']" priority = "3"> + <xsl:call-template name="make-name"> + <xsl:with-param name="name">pagination for front matter</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="possible-values"> + <xsl:with-param name="text" select="'with-front, with-toc, with-body'"/> + </xsl:call-template> + <block>**Defaults:** See below</block> + <block> + The function is the same for the following parameters: + </block> + <block>* title-pagination</block> + <block>* bibliographic-pagination</block> + <block>* dedication-pagination</block> + <block>* abstract-pagination</block> + <block>* toc-pagination</block> + <block> + Each determines what region to place the textual matter. There are + three regions, the front matter, the toc matter, and the body matter. The front + matter has no footers and headers. The toc matter starts a new page run, in which + the numbers start with 1 (or any other value), and can take any formatting. The + body matter again starts a new run of pages with its own page numbering and formatting + of these numbers. + </block> + <block> + In practice, the abstract and title page often occurr before the other front matter + material, and they appear on pages with no footers and headers. The dedication and Table + of Contents appear next, with the first numbering of the document, the numbers being + formatted as lower-case Roman numberals. The bibliographic information could appear + in either the front matter or toc matter. In order to achieve this standard layout, + the defaults choose a ``with-front`` for the ``title-pagination``, + ``abstract-pagination.``, and ``bibliographic-pagination; and a + ``with-toc`` for the ``toc-pagination`` and ``dedication-pagination``. + </block> + <block> + In order to change these defaults, choose a different value. For example, + to place the dedication in the front matter, set ``dedication-pagination`` to + ``with-front``. For a simple document, in which there is only one set of page runs, + simply set each of these parameters to ``with-body``. + + </block> + </xsl:template> + + + <xsl:template match="xsl:param[@name='bibliographic-pagination']| + xsl:param[@name='dedication-pagination']| xsl:param[@name='abstract-pagination']| + xsl:param[@name='toc-pagination'] " priority = "3"/> + + <xsl:template match="xsl:param[@name='front-order']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>title,bibliographic,dedication,abstract,toc</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + The param ``front-order`` is a string of each region, separated by a comma, + that determines the order of the title, the bibliographic + information, the dedication, the abstract, and the Table of Contents. The + default puts them in order that docutils puts them in when the document is + converted to XML. In order to change this, change the order in the string. + For example, to place the abstract before the dedication, use + ``'title,bibliographic,dedication,abstract,toc'`` as a value. + </block> + <block> + If you have a region in your parameter value that does not actually exist + in your document, no error will occurr. For example, if you set your value + to ``title,bibliographic,dedication,abstract,toc``, but have no ``title`` in + your document, the XSL stylesheet will still place the abstract before the dedication + without raising any error. + </block> + <block> + However, if you lack a region in your value that exists in the document, the + stylesheets will recognize this as an error, notifiy you, and quit. For eaxmple, + if your value is ``,bibliographic,dedication,abstract,toc``, and your document + contains a title, the processing will quit. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='author-text']" priority = "3"> + <xsl:call-template name="make-name"> + <xsl:with-param name="name">Bibliographic Field Names</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="possible-values"> + <xsl:with-param name="text" select="'Any Text'"/> + </xsl:call-template> + <block>**Defaults:** See below</block> + <block> + The function is the same for the following parameters: + </block> + <block>* author-text (default: Author: )</block> + <block>* authors-text (default: Authors: )</block> + <block>* organization-text (default: Organization: )</block> + <block>* contact-text (default: Contact: )</block> + <block>* status-text (default: Status: )</block> + <block>* copyright-text (default: Copyright: )</block> + <block>* address-text (default: Address: )</block> + <block>* version-text (default: Version: )</block> + <block>* revision-text (default: Revison: )</block> + <block>* date-text (default: Date: )</block> + <block> + Each parameter sets the text in the list for that particular bibliographic item. + For example if you wanted to change the default for ``contact`` from 'contact' to email, + you would simply set this value to 'email'. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='authors-text']| + xsl:param[@name='organization-text']| xsl:param[@name='contact-text']| + xsl:param[@name='status-text']| xsl:param[@name='copyright-text']| + xsl:param[@name='address-text']| xsl:param[@name='version-text']| + xsl:param[@name='revision-text']| xsl:param[@name='date-text'] " priority = "3"/> + + <xsl:template match="xsl:param[@name='attention-title']" priority = "3"> + <xsl:call-template name="make-name"> + <xsl:with-param name="name">Admonition Title Names</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="possible-values"> + <xsl:with-param name="text" select="'Any Text'"/> + </xsl:call-template> + <block>**Defaults:** See below</block> + <block> + The function is the same for the following parameters: + </block> + <block>* attention-title (default: Attention!)</block> + <block>* caution-title (default: Caution!)</block> + <block>* danger-title (default: !Danger!)</block> + <block>* error-title (default: Error)</block> + <block>* hint-title (default: Hint)</block> + <block>* important-title (default: Important)</block> + <block>* note-title (default: Note)</block> + <block>* tip-title (default: Tip)</block> + <block>* warning-title (default: Warning!)</block> + <block> + Each parameter sets the text for the title for that particular Admonition. + For example if you wanted to change the default for ``attention-title`` from + 'Important' to 'Pay Attention!', you would simply set this value to 'Pay Attnetion!'. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='caution-title']| xsl:param[@name='caution-title']| + xsl:param[@name='danger-title']| xsl:param[@name='error-title']| + xsl:param[@name='hint-title']| xsl:param[@name='important-title']| + xsl:param[@name='note-title']| xsl:param[@name='tip-title']| + xsl:param[@name='warning-title']" priority = "3"/> + + <xsl:template match="xsl:param[@name='transition-text']" priority = "3"> + <xsl:call-template name="make-name"> + <xsl:with-param name="name">transition-text</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="possible-values"> + <xsl:with-param name="text" select="'Any Text'"/> + </xsl:call-template> + <block>**Defaults:** \*\*\*</block> + <block> + The text to use for a transtion element. Use any text (including an empty + string) to change that value. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='number-section1']" priority = "3"> + <xsl:call-template name="make-name"> + <xsl:with-param name="name">Formatting of Section Numbering</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="possible-values"> + <xsl:with-param name="text" select="'Valid Number Formatting String'"/> + </xsl:call-template> + <block>**Defaults:** See below</block> + <block> + The function is the same for the following parameters: + </block> + <block>* number-section1 (default: 1)</block> + <block>* number-section2 (default: .1)</block> + <block>* number-section3 (default: .1)</block> + <block>* number-section4 (default: .1)</block> + <block>* number-section5 (default: .1)</block> + <block>* number-section6 (default: .1)</block> + <block>* number-section7 (default: .1)</block> + <block>* number-section8 (default: .1)</block> + <block>* number-section9 (default: .1)</block> + <block> + Each parameter sets the formatting (not the actual number) for that particular level. + The stylesheets allow for a great deal of flexibility here. For example, in + order to set a level 3 number format to '(II)3.b', you would set + ``number-section1`` to '(I)', ``number-section2`` to '.1' (the default, in this case, + meaning you woud not need to make a change), and ``number-section3`` to + '.a'. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='number-section2']| xsl:param[@name='number-section3']| + xsl:param[@name='number-section4']| xsl:param[@name='number-section5']| + xsl:param[@name='number-section6']| xsl:param[@name='number-section7']| + xsl:param[@name='number-section8']| xsl:param[@name='number-section9'] " + priority = "3"/> + + <xsl:template match="xsl:param[@name='inherit-section-num']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>True, False</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + If set to 'True', each section inherits the section numbering from the sections + above it. For example, section '1.1.2' will appear as '1.1.2'. If set to 'False', + the section number will appear as '2'. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='bullet-text']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>Any Text</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + Use to set the value for the bullets in a bullet list. If this string is left blank, + then the stylesheets will use the value in the XML. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='bullet-text-level2']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>Any Text</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + Use to set the value for the bullets in a nested bullet list. If this string is left blank, + then the stylesheets will use the value in the XML. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='options-separator']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>Any Text</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + Use to set the value for the text that separates the options in an option list. + For example, if your RST file has ``-f -file`` as the options, and you choose + ';' as the ``options-separator``, the output becomes ``-f; -file``. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='option-list-format']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>list, definition</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + Use to determine the formatting of an options list. If ``list`` is choosen, then + the options list is formatted as a traditional list, with the options to the left + and the description to the right. If ``definition`` is choosen, the options + list is formatted as a defintion list, with the options above the description, which + is indented. Lists with long options are probably better formatted using + ``definition.`` + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='number-verse']" priority = "3"> + <xsl:call-template name="make-name"> + <xsl:with-param name="name">number-verse</xsl:with-param> + </xsl:call-template> + <block>**Possible Values:** any positive integer, or ``''``</block> + <block>**Default:** 5</block> + <block> + When set, this parameter numbers a line block ("verse") every ``value`` lines. + The value of ``'5'`` numbers every 5th line. If ``number-verse`` is left + empty, the line block will not be numbered. + </block> + </xsl:template> + + + <xsl:template match="xsl:param[@name='text-before-block-quote-attribution']" priority = "3"> + <xsl:call-template name="make-name"> + <xsl:with-param name="name">Text Before Attributions</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="possible-values"> + <xsl:with-param name="text" select="'Any Text'"/> + </xsl:call-template> + <block>**Defaults:** —</block> + <block> + The function is the same for the following parameters: + </block> + <block>* text-before-block-quote-attribution</block> + <block>* text-before-epigraph-attribution</block> + <block>* text-before-pull-quote-attribution</block> + <block> + Each parameter determines the text before the attribution. When the parameter + is left empty, no text will appear before an attribution. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='text-before-epigraph-attribution']| + xsl:param[@name='text-before-pull-quote-attribution']" priority = "3"/> + + <xsl:template match="xsl:param[@name='table-title-placement']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>top, bottom</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + Where to place the table title, or caption. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='footnote-placement']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>footnote, endnote</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + This parameter determines whether footnotes will function as footnotes, + or endnotes. When ``footnote`` is choosen, footnotes appear at the + bottom of the page. When ``endnote`` is choosen, the *numbered* footnotes appear + as endnotes, in the same position where they are in the RST document. + If ``endnote`` is choosen, symbolic footnotes still appear as footnotes, + thus giving a user the ability to use both footnotes and endnotes. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='footnote-style']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>list, traditional</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + This parameter determines the style of the footnote or endnote text. + When ``'list'``, is choosen, the text is formatted as a list, + with the number as the item. When ``'traditional'`` is choosen, + the footnote appears in the more traditional manner, as a paragraph + with the first line indented. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='space-between-footnotes']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>Any Measure</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + Use to set the space between footnotes. (I have not determined how to set + this property in the normal way, which is why this property appears as + a parameter, rather than in an attribute set, like the other similar + properties.) + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='internal-link-type']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>link, page, page-link</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + When set to ``'page'``, the page number of the target appears. When + set to ``'link'``, the text of the link appears, and clicking on that + link takes you to the target. When set to ``'page-link'``, the page + of the target appears, and clicking on that page number takes you to + the target. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='bibliographic-format']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>list, normal, ''</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + Determines the formatting of the bibliographic info. When set to ``'list'`` + (the default), the bibliograhic fields will be formatted as a list. When set + to ``'normal'`` or ``''``, the each bibliographic field will be formatted + as a block. + </block> + </xsl:template> + + + <xsl:template match="xsl:param[@name='custom-bib-info1-name']" priority = "3"> + <xsl:call-template name="make-name"> + <xsl:with-param name="name">Custom bibliographic field names</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="possible-values"> + <xsl:with-param name="text" select="'Any Text'"/> + </xsl:call-template> + <block>**Defaults:** ''</block> + <block> + The function is the same for the following parameters: + </block> + <block>* custom-bib-info1-name</block> + <block>* custom-bib-info2-name</block> + <block>* custom-bib-info3-name</block> + <block>* custom-bib-info4-name</block> + <block>* custom-bib-info5-name</block> + <block>* custom-bib-info6-name</block> + <block>* custom-bib-info7-name</block> + <block>* custom-bib-info8-name</block> + <block>* custom-bib-info9-name</block> + <block>* custom-bib-info10-name</block> + <block> + Each parameter sets the value of the corresponding text for cutom bibliographic fields. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='custom-bib-info2-name']| + xsl:param[@name='custom-bib-info3-name']| + xsl:param[@name='custom-bib-info4-name']| + xsl:param[@name='custom-bib-info5-name']| + xsl:param[@name='custom-bib-info6-name']| + xsl:param[@name='custom-bib-info7-name']| + xsl:param[@name='custom-bib-info8-name']| + xsl:param[@name='custom-bib-info9-name']| + xsl:param[@name='custom-bib-info10-name'] " priority = "3"/> + + <xsl:template match="xsl:param[@name='table-cols']" priority = "3"> + <xsl:call-template name="make-name"> + <xsl:with-param name="name">Custom Table Columns</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="possible-values"> + <xsl:with-param name="text" select="'numbers separated by commas'"/> + </xsl:call-template> + <block>**Defaults:** ''</block> + <block> + The function is the same for the following parameters: + </block> + <block>* table-cols</block> + <block>* table-borderless-cols</block> + <block>* table-long-cols</block> + <block>* table1-cols</block> + <block>* table2-cols</block> + <block>* ...</block> + <block>* table30-cols</block> + <block> + Each parameter sets the columns for the table. ``'table-cols'`` sets the columns + for the default table; ``'table-borderless-cols'`` sets the columns for the + borderless table, and ``'table-long-cols'`` sets the columns for the long + table. There are also 30 custom tables, and the parameter for the columns is + ``'table1-cols'``, ``'table2-cols'`` ... ``'table30-cols'``. + </block> + <block> + Use these parameters to override the defualts created by rst2xml.py + </block> + + <block> + Use a value of numbers separated by commas. For example, a value of + ``'10,20,10'`` sets the first column to 10, the second to 20, and the + third to 10. That means the first and third columns will have the + same width, and the second will be twice as large as those. + </block> + </xsl:template> + + <xsl:template match="xsl:param[@name='table1-cols']| + xsl:param[@name='table2-cols']| + xsl:param[@name='table3-cols']| + xsl:param[@name='table4-cols']| + xsl:param[@name='table5-cols']| + xsl:param[@name='table6-cols']| + xsl:param[@name='table7-cols']| + xsl:param[@name='table8-cols']| + xsl:param[@name='table9-cols']| + xsl:param[@name='table10-cols']| + xsl:param[@name='table11-cols']| + xsl:param[@name='table12-cols']| + xsl:param[@name='table13-cols']| + xsl:param[@name='table14-cols']| + xsl:param[@name='table15-cols']| + xsl:param[@name='table16-cols']| + xsl:param[@name='table17-cols']| + xsl:param[@name='table18-cols']| + xsl:param[@name='table19-cols']| + xsl:param[@name='table20-cols']| + xsl:param[@name='table21-cols']| + xsl:param[@name='table22-cols']| + xsl:param[@name='table23-cols']| + xsl:param[@name='table24-cols']| + xsl:param[@name='table25-cols']| + xsl:param[@name='table26-cols']| + xsl:param[@name='table27-cols']| + xsl:param[@name='table28-cols']| + xsl:param[@name='table29-cols']| + xsl:param[@name='table30-cols']| + xsl:param[@name='table-borderless-cols']| + xsl:param[@name='table-long-cols'] " priority = "3"/> + + <xsl:template match="xsl:param[@name='long-rows-first-page']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>numbers separated by commas</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + + Use this property to set the number of rows you want on the first + page for a table with a class of ``'long'``. Only use if you desire + a different caption from that which appears on the first page. + + </block> + <block> + FO by itself cannot create different table headings or footings + from on subsequent pages. The stylesheets get around this + limitation by creating two tables, one which takes the first + heading (or footing), and one which takes the second. The user + must tell the stylesheets when to start the new table; the + stylesheets have no way of calcuating this on their own. + + </block> + <block> + Use numbers separated by commas for this parameter, where the first number + inidcatetes the first long table, the second the second table, and so on. For + example, a value of ``'8,10'`` tells the stylesheet to break the first *long* table + at 8 rows, and the second at 10 rows. + </block> + <block> + Leave this parameter empty, or set it to 0 in order to have the same caption on + all pages. + </block> + + </xsl:template> + + + + <xsl:template match="xsl:param[@name='custom-spacing-header-footer']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>boolean</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + Tells the stylesheets to use attributes of body and region-before that will determine + the spacing for the header. Normally, the stylesheets sets the area to .75in, if a + relevant header or footer is found. When ``'custom-spacing-header-footer'`` + is set to true, the stylesheets + won't try to generate any spacing, but will require these attributes to be set in + the relevant attribute sets. + </block> + </xsl:template> + + + <xsl:template match="xsl:param[@name='test']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>True, False, ''</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + For testing purposes only. + </block> + </xsl:template> + + + + <xsl:template match="xsl:param" priority="2"> + <xsl:message> + <xsl:text>no match for "</xsl:text> + <xsl:value-of select="@name"/> + <xsl:text>"</xsl:text> + </xsl:message> + </xsl:template> + + + <xsl:template match="@*|node()" /> + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/document_stylesheet.xsl b/sandbox/paultremblay/python_interface/docs/xsl/document_stylesheet.xsl new file mode 100644 index 000000000..5c196896d --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/document_stylesheet.xsl @@ -0,0 +1,341 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:include href="root.xsl"/> + <xsl:include href="page.xsl"/> + <xsl:include href="bibliographic_fields.xsl"/> + <xsl:include href="front_matter.xsl"/> + <xsl:include href="header_footer.xsl"/> + <xsl:include href="toc.xsl"/> + <xsl:include href="section.xsl"/> + <xsl:include href="body_elements.xsl"/> + <xsl:include href="bullet_list.xsl"/> + <xsl:include href="enumerated_list.xsl"/> + <xsl:include href="option_list.xsl"/> + <xsl:include href="definition_list.xsl"/> + <xsl:include href="field_list.xsl"/> + <xsl:include href="line_block.xsl"/> + <xsl:include href="table.xsl"/> + <xsl:include href="table_extended.xsl"/> + <xsl:include href="table_extended2.xsl"/> + <xsl:include href="table_long.xsl"/> + <xsl:include href="footnote.xsl"/> + <xsl:include href="admonitions.xsl"/> + <xsl:include href="image_figure.xsl"/> + <xsl:include href="body_directives.xsl"/> + <xsl:include href="inline.xsl"/> + <xsl:include href="comment.xsl"/> + <xsl:include href="utils.xsl"/> + + <xsl:output method="xml"/> + + <xsl:template match="xsl:stylesheet"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="/"> + <doc> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">1</xsl:with-param> + <xsl:with-param name="text">XSL-FO Documentation</xsl:with-param> + </xsl:call-template> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">2</xsl:with-param> + <xsl:with-param name="text">Attribute Sets</xsl:with-param> + </xsl:call-template> + <block>.. contents:: Table of Contents</block> + + <!--root attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Root Attribute Sets</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets root elements. Use these attribute sets to format + the defaults in a document, such as font, font-size, or line-height. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/root.xsl')/xsl:stylesheet"/> + + <xsl:call-template name="make-title"> + <!--page attribute sets--> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Page Attribute Sets</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for page. These attributes control the formatting of + the actual pages: the paper size and margins. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/page.xsl')/xsl:stylesheet"/> + + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Bibliograhic Fields Attribute Sets</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the bibliograhic fields. These attributes control the formatting of + bibliographic fields. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/bibliographic_fields.xsl')/xsl:stylesheet"/> + + <!--front matter attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Front Matter Attribute Sets</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the dedication and abstract. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/front_matter.xsl')/xsl:stylesheet"/> + + <!--header footer--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Header and Footer Attribute Sets</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the headers and footers. Since headers and footers often need + very special formatting, the stylesheets allow for the formatting of up to three + paragraphs for each header and footer. The first refers to the first that occurrs in + the document, the second to the second, and the third to the third. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/header_footer.xsl')/xsl:stylesheet"/> + + <!--TOC attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">TOC Matter Attribute Sets</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the TOC. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/toc.xsl')/xsl:stylesheet"/> + + <!--Section attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Section Attribute Sets</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the section titles. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/section.xsl')/xsl:stylesheet"/> + + <!--body-element attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Body Elements</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for body elements, including the document title and subtitle; the + default paragraph; the transition element; and the literal block. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/body_elements.xsl')/xsl:stylesheet"/> + + <!--bullet-list attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">bullet list</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the bullet list. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/bullet_list.xsl')/xsl:stylesheet"/> + + <!--enumerated-list attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">enumerated list</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the enumerated list. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/enumerated_list.xsl')/xsl:stylesheet"/> + + <!--definition-list attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">definition list</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the definition list. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/definition_list.xsl')/xsl:stylesheet"/> + + <!--field-list attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">field list</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the field list. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/field_list.xsl')/xsl:stylesheet"/> + + <!--option-list attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">option list as list</xsl:with-param> + </xsl:call-template> + <block> + Since an option list can be rendered as either a traditonal list, or a + definition list, there are two sets of attribute sets. These attribute sets + are used for the options list when it is rendered as a list. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/option_list.xsl')/xsl:stylesheet"/> + + <!--line-block attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Line Block</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the line block. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/line_block.xsl')/xsl:stylesheet"/> + + <!--table attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Table</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the Table. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/table.xsl')/xsl:stylesheet"/> + + <!--table extended attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Table Extended</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the Extended Tables. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/table_extended.xsl')/xsl:stylesheet"/> + + <!--table extended 2 attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Table Extended 2 (Borderless)</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the Extended 2 (Borderless) Tables. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/table_extended2.xsl')/xsl:stylesheet"/> + + <!--table long attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Table Long</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the Long Tables. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/table_long.xsl')/xsl:stylesheet"/> + + + + + <!--footnote attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Footnote</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for footnotes, endnotes, and the endnotes title. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/footnote.xsl')/xsl:stylesheet"/> + + <!--admonitions attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Admonitions</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for Admonitions. By default, the admontioins have a + border around them. Each admonition gets its title from the parameter + of that name. For example, the danger admonitions title gets its title + from the 'danger-title' parameter, the caution from the `caution-title` + paramter, and so fourth. + </block> + <block> + Although each admonition and each admonition title has its own attribute-set, + by default they all inherit these values from two default attribute sets. (See + below.) Each of these areas can thus be customized. In contrast, all the paragrahs + in each admonition are identical. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/admonitions.xsl')/xsl:stylesheet"/> + + <!--image and figure attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Image and Figure</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for Images and Figures. The image property of + ``alt`` and ``target`` are ignored by the stylesheets, since + they have no use in PDF. In addtion, if the ``align`` is set + to ``top`` or ``bottom``, both properties that have no meaning + for PDF, the stylesheets will report an error, and if + ``strict`` is set to ``true``, quit. + </block> + + <block> + Likwise, the figure ``figwidth`` property will be ignored, since there + is not way to implement this property directy in FO. + </block> + <block> + In order to control the scaling, alignment, and width of images and + figures, it is better to use the attribute sets than to try to set these + properties in RST. The regions of 'image', 'figure', 'caption', and 'legend' + are all wrapped in blocks. Use the attribute sets for these blocks to control the + properties. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/image_figure.xsl')/xsl:stylesheet"/> + + <!--body_directive attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Body Elements Directives</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for Body Elements Directives. + </block> + + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/body_directives.xsl')/xsl:stylesheet"/> + + <!--option-inline attribute sets--> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">Inline</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for all the inline elements. The parameter 'footnote-style' + controls the style of the footnote. The paramater 'footnote-placement' determines + whether the footnotes that are numbered will be placed as footnotes or endnotes. + </block> + <block> + The parameter 'space-between-foototes' controls the space between footnotes. + (Becuase of a flaw(?) in FOP, an attribute set could not be used.) This parameter + has no effect on the space between endnotes. + </block> + <xsl:apply-templates select="document('../../docutilsToFo/xsl_fo/inline.xsl')/xsl:stylesheet"/> + </doc> + </xsl:template> + + <xsl:template match="xsl:attribute-set" priority="2"> + <xsl:message> + <xsl:text>no match for "</xsl:text> + <xsl:value-of select="@name"/> + <xsl:text>"</xsl:text> + </xsl:message> + </xsl:template> + + <xsl:template match="@*|node()"/> + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/enumerated_list.xsl b/sandbox/paultremblay/python_interface/docs/xsl/enumerated_list.xsl new file mode 100644 index 000000000..32ab39147 --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/enumerated_list.xsl @@ -0,0 +1,132 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + + + <xsl:template match= "xsl:attribute-set[@name='enumerated-list-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">list-block</xsl:with-param> + <xsl:with-param name="docutils">enumerated_list</xsl:with-param> + </xsl:call-template> + <block> + For the enumerated list. Since this element contains all the other list + elements, it can be used to set values such as the font, background color, + line-height, etc, for the entire list, as well as the space after and + before. + </block> + <block> + "The provisional-distance-between-starts property of the list-block + specifies the distance bewteen the start of the label (the bullet, for + example) and the actual start of the list content" (Pawson, 100) + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='enumerated-level2-list-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">list-block</xsl:with-param> + <xsl:with-param name="docutils">enumerated_list/enumerated_list</xsl:with-param> + </xsl:call-template> + <block> + Same as for the enumerated-list-block attribute. The default sets the + start-indent property to a greater value to indent this nested + list. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='enumerated-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">enumerated_list/list_item</xsl:with-param> + </xsl:call-template> + <block> + For the item in the enumerated list. The attributes can control the + spacing between each item. A different set of attributes controls the spacing + of the first item (see below). + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='enumerated-level2-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">enumerated_list/list_item/enumerated_list/list-item</xsl:with-param> + </xsl:call-template> + <block> + Same as above, but formats item of nested list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='enumerated-first-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">enumerated_list/list_item[1]</xsl:with-param> + <xsl:with-param name="inherits">enumerated-list-item</xsl:with-param> + </xsl:call-template> + <block> + For the first item in the enumerated list. This attribute set inherits + all the properties form 'enumerated-list-item', and then re-defines the + space-before to 0pt. In order to get space between the first item and the + text before it, use the space-after attribute in the enumerated-list attribute + set. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='enumerated-level2-first-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">enumerated_list/item/enumerated_list/list_item[1]</xsl:with-param> + <xsl:with-param name="inherits">enumerated-level2-list-item</xsl:with-param> + </xsl:call-template> + <block> + For the first item in the nested enumerated list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='enumerated-list-item-label']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item-label</xsl:with-param> + <xsl:with-param name="docutils">enumerated_list/list_item</xsl:with-param> + </xsl:call-template> + <block> + The default attribute end-indent = "label-end()" ensures + that the label aligns properly. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='enumerated-list-item-label-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">enumerated_list/list_item</xsl:with-param> + </xsl:call-template> + <block> + These attributes format the block that wraps the the number. (FO requires such + a block, even for a small label like this.) + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='enumerated-list-item-body']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item-body</xsl:with-param> + <xsl:with-param name="docutils">enumerated_list/list_item</xsl:with-param> + </xsl:call-template> + <block> + The default of start-indent = "body-start()" ensures the correct + alignment of the labels. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='enumerated-list-item-body-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">enumerated_list/list_item/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the blocks (docutilis paragraphs) of the body of each item. + </block> + </xsl:template> + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/field_list.xsl b/sandbox/paultremblay/python_interface/docs/xsl/field_list.xsl new file mode 100644 index 000000000..4d80889b5 --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/field_list.xsl @@ -0,0 +1,100 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='field-list-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">list-block</xsl:with-param> + <xsl:with-param name="docutils">field_list</xsl:with-param> + </xsl:call-template> + <block> + Formats the field list. Since this element contains all the other list + elements, it can be used to set values such as the font, background color, + line-height, etc, for the entire list, as well as the space after and + before. + </block> + <block> + "The provisional-distance-between-starts property of the list-block + specifies the distance bewteen the start of the label (the bullet, for + example) and the actual start of the list content" (Pawson, 100). + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='field-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">field_list/field</xsl:with-param> + </xsl:call-template> + <block> + For the items, or 'fields' in the field list. The attributes can control the + spacing between each item. A different set of attributes controls the spacing + of the first item (see below). + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='field-first-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">field_list/field[1]</xsl:with-param> + <xsl:with-param name="inherits">field-list-item</xsl:with-param> + </xsl:call-template> + <block> + For the first item in the field list. This attribute set inherits + all the properties form 'field-list-item', and then re-defines the + space-before to 0pt. In order to get space between the first item and the + text before it, use the space-after attribute in the field-list-block attribute + set. + </block> + <block> + It does not make sense to change this attriubte set directly. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='field-list-item-label']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item-label</xsl:with-param> + <xsl:with-param name="docutils">field_list/field/field_name</xsl:with-param> + </xsl:call-template> + <block> + The default attribute end-indent = "label-end()" ensures + that the label aligns properly. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='field-list-item-label-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">field_list/field/field_name</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the field name. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='field-list-item-body']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item-body</xsl:with-param> + <xsl:with-param name="docutils">field_list/field/field_body</xsl:with-param> + </xsl:call-template> + <block> + The default of start-indent = "body-start()" ensures the correct + alignment of the labels. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='field-body-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">field_list/field/field_body/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the blocks (docutilis paragraphs) of the field. + </block> + </xsl:template> + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/footnote.xsl b/sandbox/paultremblay/python_interface/docs/xsl/footnote.xsl new file mode 100644 index 000000000..5b4d0ee8e --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/footnote.xsl @@ -0,0 +1,204 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='default-footnote-label-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">None</xsl:with-param> + </xsl:call-template> + <block> + Sets of the defaults for the label (1, \*, etc), of each label. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='footnote']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:footnote</xsl:with-param> + <xsl:with-param name="docutils">footnote</xsl:with-param> + </xsl:call-template> + <block> + Formats the footnote. By default, it sets properties to neutral, so + that it does not inherit any unwanted properties, such as from a + definition term. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='footnote-separator-flow']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:flow</xsl:with-param> + <xsl:with-param name="docutils">footnote</xsl:with-param> + </xsl:call-template> + <block> + Formats the flow of the footnote. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='footnote-separator-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">footnote</xsl:with-param> + </xsl:call-template> + <block> + Formats the block (with the leader) that separates the footnotes from the rest + of the page. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='footnote-label-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">footnote/paragraph[1]</xsl:with-param> + <xsl:with-param name="inherits">default-footnote-label-inline</xsl:with-param> + </xsl:call-template> + <block> + Formats the label for *traditional* footnotes and endnotes at the bottomm of the page + or with the endnotes. This attribute set does not affect the label for footnotes and + endnotes formatted as a list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='footnote-body-label-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">footnote/paragraph[1]</xsl:with-param> + <xsl:with-param name="inherits">default-footnote-label-inline</xsl:with-param> + </xsl:call-template> + <block> + Formats the label for *traditional* footnotes and endnotes in the body + of the text. This attribute set does not affect the label for footnotes and + endnotes formatted as a list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='footnote-list-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-block</xsl:with-param> + <xsl:with-param name="docutils">footnote</xsl:with-param> + </xsl:call-template> + <block> + Formats the list that contains the footnote. The 'provisional-distance-between-starts' + controls how far away the footnote label is from the text. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='footnote-item-label']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item-label</xsl:with-param> + <xsl:with-param name="docutils">footnote</xsl:with-param> + </xsl:call-template> + <block> + Formats the item-label when the footnote or endnote is formatted as a list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='footnote-label-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">footnote_reference</xsl:with-param> + </xsl:call-template> + <block> + Formats the block in item-label when the footnote or endnote is formatted as a list. + By default, the label has no superscript (as opposed to when formatting a + "traditional" footnote. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='footnote-item-body']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item-body</xsl:with-param> + <xsl:with-param name="docutils">footnote</xsl:with-param> + </xsl:call-template> + <block> + Formats the item-body when the footnote or endnote is formatted as a list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='footnote-body']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:footnote-body</xsl:with-param> + <xsl:with-param name="docutils">footnote</xsl:with-param> + </xsl:call-template> + <block> + Formats the body of the footnote. Space-after and space-before seem + to have no affect, at least with fop. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='footnote-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">footnote/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the paragraphs in the body of a footnote or endnote. Use the 'space-before' + to set the space between each paragraphs, for footnotes or endnotes + with multiple paragraphs. In addition, for traditional footnotes, use the + 'text-indent="18pt" to create a traditional footnote. (The deault does not + do this, in order to accommodate the footnote-as-a-list.) + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='footnote-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">footnote/paragraph[1]</xsl:with-param> + <xsl:with-param name="inherits">footnote-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the first paragraphs in the body of a footnote or endnote. It inherits + all the attributes from the 'footnote-paragraphs-block' and sets the space-before + to 0. It does not make sense to change attributes on this block directly. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='endnotes-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">footnote</xsl:with-param> + </xsl:call-template> + <block> + The block that wraps all the other blocks of the endnotes. Use to create a + page break before, or to create space before and after the endnotes. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='endnote-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">footnote</xsl:with-param> + </xsl:call-template> + <block> + The block that wraps each individual endnote ('footnote' in docutils). Use + to control the spacing between each endnote. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='endnote-first-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">footnote</xsl:with-param> + <xsl:with-param name="inherits">endnote-block</xsl:with-param> + </xsl:call-template> + <block> + The block that wraps each the first endnote ('footnote' in docutils). It + does not make sense to change attributes on this set directly. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='endnotes-title-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">rubric[@classes='endnotes']</xsl:with-param> + </xsl:call-template> + <block> + Formats the title for the endnotes, when one is present. + </block> + </xsl:template> + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/front_matter.xsl b/sandbox/paultremblay/python_interface/docs/xsl/front_matter.xsl new file mode 100644 index 000000000..c1a8e70b0 --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/front_matter.xsl @@ -0,0 +1,94 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + + <xsl:template match= "xsl:attribute-set[@name='dedication-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "dedication"]</xsl:with-param> + </xsl:call-template> + <block> + Formats the dedication text, including the title and subsequent paragraphs, by + wrapping them in a block. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='abstract-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "abstract"]</xsl:with-param> + </xsl:call-template> + <block> + Formats the abstract text, including the title and subsequent paragraphs, by + wrapping them in a block. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='dedication-title-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "dedication"]/title</xsl:with-param> + </xsl:call-template> + <block> + Formats the title for the dedication. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='abstract-title-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "abstract"]/title</xsl:with-param> + </xsl:call-template> + <block> + Formats the abstract title. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='dedication-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "dedication"]/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the paragraphs of the dedication. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='dedication-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "dedication"]/paragraph</xsl:with-param> + <xsl:with-param name="inherits">dedication-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the first paragraph of the dedication. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='abstract-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "abstract"]/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the paragraphs of the abstract. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='abstract-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "abstract"]/paragraph</xsl:with-param> + <xsl:with-param name="inherits">abstract-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the first paragraph of the abstract. + </block> + </xsl:template> + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/header_footer.xsl b/sandbox/paultremblay/python_interface/docs/xsl/header_footer.xsl new file mode 100644 index 000000000..60d3001b6 --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/header_footer.xsl @@ -0,0 +1,261 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='header-first-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">decoration/header/paragraph[1]</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the first paragrah in the header. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='header-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">decoration/header</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the header. Use to set the space between + the header and the body text, using ``'space-before = x'`` + and setting ``'space-before.conditionality'`` to ``'retain'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='footer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">decoration/footer</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the footer. Use to set the space between + the header and the body text, using ``'space-before = x'`` + and setting ``'space-before.conditionality'`` to ``'retain'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='paragraph-header-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">decoration/footer/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the paragraphs in the header. Use to set the space between + the footer and the body text, using ``'space-before = x'`` + and setting ``'space-before.conditionality'`` to ``'retain'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='paragraph-footer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">decoration/footer/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the footer. Use to set the space between + the footer and the body text, using ``'space-before = x'`` + and setting ``'space-before.conditionality'`` to ``'retain'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='first-header-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='first-header']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the header for the first page. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='body-header-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='body-header']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the for the header of the body, when using a layout of + ``'first'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='odd-header-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='odd-header']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the for the header of odd pages, when using a layout of + ``'first-odd-even'``, or ``'odd-even'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='even-header-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='even-header']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the for the header of even pages, when using a layout of + ``'first-odd-even'``, or ``'odd-even'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='first-footer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='first-footer']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the footer for the first page. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='body-footer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='body-footer']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the for the footer of the body, when using a layout of + ``'first'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='odd-footer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='odd-footer']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the for the footer of odd pages, when using a layout of + ``'first-odd-even'``, or ``'odd-even'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='even-footer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='even-footer']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the for the footer of even pages, when using a layout of + ``'first-odd-even'``, or ``'odd-even'``. + </block> + + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='toc-first-header-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='toc-first-header']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the header for the first page of the TOC. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-body-header-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='toc-body-header']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the for the header of the body of the TOC, when using a layout of + ``'first'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-odd-header-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='toc-odd-header']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the for the header of odd pages of the TOC, when using a layout of + ``'first-odd-even'``, or ``'odd-even'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-even-header-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='toc-even-header']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the for the header of even pages of the TOC, when using a layout of + ``'first-odd-even'``, or ``'odd-even'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-first-footer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='toc-first-footer']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the footer for the first page of the TOC. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-body-footer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='toc-body-footer']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the for the footer of the body of the TOC, when using a layout of + ``'first'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-odd-footer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='toc-odd-footer']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the for the footer of odd pages of the TOC, when using a layout of + ``'first-odd-even'``, or ``'odd-even'``. + </block> + + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-even-footer-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">container[@classes='toc-even-footer']</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the for the footer of even pages of the TOC, when using a layout of + ``'first-odd-even'``, or ``'odd-even'``. + </block> + + </xsl:template> + + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/image_figure.xsl b/sandbox/paultremblay/python_interface/docs/xsl/image_figure.xsl new file mode 100644 index 000000000..5df2b02d2 --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/image_figure.xsl @@ -0,0 +1,75 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + <xsl:template match= "xsl:attribute-set[@name='figure-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">figure</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the figure. Use this attribute set to set + properties on the image, caption, and legend, as well as to set the space + before and after the figure. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='image-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">image</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the image, both for an image by itself, and + for an image included in a figure. Use this attribute set to control the space + before and after the image, as well as to align the image itself. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='figure-caption-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">figure/caption</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the caption. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='figure-legend-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">figure/legend</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the legend. The paragrahs in the legend have + their own blocks. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='legend-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">figure/legend/paragaph</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the paragraphs in the legend. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='legend-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">figure/legend/paragaph[1]</xsl:with-param> + <xsl:with-param name="inherits">legend-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the first block that wraps the paragraphs in the legend. + </block> + </xsl:template> + + +</xsl:stylesheet> + diff --git a/sandbox/paultremblay/python_interface/docs/xsl/inline.xsl b/sandbox/paultremblay/python_interface/docs/xsl/inline.xsl new file mode 100644 index 000000000..80d304b4b --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/inline.xsl @@ -0,0 +1,58 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='emphasis-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">emphasis</xsl:with-param> + </xsl:call-template> + <block> + Formats the emphasis element. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='strong-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">strong</xsl:with-param> + </xsl:call-template> + <block> + Formats the strong element. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='basic-link-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">basic_link</xsl:with-param> + </xsl:call-template> + <block> + Formats the basic_link element. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='literal-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">literal</xsl:with-param> + </xsl:call-template> + <block> + Formats the literal element. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='title-reference-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">title-reference</xsl:with-param> + </xsl:call-template> + <block> + Formats the title_reference element. + </block> + </xsl:template> + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/line_block.xsl b/sandbox/paultremblay/python_interface/docs/xsl/line_block.xsl new file mode 100644 index 000000000..7fe6d7577 --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/line_block.xsl @@ -0,0 +1,80 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='outer-line-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">line_block</xsl:with-param> + </xsl:call-template> + <block> + The outer block containing the blocks of lines. Use the outer block to + set space before or after the verse. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='level1-line-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">line_block/line</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the first level of lines. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='level2-line-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">line_block/line_block/line</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the second level of lines. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='level3-line-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">line_block/line_block/line_block/line</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the third level of lines. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='level4-line-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">line_block/line_block/line_block/line_block/line</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the fourth level of lines. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='level5-line-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">line_block/line_block/line_block/line_block/line_block/line</xsl:with-param> + </xsl:call-template> + <block> + Attribute sets for the fifth level of lines. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='stanza-title-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">line_block/title_reference</xsl:with-param> + </xsl:call-template> + <block> + Formats the title of a stanza. + </block> + </xsl:template> + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/option_list.xsl b/sandbox/paultremblay/python_interface/docs/xsl/option_list.xsl new file mode 100644 index 000000000..59b95ad5c --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/option_list.xsl @@ -0,0 +1,250 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + + + <xsl:template match= "xsl:attribute-set[@name='option-list-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">list-block</xsl:with-param> + <xsl:with-param name="docutils">option_list</xsl:with-param> + </xsl:call-template> + <block> + For the option list. Since this element contains all the other list + elements, it can be used to set values such as the font, background color, + line-height, etc, for the entire list, as well as the space after and + before. + </block> + <block> + "The provisional-distance-between-starts property of the list-block + specifies the distance bewteen the start of the label (the bullet, for + example) and the actual start of the list content" (Pawson, 100) + </block> + + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='option-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item</xsl:with-param> + </xsl:call-template> + <block> + For the items in the option list. The attributes can control the + spacing between each item. A different set of attributes controls the spacing + of the first item (see below). + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-first-list-item']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item[1]</xsl:with-param> + <xsl:with-param name="inherits">option-list-item</xsl:with-param> + </xsl:call-template> + <block> + For the first item in the option list. This attribute set inherits + all the properties form 'option-list-item', and then re-defines the + space-before to 0pt. In order to get space between the first item and the + text before it, use the space-after attribute in the option-list attribute + set. + </block> + <block> + It does not make sense to change this attriubte set directly. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-list-item-label']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item-label</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item/option_group</xsl:with-param> + </xsl:call-template> + <block> + The default attribute end-indent = "label-end()" ensures + that the label aligns properly. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-list-item-label-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item/option_group/option_string|option_argument</xsl:with-param> + </xsl:call-template> + <block> + These attributes format the block that wraps the option_string and + option_argument. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item/option_group/option/option_string</xsl:with-param> + </xsl:call-template> + <block> + Used to format any inline properties of the option_string. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-argument-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item/option_group/option/option_argument</xsl:with-param> + </xsl:call-template> + <block> + Used to format any inline properties of the option_string. + </block> + </xsl:template> + + + + <xsl:template match= "xsl:attribute-set[@name='option-list-item-body']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:list-item-body</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item/description</xsl:with-param> + </xsl:call-template> + <block> + The default of start-indent = "body-start()" ensures the correct + alignment of the labels. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-list-item-body-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item/description/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the blocks (docutilis paragraphs) that describe the + options. If there was more than one paragraph, you could use attributes + such as space after. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-list-definition-block']" priority="3"> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text">option list as definition list</xsl:with-param> + </xsl:call-template> + <block> + These attribute sets are used for the options list when it is rendered as a + definition list. (See the docutils reference guide for an example of a + definition list, or see the defintion list in the test files.) + </block> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">option_list</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the other blocks. Use to control + space after and before, or to set any block items on the entire list. + </block> + <block> + This block wraps around another block, which in turn wraps around a third + block. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-list-item-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the options and descriptions, which are also blocks. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-list-first-item-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item</xsl:with-param> + </xsl:call-template> + <block> + Same as for option-list-item-block, but sets the space-before to 0pt + </block> + <block> + Does not make sense to change the attributes here directly. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-list-item-first-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item</xsl:with-param> + <xsl:with-param name="inherits">option-list-definition-item-block</xsl:with-param> + </xsl:call-template> + <block> + The same as the option-list-definition-item-block, except these attributes + format the first item. By default, this attribute set inherits the attributes from + the option-list-definition-item-block, and then re-defines the space-before to 0pt. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='option-group-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">option_list_item/option_list_item/option_group</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that contains the inline elements of the options and arguments. + For a defintion list, this block serves as the term, and sits on top, and to the left + of the description. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-list-description-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item/description</xsl:with-param> + </xsl:call-template> + <block> + + Formats the blocks wrappring the paragraphs describing the options + or arguments. This groups of blocks sits below the blocks + formatting the options and arguments, and in a defintion list are + usually indented right. + + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-list-description-first-block']" + priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item/description[1]</xsl:with-param> + <xsl:with-param name="inherits">option-list-description-block</xsl:with-param> + </xsl:call-template> + <block> + + Same as above, except formats the first such element. + + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-list-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item/description/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Formats the paragraphs in the description for an options list formatted as a definition list. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='option-list-first-paragraph-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">option_list/option_list_item/description/paragraph</xsl:with-param> + <xsl:with-param name="inherits">option-list-paragraph-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the first paragraph in the description for an options list formatted as a definition list. + </block> + </xsl:template> + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/page.xsl b/sandbox/paultremblay/python_interface/docs/xsl/page.xsl new file mode 100644 index 000000000..fe769404b --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/page.xsl @@ -0,0 +1,114 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + + <xsl:template match= "xsl:attribute-set[@name='paper-size-simple-page-master']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">None</xsl:with-param> + <xsl:with-param name="docutils">/</xsl:with-param> + </xsl:call-template> + <block> + Sets up the defaults for the paper size, used in other attribute sets. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='default-simple-page-master']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">None</xsl:with-param> + <xsl:with-param name="docutils">/</xsl:with-param> + </xsl:call-template> + <block> + Sets up the defaults for the margins of the fo:body-region for all the pages. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='simple-page-master']" priority="3"> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">5</xsl:with-param> + <xsl:with-param name="text">Simple Page Master Sets</xsl:with-param> + </xsl:call-template> + + <block> + <xsl:text>:fo: fo:simple-page-master</xsl:text> + </block> + <block first-line-indent="-9"> + <xsl:text>:docutils: /</xsl:text> + </block> + <block first-line-indent="-9"> + <xsl:text>:inherits: paper-size, default-page-setup</xsl:text> + </block> + <block> + The following attribute sets are identical: + </block> + <block>- simple-page-master</block> + <block>- first-simple-page-master</block> + <block>- body-simpe-page-master</block> + <block>- odd-simple-page-master</block> + <block>- even-simple-page-master</block> + <block>- toc-simple-page-master</block> + <block>- toc-first-simple-page-master</block> + <block>- toc-body-simple-page-master</block> + <block>- toc-odd-simple-page-master</block> + <block>- toc-even-simple-page-master</block> + <block>- front-simple-page-master</block> + <block>- front-first-simple-page-master</block> + <block>- front-body-simple-page-master</block> + <block>- front-odd-simple-page-master</block> + <block>- front-even-simple-page-master</block> + <block> + These attriute sets format the margins of the + fo:simple-page-master. By default, they inherit the + ``'paper-size-simple-page-master'`` and + ``'default-simple-page-master'`` attriute-sets, meaning each page + will have identical size and margins, a satisfactory setup for + many documents. However, the sizes and margins can be modified by + page type, if desired. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='first-simple-page-master']| + xsl:attribute-set[@name='body-simple-page-master']| + xsl:attribute-set[@name='odd-simple-page-master']| + xsl:attribute-set[@name='even-simple-page-master']| + xsl:attribute-set[@name='toc-simple-page-master']| + xsl:attribute-set[@name='toc-first-simple-page-master']| + xsl:attribute-set[@name='toc-body-simple-page-master']| + xsl:attribute-set[@name='toc-odd-simple-page-master']| + xsl:attribute-set[@name='toc-even-simple-page-master']| + xsl:attribute-set[@name='front-simple-page-master']| + xsl:attribute-set[@name='front-first-simple-page-master']| + xsl:attribute-set[@name='front-body-simple-page-master']| + xsl:attribute-set[@name='front-odd-simple-page-master']| + xsl:attribute-set[@name='front-even-simple-page-master'] + " + priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='header-region-before']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:region-before</xsl:with-param> + <xsl:with-param name="docutils">decoration/header</xsl:with-param> + </xsl:call-template> + <block> + The extent attribute specifies the header and footer height. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='footer-region-after']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:region-after</xsl:with-param> + <xsl:with-param name="docutils">decoration/footer</xsl:with-param> + </xsl:call-template> + <block> + The extent attribute specifies the header and footer height. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='front-matter-region-body']| + xsl:attribute-set[@name='region-body']" priority="3"/> + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/root.xsl b/sandbox/paultremblay/python_interface/docs/xsl/root.xsl new file mode 100644 index 000000000..f7af3afc9 --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/root.xsl @@ -0,0 +1,104 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='default-page-sequence']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:page-sequence</xsl:with-param> + <xsl:with-param name="docutils">document</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the all of the document. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='front-page-sequence']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:page-sequence</xsl:with-param> + <xsl:with-param name="docutils">document</xsl:with-param> + <xsl:with-param name="inherits">default-page-sequence</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the complete run of pages, in this case, the front matter. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-page-sequence']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:page-sequence</xsl:with-param> + <xsl:with-param name="docutils">document</xsl:with-param> + <xsl:with-param name="inherits">default-page-sequence</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the complete run of pages, in this case, the toc and any + pages associated with it. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='body-page-sequence']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:page-sequence</xsl:with-param> + <xsl:with-param name="docutils">document</xsl:with-param> + <xsl:with-param name="inherits">default-page-sequence</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties for the complete run of pages, in this case, the body. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='default-flow']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:flow</xsl:with-param> + <xsl:with-param name="docutils">document</xsl:with-param> + </xsl:call-template> + <block> + Sets up the default attributes for the front-flow, toc-flow, + and body-flow + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='front-flow']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:flow</xsl:with-param> + <xsl:with-param name="docutils">document</xsl:with-param> + <xsl:with-param name="inherits">default-flow</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties of the body in the front sequence of pages. Since + the front sequence has no headers and footers, that means everything. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-flow']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:flow</xsl:with-param> + <xsl:with-param name="docutils">document</xsl:with-param> + <xsl:with-param name="inherits">default-flow</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties of the body in the toc sequence of pages, which + means everything except headers and footers. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='body-flow']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:flow</xsl:with-param> + <xsl:with-param name="docutils">document</xsl:with-param> + <xsl:with-param name="inherits">default-flow</xsl:with-param> + </xsl:call-template> + <block> + Formats the properties of the body in the body sequence of pages, which + means everything except headers and footers. + </block> + </xsl:template> + + + + +</xsl:stylesheet> + diff --git a/sandbox/paultremblay/python_interface/docs/xsl/section.xsl b/sandbox/paultremblay/python_interface/docs/xsl/section.xsl new file mode 100644 index 000000000..9d73d7b1b --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/section.xsl @@ -0,0 +1,72 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='default-section-title-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">None</xsl:with-param> + <xsl:with-param name="docutils">None</xsl:with-param> + </xsl:call-template> + <block> + Sets up the defaults for the section titles. The title should always have some text beneath it + to avoid widows and orphans; hence the keep-with-always property. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='title-level1-block']" priority="3"> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">5</xsl:with-param> + <xsl:with-param name="text">title-level-block</xsl:with-param> + </xsl:call-template> + <block> + <xsl:text>:fo: fo:block</xsl:text> + </block> + <block first-line-indent="-9"> + <xsl:text>:docutils: section/title|section/section/title|etc.</xsl:text> + </block> + <block first-line-indent="-9"> + <xsl:text>:inherits: default-section-title-block</xsl:text> + </block> + <block> + The following attribute sets are identical in nature: + </block> + <block>- title-level1-block</block> + <block>- title-level2-block</block> + <block>- title-level3-block</block> + <block>- title-level4-block</block> + <block>- title-level5-block</block> + <block>- title-level6-block</block> + <block>- title-level7-block</block> + <block>- title-level8-block</block> + <block>- title-level9-block</block> + <block> + These attribute-sets format the titles of all sections. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='title-level2-block']| + xsl:attribute-set[@name='title-level3-block']| + xsl:attribute-set[@name='title-level4-block']| + xsl:attribute-set[@name='title-level5-block']| + xsl:attribute-set[@name='title-level6-block']| + xsl:attribute-set[@name='title-level7-block']| + xsl:attribute-set[@name='title-level8-block']| + xsl:attribute-set[@name='title-level9-block']" + + priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='title-number-inline']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:inline</xsl:with-param> + <xsl:with-param name="docutils">section/title/generated[@classes="sectnum]"</xsl:with-param> + </xsl:call-template> + <block> + Formats the title number generated by docutils. + </block> + </xsl:template> + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/table.xsl b/sandbox/paultremblay/python_interface/docs/xsl/table.xsl new file mode 100644 index 000000000..41b64adf8 --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/table.xsl @@ -0,0 +1,147 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='table-block-container']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block-container</xsl:with-param> + <xsl:with-param name="docutils">table</xsl:with-param> + </xsl:call-template> + <block> + Formats the block container that wraps bothe the table and a the table title (captin) + if one exists. Use to control space before and after the table. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='table']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:table</xsl:with-param> + <xsl:with-param name="docutils">table</xsl:with-param> + </xsl:call-template> + <block> + Formats the table. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='table-header']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:table-header</xsl:with-param> + <xsl:with-param name="docutils">tgroup/thead</xsl:with-param> + </xsl:call-template> + <block> + Formats the header of the table. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='default-cell']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:cell</xsl:with-param> + <xsl:with-param name="docutils">None</xsl:with-param> + </xsl:call-template> + <block> + Sets the defaults for all cells. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='table-header-cell']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:cell</xsl:with-param> + <xsl:with-param name="docutils">thead/row/entry</xsl:with-param> + <xsl:with-param name="inherits">default-cell</xsl:with-param> + </xsl:call-template> + <block> + Formats the cells in the table header. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='thead-borderless-cell_old']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:cell</xsl:with-param> + <xsl:with-param name="docutils">thead/row/entry</xsl:with-param> + </xsl:call-template> + <block> + Formats the cells in the table header for a borderless table. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='table-body']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:table-body</xsl:with-param> + <xsl:with-param name="docutils">tbody</xsl:with-param> + </xsl:call-template> + <block> + Attributes for the table body. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='table-row']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:table-row</xsl:with-param> + <xsl:with-param name="docutils">tbody/row</xsl:with-param> + </xsl:call-template> + <block> + Attributes for the table row. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='table-cell']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:table-cell</xsl:with-param> + <xsl:with-param name="docutils">tbody/row/entry</xsl:with-param> + <xsl:with-param name="inherits">default-cell</xsl:with-param> + </xsl:call-template> + <block> + Attributes for the table cell. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='table-cell-borderless_old']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:table-cell</xsl:with-param> + <xsl:with-param name="docutils">tbody/row/entry</xsl:with-param> + </xsl:call-template> + <block> + Attributes for the table cell for borderless table. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='cell-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">tbody/row/entry/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Attributes for the paragraphs in the cell. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='table-header-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">thead/row/entry/paragraph</xsl:with-param> + </xsl:call-template> + <block> + Attributes for the paragraphs in the header cell. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='caption-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">table/title</xsl:with-param> + </xsl:call-template> + <block> + Attributes for the table title, or caption. The parameter 'table-title-placement', + controls whether this block is placed before or after the table. If it is placed + on top of the table, it has a 'keep-with-next="always"' value that cannot be changed. + If this block is placed on the bottom it has a 'keep-with-previous="always"' value + that cannot be changed. + </block> + </xsl:template> + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/table_extended.xsl b/sandbox/paultremblay/python_interface/docs/xsl/table_extended.xsl new file mode 100644 index 000000000..9a7c1d4b3 --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/table_extended.xsl @@ -0,0 +1,368 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='table1-block-container']" priority="3"> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">5</xsl:with-param> + <xsl:with-param name="text">Custom Tables</xsl:with-param> + </xsl:call-template> + <block> + <xsl:text>:fo: See below</xsl:text> + </block> + <block first-line-indent="-9"> + <xsl:text>:docutils: See below</xsl:text> + </block> + <block> + + The table_extend.xsl contains templates to match 30 custom tables, + and and attribute sets for each of these tables. Each attribute set has + has the same function as its corresponding attribute set in the regular + table, as documented above. + + </block> + + <block>* table1-block-container => table-block-contanter</block> + <block>* table1 => table</block> + <block>* table1-header => table-header</block> + <block>* table1-header-cell => table-header-cell</block> + <block>* table1-header-block => table-header-block</block> + <block>* table1-body => table-body</block> + <block>* table1-header-row => table-header-row</block> + <block>* table1-row => table-row</block> + <block>* table1-cell => table-cell</block> + <block>* cell1-block => cell-block</block> + <block>* table2-block-container => table-block-contanter</block> + <block>* table2 => table</block> + <block>* ... </block> + <block>* table2-row => table-row</block> + <block>* table2-cell => table-cell</block> + <block>* cell2-block => cell-block</block> + <block>* ... </block> + <block>* table30-block-container => table-block-contanter</block> + <block>* table30 => table</block> + <block>* table30-header => table-header</block> + <block>* table30-header-cell => table-header-cell</block> + <block>* table30-header-block => table-header-block</block> + <block>* table30-body => table-body</block> + <block>* table30-header-row => table-header-row</block> + <block>* table30-row => table-row</block> + <block>* table30-cell => table-cell</block> + <block>* cell30-block => cell-block</block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='table2-block-container']| + xsl:attribute-set[@name='table3-block-container']| + xsl:attribute-set[@name='table4-block-container']| + xsl:attribute-set[@name='table5-block-container']| + xsl:attribute-set[@name='table6-block-container']| + xsl:attribute-set[@name='table7-block-container']| + xsl:attribute-set[@name='table8-block-container']| + xsl:attribute-set[@name='table9-block-container']| + xsl:attribute-set[@name='table10-block-container']| + xsl:attribute-set[@name='table11-block-container']| + xsl:attribute-set[@name='table12-block-container']| + xsl:attribute-set[@name='table13-block-container']| + xsl:attribute-set[@name='table14-block-container']| + xsl:attribute-set[@name='table15-block-container']| + xsl:attribute-set[@name='table16-block-container']| + xsl:attribute-set[@name='table17-block-container']| + xsl:attribute-set[@name='table18-block-container']| + xsl:attribute-set[@name='table19-block-container']| + xsl:attribute-set[@name='table20-block-container']| + xsl:attribute-set[@name='table21-block-container']| + xsl:attribute-set[@name='table22-block-container']| + xsl:attribute-set[@name='table23-block-container']| + xsl:attribute-set[@name='table24-block-container']| + xsl:attribute-set[@name='table25-block-container']| + xsl:attribute-set[@name='table26-block-container']| + xsl:attribute-set[@name='table27-block-container']| + xsl:attribute-set[@name='table28-block-container']| + xsl:attribute-set[@name='table29-block-container']| + xsl:attribute-set[@name='table30-block-container']" priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='table1']| + xsl:attribute-set[@name='table2']| + xsl:attribute-set[@name='table3']| + xsl:attribute-set[@name='table4']| + xsl:attribute-set[@name='table5']| + xsl:attribute-set[@name='table6']| + xsl:attribute-set[@name='table7']| + xsl:attribute-set[@name='table8']| + xsl:attribute-set[@name='table9']| + xsl:attribute-set[@name='table10']| + xsl:attribute-set[@name='table11']| + xsl:attribute-set[@name='table12']| + xsl:attribute-set[@name='table13']| + xsl:attribute-set[@name='table14']| + xsl:attribute-set[@name='table15']| + xsl:attribute-set[@name='table16']| + xsl:attribute-set[@name='table17']| + xsl:attribute-set[@name='table18']| + xsl:attribute-set[@name='table19']| + xsl:attribute-set[@name='table20']| + xsl:attribute-set[@name='table21']| + xsl:attribute-set[@name='table22']| + xsl:attribute-set[@name='table23']| + xsl:attribute-set[@name='table24']| + xsl:attribute-set[@name='table25']| + xsl:attribute-set[@name='table26']| + xsl:attribute-set[@name='table27']| + xsl:attribute-set[@name='table28']| + xsl:attribute-set[@name='table29']| + xsl:attribute-set[@name='table30']" priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='table1-header']| + xsl:attribute-set[@name='table2-header']| + xsl:attribute-set[@name='table3-header']| + xsl:attribute-set[@name='table4-header']| + xsl:attribute-set[@name='table5-header']| + xsl:attribute-set[@name='table6-header']| + xsl:attribute-set[@name='table7-header']| + xsl:attribute-set[@name='table8-header']| + xsl:attribute-set[@name='table9-header']| + xsl:attribute-set[@name='table10-header']| + xsl:attribute-set[@name='table11-header']| + xsl:attribute-set[@name='table12-header']| + xsl:attribute-set[@name='table13-header']| + xsl:attribute-set[@name='table14-header']| + xsl:attribute-set[@name='table15-header']| + xsl:attribute-set[@name='table16-header']| + xsl:attribute-set[@name='table17-header']| + xsl:attribute-set[@name='table18-header']| + xsl:attribute-set[@name='table19-header']| + xsl:attribute-set[@name='table20-header']| + xsl:attribute-set[@name='table21-header']| + xsl:attribute-set[@name='table22-header']| + xsl:attribute-set[@name='table23-header']| + xsl:attribute-set[@name='table24-header']| + xsl:attribute-set[@name='table25-header']| + xsl:attribute-set[@name='table26-header']| + xsl:attribute-set[@name='table27-header']| + xsl:attribute-set[@name='table28-header']| + xsl:attribute-set[@name='table29-header']| + xsl:attribute-set[@name='table30-header']" priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='table1-header-cell']| + xsl:attribute-set[@name='table2-header-cell']| + xsl:attribute-set[@name='table3-header-cell']| + xsl:attribute-set[@name='table4-header-cell']| + xsl:attribute-set[@name='table5-header-cell']| + xsl:attribute-set[@name='table6-header-cell']| + xsl:attribute-set[@name='table7-header-cell']| + xsl:attribute-set[@name='table8-header-cell']| + xsl:attribute-set[@name='table9-header-cell']| + xsl:attribute-set[@name='table10-header-cell']| + xsl:attribute-set[@name='table11-header-cell']| + xsl:attribute-set[@name='table12-header-cell']| + xsl:attribute-set[@name='table13-header-cell']| + xsl:attribute-set[@name='table14-header-cell']| + xsl:attribute-set[@name='table15-header-cell']| + xsl:attribute-set[@name='table16-header-cell']| + xsl:attribute-set[@name='table17-header-cell']| + xsl:attribute-set[@name='table18-header-cell']| + xsl:attribute-set[@name='table19-header-cell']| + xsl:attribute-set[@name='table20-header-cell']| + xsl:attribute-set[@name='table21-header-cell']| + xsl:attribute-set[@name='table22-header-cell']| + xsl:attribute-set[@name='table23-header-cell']| + xsl:attribute-set[@name='table24-header-cell']| + xsl:attribute-set[@name='table25-header-cell']| + xsl:attribute-set[@name='table26-header-cell']| + xsl:attribute-set[@name='table27-header-cell']| + xsl:attribute-set[@name='table28-header-cell']| + xsl:attribute-set[@name='table29-header-cell']| + xsl:attribute-set[@name='table30-header-cell']" priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='table1-header-block']| + xsl:attribute-set[@name='table2-header-block']| + xsl:attribute-set[@name='table3-header-block']| + xsl:attribute-set[@name='table4-header-block']| + xsl:attribute-set[@name='table5-header-block']| + xsl:attribute-set[@name='table6-header-block']| + xsl:attribute-set[@name='table7-header-block']| + xsl:attribute-set[@name='table8-header-block']| + xsl:attribute-set[@name='table9-header-block']| + xsl:attribute-set[@name='table10-header-block']| + xsl:attribute-set[@name='table11-header-block']| + xsl:attribute-set[@name='table12-header-block']| + xsl:attribute-set[@name='table13-header-block']| + xsl:attribute-set[@name='table14-header-block']| + xsl:attribute-set[@name='table15-header-block']| + xsl:attribute-set[@name='table16-header-block']| + xsl:attribute-set[@name='table17-header-block']| + xsl:attribute-set[@name='table18-header-block']| + xsl:attribute-set[@name='table19-header-block']| + xsl:attribute-set[@name='table20-header-block']| + xsl:attribute-set[@name='table21-header-block']| + xsl:attribute-set[@name='table22-header-block']| + xsl:attribute-set[@name='table23-header-block']| + xsl:attribute-set[@name='table24-header-block']| + xsl:attribute-set[@name='table25-header-block']| + xsl:attribute-set[@name='table26-header-block']| + xsl:attribute-set[@name='table27-header-block']| + xsl:attribute-set[@name='table28-header-block']| + xsl:attribute-set[@name='table29-header-block']| + xsl:attribute-set[@name='table30-header-block']" priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='table1-body']| + xsl:attribute-set[@name='table2-body']| + xsl:attribute-set[@name='table3-body']| + xsl:attribute-set[@name='table4-body']| + xsl:attribute-set[@name='table5-body']| + xsl:attribute-set[@name='table6-body']| + xsl:attribute-set[@name='table7-body']| + xsl:attribute-set[@name='table8-body']| + xsl:attribute-set[@name='table9-body']| + xsl:attribute-set[@name='table10-body']| + xsl:attribute-set[@name='table11-body']| + xsl:attribute-set[@name='table12-body']| + xsl:attribute-set[@name='table13-body']| + xsl:attribute-set[@name='table14-body']| + xsl:attribute-set[@name='table15-body']| + xsl:attribute-set[@name='table16-body']| + xsl:attribute-set[@name='table17-body']| + xsl:attribute-set[@name='table18-body']| + xsl:attribute-set[@name='table19-body']| + xsl:attribute-set[@name='table20-body']| + xsl:attribute-set[@name='table21-body']| + xsl:attribute-set[@name='table22-body']| + xsl:attribute-set[@name='table23-body']| + xsl:attribute-set[@name='table24-body']| + xsl:attribute-set[@name='table25-body']| + xsl:attribute-set[@name='table26-body']| + xsl:attribute-set[@name='table27-body']| + xsl:attribute-set[@name='table28-body']| + xsl:attribute-set[@name='table29-body']| + xsl:attribute-set[@name='table30-body']" priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='table1-header-row']| + xsl:attribute-set[@name='table2-header-row']| + xsl:attribute-set[@name='table3-header-row']| + xsl:attribute-set[@name='table4-header-row']| + xsl:attribute-set[@name='table5-header-row']| + xsl:attribute-set[@name='table6-header-row']| + xsl:attribute-set[@name='table7-header-row']| + xsl:attribute-set[@name='table8-header-row']| + xsl:attribute-set[@name='table9-header-row']| + xsl:attribute-set[@name='table10-header-row']| + xsl:attribute-set[@name='table11-header-row']| + xsl:attribute-set[@name='table12-header-row']| + xsl:attribute-set[@name='table13-header-row']| + xsl:attribute-set[@name='table14-header-row']| + xsl:attribute-set[@name='table15-header-row']| + xsl:attribute-set[@name='table16-header-row']| + xsl:attribute-set[@name='table17-header-row']| + xsl:attribute-set[@name='table18-header-row']| + xsl:attribute-set[@name='table19-header-row']| + xsl:attribute-set[@name='table20-header-row']| + xsl:attribute-set[@name='table21-header-row']| + xsl:attribute-set[@name='table22-header-row']| + xsl:attribute-set[@name='table23-header-row']| + xsl:attribute-set[@name='table24-header-row']| + xsl:attribute-set[@name='table25-header-row']| + xsl:attribute-set[@name='table26-header-row']| + xsl:attribute-set[@name='table27-header-row']| + xsl:attribute-set[@name='table28-header-row']| + xsl:attribute-set[@name='table29-header-row']| + xsl:attribute-set[@name='table30-header-row']" priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='table1-row']| + xsl:attribute-set[@name='table2-row']| + xsl:attribute-set[@name='table3-row']| + xsl:attribute-set[@name='table4-row']| + xsl:attribute-set[@name='table5-row']| + xsl:attribute-set[@name='table6-row']| + xsl:attribute-set[@name='table7-row']| + xsl:attribute-set[@name='table8-row']| + xsl:attribute-set[@name='table9-row']| + xsl:attribute-set[@name='table10-row']| + xsl:attribute-set[@name='table11-row']| + xsl:attribute-set[@name='table12-row']| + xsl:attribute-set[@name='table13-row']| + xsl:attribute-set[@name='table14-row']| + xsl:attribute-set[@name='table15-row']| + xsl:attribute-set[@name='table16-row']| + xsl:attribute-set[@name='table17-row']| + xsl:attribute-set[@name='table18-row']| + xsl:attribute-set[@name='table19-row']| + xsl:attribute-set[@name='table20-row']| + xsl:attribute-set[@name='table21-row']| + xsl:attribute-set[@name='table22-row']| + xsl:attribute-set[@name='table23-row']| + xsl:attribute-set[@name='table24-row']| + xsl:attribute-set[@name='table25-row']| + xsl:attribute-set[@name='table26-row']| + xsl:attribute-set[@name='table27-row']| + xsl:attribute-set[@name='table28-row']| + xsl:attribute-set[@name='table29-row']| + xsl:attribute-set[@name='table30-row']" priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='table1-cell']| + xsl:attribute-set[@name='table2-cell']| + xsl:attribute-set[@name='table3-cell']| + xsl:attribute-set[@name='table4-cell']| + xsl:attribute-set[@name='table5-cell']| + xsl:attribute-set[@name='table6-cell']| + xsl:attribute-set[@name='table7-cell']| + xsl:attribute-set[@name='table8-cell']| + xsl:attribute-set[@name='table9-cell']| + xsl:attribute-set[@name='table10-cell']| + xsl:attribute-set[@name='table11-cell']| + xsl:attribute-set[@name='table12-cell']| + xsl:attribute-set[@name='table13-cell']| + xsl:attribute-set[@name='table14-cell']| + xsl:attribute-set[@name='table15-cell']| + xsl:attribute-set[@name='table16-cell']| + xsl:attribute-set[@name='table17-cell']| + xsl:attribute-set[@name='table18-cell']| + xsl:attribute-set[@name='table19-cell']| + xsl:attribute-set[@name='table20-cell']| + xsl:attribute-set[@name='table21-cell']| + xsl:attribute-set[@name='table22-cell']| + xsl:attribute-set[@name='table23-cell']| + xsl:attribute-set[@name='table24-cell']| + xsl:attribute-set[@name='table25-cell']| + xsl:attribute-set[@name='table26-cell']| + xsl:attribute-set[@name='table27-cell']| + xsl:attribute-set[@name='table28-cell']| + xsl:attribute-set[@name='table29-cell']| + xsl:attribute-set[@name='table30-cell']" priority="3"/> + + <xsl:template match= "xsl:attribute-set[@name='cell1-block']| + xsl:attribute-set[@name='cell2-block']| + xsl:attribute-set[@name='cell3-block']| + xsl:attribute-set[@name='cell4-block']| + xsl:attribute-set[@name='cell5-block']| + xsl:attribute-set[@name='cell6-block']| + xsl:attribute-set[@name='cell7-block']| + xsl:attribute-set[@name='cell8-block']| + xsl:attribute-set[@name='cell9-block']| + xsl:attribute-set[@name='cell10-block']| + xsl:attribute-set[@name='cell11-block']| + xsl:attribute-set[@name='cell12-block']| + xsl:attribute-set[@name='cell13-block']| + xsl:attribute-set[@name='cell14-block']| + xsl:attribute-set[@name='cell15-block']| + xsl:attribute-set[@name='cell16-block']| + xsl:attribute-set[@name='cell17-block']| + xsl:attribute-set[@name='cell18-block']| + xsl:attribute-set[@name='cell19-block']| + xsl:attribute-set[@name='cell20-block']| + xsl:attribute-set[@name='cell21-block']| + xsl:attribute-set[@name='cell22-block']| + xsl:attribute-set[@name='cell23-block']| + xsl:attribute-set[@name='cell24-block']| + xsl:attribute-set[@name='cell25-block']| + xsl:attribute-set[@name='cell26-block']| + xsl:attribute-set[@name='cell27-block']| + xsl:attribute-set[@name='cell28-block']| + xsl:attribute-set[@name='cell29-block']| + xsl:attribute-set[@name='cell30-block']" priority="3"/> + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/table_extended2.xsl b/sandbox/paultremblay/python_interface/docs/xsl/table_extended2.xsl new file mode 100644 index 000000000..5348c23eb --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/table_extended2.xsl @@ -0,0 +1,51 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='borderless-table-block-container']" priority="3"> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">5</xsl:with-param> + <xsl:with-param name="text">Custom Tables</xsl:with-param> + </xsl:call-template> + <block> + <xsl:text>:fo: See below</xsl:text> + </block> + <block first-line-indent="-9"> + <xsl:text>:docutils: See below</xsl:text> + </block> + <block> + + The table_extend2.xsl contains templates for the borderless table. Each attribute set has + has the same function as its corresponding attribute set in the regular + table, as documented above. + + </block> + + <block>* borderless-table-block-container => table-block-contanter</block> + <block>* borderless-table => table</block> + <block>* borderless-table-header => table-header</block> + <block>* borderless-table-header-cell => table-header-cell</block> + <block>* borderless-table-header-block => table-header-block</block> + <block>* borderless-table-body => table-body</block> + <block>* borderless-table-header-row => table-header-row</block> + <block>* borderless-table-row => table-row</block> + <block>* borderless-table-cell => table-cell</block> + <block>* borderless-cell-block => cell-block</block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='borderless-table']| + xsl:attribute-set[@name='borderless-table-header']| + xsl:attribute-set[@name='borderless-table-header-row']| + xsl:attribute-set[@name='borderless-table-header-cell']| + xsl:attribute-set[@name='borderless-table-header-block']| + xsl:attribute-set[@name='borderless-table-body']| + xsl:attribute-set[@name='borderless-table-row']| + xsl:attribute-set[@name='borderless-table-cell']| + xsl:attribute-set[@name='borderless-cell-block']" priority="3"/> + + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/table_long.xsl b/sandbox/paultremblay/python_interface/docs/xsl/table_long.xsl new file mode 100644 index 000000000..9e9524c3a --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/table_long.xsl @@ -0,0 +1,54 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='long-table']" priority="3"> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">5</xsl:with-param> + <xsl:with-param name="text">Long Tables</xsl:with-param> + </xsl:call-template> + <block> + <xsl:text>:fo: See below</xsl:text> + </block> + <block first-line-indent="-9"> + <xsl:text>:docutils: See below</xsl:text> + </block> + <block> + + The table_long.xsl contains templates for a long table. Each attribute set has + has the same function as its corresponding attribute set in the regular + table, as documented above. There is no block-container attriute set, because + there is no block-container element; the caption is rendered as part of the + header or footer. + + </block> + + <block>* long-table => table</block> + <block>* long-table-header => table-header</block> + <block>* long-table-header-row => table-header-row</block> + <block>* long-thead-cell => thead-cell</block> + <block>* long-table-header-block => table-header-block</block> + <block>* long-table-body => table-body</block> + <block>* long-table-header-row => table-header-row</block> + <block>* long-table-row => table-row</block> + <block>* long-table-cell => table-cell</block> + <block>* long-cell-block => cell-block</block> + <block>* long-caption-block => caption-block</block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='long-table-header']| + xsl:attribute-set[@name='long-table-header-row']| + xsl:attribute-set[@name='long-table-header-cell']| + xsl:attribute-set[@name='long-table-header-block']| + xsl:attribute-set[@name='long-table-body']| + xsl:attribute-set[@name='long-table-row']| + xsl:attribute-set[@name='long-table-cell']| + xsl:attribute-set[@name='long-cell-block']| + xsl:attribute-set[@name='long-caption-block']" priority="3"/> + + + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/toc.xsl b/sandbox/paultremblay/python_interface/docs/xsl/toc.xsl new file mode 100644 index 000000000..463bcc77e --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/toc.xsl @@ -0,0 +1,98 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + <!-- $Id$ --> + + <xsl:template match= "xsl:attribute-set[@name='toc-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "contents"]</xsl:with-param> + </xsl:call-template> + <block> + Formats the block that wraps the TOC. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-title-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "contents"]/title</xsl:with-param> + </xsl:call-template> + <block> + Formats the block for the title for the TOC. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-entry-defaults-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">None</xsl:with-param> + <xsl:with-param name="docutils">None</xsl:with-param> + </xsl:call-template> + <block> + Sets up the defaults for the TOC entries. + </block> + </xsl:template> + + + <xsl:template match= "xsl:attribute-set[@name='toc-level1-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "contents"]/bullet_list/list_item/paragraph/</xsl:with-param> + <xsl:with-param name="inherits">toc-entry-defaults-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the block for the level 1 table of contents entry. If a number exists, it is + formatted according to the parameter 'number-section1'. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-level2-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "contents"]/bullet_list/list_item/bullet_list/list_item/paragraph/</xsl:with-param> + <xsl:with-param name="inherits">toc-entry-defaults-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the block for the level 2 table of contents entry. If a number exists, it is + formatted according to the parameter 'number-section2'. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-level3-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "contents"]/bullet_list/list_item/bullet_list/list_item/paragraph/etc.</xsl:with-param> + <xsl:with-param name="inherits">toc-entry-defaults-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the block for the level 3 table of contents entry. If a number exists, it is + formatted according to the parameter 'number-section3'. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-level4-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="fo">fo:block</xsl:with-param> + <xsl:with-param name="docutils">topic[@classes = "contents"]/bullet_list/list_item/bullet_list/list_item/paragraph/etc.</xsl:with-param> + <xsl:with-param name="inherits">toc-entry-defaults-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the block for the level 4 table of contents entry. If a number exists, it is + formatted according to the parameter 'number-section4'. + </block> + </xsl:template> + + <xsl:template match= "xsl:attribute-set[@name='toc-level5-block']" priority="3"> + <xsl:call-template name="before-desc"> + <xsl:with-param name="docutils">topic[@classes = "contents"]/bullet_list/list_item/bullet_list/list_item/paragraph/etc.</xsl:with-param> + <xsl:with-param name="inherits">toc-entry-defaults-block</xsl:with-param> + </xsl:call-template> + <block> + Formats the block for the level 5 table of contents entry. If a number exists, it is + formatted according to the parameter 'number-section5'. + </block> + </xsl:template> + +</xsl:stylesheet> diff --git a/sandbox/paultremblay/python_interface/docs/xsl/utils.xsl b/sandbox/paultremblay/python_interface/docs/xsl/utils.xsl new file mode 100644 index 000000000..e1c2d4c54 --- /dev/null +++ b/sandbox/paultremblay/python_interface/docs/xsl/utils.xsl @@ -0,0 +1,201 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.1"> + + + <!-- $Id$ --> + + <xsl:template name="make-border"> + <xsl:param name="length"/> + <xsl:param name="border-text">-</xsl:param> + <xsl:if test="$length != 0"> + <xsl:value-of select="$border-text"/> + <xsl:call-template name="make-border"> + <xsl:with-param name="border-text" select="$border-text"/> + <xsl:with-param name="length" select="$length - 1"/> + </xsl:call-template> + </xsl:if> + </xsl:template> + + <xsl:template name="make-title"> + <xsl:param name="level">5</xsl:param> + <xsl:param name="text"/> + <xsl:choose> + <xsl:when test="$level = 1"> + <block bottom-border="#" bottom-border-length="text" top-border="#" top-border-length="text"> + <xsl:value-of select="$text"/> + </block> + </xsl:when> + <xsl:when test="$level = 2"> + <block bottom-border="^" bottom-border-length="text" top-border="^" top-border-length="text"> + <xsl:value-of select="$text"/> + </block> + </xsl:when> + <xsl:when test="$level = 3"> + <block bottom-border="=" bottom-border-length="text" > + <xsl:value-of select="$text"/> + </block> + </xsl:when> + <xsl:when test="$level = 5"> + <block bottom-border="-" bottom-border-length="text"> + <xsl:value-of select="$text"/> + </block> + </xsl:when> + </xsl:choose> + </xsl:template> + + <xsl:template name="make-defaults"> + <block>:defaults:</block> + <xsl:for-each select="xsl:attribute"> + <block left-indent="5"> + <xsl:value-of select="@name"/> + <xsl:text>: </xsl:text> + <xsl:value-of select='.'/> + </block> + </xsl:for-each> + </xsl:template> + + <xsl:template name="make-defaults_old"> + <xsl:text>:defaults:</xsl:text> + <xsl:text>

</xsl:text> + <xsl:for-each select="xsl:attribute"> + <xsl:text> </xsl:text> + <xsl:value-of select="@name"/> + <xsl:text>: </xsl:text> + <xsl:value-of select="."/> + <xsl:text>

</xsl:text> + </xsl:for-each> + </xsl:template> + + <xsl:template name="before-desc"> + <xsl:param name="fo"/> + <xsl:param name="docutils"/> + <xsl:param name="inherits"/> + <xsl:call-template name="make-title"> + <xsl:with-param name="text" select="@name"/> + </xsl:call-template> + <block> + <xsl:text>:fo: </xsl:text> + <xsl:value-of select="$fo"/> + </block> + <block first-line-indent="-9"> + <xsl:text>:docutils: </xsl:text> + <xsl:value-of select="$docutils"/> + </block> + <!-- + <block literal="true"> + <xsl:text>

</xsl:text> + <xsl:text>:docutils: </xsl:text> + <xsl:value-of select="$docutils"/> + <xsl:text>

</xsl:text> + </block> + --> + <xsl:if test="$inherits != ''"> + <block> + <xsl:text>:inherits: </xsl:text> + <xsl:value-of select="$inherits"/> + </block> + </xsl:if> + <xsl:call-template name="make-defaults"/> + </xsl:template> + + <xsl:template name="make-name"> + <xsl:param name="name"/> + <xsl:call-template name="make-title"> + <xsl:with-param name="level">3</xsl:with-param> + <xsl:with-param name="text"> + <xsl:choose> + <xsl:when test="$name = ''"> + <xsl:value-of select="@name"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$name"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <xsl:template name="possible-values-recurs"> + <xsl:param name="text"/> + <xsl:param name="final-string">**Possible Values**: </xsl:param> + <xsl:variable name="value" select="normalize-space(substring-before($text, ','))"/> + <xsl:choose> + <xsl:when test="$value != ''"> + <xsl:call-template name="possible-values-recurs"> + <xsl:with-param name="text" select="substring-after($text, ',')"/> + <xsl:with-param name="final-string"> + <xsl:value-of select="$final-string"/> + <xsl:text>``</xsl:text> + <xsl:value-of select="$value"/> + <xsl:text>``, </xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="substring($final-string, 1, string-length($final-string) - 2)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="possible-values"> + <xsl:param name="text"/> + <xsl:choose> + <xsl:when test="$text = 'Any Measure' or $text = 'Any Text' or + $text = 'Valid Number Formatting String'"> + <block> + <xsl:text>**Possible Values**: </xsl:text> + <xsl:value-of select="$text"/> + </block> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="parsed-text"> + <xsl:choose> + <xsl:when test="substring($text, string-length($text), 1) = ','"> + <xsl:value-of select="$text"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$text"/> + <xsl:text>,</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <block> + <xsl:call-template name="possible-values-recurs"> + <xsl:with-param name="text" select="$parsed-text"/> + </xsl:call-template> + </block> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="xsl:param[@name='strict']" priority = "3"> + <xsl:call-template name="before_p_text"> + <xsl:with-param name="possible-values"> + <xsl:text>True, False, ''</xsl:text> + </xsl:with-param> + </xsl:call-template> + <block> + If set to True, stylesheet processing quits when an error is found. + </block> + </xsl:template> + + <xsl:template name="p-defaults"> + <block> + <xsl:text>**Default:** </xsl:text> + <xsl:value-of select="."/> + </block> + </xsl:template> + + <xsl:template name="before_p_text"> + <xsl:param name="possible-values"/> + <xsl:call-template name="make-name"/> + <xsl:call-template name="possible-values"> + <xsl:with-param name="text" select="$possible-values"/> + </xsl:call-template> + <xsl:call-template name="p-defaults"/> + </xsl:template> + + +</xsl:stylesheet> |
