[ 
https://issues.apache.org/jira/browse/PDFBOX-6133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-6133:
------------------------------------
    Description: 
The attached file, which I had thought to be a test case for PDFBOX-6131) 
validates with PDFLib and VeraPDF but fails in xmpbox. I suspect that this is 
because the URI is used several times.

Some debug output in checkPropertyDefinition() for later:
{noformat}
t1 prop (prefix, local, ns) : patent, CountryCode, 
http://www.epo.org/patent-bibliographic-data/1.0/
t1 isDefinedTypeNamespace   : true
t1 isDefinedSchema          : true
t1 isDefinedNamespace       : true
t1 containsNamespace        : true
{noformat}
In {{getSpecifiedPropertyType()}}, {{getSchemaFactory()}} returns something, 
but {{factory.getPropertyType(name.getLocalPart())}} doesn't.

Changing that doesn't make it better, because definedStructuredNamespaces has 
only 1 entry with the prefix "Bookmark", but there are more and the type is 
nested.

{{tm.addToDefinedStructuredTypes()}} in {{populatePDFAType()}} is called twice, 
so the second overwrites the first:

ttype: DocId, tns: http://www.epo.org/patent-bibliographic-data/1.0/, pm: 
[Number, CorrectionCode, CountryCode, KindCode, Date]
ttype: Bookmark, tns: http://www.epo.org/patent-bibliographic-data/1.0/, pm: 
[StartPage, DocumentSection, NumberOfPages]


  was:
The attached file, which I had thought to be a test case for PDFBOX-6131) 
validates with PDFLib and VeraPDF but fails in xmpbox. I suspect that this is 
because the URI is used several times.

Some debug output in checkPropertyDefinition() for later:
{noformat}
t1 prop (prefix, local, ns) : patent, CountryCode, 
http://www.epo.org/patent-bibliographic-data/1.0/
t1 isDefinedTypeNamespace   : true
t1 isDefinedSchema          : true
t1 isDefinedNamespace       : true
t1 containsNamespace        : true
{noformat}
In {{getSpecifiedPropertyType()}}, {{getSchemaFactory()}} returns something, 
but {{factory.getPropertyType(name.getLocalPart())}} doesn't.

Changing that doesn't make it better, because definedStructuredNamespaces has 
only 1 entry with the prefix "Bookmark", but there are more and the type is 
nested.


> XmpParsingException: Property 'CountryCode' not defined in 
> http://www.epo.org/patent-bibliographic-data/1.0/
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-6133
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-6133
>             Project: PDFBox
>          Issue Type: Bug
>          Components: XmpBox
>            Reporter: Tilman Hausherr
>            Priority: Major
>         Attachments: PDFBOX-6131-0064638.pdf, PDFBOX-6131-0064638.xml
>
>
> The attached file, which I had thought to be a test case for PDFBOX-6131) 
> validates with PDFLib and VeraPDF but fails in xmpbox. I suspect that this is 
> because the URI is used several times.
> Some debug output in checkPropertyDefinition() for later:
> {noformat}
> t1 prop (prefix, local, ns) : patent, CountryCode, 
> http://www.epo.org/patent-bibliographic-data/1.0/
> t1 isDefinedTypeNamespace   : true
> t1 isDefinedSchema          : true
> t1 isDefinedNamespace       : true
> t1 containsNamespace        : true
> {noformat}
> In {{getSpecifiedPropertyType()}}, {{getSchemaFactory()}} returns something, 
> but {{factory.getPropertyType(name.getLocalPart())}} doesn't.
> Changing that doesn't make it better, because definedStructuredNamespaces has 
> only 1 entry with the prefix "Bookmark", but there are more and the type is 
> nested.
> {{tm.addToDefinedStructuredTypes()}} in {{populatePDFAType()}} is called 
> twice, so the second overwrites the first:
> ttype: DocId, tns: http://www.epo.org/patent-bibliographic-data/1.0/, pm: 
> [Number, CorrectionCode, CountryCode, KindCode, Date]
> ttype: Bookmark, tns: http://www.epo.org/patent-bibliographic-data/1.0/, pm: 
> [StartPage, DocumentSection, NumberOfPages]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to