Переглянути джерело

AHS: fo:marker examples


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194375 13f79535-47bb-0310-9956-ffa450edef68
tags/PRE_CODEFORMATTING
arved 23 роки тому
джерело
коміт
371b68da40
2 змінених файлів з 389 додано та 0 видалено
  1. 314
    0
      docs/examples/markers/glossary.xml
  2. 75
    0
      docs/examples/markers/glossary.xsl

+ 314
- 0
docs/examples/markers/glossary.xml Переглянути файл

@@ -0,0 +1,314 @@
<?xml version="1.0"?>
<glossary>
<term-entry>
<term>basic-link</term>
<definition>The fo:basic-link is used for representing the start resource
of a simple link.</definition>
</term-entry>
<term-entry>
<term>bidi-override</term>
<definition>The fo:bidi-override inline formatting object is used where
it is necessary to override the default Unicode-bidirectionality
algorithm direction for different (or nested) inline scripts in
mixed-language documents.</definition>
</term-entry>
<term-entry>
<term>block</term>
<definition>The fo:block formatting object is commonly used for formatting
paragraphs, titles, headlines, figure and table captions, etc.</definition>
</term-entry>
<term-entry>
<term>block-container</term>
<definition>The fo:block-container flow object is used to generate a
block-level reference-area.</definition>
</term-entry>
<term-entry>
<term>character</term>
<definition>The fo:character flow object represents a character that is
mapped to a glyph for presentation.</definition>
</term-entry>
<term-entry>
<term>color-profile</term>
<definition>Used to declare a color profile for a stylesheet.</definition>
</term-entry>
<term-entry>
<term>conditional-page-master-reference</term>
<definition>The fo:conditional-page-master-reference
is used to identify a page-master that is to be used when the conditions
on its use are satisfied.</definition>
</term-entry>
<term-entry>
<term>declarations</term>
<definition>Used to group global declarations for a stylesheet.</definition>
</term-entry>
<term-entry>
<term>external-graphic</term>
<definition>The fo:external-graphic flow object is used for a graphic
where the graphics data resides outside of the XML result tree in the
fo namespace.</definition>
</term-entry>
<term-entry>
<term>float</term>
<definition>The fo:float serves two purposes. It can be used so that during the
normal placement of content, some related content is formatted into a
separate area at beginning of the page (or of some following page) where
it is available to be read without immediately intruding on the reader.
Alternatively, it can be used when an area is intended to float to one
side, with normal content flowing alongside.</definition>
</term-entry>
<term-entry>
<term>flow</term>
<definition>The content of the fo:flow formatting object is a sequence
of flow objects that provides the flowing text content that is distributed
into pages.</definition>
</term-entry>
<term-entry>
<term>footnote</term>
<definition>The fo:footnote is used to produce a footnote citation and the
corresponding footnote.</definition>
</term-entry>
<term-entry>
<term>footnote-body</term>
<definition>The fo:footnote-body is used to generate the content of the
footnote.</definition>
</term-entry>
<term-entry>
<term>initial-property-set</term>
<definition>The fo:initial-property-set specifies formatting properties
for the first line of an fo:block.</definition>
</term-entry>
<term-entry>
<term>inline</term>
<definition>The fo:inline formatting object is commonly used for
formatting a portion of text with a background or enclosing it in a
border.</definition>
</term-entry>
<term-entry>
<term>inline-container</term>
<definition>The fo:inline-container flow object is used to generate an
inline reference-area.</definition>
</term-entry>
<term-entry>
<term>instream-foreign-object</term>
<definition>The fo:instream-foreign-object flow object is used for an
inline graphic or other "generic" object where the object data resides
as descendants of the fo:instream-foreign-object.</definition>
</term-entry>
<term-entry>
<term>layout-master-set</term>
<definition>The fo:layout-master-set is a wrapper around all masters used
in the document.</definition>
</term-entry>
<term-entry>
<term>leader</term>
<definition>The fo:leader formatting object is used to generate leaders
consisting either of a rule or of a row of a repeating character or
cyclically repeating pattern of characters that may be used for connecting
two text formatting objects.</definition>
</term-entry>
<term-entry>
<term>list-block</term>
<definition>The fo:list-block flow object is used to format a list.</definition>
</term-entry>
<term-entry>
<term>list-item</term>
<definition>The fo:list-item formatting object contains the label and the
body of an item in a list.</definition>
</term-entry>
<term-entry>
<term>list-item-body</term>
<definition>The fo:list-item-body formatting object contains the content
of the body of a list-item.</definition>
</term-entry>
<term-entry>
<term>list-item-label</term>
<definition>The fo:list-item-label formatting object contains the content
of the label of a list-item; typically used to either enumerate, identify,
or adorn the list-item's body.</definition>
</term-entry>
<term-entry>
<term>marker</term>
<definition>The fo:marker is used in conjunction with fo:retrieve-marker
to produce running headers or footers.</definition>
</term-entry>
<term-entry>
<term>multi-case</term>
<definition>The fo:multi-case is used to contain (within an fo:multi-switch)
each alternative sub-tree of formatting objects among which the parent
fo:multi-switch will choose one to show and will hide the rest.</definition>
</term-entry>
<term-entry>
<term>multi-properties</term>
<definition>The fo:multi-properties is used to switch between two or more
property sets that are associated with a given portion of content.</definition>
</term-entry>
<term-entry>
<term>multi-property-set</term>
<definition>The fo:multi-property-set is used to specify an alternative
set of formatting properties that, dependent on a User Agent state, are
applied to the content. </definition>
</term-entry>
<term-entry>
<term>multi-switch</term>
<definition>The fo:multi-switch wraps the specification of alternative
sub-trees of formatting objects (each sub-tree being within an
fo:multi-case), and controls the switching (activated via fo:multi-toggle)
from one alternative to another. </definition>
</term-entry>
<term-entry>
<term>multi-toggle</term>
<definition>The fo:multi-toggle is used within an fo:multi-case to switch
to another fo:multi-case.</definition>
</term-entry>
<term-entry>
<term>page-number</term>
<definition>The fo:page-number formatting object is used to represent the
current page-number.</definition>
</term-entry>
<term-entry>
<term>page-number-citation</term>
<definition>The fo:page-number-citation is used to reference the
page-number for the page containing the first normal area returned by the
cited formatting object.</definition>
</term-entry>
<term-entry>
<term>page-sequence</term>
<definition>The fo:page-sequence formatting object is used to specify how
to create a (sub-)sequence of pages within a document; for example, a
chapter of a report. The content of these pages comes from flow children
of the fo:page-sequence.</definition>
</term-entry>
<term-entry>
<term>page-sequence-master</term>
<definition>The fo:page-sequence-master specifies sequences of page-masters
that are used when generating a sequence of pages.</definition>
</term-entry>
<term-entry>
<term>region-after</term>
<definition>This region defines a viewport that is located on the "after"
side of fo:region-body region. </definition>
</term-entry>
<term-entry>
<term>region-before</term>
<definition>This region defines a viewport that is located on the "before"
side of fo:region-body region.</definition>
</term-entry>
<term-entry>
<term>region-body</term>
<definition>This region specifies a viewport/reference pair that is located
in the "center" of the fo:simple-page-master.</definition>
</term-entry>
<term-entry>
<term>region-end</term>
<definition>This region defines a viewport that is located on the "end"
side of fo:region-body region.</definition>
</term-entry>
<term-entry>
<term>region-start</term>
<definition>This region defines a viewport that is located on the "start"
side of fo:region-body region.</definition>
</term-entry>
<term-entry>
<term>repeatable-page-master-alternatives</term>
<definition>An fo:repeatable-page-master-alternatives specifies a
sub-sequence consisting of repeated instances of a set of alternative
page-masters. The number of repetitions may be bounded or potentially
unbounded.</definition>
</term-entry>
<term-entry>
<term>repeatable-page-master-reference</term>
<definition>An fo:repeatable-page-master-reference specifies a sub-sequence
consisting of repeated instances of a single page-master. The number of
repetitions may be bounded or potentially unbounded.</definition>
</term-entry>
<term-entry>
<term>retrieve-marker</term>
<definition>The fo:retrieve-marker is used in conjunction with fo:marker
to produce running headers or footers.</definition>
</term-entry>
<term-entry>
<term>root</term>
<definition>The fo:root node is the top node of an XSL result tree. This
tree is composed of formatting objects.</definition>
</term-entry>
<term-entry>
<term>simple-page-master</term>
<definition>The fo:simple-page-master is used in the generation of pages
and specifies the geometry of the page. The page may be subdivided into
up to five regions.</definition>
</term-entry>
<term-entry>
<term>single-page-master-reference</term>
<definition>An fo:single-page-master-reference specifies a sub-sequence
consisting of a single instance of a single page-master.</definition>
</term-entry>
<term-entry>
<term>static-content</term>
<definition>The fo:static-content formatting object holds a sequence or a
tree of formatting objects that is to be presented in a single region or
repeated in like-named regions on one or more pages in the page-sequence.
Its common use is for repeating or running headers and footers.</definition>
</term-entry>
<term-entry>
<term>table</term>
<definition>The fo:table flow object is used for formatting the tabular
material of a table.</definition>
</term-entry>
<term-entry>
<term>table-and-caption</term>
<definition>The fo:table-and-caption flow object is used for formatting a
table together with its caption.</definition>
</term-entry>
<term-entry>
<term>table-body</term>
<definition>The fo:table-body formatting object is used to contain the
content of the table body.</definition>
</term-entry>
<term-entry>
<term>table-caption</term>
<definition>The fo:table-caption formatting object is used to contain
block-level formatting objects containing the caption for the table only
when using the fo:table-and-caption.</definition>
</term-entry>
<term-entry>
<term>table-cell</term>
<definition>The fo:table-cell formatting object is used to group content to
be placed in a table cell.</definition>
</term-entry>
<term-entry>
<term>table-column</term>
<definition>The fo:table-column formatting object specifies characteristics
applicable to table cells that have the same column and span.</definition>
</term-entry>
<term-entry>
<term>table-footer</term>
<definition>The fo:table-footer formatting object is used to contain the
content of the table footer.</definition>
</term-entry>
<term-entry>
<term>table-header</term>
<definition>The fo:table-header formatting object is used to contain the
content of the table header.</definition>
</term-entry>
<term-entry>
<term>table-row</term>
<definition>The fo:table-row formatting object is used to group table-cells
into rows.</definition>
</term-entry>
<term-entry>
<term>title</term>
<definition>The fo:title formatting object is used to associate a title with
a given document. This title may be used by an interactive User Agent to
identify the document. For example, the content of the fo:title can be
formatted and displayed in a "title" window or in a "tool tip".</definition>
</term-entry>
<term-entry>
<term>wrapper </term>
<definition>The fo:wrapper formatting object is used to specify inherited
properties for a group of formatting objects. It has no additional
formatting semantics.</definition>
</term-entry>
</glossary>




