You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2012/11/05 09:54:10 UTC

[Bug 54098] New: FOP is too strict: URIs containting backslashes are not resolved in FOP 1.1

https://issues.apache.org/bugzilla/show_bug.cgi?id=54098

          Priority: P2
            Bug ID: 54098
          Assignee: fop-dev@xmlgraphics.apache.org
           Summary: FOP is too strict: URIs containting backslashes are
                    not resolved in FOP 1.1
          Severity: normal
    Classification: Unclassified
          Reporter: dan@sync.ro
          Hardware: PC
            Status: NEW
           Version: 1.1
         Component: general
           Product: Fop

When publishing DITA or Docbook to PDF (on a Windows machine) there are created
FO files containing references to images. Some of the references are respecting
the URI syntax, others are using the backslash: "\". This is not under the
control of the end users. The XSLT stylesheets from these documentation
frameworks are generating these invalid URIs.

FOP 1.0 translated the back-slashses to forward slashes before attempting to
parse the URIs. 
FOP 1.1 kept this translation in: org.apache.fop.apps.FOURIResolver but not in:
org.apache.fop.fo.properties.URIProperty

I propose adding the following code in:
org.apache.fop.fo.properties.URIProperty.Maker.make(PropertyList, String, FObj)

....
value = value.replace('\\', '/');
....

This will make FOP more compatible with the Docbook and DITA output.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 54098] FOP is too strict: URIs containting backslashes are not resolved in FOP 1.1

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54098

--- Comment #2 from Dan Caprioara <da...@sync.ro> ---
Thank you for the detailed answer.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 54098] FOP is too strict: URIs containting backslashes are not resolved in FOP 1.1

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54098

--- Comment #3 from Radu Coravu <ra...@sync.ro> ---
For more than 6 years Apache FOP has behaved in a certain way.

This means that all projects which created XSL-FO as output could have produced
references which are either local file references (like Docbook does when
producing references to Note images) or URL paths which may contain "\" in them
like the DITA Open Toolkit does.
Such invalid references are still handled by commercial FO applications like
RenderX XEP or Antenna House because they are more interested in generating the
PDF than in breaking the XSL-FO transformation.

Could you add in the FOP configuration file a special setting which would
overpass this problem (show it as a warning) instead of signaling it as an
error?
This is what the producer of the Saxon XSLT processor did when he decided to no
longer handle file references to XSLT files (instead of URI references).

I understand that by default FOP could fail with a fatal error but you have to
give the projects which produce XSL-FO (and there could be many) some time to
upgrade their handling of image references and in the meantime to have users
benefit of the latest bug fixes available in Apache FOP.

We are the manufacturers on an XML Editor (Oxygen XML Editor), our editor comes
bundled with a lot of open source software and is used to publish using a lot
of open source software so upgrading the bundled FOP libraries to FOP 1.1 is a
problem for us.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 54098] FOP is too strict: URIs containting backslashes are not resolved in FOP 1.1

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54098

Glenn Adams <ga...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX
                 OS|                            |All

--- Comment #1 from Glenn Adams <ga...@apache.org> ---
As a user, you choose what XSLT stylesheets to use. If you use one that
contains broken references, then you suffer the consequences. The correct way
to handle this is get those broken XSLT stylesheets fixed, and not require FOP
to accept invalid input to accommodate such brokenness.

-- 
You are receiving this mail because:
You are the assignee for the bug.