Fixed Mustang XML/ZUGFeRD standards namespace issues.
This commit is contained in:
committed by
Thomas Chojecki
parent
f087d08119
commit
1a16ac296a
@@ -15,16 +15,16 @@ import org.w3c.dom.Element;
|
||||
* Additionally to adding a RDF namespace with a indication which file
|
||||
* attachment if Zugferd, this namespace has to be described in a PDFA
|
||||
* Extension Schema.
|
||||
*
|
||||
*
|
||||
* I know there is a PDFAExtensionSchema in the context of PDFBox' XMPBOX
|
||||
* but I have been using PDFBox' JempBOX so far because I could not find out
|
||||
* but I have been using PDFBox' JempBOX so far because I could not find out
|
||||
* how to write XMPBOX XMPMetadata to a PDF file.
|
||||
*
|
||||
* So this is my version of PDFAExtensionSchema
|
||||
*
|
||||
* So this is my version of PDFAExtensionSchema
|
||||
* for PDFBox' jempbox XMPMetadata
|
||||
*
|
||||
*
|
||||
* @author jstaerk
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class XMPSchemaPDFAExtensions extends XMPSchemaBasic {
|
||||
|
||||
@@ -52,8 +52,8 @@ import org.w3c.dom.Element;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public XMPSchemaPDFAExtensions(org.apache.jempbox.xmp.XMPMetadata parent) {
|
||||
super(parent);
|
||||
|
||||
@@ -101,7 +101,7 @@ import org.w3c.dom.Element;
|
||||
|
||||
Element nsInfoNode = schema.getOwnerDocument().createElement(
|
||||
"pdfaSchema:namespaceURI"); //$NON-NLS-1$
|
||||
XMLUtil.setStringValue(nsInfoNode, "urn:ferd:pdfa:invoice:rc#"); //$NON-NLS-1$
|
||||
XMLUtil.setStringValue(nsInfoNode, "urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#"); //$NON-NLS-1$
|
||||
bagListNode.appendChild(nsInfoNode);
|
||||
|
||||
Element prefixInfoNode = schema.getOwnerDocument().createElement(
|
||||
|
||||
@@ -15,14 +15,14 @@ import org.w3c.dom.Element;
|
||||
public class XMPSchemaZugferd extends XMPSchemaBasic {
|
||||
|
||||
/**
|
||||
* This is what needs to be added to the RDF metadata - basically the name of the embedded
|
||||
* This is what needs to be added to the RDF metadata - basically the name of the embedded
|
||||
* Zugferd file
|
||||
* */
|
||||
public XMPSchemaZugferd(org.apache.jempbox.xmp.XMPMetadata parent) {
|
||||
super(parent);
|
||||
|
||||
schema.setAttributeNS(NS_NAMESPACE, "xmlns:zf", //$NON-NLS-1$
|
||||
"urn:ferd:pdfa:invoice:rc#"); //$NON-NLS-1$
|
||||
"urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#"); //$NON-NLS-1$
|
||||
// the superclass includes this two namespaces we don't need
|
||||
schema.removeAttributeNS(NS_NAMESPACE, "xapGImg"); //$NON-NLS-1$
|
||||
schema.removeAttributeNS(NS_NAMESPACE, "xmp"); //$NON-NLS-1$
|
||||
@@ -37,12 +37,12 @@ public class XMPSchemaZugferd extends XMPSchemaBasic {
|
||||
schema.appendChild(textNode);
|
||||
|
||||
textNode = schema.getOwnerDocument().createElement("zf:Version"); //$NON-NLS-1$
|
||||
XMLUtil.setStringValue(textNode, "RC"); //$NON-NLS-1$
|
||||
XMLUtil.setStringValue(textNode, "1.0"); //$NON-NLS-1$
|
||||
schema.appendChild(textNode);
|
||||
|
||||
textNode = schema.getOwnerDocument().createElement(
|
||||
"zf:ConformanceLevel"); //$NON-NLS-1$
|
||||
XMLUtil.setStringValue(textNode, "BASIC"); //$NON-NLS-1$
|
||||
XMLUtil.setStringValue(textNode, "COMFORT"); //$NON-NLS-1$
|
||||
schema.appendChild(textNode);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user