You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Mathieu Malaterre <ma...@gmail.com> on 2011/09/11 14:31:20 UTC
picks wrong title language for metadata
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
Re: picks wrong title language for metadata
Posted by Glenn Adams <gl...@skynav.com>.
nope, just the backslashes are the problem
On Mon, Sep 12, 2011 at 12:54 PM, Terence M. Bandoian <te...@tmbsw.com>wrote:
> On 9/12/2011 6:20 AM, Glenn Adams wrote:
>
>> the following would not be valid XML, so would produce an XML parsing
>> error
>>
>> On Sun, Sep 11, 2011 at 3:48 PM, Terence M. Bandoian <terence@tmbsw.com<mailto:
>> terence@tmbsw.com>> wrote:
>>
>>
>> Does it make sense to specify something like the following?
>>
>> <dc:title>
>> <rdf:Alt>
>> <rdf:li xml:lang=\"x-default\">An Orange in Flight</rdf:li>
>> <rdf:li xml:lang=\"es\">Una Naranja en Vuelo</rdf:li>
>> </rdf:Alt>
>> </dc:title>
>>
>>
> Hi, Glenn-
>
> Is there something I missed other than the backslashes preceding the
> quotes?
>
>
> -Terence Bandoian
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: fop-users-unsubscribe@**xmlgraphics.apache.org<fo...@xmlgraphics.apache.org>
> For additional commands, e-mail: fop-users-help@xmlgraphics.**apache.org<fo...@xmlgraphics.apache.org>
>
>
Re: picks wrong title language for metadata
Posted by "Terence M. Bandoian" <te...@tmbsw.com>.
On 9/12/2011 6:20 AM, Glenn Adams wrote:
> the following would not be valid XML, so would produce an XML parsing
> error
>
> On Sun, Sep 11, 2011 at 3:48 PM, Terence M. Bandoian
> <terence@tmbsw.com <ma...@tmbsw.com>> wrote:
>
>
> Does it make sense to specify something like the following?
>
> <dc:title>
> <rdf:Alt>
> <rdf:li xml:lang=\"x-default\">An Orange in Flight</rdf:li>
> <rdf:li xml:lang=\"es\">Una Naranja en Vuelo</rdf:li>
> </rdf:Alt>
> </dc:title>
>
Hi, Glenn-
Is there something I missed other than the backslashes preceding the quotes?
-Terence Bandoian
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: picks wrong title language for metadata
Posted by Glenn Adams <gl...@skynav.com>.
the following would not be valid XML, so would produce an XML parsing error
On Sun, Sep 11, 2011 at 3:48 PM, Terence M. Bandoian <te...@tmbsw.com>wrote:
>
> Does it make sense to specify something like the following?
>
> <dc:title>
> <rdf:Alt>
> <rdf:li xml:lang=\"x-default\">An Orange in Flight</rdf:li>
> <rdf:li xml:lang=\"es\">Una Naranja en Vuelo</rdf:li>
> </rdf:Alt>
> </dc:title>
>
>
Re: picks wrong title language for metadata
Posted by "Terence M. Bandoian" <te...@tmbsw.com>.
On 9/11/2011 7:31 AM, Mathieu Malaterre 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
Hi, Mathieu-
Does it make sense to specify something like the following?
<dc:title>
<rdf:Alt>
<rdf:li xml:lang=\"x-default\">An Orange in Flight</rdf:li>
<rdf:li xml:lang=\"es\">Una Naranja en Vuelo</rdf:li>
</rdf:Alt>
</dc:title>
-Terence Bandoian
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: picks wrong title language for metadata
Posted by Glenn Adams <gl...@skynav.com>.
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
>