Debian Bug report logs - #519592
fop: picks wrong title language for metadata

version graph

Package: fop; Maintainer for fop is Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>; Source for fop is src:fop.

Reported by: "brian m. carlson" <sandals@crustytoothpaste.net>

Date: Fri, 13 Mar 2009 17:48:04 UTC

Severity: normal

Tags: wontfix

Found in version fop/1:0.95.dfsg-4

Done: Mathieu Malaterre <mathieu.malaterre@gmail.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#519592; Package fop. (Fri, 13 Mar 2009 17:48:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
New Bug report received and forwarded. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Fri, 13 Mar 2009 17:48:06 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: fop: picks wrong title language for metadata
Date: Fri, 13 Mar 2009 17:46:58 +0000
[Message part 1 (text/plain, inline)]
Package: fop
Version: 1:0.95.dfsg-4
Severity: normal

When I specify RDF metadata in my XSL-FO file, I can specify several
different dc:title tags, each with a different xml:lang tag (or none at
all).  If I specify

  <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:title>An Orange in Flight</dc:title>
    <dc:title xml:lang="x-default">An Orange in Flight</dc:title>
    <dc:title xml:lang="en">An Orange in Flight</dc:title>
    <dc:title xml:lang="es">Una Naranja en Vuelo</dc:title>
    <dc:creator>The Barefoot Waif</dc:creator>
  </rdf:Description>

fop chooses the last title, even though the language for the XSL-FO
document is "en".  The XMP metadata (as well as the /Info data) in the
PDF comes out as

  <dc:title>
  <rdf:Alt>
  <rdf:li xml:lang="x-default">Una Naranja en Vuelo</rdf:li>
  </rdf:Alt>
  </dc:title>

which is completely wrong.

