Browse Source

updated to latest cvs


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195732 13f79535-47bb-0310-9956-ffa450edef68
tags/Alt-Design-integration-base
Keiron Liddle 21 years ago
parent
commit
8f52de9da2
2 changed files with 27 additions and 154 deletions
  1. 18
    19
      src/documentation/cocoon.diff
  2. 9
    135
      src/documentation/forrest.diff

+ 18
- 19
src/documentation/cocoon.diff View File

@@ -1,11 +1,11 @@
Index: src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java,v
retrieving revision 1.3
diff -u -r1.3 FOPSerializer.java
--- src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java 23 Sep 2002 03:30:44 -0000 1.3
+++ src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java 20 Nov 2002 07:53:48 -0000
@@ -62,18 +62,28 @@
retrieving revision 1.4
diff -u -r1.4 FOPSerializer.java
--- src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java 21 Nov 2002 18:18:48 -0000 1.4
+++ src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java 5 Dec 2002 09:21:13 -0000
@@ -63,18 +63,28 @@
import org.apache.cocoon.components.url.URLFactory;
import org.apache.cocoon.util.ClassUtils;
import org.apache.cocoon.environment.URLFactorySourceResolver;
@@ -38,7 +38,7 @@ diff -u -r1.3 FOPSerializer.java
import java.net.MalformedURLException;
/**
@@ -83,7 +93,7 @@
@@ -84,7 +94,7 @@
*/
public class FOPSerializer
extends AbstractSerializer
@@ -47,7 +47,7 @@ diff -u -r1.3 FOPSerializer.java
/**
* The Renderer Factory to use
@@ -96,6 +106,11 @@
@@ -97,6 +107,11 @@
protected Driver driver;
/**
@@ -59,7 +59,7 @@ diff -u -r1.3 FOPSerializer.java
* The current <code>Renderer</code>.
*/
protected Renderer renderer;
@@ -144,24 +159,6 @@
@@ -145,24 +160,6 @@
public void configure(Configuration conf) throws ConfigurationException {
this.logger = getLogger().getChildLogger("fop");
@@ -84,7 +84,7 @@ diff -u -r1.3 FOPSerializer.java
this.setContentLength = conf.getChild("set-content-length").getValueAsBoolean(true);
@@ -179,28 +176,6 @@
@@ -180,28 +177,6 @@
// New syntax: Element user-config contains URL
configUrl = conf.getChild("user-config").getValue(null);
}
@@ -113,7 +113,7 @@ diff -u -r1.3 FOPSerializer.java
// Get the mime type.
this.mimetype = conf.getAttribute("mime-type");
@@ -232,6 +207,22 @@
@@ -233,6 +208,22 @@
+ "no renderer was specified in the sitemap configuration."
);
}
@@ -136,7 +136,7 @@ diff -u -r1.3 FOPSerializer.java
}
/**
@@ -241,27 +232,40 @@
@@ -242,27 +233,39 @@
return mimetype;
}
@@ -152,9 +152,9 @@ diff -u -r1.3 FOPSerializer.java
+ ccf = new org.apache.cocoon.components.source.CocoonSourceFactory(null, manager);
+ ccf.enableLogging(logger);
+ source = ccf.getSource(env, "/" + uri);
+ getLogger().error("Loading image from " + source.getSystemId());
+ getLogger().debug("Loading image from " + source.getSystemId());
+ InputStream is = source.getInputStream();
+ getLogger().error("input stream: " + is + ":" + is.available());
+ getLogger().debug("input stream: " + is + ":" + is.available());
+ return is;
+ } catch (Exception e) {
+ getLogger().error("Cannot load source", e);
@@ -166,7 +166,6 @@ diff -u -r1.3 FOPSerializer.java
+ //userAgent.setBaseURL(source.getSystemId());
+
+ driver.setUserAgent(userAgent);
+
+ }
+
/**
@@ -186,14 +185,14 @@ diff -u -r1.3 FOPSerializer.java
- if (getLogger().isWarnEnabled()) {
- getLogger().warn("Cannot load class " + this.rendererName, e);
- }
- throw new RuntimeException("Cannot load class " + this.rendererName + "(" + e + ")");
- throw new CascadingRuntimeException("Cannot load class " + this.rendererName, e);
- }
- }
- this.driver.setRenderer(this.renderer);
this.driver.setOutputStream(out);
setContentHandler(this.driver.getContentHandler());
}
@@ -295,8 +299,7 @@
@@ -296,8 +299,7 @@
*/
public void recycle() {
super.recycle();
@@ -203,7 +202,7 @@ diff -u -r1.3 FOPSerializer.java
}
/**
@@ -306,3 +309,4 @@
@@ -307,3 +309,4 @@
return this.setContentLength;
}
}
@@ -214,7 +213,7 @@ RCS file: /home/cvspublic/xml-cocoon2/src/java/org/apache/cocoon/components/pipe
retrieving revision 1.24
diff -u -r1.24 AbstractProcessingPipeline.java
--- src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java 11 Oct 2002 08:36:30 -0000 1.24
+++ src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java 20 Nov 2002 07:53:48 -0000
+++ src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java 5 Dec 2002 09:21:13 -0000
@@ -62,6 +62,7 @@
import org.apache.cocoon.ConnectionResetException;
import org.apache.cocoon.ProcessingException;
@@ -231,7 +230,7 @@ diff -u -r1.24 AbstractProcessingPipeline.java
+ }
+
+ // WARNING: quick hack
+ // setup the generator
+ // setup the serializer
+ if(this.serializer instanceof RequestLifecycleComponent) {
+ ((RequestLifecycleComponent)this.serializer).setup(
+ environment,

+ 9
- 135
src/documentation/forrest.diff View File

@@ -1,78 +1,14 @@
Index: src/resources/skins/common/xslt/fo/pdfoutline.xsl
===================================================================
RCS file: /home/cvspublic/xml-forrest/src/resources/skins/common/xslt/fo/pdfoutline.xsl,v
retrieving revision 1.1
diff -u -r1.1 pdfoutline.xsl
--- src/resources/skins/common/xslt/fo/pdfoutline.xsl 3 Dec 2002 00:23:19 -0000 1.1
+++ src/resources/skins/common/xslt/fo/pdfoutline.xsl 3 Dec 2002 10:57:33 -0000
@@ -1,26 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY copy "&#169;">
-<!ENTITY nbsp "&#160;">
-<!ENTITY degr "&#186;">
-<!ENTITY sup2 "&#178;">
-<!ENTITY sup3 "&#179;">]>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xml.apache.org/fop/extensions" xmlns:documentation="http://sealcorp.com.au/documentation">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xml.apache.org/fop/extensions">
<xsl:template match="document" mode="outline">
- <fox:outline internal-destination="{generate-id()}">
- <fox:label>
- <xsl:value-of select="header/title"/>
- <xsl:text> - </xsl:text>
- <xsl:value-of select="header/authors/person/@name"/>
- </fox:label>
- <xsl:apply-templates select="body/section" mode="outline"/>
- </fox:outline>
+ <fox:bookmarks>
+ <fox:outline internal-destination="{generate-id()}">
+ <fox:label>
+ <xsl:value-of select="header/title"/>
+ </fox:label>
+ <xsl:apply-templates select="body/section" mode="outline"/>
+ </fox:outline>
+ </fox:bookmarks>
</xsl:template>
<xsl:template match="section" mode="outline">
<fox:outline internal-destination="{generate-id()}">
<fox:label>
+ <xsl:number format="1.1.1.1.1.1.1" count="section" level="multiple"/>
+ <xsl:text> </xsl:text>
<xsl:value-of select="title"/>
</fox:label>
<xsl:apply-templates select="section" mode="outline"/>
Index: src/resources/skins/common/xslt/fo/document2fo.xsl
===================================================================
RCS file: /home/cvspublic/xml-forrest/src/resources/skins/common/xslt/fo/document2fo.xsl,v
retrieving revision 1.3
diff -u -r1.3 document2fo.xsl
--- src/resources/skins/common/xslt/fo/document2fo.xsl 3 Dec 2002 00:23:19 -0000 1.3
+++ src/resources/skins/common/xslt/fo/document2fo.xsl 3 Dec 2002 10:57:33 -0000
@@ -2,6 +2,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:fox="http://xml.apache.org/fop/extensions"
version="1.0">
<xsl:output method="xml"/>
@@ -84,14 +85,34 @@
</fo:layout-master-set>
<xsl:apply-templates select="/document" mode="outline"/>
-
+
<fo:page-sequence master-reference="book">
+ <fo:title><xsl:value-of select="document/header/title"/></fo:title>
<xsl:apply-templates/>
</fo:page-sequence>
retrieving revision 1.4
diff -u -r1.4 document2fo.xsl
--- src/resources/skins/common/xslt/fo/document2fo.xsl 4 Dec 2002 14:14:29 -0000 1.4
+++ src/resources/skins/common/xslt/fo/document2fo.xsl 5 Dec 2002 09:23:13 -0000
@@ -93,6 +93,25 @@
</fo:root>
</xsl:template>
-
+
+ <xsl:template name="info">
+ <fo:block-container font-style="italic" absolute-position="absolute"
+ left="0pt" top="0pt" right="6.25in" bottom="150pt"
@@ -95,7 +31,7 @@ diff -u -r1.3 document2fo.xsl
<xsl:template match="document">
<fo:title><xsl:value-of select="header/title"/></fo:title>
@@ -106,6 +127,7 @@
@@ -107,6 +126,7 @@
text-align="start">
Page <fo:page-number/>
</fo:block>
@@ -103,7 +39,7 @@ diff -u -r1.3 document2fo.xsl
</fo:static-content>
<fo:static-content flow-name="even-header">
@@ -114,6 +136,7 @@
@@ -115,6 +135,7 @@
font-style="italic">
<xsl:value-of select="header/title"/>
</fo:block>
@@ -111,7 +47,7 @@ diff -u -r1.3 document2fo.xsl
</fo:static-content>
<fo:static-content flow-name="even-footer">
@@ -135,6 +158,7 @@
@@ -136,6 +157,7 @@
font-style="italic">
<xsl:value-of select="header/title"/>
</fo:block>
@@ -119,65 +55,3 @@ diff -u -r1.3 document2fo.xsl
</fo:static-content>
<fo:static-content flow-name="odd-footer">
@@ -198,6 +222,11 @@
</fo:block>
</xsl:template>
+ <xsl:template match="anchor">
+ <fo:block id="{@id}"/>
+ <xsl:apply-templates/>
+ </xsl:template>
+
<xsl:template match="section">
<xsl:param name="level">0</xsl:param>
@@ -212,6 +241,11 @@
<xsl:number format="1.1.1.1.1.1.1" count="section" level="multiple"/>
<xsl:text> </xsl:text>
+
+ <xsl:if test="normalize-space(@id)!=''">
+ <fo:block id="{@id}"/>
+ </xsl:if>
+
<xsl:value-of select="title"/>
</fo:block>
<xsl:apply-templates>
@@ -240,8 +274,9 @@
space-before="20pt"
font-weight="bold"
font-size="9pt">
+ by
<xsl:for-each select="person">
- <xsl:value-of select="@name"/>, <xsl:value-of select="@email"/>
+ <xsl:value-of select="@name"/>
<xsl:if test="not(position() = last())">, </xsl:if>
</xsl:for-each>
</fo:block>
@@ -263,6 +298,9 @@
font-size="10pt"
background-color="#f0f0f0"
white-space-collapse="false"
+ linefeed-treatment="preserve"
+ white-space-treatment="preserve"
+ wrap-option="no-wrap"
text-align="start">
<xsl:apply-templates/>
</fo:block>
@@ -464,7 +502,16 @@
</xsl:template>
<xsl:template match="link">
+ <xsl:choose>
+ <xsl:when test="starts-with(@href, '#')">
+ <fo:basic-link color="blue" text-decoration="underline" internal-destination="{substring(@href,2)}">
+ <xsl:apply-templates/>
+ </fo:basic-link>
+ </xsl:when>
+ <xsl:otherwise>
<fo:basic-link color="blue" text-decoration="underline" external-destination="{@href}"><xsl:apply-templates/></fo:basic-link>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="figure">

Loading…
Cancel
Save