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"?>
<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 name="fo-cover">
<fo:page-sequence master-reference="cover-page">
<fo:flow flow-name="xsl-region-body">
<fo:block xsl:use-attribute-sets="body.title"
text-align="end">
<xsl:value-of select="$coverProjectName"/> v.<xsl:value-of select="$coverVersion"/>
</fo:block>
<fo:block xsl:use-attribute-sets="body.h1"
text-align="end" space-before="24pt" space-after="36pt">
<xsl:value-of select="$coverProjectCompany"/>
</fo:block>
<fo:block xsl:use-attribute-sets="body.h1"
text-align="end">
<xsl:value-of select="$coverType"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</xsl:template>
<?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 name="fo-cover">
<fo:page-sequence master-reference="cover-page">
<fo:flow flow-name="xsl-region-body">
<fo:block xsl:use-attribute-sets="body.title" text-align="end">
<xsl:value-of select="$coverProjectName"/> v.<xsl:value-of select="$coverVersion"/>
</fo:block>
<fo:block xsl:use-attribute-sets="body.h1" text-align="end" space-before="24pt" space-after="36pt">
<xsl:value-of select="$coverProjectCompany"/>
</fo:block>
<fo:block xsl:use-attribute-sets="body.h1" text-align="end">
<xsl:value-of select="$coverType"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,73 +1,38 @@
<?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'>
<!-- Set the default page width, in inches -->
<xsl:variable name="pageWidth">
<xsl:choose>
<xsl:when test="$paperType = 'US'">8.5</xsl:when>
<xsl:when test="$paperType = 'A4'">8.25</xsl:when>
<xsl:otherwise>8.5</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Set the default page height, in inches -->
<xsl:variable name="pageHeight">11</xsl:variable>
<!-- Set the default left and right margin, in inches -->
<xsl:variable name="bodySideMargins">1</xsl:variable>
<xsl:variable name="maxBodyWidth" select="$pageWidth - (2 * $bodySideMargins)"/>
<xsl:variable name="maxTableWidth" select="$maxBodyWidth"/>
<xsl:template name="fo-layouts">
<!-- Defines the layout set -->
<fo:layout-master-set>
<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"/>
</fo:simple-page-master>
<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>
<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>
<?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">
<!-- Set the default page width, in inches -->
<xsl:variable name="pageWidth">
<xsl:choose>
<xsl:when test="$paperType = 'US'">8.5</xsl:when>
<xsl:when test="$paperType = 'A4'">8.25</xsl:when>
<xsl:otherwise>8.5</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Set the default page height, in inches -->
<xsl:variable name="pageHeight">11</xsl:variable>
<!-- Set the default left and right margin, in inches -->
<xsl:variable name="bodySideMargins">1</xsl:variable>
<xsl:variable name="maxBodyWidth" select="$pageWidth - (2 * $bodySideMargins)"/>
<xsl:variable name="maxTableWidth" select="$maxBodyWidth"/>
<xsl:template name="fo-layouts">
<!-- Defines the layout set -->
<fo:layout-master-set>
<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"/>
</fo:simple-page-master>
<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>
<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>

View File

@ -228,7 +228,6 @@
</xsl:when>
</xsl:choose>
</xsl:template>
<!-- Calculate column widths for tables without thead -->
<xsl:template name="html-calculate-column-widths">
<xsl:param name="row">1</xsl:param>
@ -369,5 +368,4 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</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="documentName" select="substring-before( @href, '.html' )"/>
<xsl:variable name="documentPath" select="concat($basePath, $documentName, '.xml')"/>
<xsl:if test="normalize-space(@href)">
<xsl:if test="$debug = 'true'">
<xsl:message>Creating XSL:FO for <xsl:value-of select="$documentPath"/>
</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 test="normalize-space(@href)">
<xsl:if test="$debug = 'true'">
<xsl:message>Creating XSL:FO for <xsl:value-of select="$documentPath"/>
</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:template>
</xsl:stylesheet>

View File

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