[Yanel-dev] PDF test cases do not work anymore
Jonathan Addison
jon at wyona.com
Wed Aug 22 16:36:44 CEST 2007
Michael Wechner wrote:
> Hi
>
> Since the FOP lib has been changed the following test cases do not =
> work anymore:
>
> http://127.0.0.1:8080/yanel/test/use-cases/hello/pdf-sample.pdf
> http://127.0.0.1:8080/yanel/test/use-cases/hello/pdf-sample2.pdf
I have attached a patch which makes the xsl-fo files compatible with FOP =
0.93.
Jonathan
>
> Any idea what might be wrong?
>
> Thanks
>
> Michi
>
-------------- next part --------------
Index: src/realms/use-cases/yanel/data/xslt/samplePdf2.xsl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- src/realms/use-cases/yanel/data/xslt/samplePdf2.xsl (revision 26843)
+++ src/realms/use-cases/yanel/data/xslt/samplePdf2.xsl (working copy)
@@ -6,7 +6,7 @@
xmlns:fo=3D"http://www.w3.org/1999/XSL/Format">
=
<xsl:template match=3D"/">
- <fo:root xmlns:fo=3D"http://www.w3.org/1999/XSL/Format">
+ <fo:root>
=
<fo:layout-master-set>
<fo:simple-page-master master-name=3D"page"
@@ -35,7 +35,10 @@
=
<fo:page-sequence-master master-name=3D"all">
<fo:repeatable-page-master-alternatives>
- <fo:conditional-page-master-reference master-reference=3D"page" page-pos=
ition=3D"first"/>
+ <fo:conditional-page-master-reference master-reference=3D"page" p=
age-position=3D"first"/>
+ <fo:conditional-page-master-reference master-reference=3D"page" o=
dd-or-even=3D"odd"/>
+ <fo:conditional-page-master-reference master-reference=3D"page" o=
dd-or-even=3D"even"/>
+ <fo:conditional-page-master-reference master-reference=3D"page" b=
lank-or-not-blank=3D"blank"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
@@ -44,20 +47,20 @@
=
<fo:page-sequence master-reference=3D"all">
<fo:static-content flow-name=3D"xsl-region-before">
- <fo:block text-align=3D"left" font-size=3D"10pt" font-family=3D"serif" li=
ne-height=3D"14pt">
+ <fo:block text-align=3D"left" font-size=3D"10pt" font-family=3D"serif=
" line-height=3D"14pt">
<!--<fo:external-graphic src=3D"file:/home/michi/src/lenya-samples=
/slides/resources/images/live/wyona_klein.gif"/>
=
<fo:external-graphic src=3D"url('http://cocoon.apache.org/lenya/=
images/apache-lenya-light.png')"/>-->
=
</fo:block>
=
- </fo:static-content> -->
+ </fo:static-content>
=
<fo:static-content flow-name=3D"xsl-region-after">
- <fo:block text-align=3D"center" font-size=3D"10pt" font-family=3D"serif" =
line-height=3D"14pt">
+ <fo:block text-align=3D"center" font-size=3D"10pt" font-family=3D"ser=
if" line-height=3D"14pt">
<xsl:value-of select=3D"/s:slideset/s:metadata/s:author/s:name"/=
> (<xsl:value-of select=3D"/s:slideset/s:metadata/s:author/s:email"/>), <xs=
l:value-of select=3D"/s:slideset/s:metadata/s:title"/>, <xsl:value-of selec=
t=3D"/s:slideset/s:metadata/s:confgroup/s:conftitle"/>
</fo:block>
- <fo:block text-align=3D"center" font-size=3D"10pt" font-family=3D"serif" =
line-height=3D"14pt">
+ <fo:block text-align=3D"center" font-size=3D"10pt" font-family=3D"ser=
if" line-height=3D"14pt">
Seite <fo:page-number/>
=
</fo:block>
@@ -148,19 +151,18 @@
=
<xsl:template match=3D"ol">
<fo:list-block>
- <xsl:for-each select=3D"li">
+ <xsl:for-each select=3D"li">
<fo:list-item space-before.optimum=3D"40pt">
<fo:list-item-label end-indent=3D"label-end()">
<fo:block font-size=3D"18pt">•</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent=3D"body-start()">
-
<fo:block font-size=3D"18pt">
<fo:inline text-decoration=3D"none"><xsl:apply-templates/></=
fo:inline>
</fo:block>
</fo:list-item-body>
</fo:list-item>
- </xsl:for-each>
+ </xsl:for-each>
</fo:list-block>
</xsl:template>
Index: src/contributions/resources/pdf/xslt/xml2fo.xsl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- src/contributions/resources/pdf/xslt/xml2fo.xsl (revision 26843)
+++ src/contributions/resources/pdf/xslt/xml2fo.xsl (working copy)
@@ -11,7 +11,7 @@
<xsl:output method=3D"xml"/>
=
<xsl:template match=3D"/">
- <fo:root xmlns:fo=3D"http://www.w3.org/1999/XSL/Format">
+ <fo:root>
=
<fo:layout-master-set>
<fo:simple-page-master master-name=3D"simple"
@@ -19,7 +19,7 @@
page-width =3D"21cm"
margin-left =3D"2.5cm"
margin-right =3D"2.5cm">
- <fo:region-body name=3D"xsl-region-body" margin-top=3D"3cm"/>
+ <fo:region-body margin-top=3D"3cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
=
=20
More information about the Yanel-development
mailing list