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.

On Sun, Sep 11, 2011 at 8:31 AM, Mathieu Malaterre <mathieu.malaterre@gmail.com> wrote:
Dear all,

 I am trying to fix a bug in fop debian package (#519592). I am
copying the exact bug report here (*). Does anyone knows what is going
on ? Should I simply fill in a bug report with this information ? The
aoif.fo attached allowed me to reproduce the issue with fop 1.0.

thanks

(*)
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


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org