OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] PDF transformation: Why is the right border of my inline "box" missing when I transform to PDF. It works for HTML and Oxygen XML Editor.


Hi Daniel,

Sorry for not jumping into this thread sooner, we are getting close to the Oxygen 14.1 release so lots of work and testing to do :)

Indeed both Oxygen 13 and 14 come with Apache FOP 1.0 which seems to have the bug you mentioned. And indeed running the transformation with FOP 1.1 RC1 fixes this problem (but it might break something else though being just a release candidate).

In the Oxygen Preferences "XML/XSLT-FO-XQuery/FO Processors" page there is a checkbox called "Enabled output to the built-in FOP" which shows the entire output received from Apache FOP.

For example, running the Docbook XSLS 1.77.1 over my sample Docbook XML file which contains a <note> produces some XSL-FO image references which are not in URL format like:

<fo:external-graphic width="auto" height="auto"
                                        content-width="36pt"
                                        src="url(D:\projects\eXml\frameworks/docbook/xsl/images/note.png)"
                                    />

This works with FOP 1.0 but the Apache FOP 1.1 RC1 seems to report errors (and not load the note image anymore) like:

SEVERE: Invalid property value encountered in src="url(D:\projects\eXml\frameworks/docbook/xsl/images/note.png)": org.apache.fop.fo.expr.PropertyException: Invalid URI specified (See position 1056:39)
org.apache.fop.fo.expr.PropertyException: Invalid URI specified
	at org.apache.fop.fo.properties.URIProperty$Maker.make(URIProperty.java:142)
	at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:413)
	at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:321)
	at org.apache.fop.fo.FObj.processNode(FObj.java:122)
	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:280)
	at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:175)
	at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
	at org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:300)
	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
	at org.apache.fop.cli.Main.startFOP(Main.java:177)
	at org.apache.fop.cli.Main.main(Main.java:208)

Also the latest FOP build seems to be failing in loading a lot of system fonts:

WARNING: Unable to load font file: file:/C:/Windows/FONTS/batang.ttc. Reason: java.lang.NullPointerException

Regards,
Radu

Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 10/17/2012 1:59 PM, daniel.keyes@finaris.de wrote:
Hi,
thanks for your help Bob!
At first, we first tried to run a transformation with fop 1.0. This
didn´t work, so we used fop1.1rc1.

fop1.1.rc1 is still a release candidate, but it works just fine for our
transformation. Each element / style is at its place and our PDFs
finally show the right border of our buttons.

We really don´t what it was, but it looks like the FOP of our Oxygen
version (13) couldn´t handle our style.

If anyone has the same problem: You can download the latest FOP version
on apache.org/dyn/closer.cgi/xmlgraphics/fop
<http://www.apache.org/dyn/closer.cgi/xmlgraphics/fop>


Thanks for your help!


Greetings,
Daniel




From: "Bob Stayton" <bobs@sagehill.net>
To: <docbook-apps@lists.oasis-open.org>, <daniel.keyes@finaris.de>,
Date: 16.10.2012 20:18
Subject: Re: [docbook-apps] PDF transformation: Why is the right border
of my inline "box" missing when I transform to PDF. It works for HTML
  and Oxygen XML Editor.
------------------------------------------------------------------------



I did some testing and found that the problem seems to be the FOP that
ships with Oxygen 14.  Here is what I did.

I copied your customization and configured  an Oxygen 14 transformation
to apply the customized stylesheet *and* run the built-in FOP processor.
  For the Transformation Output tab, I said to Prompt for filename so I
could keep track of the output.  That PDF file duplicated the result you
were seeing with the missing right border.

Then I changed the transformation to just produce the FO output.  When I
examined the FO output file, it looked ok.  When I subsequently
processed that saved FO file with the FOP 1.0 I had installed separately
on my system, the output showed the right border.

Then I changed the Oxygen configuration using Options > Preferences >
XML > XSLT-FO-XQuery > FO Processors.  Under Apache FOP, I selected "Use
other Apache FOP", and browsed to the fop.bat file that I had installed
separately on my system.  I saved that configuration, and when I ran the
transformation, the output showed the right border.

So I concluded that the version of FOP 1.0 that ships with Oxygen 14
seems to be the source of this problem.  Oddly, I compared the fop.jar
in Oxygen 14 to the fop.jar in my installation, and they are identical.
  So I cannot explain why this happens.  But if you download FOP 1.0,
install it, and point Oxygen 14 to use it, then you should get the right
border.

And let Oxygen Support know about this (you can forward this information
if you like).

Bob Stayton
Sagehill Enterprises_
__bobs@sagehill.net_ <mailto:bobs@sagehill.net>