Obviously, I want it to pick one of the other three.  My preference is
that fop picks the tag without an xml:lang attribute; then the tag with
xml:lang="x-default"; then the tag with the language of the document,
according to the language attribute on an enclosing fo element; and then
some other language (which one I don't care).

This doesn't happen if dc:title contains an rdf:Alt with rdf:li elements
that have xml:lang attributes, as the XMP specification requires.
However, the fop page on metadata[0] demonstrates metadata that does not
comply with the XMP standard, so it is reasonable to assume that fop
will properly fix up metadata that isn't strictly conforming.

[0] http://xmlgraphics.apache.org/fop/0.95/metadata.html

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.29-rc7-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages fop depends on:
ii  default-jre [java2-runti 1.5-31          Standard Java or Java compatible R
ii  java-gcj-compat [java2-r 1.0.80-1        Java runtime environment using GIJ
ii  java-wrappers            0.1.13          wrappers for java executables
ii  libavalon-framework-java 4.2.0-4         Common framework for Java server a
ii  libbatik-java            1.7-2           xml.apache.org SVG Library
ii  libbsf-java              1:2.4.0-2       Bean Scripting Framework to suppor
ii  libcommons-io-java       1.4-1           Common useful IO related classes
ii  libcommons-logging-java  1.1.1-2         commmon wrapper interface for seve
ii  libxalan2-java           2.7.1-2         XSL Transformations (XSLT) process
ii  libxerces2-java          2.9.1-2         Validating XML parser for Java wit
ii  libxml-commons-external- 1.3.04-2        XML Commons external code - DOM, S
ii  libxmlgraphics-commons-j 1.3.1.dfsg-2    reusable components used by Batik 
ii  libxp6                   1:1.0.0.xsf1-2  X Printing Extension (Xprint) clie
ii  libxt6                   1:1.0.5-3       X11 toolkit intrinsics library
ii  libxtst6                 2:1.0.3-1       X11 Testing -- Resource extension 
ii  openjdk-6-jre [java2-run 6b14-1.5~pre1-3 OpenJDK Java runtime, using Hotspo

Versions of packages fop recommends:
ii  libsaxon-java                 1:6.5.5-5  The Saxon XSLT Processor

Versions of packages fop suggests:
ii  fop-doc                    1:0.95.dfsg-4 Documentation for fop
ii  libservlet2.4-java         5.0.30-8      Servlet 2.4 and JSP 2.0 Java class

-- no debconf information

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
troff on top of XML: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#519592; Package fop. (Mon, 26 Jul 2010 08:57:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mathieu Malaterre <mathieu.malaterre@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Mon, 26 Jul 2010 08:57:04 GMT) Full text and rfc822 format available.

Message #10 received at 519592@bugs.debian.org (full text, mbox):

From: Mathieu Malaterre <mathieu.malaterre@gmail.com>
To: 586469@bugs.debian.org, 519592@bugs.debian.org, 518979@bugs.debian.org, 580333@bugs.debian.org
Date: Mon, 26 Jul 2010 10:53:01 +0200
I uploaded fop 1.0 to experimental. Could you please test if the bug
can still be reproduced with this new version ?

Thanks
-- 
Mathieu




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#519592; Package fop. (Sat, 28 Aug 2010 17:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.net>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Sat, 28 Aug 2010 17:42:02 GMT) Full text and rfc822 format available.

Message #15 received at 519592@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: 519592@bugs.debian.org
Subject: Still reproducible
Date: Sat, 28 Aug 2010 17:39:08 +0000
[Message part 1 (text/plain, inline)]
I can still reproduce the problem described in 519592 with fop 1.0.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Changed Bug submitter to '"brian m. carlson" <sandals@crustytoothpaste.net>' from '"brian m. carlson" <sandals@crustytoothpaste.ath.cx>' Request was from "brian m. carlson" <sandals@crustytoothpaste.net> to control@bugs.debian.org. (Thu, 03 Feb 2011 20:51:38 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#519592; Package fop. (Fri, 09 Sep 2011 09:18:18 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mathieu Malaterre <mathieu.malaterre@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Fri, 09 Sep 2011 09:18:26 GMT) Full text and rfc822 format available.

Message #22 received at 519592@bugs.debian.org (full text, mbox):

From: Mathieu Malaterre <mathieu.malaterre@gmail.com>
To: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
Cc: 519592@bugs.debian.org
Date: Fri, 9 Sep 2011 11:17:03 +0200
tag 519592 moreinfo
thanks

Brian, would it be possible for you to provide a simple fo file to
reproduce this issue ?
Did you reported it upstream ?

Thanks

-- 
Mathieu




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#519592; Package fop. (Sun, 11 Sep 2011 12:36:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mathieu Malaterre <mathieu.malaterre@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Sun, 11 Sep 2011 12:36:12 GMT) Full text and rfc822 format available.

Message #27 received at 519592@bugs.debian.org (full text, mbox):

From: Mathieu Malaterre <mathieu.malaterre@gmail.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: 519592@bugs.debian.org
Subject: Re: your mail
Date: Sun, 11 Sep 2011 14:28:46 +0200
On Sun, Sep 11, 2011 at 3:07 AM, brian m. carlson
<sandals@crustytoothpaste.net> wrote:
> On Fri, Sep 09, 2011 at 11:17:03AM +0200, Mathieu Malaterre wrote:
>> Brian, would it be possible for you to provide a simple fo file to
>> reproduce this issue ?
>
> A fo file is attached.  I don't know about simple, but I trimmed the
> input file I generated it from in order to make it as minimal as
> possible.  The only thing that matters is the rdf:RDF in the
> fo:declarations element, so you can remove extraneous material if you
> need to.

Ok. I can reproduce:

$ fop aoif.fo aoif.pdf
$ pdfinfo aoif.pdf
Title:          Una Naranja en Vuelo
...

>> Did you reported it upstream ?
>
> If I didn't mark the Debian bug as forwarded, I didn't report it
> upstream.

Ok, I'll do it for you.

-- 
Mathieu




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#519592; Package fop. (Mon, 12 Sep 2011 11:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mathieu Malaterre <mathieu.malaterre@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Mon, 12 Sep 2011 11:33:10 GMT) Full text and rfc822 format available.

Message #32 received at 519592@bugs.debian.org (full text, mbox):

From: Mathieu Malaterre <mathieu.malaterre@gmail.com>
To: 519592@bugs.debian.org, Control bugs server <control@bugs.debian.org>, 519592-done@bugs.debian.org
Subject: Fwd: picks wrong title language for metadata
Date: Mon, 12 Sep 2011 13:28:38 +0200
tag 519592 wontfix
thanks


---------- Forwarded message ----------


There are two questionable assumptions you seem to make below:
(1) that FOP "chooses" (filters) metadata elements based on lang,
i.e., FOP implements the semantics of rdf:Alt;
(2) that FOP would fix-up non-conforming metadata;
Of course, the functionality in question is an extension to XSL-FO in
the first place, so it is *possible* that FOP could do these things.
However, it is not consistent with FOP semantics that it should do so,
since FOP does not make choices between *any* content based on
language, and since FOP does not perform *any* fix-ups for
non-compliant content.
You should perform the content selection process during the front-end
XSLT stage, or, if you are feeding FO directly to FOP, then do it when
you create the FO input file. That is, you should not expect this
extension to implement the semantics of rdf:Alt.




Added tag(s) wontfix. Request was from Mathieu Malaterre <mathieu.malaterre@gmail.com> to control@bugs.debian.org. (Mon, 12 Sep 2011 11:33:31 GMT) Full text and rfc822 format available.

Reply sent to Mathieu Malaterre <mathieu.malaterre@gmail.com>:
You have taken responsibility. (Mon, 12 Sep 2011 11:33:35 GMT) Full text and rfc822 format available.

Notification sent to "brian m. carlson" <sandals@crustytoothpaste.net>:
Bug acknowledged by developer. (Mon, 12 Sep 2011 11:33:37 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 11 Oct 2011 07:35:40 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 14:37:25 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.