[
https://issues.apache.org/jira/browse/PDFBOX-2417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14176674#comment-14176674
]
Tilman Hausherr commented on PDFBOX-2417:
-----------------------------------------
The file goes through with the current trunk if the two schema definitions are
moved up. I'm not saying that this is a bug, it is just an observation how the
DomXmpParser works.
not ok:
{code}
<rdf:Description rdf:about=""
xmlns:ptt="http://ns.pdflib.com/typetest/1.0/">
<ptt:T_Boolean>True</ptt:T_Boolean>
<ptt:T_Choice>foo</ptt:T_Choice>
<ptt:T_Date>2008-01-16T00:00:00Z</ptt:T_Date>
<ptt:T_Dimensions>
<rdf:Description
xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#">
<stDim:w>4</stDim:w>
<stDim:h>3</stDim:h>
<stDim:unit>inches</stDim:unit>
</rdf:Description>
</ptt:T_Dimensions>
<ptt:T_Integer>47</ptt:T_Integer>
<ptt:T_Locale>de</ptt:T_Locale>
<ptt:T_Real>IEEE754D,L,3A4901F387D31108</ptt:T_Real>
<ptt:T_MIMEType>application/pdf</ptt:T_MIMEType>
<ptt:T_ProperName>Humphrey Bogart</ptt:T_ProperName>
<ptt:T_Text>Plain Old Text (POT)</ptt:T_Text>
<ptt:T_Thumbnail>
<rdf:Description xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/">
{code}
ok:
{code}
<rdf:Description rdf:about=""
xmlns:ptt="http://ns.pdflib.com/typetest/1.0/"
xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/">
<ptt:T_Boolean>True</ptt:T_Boolean>
<ptt:T_Choice>foo</ptt:T_Choice>
<ptt:T_Date>2008-01-16T00:00:00Z</ptt:T_Date>
<ptt:T_Dimensions>
<rdf:Description>
<stDim:w>4</stDim:w>
<stDim:h>3</stDim:h>
<stDim:unit>inches</stDim:unit>
</rdf:Description>
</ptt:T_Dimensions>
<ptt:T_Integer>47</ptt:T_Integer>
<ptt:T_Locale>de</ptt:T_Locale>
<ptt:T_Real>IEEE754D,L,3A4901F387D31108</ptt:T_Real>
<ptt:T_MIMEType>application/pdf</ptt:T_MIMEType>
<ptt:T_ProperName>Humphrey Bogart</ptt:T_ProperName>
<ptt:T_Text>Plain Old Text (POT)</ptt:T_Text>
<ptt:T_Thumbnail>
<rdf:Description>
{code}
> xmp regression? 7.3 : Error on MetaData, Schema is not set in this document :
> http://ns.adobe.com/xap/1.0/sType/Dimensions#
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: PDFBOX-2417
> URL: https://issues.apache.org/jira/browse/PDFBOX-2417
> Project: PDFBox
> Issue Type: Bug
> Components: Preflight
> Affects Versions: 2.0.0
> Reporter: Ralf Hauser
> Fix For: 2.0.0
>
> Attachments: good0011.pdf, patch2417.txt
>
>
> oops, the error message has changed a little bit:
> was "7.6 : Error on MetaData, Type not defined : Dimensions"
> org.apache.xmpbox.xml.XmpParsingException: Schema is not set in this document
> : http://ns.adobe.com/xap/1.0/sType/Dimensions#
> at
> org.apache.xmpbox.xml.DomXmpParser.checkPropertyDefinition(DomXmpParser.java:808)
> at
> org.apache.xmpbox.xml.DomXmpParser.parseLiDescription(DomXmpParser.java:530)
> at
> org.apache.xmpbox.xml.DomXmpParser.createProperty(DomXmpParser.java:353)
> at
> org.apache.xmpbox.xml.DomXmpParser.parseDescriptionRoot(DomXmpParser.java:292)
> at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:206)
> at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:114)
> at
> org.apache.pdfbox.preflight.process.MetadataValidationProcess.validate(MetadataValidationProcess.java:66)
> at
> org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:73)
> at
> org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:88)
> at
> org.apache.pdfbox.preflight.PreflightDocument.validate(PreflightDocument.java:168)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)