*From:* _daniel.keyes@finaris.de_ <mailto:daniel.keyes@finaris.de>
*Sent:* Tuesday, October 16, 2012 5:22 AM
*To:* _docbook-apps@lists.oasis-open.org_
<mailto:docbook-apps@lists.oasis-open.org>
*Subject:* Re: [docbook-apps] PDF transformation: Why is the right
border of my inline "box" missing when I transform to PDF. It works for
HTML and Oxygen XML Editor.

Hi,

we tried to come up with a solution, but it didn´t work.
After all, we considered that it would be best to reset the entire
schema and stylesheet back to "factory settings". Starting from scratch
seemed to be a good idea to find the error (we created a backup). All
that remained was Oxygens supplied version of Docbook 5.0.

We added our button style to the styelsheet:


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xml:lang="de"
xmlns:xsl="_http://www.w3.org/1999/XSL/Transform_";
xmlns:fo="_http://www.w3.org/1999/XSL/Format_";
xmlns:d = "_http://docbook.org/ns/docbook_";
xmlns:xi="_http://www.w3.org/2001/XInclude_";
xmlns:exsl="_http://exslt.org/common_";
exclude-result-prefixes="d"
version="1.0">

<xsl:import href="docbook.xsl"/>

<xsl:template match="d:button">
<fo:inline background-color="#D3D3D3" border-style="solid"
border-width="thin" >
<xsl:apply-templates/>
</fo:inline>
</xsl:template>

</xsl:stylesheet>



as well as a matching counterpart to the schema docbookxi.rng.
Everything else remained the same.
However, the borders were still missing when transforming to PDF

After all, the bottom line is that:
- Except of the border, our custom style is working just fine. There is
a link between stylesheet and schema
- Its not Adobe Reader (Zoom etc.)
- Its not our stylesheet or schema

So what´s the problem?
- Is it possible that Oxygen and its FO processor cannot handle our
custom style? I know you told me that it´s propably not Saxxon, but is
possible?
- How did you (@Simon) manage to successfully transform our style to PDF?
- Is is possible that Oxygen supplied an old or at least buggy version
of DocBook 5.0?
- How is it possible that our styles works if we use fo:block instead?
We have several "boxes" in our manuals and their all rendered correctly.


Thanks for your help.



Greetings,

Daniel Keyes




From: DaveP <davep@dpawson.co.uk>
To: docbook-apps@lists.oasis-open.org,
Date: 12.10.2012 16:04
Subject: Re: [docbook-apps] PDF transformation: Why is the right border
of my inline "box" missing when I transform to PDF. It works for HTML
  and Oxygen XML Editor.
------------------------------------------------------------------------



On 10/12/2012 01:37 PM, daniel.keyes@finaris.de wrote:
 > Hi Simon,
 >
 > we have implemented some custom styles in our style sheet and schema, so
 > d:button shuld/ does match.
 >
 > As mentioned before, it is a custom style. It works for HTML and our
 > Oxygen XML Editor, but not for PDF.
 >
 > Is it possible that our FO processor, i.e. Saxxon, does not work?
 >
 >
 > Daniel


No Daniel, very unlikely. Saxon is probably the most conformant
and well tested processor.




regards

--
Dave Pawson
XSLT XSL-FO FAQ._
__http://www.dpawson.co.uk_ <http://www.dpawson.co.uk/>

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org




=======================================================
Disclaimer
The information contained in this e - mail and any attachments
( together the "message") is intended for the addressee only and may
contain confidential and/or privileged information. If you have received
the message by mistake please delete it and notify the sender and do
not copy or distribute it or disclose its contents to anyone.

FINARIS Financial Software Partner GmbH
Sömmerringstr. 23, 60322 Frankfurt/Main, Germany
Registered at Frankfurt/Main, HRB 52873

Managing Directors:
Dipl. Inf. Hermann Friebel, Dipl. Ing. Kai Bächle, Dipl. Inf. Werner Märkl
=======================================================


=======================================================
Disclaimer
The information contained in this e - mail and any attachments
( together the "message") is intended for the addressee only and may
contain confidential and/or privileged information. If you have received
the message by mistake please delete it and notify the sender and do
not copy or distribute it or disclose its contents to anyone.

FINARIS Financial Software Partner GmbH
Sömmerringstr. 23, 60322 Frankfurt/Main, Germany
Registered at Frankfurt/Main, HRB 52873

Managing Directors:
Dipl. Inf. Hermann Friebel, Dipl. Ing. Kai Bächle, Dipl. Inf. Werner Märkl
=======================================================





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]