[
https://issues.apache.org/jira/browse/PDFBOX-4817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17986611#comment-17986611
]
Tilman Hausherr commented on PDFBOX-4817:
-----------------------------------------
Reason for the problem found by asking ChatGPT, and fixed in PDFBOX-6027
> 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}
> <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
> <dc:title>
> <rdf:Alt>
> <rdf:li lang="x-default">some title</rdf:li>
> </rdf:Alt>
> </dc:title>
> </rdf:Description>
> {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.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]