zakkinsey / pdfa-test-4

0 stars 0 forks source link

PDFUA-151: Document fragment #151

Open zakkinsey opened 5 years ago

zakkinsey commented 5 years ago

Jira issue originally created by user jensbjerrekirkegaard:

The objective of this technique is to show the use of the DocumentFragment tag when a PDF file contains content that is part of a different document.  A "use case" for this would be when a full document contains an excerpt of another document.  

Note:  For the current PDF specifications (ISO 32000-1:2020 and ISO 14289-1), DocumentFragment is not a standard structure type.  As such, it should be role mapped to a grouping tag that is a standard structure type in PDF-1.7.  However, DocumentFragment is a standard structure type in PDF-2.0 and, in the future, processors and assistive technologies should know how to handle it. 

zakkinsey commented 3 years ago

Comment created by @MarkusErle:

H1: First level heading in the main document

P: The following text is inserted from another document served as documentation.

Keep the fragment like it is

The content of the box is enclosed in DocumentFragment tag

the heading of the fragment is a H2

Fix contrast issue

zakkinsey commented 3 years ago

Comment created by @MarkusErle:

Accepted

Rolemapped to PDF 1.7 For a valid 2.0 example the namespace is missing

zakkinsey commented 3 years ago

Comment created by @pkopicar:

Cleaned up

zakkinsey commented 3 years ago

Comment created by @PaulRayius:

Shouldn't the heading tag in the DocumentFragment be an H3?  Logically, in the "parent" document (where the fragment came from) if "2" is an H1, "2.3" would be an H2 and "2.3.4 heading from the document fragment" would be an H3, right? 

zakkinsey commented 3 years ago

Comment created by @unknown-jira-user-2:

[~prayius], you are correct for UA-2, but the heading level provisions do not match in UA-1 and UA-2. In UA-2, the "2.3.4" heading is "evidently" a level 3 heading and should be tagged H3. In contrast, UA-1 has a strict requirement that heading levels can only increment by one level at a time. This means using H3 violates UA-1. The use of namespace and a DocumentFragment tag that is role-mapped to Part is a good forward-compatibility practice, but forward compatibility does not create an exception to the UA-1 heading level rules. This is still a UA-1 and PDF-1.7 document.

DocumentFragment will require a separate example for UA-2 with an H3 like you suggest. For that reason, I suggest the Description and Tests should reflect a UA-1 focus. The Tests should not mention UA-2 or PDF-2, but a short explanation in the description of the forward-compatibility measures is warranted.

"This [document fragment] tag must be a child [] of a document tag" should be removed. Annex L of PDF-2.0 allows DocumentFragment as a child of tags other than Document. More importantly, it's the PDF-1.7 containment rules for Part that apply in this case, not PDF-2.0.

zakkinsey commented 3 years ago

Comment created by @PaulRayius:

Points well taken, @william Kilian.  Thanks. 

I've updated the Tests, Expected Results and the Description.