Skip to content

Commit

Permalink
PDF/UA. Update rules about tagged content
Browse files Browse the repository at this point in the history
PDF/UA-1(7.1-1 - 7.1-2), PDF/UA-2(8.2.2-1, 8.5.1-1)
  • Loading branch information
MaximPlusov committed Dec 27, 2023
1 parent b93f422 commit 5e46b51
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<description>The ActualText entry shall not contain any PUA values</description>
<test>containsPUA == false</test>
<error>
<message>The ActualText entry contains a Private Unicoide Area value</message>
<message>The ActualText entry contains a Private Unicode Area value</message>
<arguments/>
</error>
<references/>
Expand Down
6 changes: 3 additions & 3 deletions PDF_UA/1/7.1 General/verapdf-profile-7-1-t01.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<rule object="SEMarkedContent" tags="major,machine,artifact">
<id specification="ISO_14289_1" clause="7.1" testNumber="1"/>
<description>Content marked as Artifact should not present inside tagged content</description>
<test>tag != 'Artifact' || parentStructureTag == null</test>
<test>tag != 'Artifact' || isTaggedContent == false</test>
<error>
<message>Content marked as Artifact is present inside tagged content (tag %1)</message>
<message>Content marked as Artifact is present inside tagged content (parent struct element %1)</message>
<arguments>
<argument>parentStructureTag</argument>
<argument>parentStructureElementObjectKey</argument>
</arguments>
</error>
<references/>
Expand Down
6 changes: 3 additions & 3 deletions PDF_UA/1/7.1 General/verapdf-profile-7-1-t02.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<rule object="SEMarkedContent" tags="major,machine,artifact">
<id specification="ISO_14289_1" clause="7.1" testNumber="2"/>
<description>Tagged content should not present inside content marked as Artifact</description>
<test>parentStructureTag == null || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length == 0</test>
<test>isTaggedContent == false || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length == 0</test>
<error>
<message>Tagged content (tag %1) is present inside content marked as Artifact</message>
<message>Tagged content (parent struct element %1) is present inside content marked as Artifact</message>
<arguments>
<argument>parentStructureTag</argument>
<argument>parentStructureElementObjectKey</argument>
</arguments>
</error>
<references/>
Expand Down
2 changes: 1 addition & 1 deletion PDF_UA/1/7.1 General/verapdf-profile-7-1-t03.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<rule object="SESimpleContentItem" tags="critical,machine,artifact">
<id specification="ISO_14289_1" clause="7.1" testNumber="3"/>
<description>Content shall be marked as Artifact or tagged as real content</description>
<test>parentStructureTag != null || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<test>isTaggedContent == true || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<error>
<message>Content is neither marked as Artifact nor tagged as real content</message>
<arguments/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<rule object="SESimpleContentItem">
<id specification="ISO_14289_2" clause="8.2.2" testNumber="1"/>
<description>Content that is not considered real shall be an artifact</description>
<test>parentStructureTag != null || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<test>isTaggedContent == true || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<error>
<message>Content is neither marked as Artifact nor tagged as real content</message>
<arguments/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<description>The ActualText entry shall not contain any PUA values</description>
<test>containsPUA == false</test>
<error>
<message>The ActualText entry contains a Private Unicoide Area value</message>
<message>The ActualText entry contains a Private Unicode Area value</message>
<arguments/>
</error>
<references/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
</details>
<hash></hash>
<rules>
<rule object="CosActualText">
<rule object="CosAlt">
<id specification="ISO_14289_2" clause="8.4.3" testNumber="3"/>
<description>The Alt entry shall not contain any PUA values</description>
<test>containsPUA == false</test>
<error>
<message>The Alt entry contains a Private Unicoide Area value</message>
<message>The Alt entry contains a Private Unicode Area value</message>
<arguments/>
</error>
<references/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<id specification="ISO_14289_2" clause="8.5.1" testNumber="1"/>
<description>Real content that does not possess the semantics of text objects and does not have an alternate
textual representation shall be enclosed within Figure or Formula structure elements as appropriate</description>
<test>itemType == 'text' || parentStructureTag == null || ActualText != null ||
<test>itemType == 'text' || isTaggedContent == false || ActualText != null ||
isArtifact == true || isFigure == true || isFormula == true</test>
<error>
<message>Real content that does not possess the semantics of text objects and does not have an alternate
Expand Down

0 comments on commit 5e46b51

Please sign in to comment.