[jira] [Commented] (PDFBOX-5591) Parsing of XMP metadata without optional xmpmeta element
[ https://issues.apache.org/jira/browse/PDFBOX-5591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17722043#comment-17722043 ] Miroslav Holubec commented on PDFBOX-5591: -- Hi [~tilman], do you have time to review the merge of [https://github.com/apache/pdfbox/pull/163]? Or how can I move it forward? Thanks allot! m. > Parsing of XMP metadata without optional xmpmeta element > > > Key: PDFBOX-5591 > URL: https://issues.apache.org/jira/browse/PDFBOX-5591 > Project: PDFBox > Issue Type: Bug > Components: XmpBox >Affects Versions: 2.0.28 >Reporter: Miroslav Holubec >Priority: Major > Fix For: 2.0.29, 3.0.0 PDFBox > > > As per [XMP > Specification|https://printtechnologies.org/wp-content/uploads/2020/03/xmp-specification-jan04_fileticket1nrcKq4MTKctabid158mid669.pdf] > is the _xmpmeta_ element optional: > The sections below describe the high-level structure of XMP data in an XMP > Packet: > * The outermost element is *optionally* an x:xmpmeta element > * It contains a single rdf:RDF element > * which in turn contains one or more rdf:Description elements > * each of which contains one or more XMP Properties. > > DomXmpParser requires it as per call to {{expectNaming(root, > "adobe:ns:meta/", "x", "xmpmeta");}} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-5591) Parsing of XMP metadata without optional xmpmeta element
[ https://issues.apache.org/jira/browse/PDFBOX-5591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17717505#comment-17717505 ] Miroslav Holubec commented on PDFBOX-5591: -- pull request: https://github.com/apache/pdfbox/pull/163 > Parsing of XMP metadata without optional xmpmeta element > > > Key: PDFBOX-5591 > URL: https://issues.apache.org/jira/browse/PDFBOX-5591 > Project: PDFBox > Issue Type: Bug > Components: XmpBox >Affects Versions: 2.0.28 >Reporter: Miroslav Holubec >Priority: Major > > As per [XMP > Specification|https://printtechnologies.org/wp-content/uploads/2020/03/xmp-specification-jan04_fileticket1nrcKq4MTKctabid158mid669.pdf] > is the _xmpmeta_ element optional: > The sections below describe the high-level structure of XMP data in an XMP > Packet: > * The outermost element is *optionally* an x:xmpmeta element > * It contains a single rdf:RDF element > * which in turn contains one or more rdf:Description elements > * each of which contains one or more XMP Properties. > > DomXmpParser requires it as per call to {{expectNaming(root, > "adobe:ns:meta/", "x", "xmpmeta");}} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-5591) Parsing of XMP metadata without optional xmpmeta element
[ https://issues.apache.org/jira/browse/PDFBOX-5591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17717483#comment-17717483 ] Miroslav Holubec commented on PDFBOX-5591: -- Possible solution: {noformat} private Element findDescriptionsParent(Element root) throws XmpParsingException { Element rdfRdf; if (!XmpConstants.RDF_NAMESPACE.equals(root.getNamespaceURI())) { // always expectNaming(root, "adobe:ns:meta/", "x", "xmpmeta"); // should only have one child NodeList nl = root.getChildNodes(); if (nl.getLength() == 0) { // empty description throw new XmpParsingException(ErrorType.Format, "No rdf description found in xmp"); } else if (nl.getLength() > 1) { // only expect one element throw new XmpParsingException(ErrorType.Format, "More than one element found in x:xmpmeta"); } else if (!(root.getFirstChild() instanceof Element)) { // should be an element throw new XmpParsingException(ErrorType.Format, "x:xmpmeta does not contains rdf:RDF element"); } // else let's parse rdfRdf = (Element) root.getFirstChild(); } else { rdfRdf = root; } // always http://www.w3.org/1999/02/22-rdf-syntax-ns#;> expectNaming(rdfRdf, XmpConstants.RDF_NAMESPACE, XmpConstants.DEFAULT_RDF_PREFIX, XmpConstants.DEFAULT_RDF_LOCAL_NAME); // return description parent return rdfRdf; } {noformat} > Parsing of XMP metadata without optional xmpmeta element > > > Key: PDFBOX-5591 > URL: https://issues.apache.org/jira/browse/PDFBOX-5591 > Project: PDFBox > Issue Type: Bug > Components: XmpBox >Affects Versions: 2.0.28 >Reporter: Miroslav Holubec >Priority: Major > > As per [XMP > Specification|https://printtechnologies.org/wp-content/uploads/2020/03/xmp-specification-jan04_fileticket1nrcKq4MTKctabid158mid669.pdf] > is the _xmpmeta_ element optional: > The sections below describe the high-level structure of XMP data in an XMP > Packet: > * The outermost element is *optionally* an x:xmpmeta element > * It contains a single rdf:RDF element > * which in turn contains one or more rdf:Description elements > * each of which contains one or more XMP Properties. > > DomXmpParser requires it as per call to expectNaming(root, "adobe:ns:meta/", > "x", "xmpmeta"); -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-5591) Parsing of XMP metadata without optional xmpmeta element
[ https://issues.apache.org/jira/browse/PDFBOX-5591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Miroslav Holubec updated PDFBOX-5591: - Description: As per [XMP Specification|https://printtechnologies.org/wp-content/uploads/2020/03/xmp-specification-jan04_fileticket1nrcKq4MTKctabid158mid669.pdf] is the _xmpmeta_ element optional: The sections below describe the high-level structure of XMP data in an XMP Packet: * The outermost element is *optionally* an x:xmpmeta element * It contains a single rdf:RDF element * which in turn contains one or more rdf:Description elements * each of which contains one or more XMP Properties. DomXmpParser requires it as per call to {{expectNaming(root, "adobe:ns:meta/", "x", "xmpmeta");}} was: As per [XMP Specification|https://printtechnologies.org/wp-content/uploads/2020/03/xmp-specification-jan04_fileticket1nrcKq4MTKctabid158mid669.pdf] is the _xmpmeta_ element optional: The sections below describe the high-level structure of XMP data in an XMP Packet: * The outermost element is *optionally* an x:xmpmeta element * It contains a single rdf:RDF element * which in turn contains one or more rdf:Description elements * each of which contains one or more XMP Properties. DomXmpParser requires it as per call to expectNaming(root, "adobe:ns:meta/", "x", "xmpmeta"); > Parsing of XMP metadata without optional xmpmeta element > > > Key: PDFBOX-5591 > URL: https://issues.apache.org/jira/browse/PDFBOX-5591 > Project: PDFBox > Issue Type: Bug > Components: XmpBox >Affects Versions: 2.0.28 >Reporter: Miroslav Holubec >Priority: Major > > As per [XMP > Specification|https://printtechnologies.org/wp-content/uploads/2020/03/xmp-specification-jan04_fileticket1nrcKq4MTKctabid158mid669.pdf] > is the _xmpmeta_ element optional: > The sections below describe the high-level structure of XMP data in an XMP > Packet: > * The outermost element is *optionally* an x:xmpmeta element > * It contains a single rdf:RDF element > * which in turn contains one or more rdf:Description elements > * each of which contains one or more XMP Properties. > > DomXmpParser requires it as per call to {{expectNaming(root, > "adobe:ns:meta/", "x", "xmpmeta");}} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Created] (PDFBOX-5591) Parsing of XMP metadata without optional xmpmeta element
Miroslav Holubec created PDFBOX-5591: Summary: Parsing of XMP metadata without optional xmpmeta element Key: PDFBOX-5591 URL: https://issues.apache.org/jira/browse/PDFBOX-5591 Project: PDFBox Issue Type: Bug Components: XmpBox Affects Versions: 2.0.28 Reporter: Miroslav Holubec As per [XMP Specification|https://printtechnologies.org/wp-content/uploads/2020/03/xmp-specification-jan04_fileticket1nrcKq4MTKctabid158mid669.pdf] is the _xmpmeta_ element optional: The sections below describe the high-level structure of XMP data in an XMP Packet: * The outermost element is *optionally* an x:xmpmeta element * It contains a single rdf:RDF element * which in turn contains one or more rdf:Description elements * each of which contains one or more XMP Properties. DomXmpParser requires it as per call to expectNaming(root, "adobe:ns:meta/", "x", "xmpmeta"); -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4817) Generated XMP Metadata with other XSLT processor are XML invalid
[ https://issues.apache.org/jira/browse/PDFBOX-4817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17107240#comment-17107240 ] Miroslav Holubec commented on PDFBOX-4817: -- perfect, thank you! > Generated XMP Metadata with other XSLT processor are XML invalid > > > Key: PDFBOX-4817 > URL: https://issues.apache.org/jira/browse/PDFBOX-4817 > Project: PDFBox > Issue Type: Bug > Components: XmpBox >Affects Versions: 2.0.19 >Reporter: Miroslav Holubec >Assignee: Andreas Lehmkühler >Priority: Major > Fix For: 2.0.20, 3.0.0 PDFBox > > > In our system I cannot affect javax.xml.transform.TransformerFactory > property, it is per default set to > org.apache.xalan.processor.TransformerFactoryImpl (Xalan v2.7.2). > When I generate XMP metadata DublinCoreSchema with title, I will get > following piece of XML: > {noformat} > http://purl.org/dc/elements/1.1/; rdf:about=""> > > > some title > > > > {noformat} > Problem is, that before _lang_ attribute is _xml:_ attribute prefix missing, > and then is XML invalid as per specification. With > org.apache.xalan.xsltc.trax.TransformerFactoryImpl is everything OK. > Solution to the problem will be providing DocumentBuilderFactory and > TransformerFactory from outside via constructor. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Closed] (PDFBOX-4817) Generated XMP Metadata with other XSLT processor are XML invalid
[ https://issues.apache.org/jira/browse/PDFBOX-4817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Miroslav Holubec closed PDFBOX-4817. Resolution: Fixed > Generated XMP Metadata with other XSLT processor are XML invalid > > > Key: PDFBOX-4817 > URL: https://issues.apache.org/jira/browse/PDFBOX-4817 > Project: PDFBox > Issue Type: Bug > Components: XmpBox >Affects Versions: 2.0.19 >Reporter: Miroslav Holubec >Assignee: Andreas Lehmkühler >Priority: Major > Fix For: 2.0.20, 3.0.0 PDFBox > > > In our system I cannot affect javax.xml.transform.TransformerFactory > property, it is per default set to > org.apache.xalan.processor.TransformerFactoryImpl (Xalan v2.7.2). > When I generate XMP metadata DublinCoreSchema with title, I will get > following piece of XML: > {noformat} > http://purl.org/dc/elements/1.1/; rdf:about=""> > > > some title > > > > {noformat} > Problem is, that before _lang_ attribute is _xml:_ attribute prefix missing, > and then is XML invalid as per specification. With > org.apache.xalan.xsltc.trax.TransformerFactoryImpl is everything OK. > Solution to the problem will be providing DocumentBuilderFactory and > TransformerFactory from outside via constructor. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4817) Generated XMP Metadata with other XSLT processor are XML invalid
[ https://issues.apache.org/jira/browse/PDFBOX-4817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17087955#comment-17087955 ] Miroslav Holubec commented on PDFBOX-4817: -- Yeah exactly. Or at least setters... I verified that Xalan XSLTC and Vanilla Java (based on same) are working without issues. Saxon and standard Xalan unfortunately not. > Generated XMP Metadata with other XSLT processor are XML invalid > > > Key: PDFBOX-4817 > URL: https://issues.apache.org/jira/browse/PDFBOX-4817 > Project: PDFBox > Issue Type: Bug > Components: XmpBox >Affects Versions: 2.0.19 >Reporter: Miroslav Holubec >Priority: Major > > In our system I cannot affect javax.xml.transform.TransformerFactory > property, it is per default set to > org.apache.xalan.processor.TransformerFactoryImpl (Xalan v2.7.2). > When I generate XMP metadata DublinCoreSchema with title, I will get > following piece of XML: > {noformat} > http://purl.org/dc/elements/1.1/; rdf:about=""> > > > some title > > > > {noformat} > Problem is, that before _lang_ attribute is _xml:_ attribute prefix missing, > and then is XML invalid as per specification. With > org.apache.xalan.xsltc.trax.TransformerFactoryImpl is everything OK. > Solution to the problem will be providing DocumentBuilderFactory and > TransformerFactory from outside via constructor. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Created] (PDFBOX-4817) Generated XMP Metadata with other XSLT processor are XML invalid
Miroslav Holubec created PDFBOX-4817: Summary: Generated XMP Metadata with other XSLT processor are XML invalid Key: PDFBOX-4817 URL: https://issues.apache.org/jira/browse/PDFBOX-4817 Project: PDFBox Issue Type: Bug Components: XmpBox Affects Versions: 2.0.19 Reporter: Miroslav Holubec In our system I cannot affect javax.xml.transform.TransformerFactory property, it is per default set to org.apache.xalan.processor.TransformerFactoryImpl (Xalan v2.7.2). When I generate XMP metadata DublinCoreSchema with title, I will get following piece of XML: {noformat} http://purl.org/dc/elements/1.1/; rdf:about=""> some title {noformat} Problem is, that before _lang_ attribute is _xml:_ attribute prefix missing, and then is XML invalid as per specification. With org.apache.xalan.xsltc.trax.TransformerFactoryImpl is everything OK. Solution to the problem will be providing DocumentBuilderFactory and TransformerFactory from outside via constructor. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org