+ 75
- 0
docs/examples/markers/glossary.xsl Переглянути файл

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<xsl:template match="glossary">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

<fo:layout-master-set>

<fo:simple-page-master master-name="all"
page-height="11.5in" page-width="8.5in"
margin-top="1in" margin-bottom="1in"
margin-left="0.75in" margin-right="0.75in">
<fo:region-body margin-top="1in" margin-bottom="0.75in"/>
<fo:region-before extent="0.75in"/>
<fo:region-after extent="0.5in"/>
</fo:simple-page-master>

</fo:layout-master-set>

<fo:page-sequence master-name="all" format="i">

<!-- header with running glossary entries -->
<fo:static-content flow-name="xsl-region-before">
<fo:block text-align="start"
font-size="10pt" font-family="serif" line-height="1em + 2pt">
<fo:retrieve-marker retrieve-class-name="term"
retrieve-boundary="page"
retrieve-position="first-starting-within-page"/>
<fo:leader leader-alignment="reference-area" leader-pattern="dots"
leader-length="4in"/>
<fo:retrieve-marker retrieve-class-name="term"
retrieve-boundary="page"
retrieve-position="last-ending-within-page"/>
</fo:block>
</fo:static-content>

<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="start"
font-size="10pt" font-family="serif" line-height="1em + 2pt">
Page (<fo:page-number/>)
</fo:block>
</fo:static-content>

<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates select="term-entry"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>

<xsl:template match="term-entry">
<fo:block text-align="start" font-size="12pt" font-family="sans-serif">
<xsl:apply-templates select="term"/>
<xsl:apply-templates select="definition"/>
</fo:block>
</xsl:template>

<xsl:template match="term">
<fo:block color="blue" space-before.optimum="3pt"><fo:marker
marker-class-name="term"><xsl:value-of select="."/></fo:marker>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>

<xsl:template match="definition">
<fo:block text-align="start" start-indent="2em">
<xsl:value-of select="."/>
</fo:block>
</xsl:template>

</xsl:stylesheet>


Завантаження…
Відмінити
Зберегти