Well the bug is in Apache FOP (or maybe in Saxon?) Here is a reproducible test 
procedure:
 
I use the FOP binary package from 
https://www.apache.org/dyn/closer.cgi?filename=/xmlgraphics/fop/binaries/fop-2.10-bin.tar.gz&action=download
 and the current Saxon 12.5 HE.
 
Create PDF without Saxon:
   $ fop-2.10/fop/fop -c PDFA3Xmp.xconf -fo PDFXMP.fo -pdf output-ok.pdf
 
Create PDF with Saxon:
  $ export 
CLASSPATH=SaxonHE12-5J/saxon-he-12.5.jar:SaxonHE12-5J/lib/xmlresolver-5.2.2.jar:SaxonHE12-5J/lib/xmlresolver-5.2.2-data.jar:SaxonHE12-5J/lib/jline-2.14.6.jar
  $ fop-2.10/fop/fop -c PDFA3Xmp.xconf -fo PDFXMP.fo -pdf output-saxon.pdf
 
Result without Saxon:
  $ pdfinfo -meta output-ok.pdf
...
       <rdf:Description 
xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"; rdf:about="">
           <pdfaExtension:schemas>
               <rdf:Bag>
                   <rdf:li rdf:parseType="Resource">
                       <pdfaSchema:property 
xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#";>
                           <rdf:Seq>
                               <rdf:li rdf:parseType="Resource">
                                   <pdfaProperty:name 
xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#";>split</pdfaProperty:name>
                               </rdf:li>
                           </rdf:Seq>
                       </pdfaSchema:property>
                   </rdf:li>
               </rdf:Bag>
           </pdfaExtension:schemas>
       </rdf:Description>
...
 
The result with Saxon is totally messed up:
$ pdfinfo -meta output-saxon.pdf
...
     <rdf:RDF xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"; 
rdf:about="">
        <pdfaExtension:schemas>
           <rdf:Bag>
              <rdf:li rdf:parseType="Resource">
                 <pdfaSchema:property>
                    <rdf:Seq>
                       <rdf:li rdf:parseType="Resource">
                          <pdfaProperty:name>split</pdfaProperty:name>
                       </rdf:li>
                    </rdf:Seq>
                 </pdfaSchema:property>
              </rdf:li>
           </rdf:Bag>
        </pdfaExtension:schemas>
     </rdf:RDF>
...
Not only the namespace attributes xmlns:pdfaSchema and xmlns:pdfaProperty are 
missing, but also the rdf:Description element is now called rdf:RDF (?!)
 
I think it makes sense to create a Jira ticket for this issue. Since I am not a 
member of the project, shall I sign up and do this?
 

Cheers

   Jörn Willhöft

> Jörn Willhöft <j...@willhoeft-it.com> hat am 07.11.2024 13:34 CET geschrieben:
>  
>  
> OK, I am a big step further now. The bug appears in Camel (only) if Saxon is 
> used anywhere in the Camel Route. I use Saxon to create the actual FO and 
> additional files. The created FO has the namespaces where they belong, but 
> somehow Saxon in the classpath seems to confuse the FOP component internally. 
> Skipping Saxon is not really an option as I need XSLT 2.0.
>  
> It is still unclear to me if the problem is in the Camel FOP component or FOP 
> itself.
>  
> Cheers
> 
>     Jörn Willhöft
> 

Reply via email to