From Arnaud Heritier :

- XML reformatting


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114608 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
evenisse 2004-01-26 05:55:44 +00:00
parent 00f8e33f37
commit 533f53d097
9 changed files with 4827 additions and 726 deletions

View File

@ -1,24 +1,18 @@
<?xml version='1.0' encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
xmlns:fo="http://www.w3.org/1999/XSL/Format" version='1.0'> <xsl:template name="fo-cover">
<fo:page-sequence master-reference="cover-page">
<xsl:template name="fo-cover"> <fo:flow flow-name="xsl-region-body">
<fo:page-sequence master-reference="cover-page"> <fo:block xsl:use-attribute-sets="body.title" text-align="end">
<fo:flow flow-name="xsl-region-body"> <xsl:value-of select="$coverProjectName"/> v.<xsl:value-of select="$coverVersion"/>
<fo:block xsl:use-attribute-sets="body.title" </fo:block>
text-align="end"> <fo:block xsl:use-attribute-sets="body.h1" text-align="end" space-before="24pt" space-after="36pt">
<xsl:value-of select="$coverProjectName"/> v.<xsl:value-of select="$coverVersion"/> <xsl:value-of select="$coverProjectCompany"/>
</fo:block> </fo:block>
<fo:block xsl:use-attribute-sets="body.h1" <fo:block xsl:use-attribute-sets="body.h1" text-align="end">
text-align="end" space-before="24pt" space-after="36pt"> <xsl:value-of select="$coverType"/>
<xsl:value-of select="$coverProjectCompany"/> </fo:block>
</fo:block> </fo:flow>
<fo:block xsl:use-attribute-sets="body.h1" </fo:page-sequence>
text-align="end"> </xsl:template>
<xsl:value-of select="$coverType"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -1,73 +1,38 @@
<?xml version='1.0' encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
xmlns:fo="http://www.w3.org/1999/XSL/Format" version='1.0'> <!-- Set the default page width, in inches -->
<xsl:variable name="pageWidth">
<!-- Set the default page width, in inches --> <xsl:choose>
<xsl:variable name="pageWidth"> <xsl:when test="$paperType = 'US'">8.5</xsl:when>
<xsl:choose> <xsl:when test="$paperType = 'A4'">8.25</xsl:when>
<xsl:when test="$paperType = 'US'">8.5</xsl:when> <xsl:otherwise>8.5</xsl:otherwise>
<xsl:when test="$paperType = 'A4'">8.25</xsl:when> </xsl:choose>
<xsl:otherwise>8.5</xsl:otherwise> </xsl:variable>
</xsl:choose> <!-- Set the default page height, in inches -->
</xsl:variable> <xsl:variable name="pageHeight">11</xsl:variable>
<!-- Set the default page height, in inches --> <!-- Set the default left and right margin, in inches -->
<xsl:variable name="pageHeight">11</xsl:variable> <xsl:variable name="bodySideMargins">1</xsl:variable>
<!-- Set the default left and right margin, in inches --> <xsl:variable name="maxBodyWidth" select="$pageWidth - (2 * $bodySideMargins)"/>
<xsl:variable name="bodySideMargins">1</xsl:variable> <xsl:variable name="maxTableWidth" select="$maxBodyWidth"/>
<xsl:variable name="maxBodyWidth" select="$pageWidth - (2 * $bodySideMargins)"/> <xsl:template name="fo-layouts">
<xsl:variable name="maxTableWidth" select="$maxBodyWidth"/> <!-- Defines the layout set -->
<fo:layout-master-set>
<xsl:template name="fo-layouts"> <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}in" page-height="{$pageHeight}in" margin-top="0.2in" margin-bottom="0.2in" margin-left="0.4in" margin-right="0.2in">
<fo:region-body margin-top="4.72in"/>
<!-- Defines the layout set --> </fo:simple-page-master>
<fo:layout-master-set> <fo:simple-page-master master-name="cover-inside" page-width="{$pageWidth}in" page-height="{$pageHeight}in" margin-top="0in" margin-bottom="0in" margin-left="0in" margin-right="0in">
<fo:region-body margin-top="0in"/>
<fo:simple-page-master master-name="cover-page" </fo:simple-page-master>
page-width="{$pageWidth}in" <fo:simple-page-master master-name="toc" page-width="{$pageWidth}in" page-height="{$pageHeight}in" margin-top="0.625in" margin-bottom="0.6in" margin-left="{$bodySideMargins}in" margin-right="{$bodySideMargins}in">
page-height="{$pageHeight}in" <fo:region-before extent="0.35in"/>
margin-top="0.2in" <fo:region-body margin-top="0.7in" margin-bottom="0.8in"/>
margin-bottom="0.2in" <fo:region-after extent="0.125in"/>
margin-left="0.4in" </fo:simple-page-master>
margin-right="0.2in"> <fo:simple-page-master master-name="body" page-width="{$pageWidth}in" page-height="{$pageHeight}in" margin-top="0.625in" margin-bottom="0.6in" margin-left="{$bodySideMargins}in" margin-right="{$bodySideMargins}in">
<fo:region-body margin-top="4.72in"/> <fo:region-before extent="0.35in"/>
</fo:simple-page-master> <fo:region-body margin-top="0.7in" margin-bottom="0.8in"/>
<fo:region-after extent="0.125in"/>
<fo:simple-page-master master-name="cover-inside" </fo:simple-page-master>
page-width="{$pageWidth}in" </fo:layout-master-set>
page-height="{$pageHeight}in" </xsl:template>
margin-top="0in"
margin-bottom="0in"
margin-left="0in"
margin-right="0in">
<fo:region-body margin-top="0in"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="toc"
page-width="{$pageWidth}in"
page-height="{$pageHeight}in"
margin-top="0.625in"
margin-bottom="0.6in"
margin-left="{$bodySideMargins}in"
margin-right="{$bodySideMargins}in">
<fo:region-before extent="0.35in"/>
<fo:region-body margin-top="0.7in" margin-bottom="0.8in"/>
<fo:region-after extent="0.125in"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="body"
page-width="{$pageWidth}in"
page-height="{$pageHeight}in"
margin-top="0.625in"
margin-bottom="0.6in"
margin-left="{$bodySideMargins}in"
margin-right="{$bodySideMargins}in">
<fo:region-before extent="0.35in"/>
<fo:region-body margin-top="0.7in" margin-bottom="0.8in"/>
<fo:region-after extent="0.125in"/>
</fo:simple-page-master>
</fo:layout-master-set>
</xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -228,7 +228,6 @@
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<!-- Calculate column widths for tables without thead --> <!-- Calculate column widths for tables without thead -->
<xsl:template name="html-calculate-column-widths"> <xsl:template name="html-calculate-column-widths">
<xsl:param name="row">1</xsl:param> <xsl:param name="row">1</xsl:param>
@ -369,5 +368,4 @@
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -114,46 +114,48 @@
<xsl:variable name="href" select="@href"/> <xsl:variable name="href" select="@href"/>
<xsl:variable name="documentName" select="substring-before( @href, '.html' )"/> <xsl:variable name="documentName" select="substring-before( @href, '.html' )"/>
<xsl:variable name="documentPath" select="concat($basePath, $documentName, '.xml')"/> <xsl:variable name="documentPath" select="concat($basePath, $documentName, '.xml')"/>
<xsl:if test="normalize-space(@href)"> <xsl:if test="normalize-space(@href)">
<xsl:if test="$debug = 'true'"> <xsl:if test="$debug = 'true'">
<xsl:message>Creating XSL:FO for <xsl:value-of select="$documentPath"/> <xsl:message>Creating XSL:FO for <xsl:value-of select="$documentPath"/>
</xsl:message> </xsl:message>
</xsl:if>
<fo:page-sequence master-reference="body" initial-page-number="{$pageStart}">
<!-- Render the header and footer -->
<xsl:call-template name="body-header">
<xsl:with-param name="headerText" select="concat($chapterNumber, ' ', translate(@name, $lc, $uc))"/>
</xsl:call-template>
<xsl:call-template name="body-footer">
<xsl:with-param name="footerText" select="translate($footerText, $lc, $uc)"/>
</xsl:call-template>
<fo:flow flow-name="xsl-region-body">
<!-- Render the chapter heading -->
<xsl:call-template name="body-chapter-heading">
<xsl:with-param name="chapterNumber">
<xsl:value-of select="$chapterNumber"/>
</xsl:with-param>
<xsl:with-param name="chapter">
<xsl:value-of select="@name"/>
</xsl:with-param>
</xsl:call-template>
<!-- Render the associated xdoc -->
<fo:block id="{@href}{generate-id()}">
<xsl:if test="not(starts-with($href, 'http'))">
<xsl:apply-templates select="document($documentPath)/document/body">
<xsl:with-param name="chapterNumber">
<xsl:value-of select="$chapterNumber"/>
</xsl:with-param>
</xsl:apply-templates>
</xsl:if>
<xsl:if test="starts-with($href, 'http')">
<fo:basic-link external-destination="{@href}">
<fo:inline xsl:use-attribute-sets="href"><xsl:value-of select="$href"/></fo:inline>
</fo:basic-link>
</xsl:if>
</fo:block>
</fo:flow>
</fo:page-sequence>
</xsl:if> </xsl:if>
<fo:page-sequence master-reference="body" initial-page-number="{$pageStart}">
<!-- Render the header and footer -->
<xsl:call-template name="body-header">
<xsl:with-param name="headerText" select="concat($chapterNumber, ' ', translate(@name, $lc, $uc))"/>
</xsl:call-template>
<xsl:call-template name="body-footer">
<xsl:with-param name="footerText" select="translate($footerText, $lc, $uc)"/>
</xsl:call-template>
<fo:flow flow-name="xsl-region-body">
<!-- Render the chapter heading -->
<xsl:call-template name="body-chapter-heading">
<xsl:with-param name="chapterNumber">
<xsl:value-of select="$chapterNumber"/>
</xsl:with-param>
<xsl:with-param name="chapter">
<xsl:value-of select="@name"/>
</xsl:with-param>
</xsl:call-template>
<!-- Render the associated xdoc -->
<fo:block id="{@href}{generate-id()}">
<xsl:if test="not(starts-with($href, 'http'))">
<xsl:apply-templates select="document($documentPath)/document/body">
<xsl:with-param name="chapterNumber">
<xsl:value-of select="$chapterNumber"/>
</xsl:with-param>
</xsl:apply-templates>
</xsl:if>
<xsl:if test="starts-with($href, 'http')">
<fo:basic-link external-destination="{@href}">
<fo:inline xsl:use-attribute-sets="href">
<xsl:value-of select="$href"/>
</fo:inline>
</fo:basic-link>
</xsl:if>
</fo:block>
</fo:flow>
</fo:page-sequence>
</xsl:if>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -6,67 +6,54 @@
always use this file and *not* config.xml. always use this file and *not* config.xml.
Usage: java org.apache.fop.apps.Fop -c userconfig.xml -fo fo-file -pdf pdf-file Usage: java org.apache.fop.apps.Fop -c userconfig.xml -fo fo-file -pdf pdf-file
--> -->
<configuration> <configuration>
<!-- NOT IMPLEMENTED
<!-- NOT IMPLEMENTED
basedir: normally the base directory is the directory where the fo file is basedir: normally the base directory is the directory where the fo file is
located. if you want to specify your own, uncomment this entry located. if you want to specify your own, uncomment this entry
--> -->
<!-- <!--
<entry> <entry>
<key>baseDir</key> <key>baseDir</key>
<value></value> <value></value>
</entry> </entry>
--> -->
<!--
<!--
************************************************************************ ************************************************************************
HYPHENATION HYPHENATION
************************************************************************ ************************************************************************
--> -->
<!--
<!--
hyphenation directory hyphenation directory
if you want to specify your own directory with hyphenation pattern if you want to specify your own directory with hyphenation pattern
then uncomment the next entry and add the directory name then uncomment the next entry and add the directory name
--> -->
<!--
<!--
<entry> <entry>
<key>hyphenation-dir</key> <key>hyphenation-dir</key>
<value>/java/xml-fop/hyph</value> <value>/java/xml-fop/hyph</value>
</entry> </entry>
--> -->
<!--
<!--
************************************************************************ ************************************************************************
Add fonts here Add fonts here
************************************************************************ ************************************************************************
--> -->
<fonts>
<fonts> <font metrics-file="fonts/ttf-gara.xml" kerning="yes" embed-file="fonts/gara.ttf">
<font metrics-file="fonts/ttf-gara.xml" kerning="yes" embed-file="fonts/gara.ttf"> <font-triplet name="Garamond" style="normal" weight="normal"/>
<font-triplet name="Garamond" style="normal" weight="normal"/> </font>
</font> <font metrics-file="fonts/ttf-garabd.xml" kerning="yes" embed-file="fonts/garabd.ttf">
<font metrics-file="fonts/ttf-garabd.xml" kerning="yes" embed-file="fonts/garabd.ttf"> <font-triplet name="Garamond" style="normal" weight="bold"/>
<font-triplet name="Garamond" style="normal" weight="bold"/> </font>
</font> <font metrics-file="fonts/ttf-garait.xml" kerning="yes" embed-file="fonts/garait.ttf">
<font metrics-file="fonts/ttf-garait.xml" kerning="yes" embed-file="fonts/garait.ttf"> <font-triplet name="Garamond" style="italic" weight="normal"/>
<font-triplet name="Garamond" style="italic" weight="normal"/> </font>
</font> <!-- example -->
<!-- example --> <!--
<!--
<font metrics-file="arial.xml" kerning="yes" embed-file="arial.ttf"> <font metrics-file="arial.xml" kerning="yes" embed-file="arial.ttf">
<font-triplet name="Arial" style="normal" weight="normal"/> <font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="ArialMT" style="normal" weight="normal"/> <font-triplet name="ArialMT" style="normal" weight="normal"/>
</font> </font>
--> -->
</fonts> </fonts>
</configuration> </configuration>