RE: Namespaces are dropped in XMP stream. XML invalid
Joao Andre Goncalves <[email protected]> Thu, 7 Nov 2024 16:31:40 +0000
| Newsgroups | gmane.text.xml.fop.user |
|---|---|
| Message-ID | <AM9PR04MB8604AD2D8ED3F90DE7850562DD5C2@AM9PR04MB8604.eurprd04.prod.outlook.com> |
--_000_AM9PR04MB8604AD2D8ED3F90DE7850562DD5C2AM9PR04MB8604eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable It would be easier if you raised a ticket. You would be able to upload your= project files as well. From: J=F6rn Willh=F6ft <[email protected]> Sent: Thursday, November 7, 2024 9:49 AM To: [email protected] Subject: RE: Namespaces are dropped in XMP stream. XML invalid You don't often get email from [email protected]<mailto:jwi@willhoeft-it= .com>. Learn why this is important<https://aka.ms/LearnAboutSenderIdentific= ation> Well the bug is in Apache FOP (or maybe in Saxon?) Here is a reproducible t= est procedure: I use the FOP binary package from https://www.apache.org/dyn/closer.cgi?fil= ename=3D/xmlgraphics/fop/binaries/fop-2.10-bin.tar.gz&action=3Ddownload 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=3DSaxonHE12-5J/saxon-he-12.5.jar:SaxonHE12-5J/lib/xmlr= esolver-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=3D"http://www.aiim.org/pdfa/ns/= extension/" rdf:about=3D""> <pdfaExtension:schemas> <rdf:Bag> <rdf:li rdf:parseType=3D"Resource"> <pdfaSchema:property xmlns:pdfaSchema=3D"http://www.= aiim.org/pdfa/ns/schema#"> <rdf:Seq> <rdf:li rdf:parseType=3D"Resource"> <pdfaProperty:name xmlns:pdfaProperty=3D= "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=3D"http://www.aiim.org/pdfa/ns/extension/= " rdf:about=3D""> <pdfaExtension:schemas> <rdf:Bag> <rdf:li rdf:parseType=3D"Resource"> <pdfaSchema:property> <rdf:Seq> <rdf:li rdf:parseType=3D"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 a= re 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 n= ot a member of the project, shall I sign up and do this? Cheers J=F6rn Willh=F6ft J=F6rn Willh=F6ft <[email protected]<mailto:[email protected]>> hat a= m 07.11.2024 13:34 CET geschrieben: OK, I am a big step further now. The bug appears in Camel (only) if Saxon i= s 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 internal= ly. 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 F= OP itself. Cheers J=F6rn Willh=F6ft ________________________________ Joao Andre Goncalves Customer Developer t | m 07733161880 [email protected] smartcommunications.com<https://www.smartcommunications.com/> [https://scale.smartcommunications.com/rs/041-BQO-927/images/024_Esignature= -2024-Benchmark.png?version=3D0]<https://www.smartcommunications.com/resour= ces/benchmark-report/?utm_source=3Doutlook&utm_medium=3Demail&utm_campaign= =3Dbenchmark_report_2024_webpage> The largest study of its kind! Unlock unparalleled insights into customer p= references and stay ahead in today's market. Download now!<https://www.smar= tcommunications.com/resources/benchmark-report/?utm_source=3Doutlook&utm_me= dium=3Demail&utm_campaign=3Dbenchmark_report_2024_webpage> Smart Communic= ations is a trading name of SmartComms SC Limited which is registered in En= gland under No. 4303041 whose registered office is at Suite 23, LCLB, 95 Mo= rtimer Street, London, W1W 7GB. Please consider the environment before prin= ting. The contents of this e-mail are intended for the named addressee only= . It contains confidential information. Unless you are the named addressee = or an authorized designee, you may not copy or use it, or disclose it to an= yone else. If you received it in error please notify us immediately and the= n destroy it. Smart Communications will process your data as described in t= he Smart Communications' External Privacy Policy.<https://www.smartcommunic= ations.com/external-privacy-policy/> Follow us on LinkedIn<https://www.linkedin.com/company/15166060/admin/> and= Twitter<https://twitter.com/ccminnovators?lang=3Den> --_000_AM9PR04MB8604AD2D8ED3F90DE7850562DD5C2AM9PR04MB8604eurp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-= 1"> <meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Aptos;} @font-face {font-family:"Segoe UI"; panose-1:2 11 5 2 4 2 4 2 2 3;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; font-size:12.0pt; font-family:"Aptos",sans-serif;} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} span.EmailStyle20 {mso-style-type:personal-reply; font-family:"Aptos",sans-serif; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt; mso-ligatures:none;} @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--> </head> <body lang=3D"EN-GB" link=3D"blue" vlink=3D"purple" style=3D"word-wrap:brea= k-word"> <div class=3D"WordSection1"> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;mso-fareast-language= :EN-US">It would be easier if you raised a ticket. You would be able to upl= oad your project files as well.<o:p></o:p></span></p> <p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;mso-fareast-language= :EN-US"><o:p> </o:p></span></p> <div> <div style=3D"border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm = 0cm 0cm"> <p class=3D"MsoNormal"><b><span lang=3D"EN-US" style=3D"font-size:11.0pt;fo= nt-family:"Calibri",sans-serif">From:</span></b><span lang=3D"EN-= US" style=3D"font-size:11.0pt;font-family:"Calibri",sans-serif"> = J=F6rn Willh=F6ft <[email protected]> <br> <b>Sent:</b> Thursday, November 7, 2024 9:49 AM<br> <b>To:</b> [email protected]<br> <b>Subject:</b> RE: Namespaces are dropped in XMP stream. XML invalid<o:p><= /o:p></span></p> </div> </div> <p class=3D"MsoNormal"><o:p> </o:p></p> <table class=3D"MsoNormalTable" border=3D"0" cellspacing=3D"0" cellpadding= =3D"0" align=3D"left" width=3D"100%" style=3D"width:100.0%"> <tbody> <tr> <td width=3D"0" style=3D"width:.3pt;background:#A6A6A6;padding:5.25pt 1.5pt= 5.25pt 1.5pt"> </td> <td width=3D"100%" style=3D"width:100.0%;background:#EAEAEA;padding:5.25pt = 3.75pt 5.25pt 11.25pt;aspect-ratio: revert !important;background:revert !im= portant;block-size: revert !important;border:revert !important;bottom: reve= rt !important;color:revert !important;color-scheme: revert !important;conte= nt-visibility: revert !important;cursor:revert !important;direction:revert = !important;display:revert !important;font-size:revert !important;height:rev= ert !important;hyphens: revert !important;letter-spacing:revert !important;= line-height:revert !important;margin:revert !important;opacity: revert !imp= ortant;order: revert !important;outline: revert !important;overflow:revert = !important;padding:revert !important;position:revert !important;resize: rev= ert !important;rotate: revert !important;scale: revert !important;tab-size:= revert !important;table-layout:revert !important;text-align:revert !import= ant;text-indent:revert !important;text-orientation: revert !important;text-= overflow: revert !important;text-shadow:revert !important;text-transform:re= vert !important;text-wrap: revert !important;top:revert !important;transiti= on: revert !important;user-select: revert !important;vertical-align:revert = !important;visibility:revert !important;white-space:revert !important;width= :revert !important;word-break:revert !important;word-spacing:revert !import= ant;writing-mode:revert !important;zoom: revert !important"> <div> <p class=3D"MsoNormal" style=3D"mso-element:frame;mso-element-frame-hspace:= 2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-el= ement-anchor-horizontal:column;mso-height-rule:exactly"> <span style=3D"font-size:9.0pt;font-family:"Segoe UI",sans-serif;= color:#212121">You don't often get email from <a href=3D"mailto:[email protected]">[email protected]</a>. <a href= =3D"https://aka.ms/LearnAboutSenderIdentification"> Learn why this is important</a> <o:p></o:p></span></p> </div> </td> <td width=3D"75" style=3D"width:56.25pt;background:#EAEAEA;padding:5.25pt 3= .75pt 5.25pt 3.75pt;aspect-ratio: revert !important;background:revert !impo= rtant;block-size: revert !important;border:revert !important;bottom: revert= !important;color:revert !important;color-scheme: revert !important;content= -visibility: revert !important;cursor:revert !important;direction:revert !i= mportant;display:revert !important;font-size:revert !important;height:rever= t !important;hyphens: revert !important;letter-spacing:revert !important;li= ne-height:revert !important;margin:revert !important;opacity: revert !impor= tant;order: revert !important;outline: revert !important;overflow:revert !i= mportant;padding:revert !important;position:revert !important;resize: rever= t !important;rotate: revert !important;scale: revert !important;tab-size: r= evert !important;table-layout:revert !important;text-align:revert !importan= t;text-indent:revert !important;text-orientation: revert !important;text-ov= erflow: revert !important;text-shadow:revert !important;text-transform:reve= rt !important;text-wrap: revert !important;top:revert !important;transition= : revert !important;user-select: revert !important;vertical-align:revert !i= mportant;visibility:revert !important;white-space:revert !important;width:r= evert !important;word-break:revert !important;word-spacing:revert !importan= t;writing-mode:revert !important;zoom: revert !important;align: left !impor= tant"> </td> </tr> </tbody> </table> <div> <div> <p class=3D"MsoNormal">Well the bug is in Apache FOP (or maybe in Saxon?) H= ere is a reproducible test procedure: <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal">I use the FOP binary package from <a href=3D"https:/= /www.apache.org/dyn/closer.cgi?filename=3D/xmlgraphics/fop/binaries/fop-2.1= 0-bin.tar.gz&action=3Ddownload"> https://www.apache.org/dyn/closer.cgi?filename=3D/xmlgraphics/fop/binaries/= fop-2.10-bin.tar.gz&action=3Ddownload</a> and the current Saxon 12.5 HE= . <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal">Create PDF without Saxon: <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> $ fop-2.10/fop/fop -c PDFA3Xmp.xconf -f= o PDFXMP.fo -pdf output-ok.pdf <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal">Create PDF with Saxon: <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> $ export CLASSPATH=3DSaxonHE12-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 <br> $ fop-2.10/fop/fop -c PDFA3Xmp.xconf -fo PDFXMP.fo -pdf output-saxon= .pdf <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal">Result without Saxon: <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:black;background:white"> $ pdfinfo -meta output-ok.pdf</span> <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New"">= ...<br> <span style=3D"color:black;background:white"> = <rdf:Description xmlns:pdfaExtension=3D"<a href=3D"http= ://www.aiim.org/pdfa/ns/extension/">http://www.aiim.org/pdfa/ns/extension/<= /a>" rdf:about=3D""> </span><br> <pdfaE= xtension:schemas> <br> &nb= sp; <rdf:Bag> <br> &nb= sp; <rdf:li rdf:parseType=3D"Res= ource"> <br> &nb= sp; <pdfaSche= ma:property xmlns:pdfaSchema=3D"<a href=3D"http://www.aiim.org/pdfa/ns= /schema#">http://www.aiim.org/pdfa/ns/schema#</a>"> <br> &nb= sp; = <rdf:Seq> <br> &nb= sp; = <rdf:li rdf:parseType=3D"Resour= ce"> <br> &nb= sp; = <pdfaPropert= y:name xmlns:pdfaProperty=3D"<a href=3D"http://www.aiim.org/pdfa/ns/pr= operty#">http://www.aiim.org/pdfa/ns/property#</a>">split</pdfaP= roperty:name> <br> &nb= sp; = </rdf:li> <br> &nb= sp; = </rdf:Seq> <br> &nb= sp; </pdfaSch= ema:property> <br> &nb= sp; </rdf:li> <br> &nb= sp; </rdf:Bag> <br> </pdfa= Extension:schemas> <br> </rdf:Description></span><o= :p></o:p></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New"">= ...</span> <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal">The result with Saxon is totally messed up: <o:p></o= :p></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:black;background:white">$ pdfinfo -meta output-saxon.pdf</span><o:p></= o:p></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:black;background:white">...</span> <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"><span style=3D"font-family:"Courier New";c= olor:black;background:white"> <rdf:RDF xmln= s:pdfaExtension=3D"<a href=3D"http://www.aiim.org/pdfa/ns/extension/">= http://www.aiim.org/pdfa/ns/extension/</a>" rdf:about=3D""&g= t; </span><span style=3D"font-family:"Courier New""><br> <pdfaExtension:schemas&g= t; <br> <rdf:B= ag> <br> &nb= sp; <rdf:li rdf:parseType=3D"Resource"> <br> &nb= sp; <pdfaSchema:property> <br> &nb= sp; <rdf:Seq> <br> &nb= sp; <rdf:li r= df:parseType=3D"Resource"> <br> &nb= sp; = <pdfaProperty:name>split</pdfaProperty:name> <br> &nb= sp; </rdf:li&= gt; <br> &nb= sp; </rdf:Seq> <br> &nb= sp; </pdfaSchema:property> <br> &nb= sp; </rdf:li> <br> </rdf:= Bag> <br> </pdfaExtension:schemas&= gt; <br> </rdf:RDF></span><o:p></o:p></p> </div> <div> <p class=3D"MsoNormal">... <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal">Not only the namespace attributes <span style=3D"fon= t-family:"Courier New""> xmlns:pdfaSchema</span> and <span style=3D"font-family:"Courier New&qu= ot;">xmlns:pdfaProperty</span> are missing, but also the rdf:Description el= ement is now called rdf:RDF (?!) <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal">I think it makes sense to create a Jira ticket for t= his issue. Since I am not a member of the project, shall I sign up and do t= his? <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> <o:p></o:p></p> </div> <div> <p>Cheers<o:p></o:p></p> <p> J=F6rn Willh=F6ft<o:p></o:p></p> </div> <blockquote style=3D"margin-top:5.0pt;margin-bottom:5.0pt"> <div> <p class=3D"MsoNormal">J=F6rn Willh=F6ft <<a href=3D"mailto:jwi@willhoef= t-it.com">[email protected]</a>> hat am 07.11.2024 13:34 CET geschrie= ben: <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal">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 c= reate 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 S= axon is not really an option as I need XSLT 2.0. <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal">It is still unclear to me if the problem is in the C= amel FOP component or FOP itself. <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal"> <o:p></o:p></p> </div> <div> <p class=3D"MsoNormal">Cheers <o:p></o:p></p> </div> <div> <p> J=F6rn Willh=F6ft<o:p></o:p></p> </div> </blockquote> </div> </div> <style type=3D"text/css">=0A= a:link {color:#20407f;text-decoration:none;}=0A= a:visited {color:#20407f;text-decoration:none;}=0A= </style> <table style=3D"width:400px"> <tbody> <tr> <td colspan=3D"2"> <hr size=3D"4" color=3D"fec432" width=3D"30%" align=3D"left"> </td> </tr> <tr> <td width=3D"65%" ;=3D"" style=3D"FONT-FAMILY: Arial Black; COLOR: #20407f;= FONT-SIZE: 11px"> Joao Andre Goncalves<br> Customer Developer<br> <br> </td> </tr> <tr> <td style=3D"FONT-FAMILY: Arial; COLOR: #20407f; FONT-SIZE: 9px">t | m 0773= 3161880<br> [email protected]<br> <a href=3D"https://www.smartcommunications.com/">smartcommunications.com</a= ><br> <br> </td> </tr> </tbody> </table> <table style=3D"width:400px"> <tbody> <tr> <td width=3D"100%" ;=3D"" colspan=3D"2"><a href=3D"https://www.smartcommuni= cations.com/resources/benchmark-report/?utm_source=3Doutlook&utm_medium= =3Demail&utm_campaign=3Dbenchmark_report_2024_webpage"><img src=3D"http= s://scale.smartcommunications.com/rs/041-BQO-927/images/024_Esignature-2024= -Benchmark.png?version=3D0" width=3D"" 450=3D"" height=3D"160"></a><br> <br> </td> </tr> <tr> <td width=3D"28%" ;=3D"" style=3D"FONT-FAMILY: Arial Black; COLOR: #20407f;= FONT-SIZE: 10px"> <a href=3D"https://www.smartcommunications.com/resources/benchmark-report/?= utm_source=3Doutlook&utm_medium=3Demail&utm_campaign=3Dbenchmark_re= port_2024_webpage">The largest study of its kind! Unlock unparalleled insig= hts into customer preferences and stay ahead in today’s market. Download now!</a></td> <td width=3D"72%" ;=3D"" style=3D"FONT-FAMILY: Arial; COLOR: #939597; line-= height: 13px; FONT-SIZE: 9px"> Smart Communications is a trading name of SmartComms SC Limited which is re= gistered in England under No. 4303041 whose registered office is at Suite 2= 3, LCLB, 95 Mortimer Street, London, W1W 7GB. Please consider the environme= nt before printing. The contents of this e-mail are intended for the named addressee only. It contains conf= idential information. Unless you are the named addressee or an authorized d= esignee, you may not copy or use it, or disclose it to anyone else. If you = received it in error please notify us immediately and then destroy it. Smart Communications will process your= data as described in the Smart Communications' <a href=3D"https://www.smartcommunications.com/external-privacy-policy/">Ex= ternal Privacy Policy.</a></td> </tr> <tr> <td width=3D"100%" ;=3D"" colspan=3D"2" style=3D"FONT-FAMILY: Arial Black; = COLOR: #20407f; FONT-SIZE: 10px"> <br> Follow us on <a href=3D"https://www.linkedin.com/company/15166060/admin/">L= inkedIn</a> and <a href=3D"https://twitter.com/ccminnovators?lang=3Den">Twitter</a></td> </tr> </tbody> </table> </body> </html> --_000_AM9PR04MB8604AD2D8ED3F90DE7850562DD5C2AM9PR04MB8604eurp_--