?? - XSL-FO XHTML - XHTML Advertisement - From Web to PDF
| |
TD.body {
PADDING-TOP: 25px;
PADDING-BOTTOM: 25px
}
TD.frame_top {
BORDER-WIDTH: 0pt;
BACKGROUND-COLOR: #707070;
WIDTH: 750px;
HEIGHT: 50px;
TEXT-ALIGN: center
}
TD.frame_left {
BORDER-WIDTH: 0pt;
BACKGROUND-COLOR: #707070;
WIDTH: 25px;
HEIGHT: 1px
}
TD.frame_center {
BORDER-WIDTH: 0pt;
BACKGROUND-COLOR: #707070;
WIDTH: 700px;
HEIGHT: 200px
}
TD.frame_right {
BORDER-WIDTH: 0pt;
BACKGROUND-COLOR: #707070;
WIDTH: 25px;
HEIGHT: 1px
}
TD.frame_bottom {
BORDER-WIDTH: 0pt;
BACKGROUND-COLOR: #707070;
WIDTH: 750px;
HEIGHT: 1px;
TEXT-ALIGN: center
}
TD.page_line {
WIDTH: 600px;
HEIGHT: 1px
}
UL {
MARGIN-TOP: 0pt;
MARGIN-BOTTOM: 0pt;
LIST-STYLE-TYPE: disc
}
The XSL Book with XSLT and XSL-FO Statements
Here is my XSL file, book_fo.xsl:
<?xml version="1.0"?>
<!-- book_fo.xsl
Absorb (c) 2002 by Dr. Yang
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="xml"/>
<xsl:preserve-space elements="html"/>
<xsl:template match="html">
<xsl:variable name="title"><xsl:value-of
select="head/meta/@title"/></xsl:variable>
<xsl:variable name="version"><xsl:value-of
select="head/meta/@version"/></xsl:variable>
<xsl:variable name="author"><xsl:value-of
select="head/meta/@author"/></xsl:variable>
<xsl:variable name="copyright"><xsl:value-of
select="head/meta/@copyright"/></xsl:variable>
<xsl:variable name="pagetitle"><xsl:value-of
select="head/meta/@pagetitle"/></xsl:variable>
<xsl:variable name="date"><xsl:value-of
select="head/meta/@date"/></xsl:variable>
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="page"
margin-left="1.2in" margin-right="0.8in"
margin-top="0.8in" margin-bottom="0.8in">
<fo:region-before region-name="header" extent="0.25in"
background-color="#ffffff"/>
<fo:region-after region-name="footer" extent="0.4in"
background-color="#ffffff"/>
<fo:region-body region-name="body"
margin-top="0.35in" margin-bottom="0.5in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="page">
<fo:static-content flow-name="header"
font-family="sans-serif" font-size="12pt" font-style="normal">
<fo:block border-bottom-width="1px" border-bottom-style="solid">
<fo:list-block>
<fo:list-item>
<fo:list-item-label>
<fo:block font-weight="normal" text-align="start">
<xsl:value-of select="$pagetitle"/>
</fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block font-weight="normal" text-align="end">
<fo:page-number/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:block>
</fo:static-content>
<fo:static-content flow-name="footer"
font-family="sans-serif" font-size="10pt" font-style="normal">
<fo:block border-top-width="1px" border-top-style="solid"
text-align="start">
<fo:list-block>
<fo:list-item>
<fo:list-item-label>
<fo:block font-weight="bold" text-align="start">
<xsl:value-of select="$title"/>
</fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block font-weight="normal" text-align="end">
by <xsl:value-of select="$author"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item>
<fo:list-item-label>
<fo:block font-weight="normal" text-align="start">
<xsl:value-of select="$version"/>,
adapted on <xsl:value-of select="$date"/>
</fo:block>
</fo:list-item-label>
|
block, width, variable, select, value, border, align, margin, color, background, normal, label, master, region, height, frame, weight, style, xhtml, start, version, static, content, , < xsl, list item, xsl variable, xsl value, block <, text align, background color, head meta, item label, variable name, select head, variable <, width 0pt, 0pt background, label <, block font, font weight, color 707070, item <, border width, 707070 width, normal text, align start, start <, item body, weight normal, margin top, region name, static content, list block, margin bottom, xsl variable name, list item label, select head meta, color 707070 width, background color 707070, 0pt background color, block font weight, font weight normal, list item body, normal text align, text align start, weight normal text, family sans serif, sans serif font, serif font size, font style normal, font family sans, simple page master, text align center}td, 707070 width 25px, width 750px height, 707070 width 750px, xhtml publication from, width 25px height, 25px height 1px}td, static content flow, background color ffffff, xhtml xhtml publication, height 1px}td frame, content flow name, |
Also see ...
<fo:list item body <fo:block font weight="normal" text align="end" </fo:block </fo:list item body </fo:list item </fo:list block </fo:block </fo
?o XSL FOXSL FO?? XML ???U?L??? XML ????U?XSL FO ? TeX ?? TeX ?j????U??XSL FO ???XSL FO XML ??XSL
XSL FO lU .txt l???? hello.fo U? .txt ?? run_fop fo hello.fo txt hello.txtoµ? Using org.apache.xerces.parsers.SAXParser as S
XSL FO Archetype simple_page.foLet s administer what we accept abstruse so far to make a simple XSL FO examplefile to allegorize how to handle some basal formatting appearance like: page margin,
XSL FO Book StructureSince XSL FO files are accounting in XML, all statements are organized into an XML tree structure. Actuality is the syntax of the top akin of the tree:<f
Page Amount References"page number": An XSL FO aspect confined as a data capricious to accredit tothe accepted page number. It is actual advantageous for bearing active page numberin
XSL FO Archetype complex_page.foLet s administer what we accept abstruse so far to make a added circuitous XSL FO examplefile to allegorize how to handle some avant garde formatting appearance like: b