On 8/1/2013 6:56 AM, "Stenersen, Björn WI \(Fa. Kessler Beratung\)" wrote:
> Hello,
> i am trying to create a pdf/a with FOP 1.1, but the validation of the 
> generated PDF always fails due to corrupt xmp-metadata.
> I tried several Validators, all of them report the same error:
>
> XMP metadata: Property 'language' in predefined XMP schema 
> 'http://purl.org/dc/elements/1.1/' for PDF/A has wrong value type (must be 
> 'rdf:bag')
> (http://www.pdflib.com/knowledge-base/xmp-metadata/free-xmp-validator/)
>
> So I tried to fix the problem by declaring the language-property in my 
> fo:declarations-section:
>
> <fo:declarations>
>       <x:xmpmeta xmlns:x="adobe:ns:meta/" 
> xmlns:dc="http://purl.org/dc/elements/1.1/"; 
> xmlns:xmp="http://ns.adobe.com/xap/1.0/"; 
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
>               <dc:creator>
>                       <rdf:Seq>
>                               <rdf:li>
>                                       CREATOR
>                               </rdf:li>
>                       </rdf:Seq>
>               </dc:creator>
>               <dc:language>
>                       <rdf:Bag>
>                               <rdf:li>
>                                       de-DE
>                               </rdf:li>
>                       </rdf:Bag>
>               </dc:language>
>               <dc:date>
>               <rdf:Seq>
>                       <rdf:li>1999-08-01T12:56:02+02:00</rdf:li>
>               </rdf:Seq>
>        </dc:date>
>               <xmp:CreatorTool>My App</xmp:CreatorTool>
>       </x:xmpmeta>
> </fo:declarations>
>
> In the resulting PDF the metadata looks like this:
>
> <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta 
> xmlns:x="adobe:ns:meta/">
>    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
>       <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/"; 
> rdf:about="">
>          <dc:format>application/pdf</dc:format>
>          <dc:language>x-unknown</dc:language>
>          <dc:creator>
>             <rdf:Seq>
>                <rdf:li>CREATOR</rdf:li>
>             </rdf:Seq>
>          </dc:creator>
>          <dc:date>
>             <rdf:Seq>
>                <rdf:li>1999-08-01T12:56:02+02:00</rdf:li>
>                <rdf:li>2013-08-01T13:53:08+02:00</rdf:li>
>             </rdf:Seq>
>          </dc:date>
>       </rdf:Description>
>       <rdf:Description xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/"; 
> rdf:about="">
>          <pdfaid:conformance>B</pdfaid:conformance>
>          <pdfaid:part>1</pdfaid:part>
>       </rdf:Description>
>       <rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/"; rdf:about="">
>          <pdf:PDFVersion>1.4</pdf:PDFVersion>
>          <pdf:Producer>Apache FOP Version SVN tags/fop-1_1</pdf:Producer>
>       </rdf:Description>
>       <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/"; rdf:about="">
>          <xmp:CreateDate>2013-08-01T13:53:08+02:00</xmp:CreateDate>
>          <xmp:CreatorTool>My App</xmp:CreatorTool>
>          <xmp:MetadataDate>2013-08-01T13:53:08+02:00</xmp:MetadataDate>
>       </rdf:Description>
>    </rdf:RDF>
> </x:xmpmeta>
> <?xpacket end="r"?>
>
> Is anyone experiencing the same problem? Any tips how to fix this?
>
> Thanks Björn
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Hi, Björn-

I used something like this:

        <fo:declarations>
            <x:xmpmeta xmlns:x="adobe:ns:meta/">
                <rdf:RDF
                    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
                    xmlns:dc="http://purl.org/dc/elements/1.1/";>

                    <rdf:Description rdf:about="">

                        <dc:title>
                            <rdf:Alt>
                                <rdf:li xml:lang="x-default">
                                    <xsl:value-of select="//title" />
                                </rdf:li>
                            </rdf:Alt>
                        </dc:title>

                        ...

                    </rdf:Description>

                </rdf:RDF>
            </x:xmpmeta>
        </fo:declarations>

and was able to successfully validate the output as PDF/A.

-Terence Bandoian


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

Reply via email to