[
https://issues.apache.org/jira/browse/PDFBOX-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18040903#comment-18040903
]
Tilman Hausherr commented on PDFBOX-2378:
-----------------------------------------
The new output:
{code:xml}
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta
xmlns:x="adobe:ns:meta/">
<rdf:RDF xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#"
xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="">
<pdfaExtension:schemas>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
<pdfaSchema:schema>ZUGFeRD PDFA Extension Schema</pdfaSchema:schema>
<pdfaSchema:namespaceURI>urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#</pdfaSchema:namespaceURI>
<pdfaSchema:prefix>zf</pdfaSchema:prefix>
<pdfaSchema:property>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>DocumentFileName</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>name of the embedded XML invoice
file</pdfaProperty:description>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>DocumentType</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>INVOICE</pdfaProperty:description>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>Version</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>The actual version of the ZUGFeRD
XML schema</pdfaProperty:description>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>The conformance level of the
embedded ZUGFeRD data</pdfaProperty:description>
</rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
</rdf:Bag>
</pdfaExtension:schemas>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta><?xpacket end="w"?>
{code}
although the description part is now empty, the namespace declaration are all
in the rdf.
> XMPBox removes namespaces on serialization
> ------------------------------------------
>
> Key: PDFBOX-2378
> URL: https://issues.apache.org/jira/browse/PDFBOX-2378
> Project: PDFBox
> Issue Type: Bug
> Components: XmpBox
> Affects Versions: 1.8.7, 2.0.29, 3.0.0 PDFBox, 4.0.0
> Reporter: Vadimo
> Assignee: Tilman Hausherr
> Priority: Minor
> Fix For: 2.0.36, 3.0.7 PDFBox, 4.0.0
>
> Attachments: zf_extension.pdfbox.xmp
>
>
> {code:title=Bar.java|borderStyle=none}
> InputStream zfExtensionIs =
> getClass().getResourceAsStream("/zf_extension.pdfbox.xmp");
> DomXmpParser builder = new DomXmpParser();
> zfDefaultXmp = builder.parse(zfExtensionIs);
> PdfaExtensionHelper.populateSchemaMapping(zfDefaultXmp);
> new XmpSerializer().serialize(zfDefaultXmp, new
> FileOutputStream("target/out.xmp.xml"), true);
> {code}
> the incoming file
> {code:xml|title=incoming.xml|borderStyle=none}
> <rdf:Description
> xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
> xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
> xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" rdf:about="">
> {code}
> outgoing file
> {code:xml|title=resulting.xml|borderStyle=none}
> <rdf:Description xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
> rdf:about="">
> {code}
> why are the two namespaces gone?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]