Browse Source

replaced ant task with a xslt stylesheet (discovered that stylebook doesn't need the dtd)


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193570 13f79535-47bb-0310-9956-ffa450edef68
tags/pre-columns
fotis 24 years ago
parent
commit
b2d4aafa14
3 changed files with 44 additions and 21 deletions
  1. 9
    12
      docs/xml-docs/build.xml
  2. 9
    9
      docs/xml-docs/xml2pdf.xsl
  3. 26
    0
      docs/xml-docs/xml2xml.xsl

+ 9
- 12
docs/xml-docs/build.xml View File

@@ -23,38 +23,35 @@ These are the meaningful targets for this build file:
<tstamp/>

<property name="src.dir" value="./fop"/>
<property name="docfile.pdf" value="./fop.pdf"/>
<property name="allfiles.xml" value="fop-doc.xml"/>
<property name="stylesheet.xsl" value="xml2pdf.xsl"/>
<property name="outfile.fo" value="fop-doc.fo"/>
<property name="outfile.pdf" value="fop-doc.pdf"/>

<property name="xslt" value="org.apache.xalan.xslt.Process"/>
<property name="outfile.fo" value="fop.fo"/>
<property name="outfile.pdf" value="fop.pdf"/>

<taskdef name="fop" classname="Fop"/>
<taskdef name="collectDocFiles" classname="CollectDocFiles"/>
<taskdef name="xslt" classname="Xslt"/>

</target>

<!-- =================================================================== -->
<!-- compiles all xml files into one and removes the proprietary sbk protocol -->
<!-- copies all xml files into one. the infile is a dummy, because the -->
<!-- source files are defined in the stylesheet -->
<!-- =================================================================== -->
<target name="prepare-files" depends="init">
<collectDocFiles configFile="fop.xml" outFile="fop.pdf"/>
<xslt infile="fop.xml" xsltfile="xml2xml.xsl"
outfile="${allfiles.xml}" smart="yes"/>
</target>

<!-- =================================================================== -->
<!-- Generates the fo file -->
<!-- Generates the fo file -->
<!-- =================================================================== -->
<target name="fo" depends="prepare-files">
<xslt infile="${allfiles.xml}" xsltfile="${stylesheet.xsl}"
<xslt infile="${allfiles.xml}" xsltfile="xml2pdf.xsl"
outfile="${outfile.fo}" smart="yes"/>
</target>


<!-- =================================================================== -->
<!-- Generates the pdf file -->
<!-- Generates the pdf file -->
<!-- =================================================================== -->
<target name="pdf" depends="fo">
<fop fofile="${outfile.fo}" pdffile="${outfile.pdf}"/>

+ 9
- 9
docs/xml-docs/xml2pdf.xsl View File

@@ -73,7 +73,7 @@ TBD: - The faq doesn't show in the content
space-after.optimum="15pt"
background-color="blue"
color="white"
text-align="centered">
text-align="center">
FOP - an xsl:fo renderer
</fo:block>

@@ -133,7 +133,7 @@ TBD: - The faq doesn't show in the content
space-after.optimum="15pt"
background-color="blue"
color="white"
text-align="centered"
text-align="center"
>
<xsl:attribute name="id">
<xsl:value-of select="translate(.,' ),-.(','____')"/>
@@ -150,7 +150,7 @@ TBD: - The faq doesn't show in the content
line-height="20pt"
space-before.optimum="15pt"
space-after.optimum="12pt"
text-align="centered"
text-align="center"
padding-top="3pt"
>
<xsl:value-of select="@title"/>
@@ -165,7 +165,7 @@ TBD: - The faq doesn't show in the content
line-height="18pt"
space-before.optimum="10pt"
space-after.optimum="9pt"
text-align="centered"
text-align="center"
padding-top="3pt">
<xsl:value-of select="@title"/>
</fo:block>
@@ -179,7 +179,7 @@ TBD: - The faq doesn't show in the content
line-height="13pt"
space-after.optimum="3pt"
space-before.optimum="3pt"
text-align="justified">
text-align="justify">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
@@ -206,7 +206,7 @@ TBD: - The faq doesn't show in the content
space-after.optimum="15pt"
background-color="blue"
color="white"
text-align="centered"
text-align="center"
>
<xsl:attribute name="id">
<xsl:value-of select="translate(.,' ),-.(','____')"/>
@@ -229,7 +229,7 @@ TBD: - The faq doesn't show in the content
line-height="13pt"
space-after.optimum="3pt"
space-before.optimum="3pt"
text-align="justified">
text-align="justify">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
@@ -289,7 +289,7 @@ TBD: - The faq doesn't show in the content
</fo:list-item-label>
<fo:list-item-body>
<fo:block space-after.optimum="4pt"
text-align="justified"
text-align="justify"
padding-top="3pt">
<xsl:apply-templates/>
</fo:block>
@@ -308,7 +308,7 @@ TBD: - The faq doesn't show in the content
</fo:list-item-label>
<fo:list-item-body>
<fo:block space-after.optimum="4pt"
text-align="justified"
text-align="justify"
padding-top="3pt">
<xsl:apply-templates/>
</fo:block>

+ 26
- 0
docs/xml-docs/xml2xml.xsl View File

@@ -0,0 +1,26 @@
<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:template match ="/">
<documentation>
<xsl:copy-of select="document('fop/readme.xml')"/>
<xsl:copy-of select="document('fop/download.xml')"/>
<xsl:copy-of select="document('fop/running.xml')"/>
<xsl:copy-of select="document('fop/implemented.xml')"/>
<xsl:copy-of select="document('fop/limitations.xml')"/>
<xsl:copy-of select="document('fop/bugs.xml')"/>
<xsl:copy-of select="document('fop/examples.xml')"/>
<xsl:copy-of select="document('fop/compiling.xml')"/>
<xsl:copy-of select="document('fop/embedding.xml')"/>
<xsl:copy-of select="document('fop/involved.xml')"/>
<xsl:copy-of select="document('fop/architecture.xml')"/>
<xsl:copy-of select="document('fop/faq.xml')"/>
<xsl:copy-of select="document('fop/specs.xml')"/>
<xsl:copy-of select="document('fop/license.xml')"/>
</documentation>
</xsl:template>

</xsl:stylesheet>



Loading…
Cancel
Save