Skip to content

Commit

Permalink
Update rules about non standard structure types
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov authored and github-actions[bot] committed Dec 27, 2023
1 parent e9ade88 commit 7da9827
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 20 deletions.
6 changes: 3 additions & 3 deletions PDF_A/PDFA-1A.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFA_1_A">
<details creator="veraPDF Consortium" created="2017-09-06T10:12:11.281-03:00">
<details creator="veraPDF Consortium" created="2017-09-06T13:12:11.281Z">
<name>PDF/A-1A validation profile</name>
<description>Validation rules against ISO 19005-1:2005, Cor.1:2007 and Cor.2:2011, Level A</description>
</details>
Expand Down Expand Up @@ -1652,7 +1652,7 @@
<rule object="SENonStandard">
<id specification="ISO_19005_1" clause="6.8.3.4" testNumber="1"/>
<description>All non-standard structure types shall be mapped to the nearest functionally equivalent standard type, as defined in PDF Reference 9.7.4, in the role map dictionary of the structure tree root</description>
<test>circularMappingExist == true</test>
<test>isNotMappedToStandardType == false</test>
<error>
<message>Non-standard structure type %1 is not mapped to a standard type</message>
<arguments>
Expand Down Expand Up @@ -1682,7 +1682,7 @@
<description>If the Lang entry is present in the document catalog dictionary or in a structure element dictionary or property list, its value shall be a language identifier as defined by RFC 1766, Tags for the Identification of Languages, as described in PDF Reference 9.8.1</description>
<test>unicodeValue == '' || /^[a-zA-Z]{1,8}(-[a-zA-Z]{1,8})*$/.test(unicodeValue)</test>
<error>
<message>Value %1 of the Lang entry is not Language-Tag</message>
<message>Value %1 of the Lang entry is not a Language-Tag</message>
<arguments>
<argument>unicodeValue</argument>
</arguments>
Expand Down
2 changes: 1 addition & 1 deletion PDF_A/PDFA-1B.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFA_1_B">
<details creator="veraPDF Consortium" created="2017-09-06T10:12:20.277-03:00">
<details creator="veraPDF Consortium" created="2017-09-06T13:12:20.277Z">
<name>PDF/A-1B validation profile</name>
<description>Validation rules against ISO 19005-1:2005, Cor.1:2007 and Cor.2:2011, Level B</description>
</details>
Expand Down
20 changes: 17 additions & 3 deletions PDF_A/PDFA-2A.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFA_2_A">
<details creator="veraPDF Consortium" created="2017-08-25T04:58:39.172-03:00">
<details creator="veraPDF Consortium" created="2017-08-25T07:58:39.172Z">
<name>PDF/A-2A validation profile</name>
<description>Validation rules against ISO 19005-2:2011, Level A</description>
</details>
Expand Down Expand Up @@ -1719,7 +1719,7 @@
<rule object="SENonStandard">
<id specification="ISO_19005_2" clause="6.7.3.4" testNumber="1"/>
<description>All non-standard structure types shall be mapped to the nearest functionally equivalent standard type, as defined in ISO 32000-1:2008, 14.8.4, in the role map dictionary of the structure tree root</description>
<test>circularMappingExist == true</test>
<test>isNotMappedToStandardType == false</test>
<error>
<message>Non-standard structure type %1 is not mapped to a standard type</message>
<arguments>
Expand All @@ -1744,12 +1744,26 @@
<reference specification="ISO 32000-1:2008" clause="14.8.4"/>
</references>
</rule>
<rule object="SENonStandard">
<id specification="ISO_19005_2" clause="6.7.3.4" testNumber="3"/>
<description>Standard tags shall not be remapped to a non-standard type</description>
<test>remappedStandardType == null</test>
<error>
<message>The standard structure type %1 is remapped to a non-standard type</message>
<arguments>
<argument>remappedStandardType</argument>
</arguments>
</error>
<references>
<reference specification="ISO 32000-1:2008" clause="14.8.4"/>
</references>
</rule>
<rule object="CosLang">
<id specification="ISO_19005_2" clause="6.7.4" testNumber="1"/>
<description>If the Lang entry is present in the document's Catalog dictionary or in a structure element dictionary or property list, its value shall be a language identifier as described in ISO 32000-1:2008, 14.9.2. A language identifier shall either be the empty text string, to indicate that the language is unknown, or a Language-Tag as defined in RFC 3066, Tags for the Identification of Languages</description>
<test>unicodeValue == '' || /^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/.test(unicodeValue)</test>
<error>
<message>Value %1 of the Lang entry is not Language-Tag</message>
<message>Value %1 of the Lang entry is not a Language-Tag</message>
<arguments>
<argument>unicodeValue</argument>
</arguments>
Expand Down
2 changes: 1 addition & 1 deletion PDF_A/PDFA-2B.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFA_2_B">
<details creator="veraPDF Consortium" created="2017-08-25T04:58:48.168-03:00">
<details creator="veraPDF Consortium" created="2017-08-25T07:58:48.168Z">
<name>PDF/A-2B validation profile</name>
<description>Validation rules against ISO 19005-2:2011, Level B</description>
</details>
Expand Down
2 changes: 1 addition & 1 deletion PDF_A/PDFA-2U.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFA_2_U">
<details creator="veraPDF Consortium" created="2017-08-25T04:58:57.436-03:00">
<details creator="veraPDF Consortium" created="2017-08-25T07:58:57.436Z">
<name>PDF/A-2U validation profile</name>
<description>Validation rules against ISO 19005-2:2011, Level U</description>
</details>
Expand Down
20 changes: 17 additions & 3 deletions PDF_A/PDFA-3A.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFA_3_A">
<details creator="veraPDF Consortium" created="2017-08-25T05:00:12.789-03:00">
<details creator="veraPDF Consortium" created="2017-08-25T08:00:12.789Z">
<name>PDF/A-3A validation profile</name>
<description>Validation rules against ISO 19005-3:2012, Level A</description>
</details>
Expand Down Expand Up @@ -1719,7 +1719,7 @@
<rule object="SENonStandard">
<id specification="ISO_19005_3" clause="6.7.3.4" testNumber="1"/>
<description>All non-standard structure types shall be mapped to the nearest functionally equivalent standard type, as defined in ISO 32000-1:2008, 14.8.4, in the role map dictionary of the structure tree root</description>
<test>circularMappingExist == true</test>
<test>isNotMappedToStandardType == false</test>
<error>
<message>Non-standard structure type %1 is not mapped to a standard type</message>
<arguments>
Expand All @@ -1744,12 +1744,26 @@
<reference specification="ISO 32000-1:2008" clause="14.8.4"/>
</references>
</rule>
<rule object="SENonStandard">
<id specification="ISO_19005_3" clause="6.7.3.4" testNumber="3"/>
<description>Standard tags shall not be remapped to a non-standard type</description>
<test>remappedStandardType == null</test>
<error>
<message>The standard structure type %1 is remapped to a non-standard type</message>
<arguments>
<argument>remappedStandardType</argument>
</arguments>
</error>
<references>
<reference specification="ISO 32000-1:2008" clause="14.8.4"/>
</references>
</rule>
<rule object="CosLang">
<id specification="ISO_19005_3" clause="6.7.4" testNumber="1"/>
<description>If the Lang entry is present in the document's Catalog dictionary or in a structure element dictionary or property list, its value shall be a language identifier as described in ISO 32000-1:2008, 14.9.2. A language identifier shall either be the empty text string, to indicate that the language is unknown, or a Language-Tag as defined in RFC 3066, Tags for the Identification of Languages</description>
<test>unicodeValue == '' || /^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/.test(unicodeValue)</test>
<error>
<message>Value %1 of the Lang entry is not Language-Tag</message>
<message>Value %1 of the Lang entry is not a Language-Tag</message>
<arguments>
<argument>unicodeValue</argument>
</arguments>
Expand Down
2 changes: 1 addition & 1 deletion PDF_A/PDFA-3B.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFA_3_B">
<details creator="veraPDF Consortium" created="2017-08-25T04:59:15.826-03:00">
<details creator="veraPDF Consortium" created="2017-08-25T07:59:15.826Z">
<name>PDF/A-3B validation profile</name>
<description>Validation rules against ISO 19005-3:2012, Level B</description>
</details>
Expand Down
2 changes: 1 addition & 1 deletion PDF_A/PDFA-3U.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFA_3_U">
<details creator="veraPDF Consortium" created="2017-08-25T05:00:39.590-03:00">
<details creator="veraPDF Consortium" created="2017-08-25T08:00:39.590Z">
<name>PDF/A-3U validation profile</name>
<description>Validation rules against ISO 19005-3:2012, Level U</description>
</details>
Expand Down
4 changes: 2 additions & 2 deletions PDF_A/PDFA-4.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFA_4">
<details creator="veraPDF Consortium" created="2020-12-25T04:59:15.826-03:00">
<details creator="veraPDF Consortium" created="2020-12-25T07:59:15.826Z">
<name>PDF/A-4 validation profile</name>
<description>Validation rules against ISO 19005-4:2020</description>
</details>
Expand Down Expand Up @@ -890,7 +890,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
4 changes: 2 additions & 2 deletions PDF_A/PDFA-4E.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFA_4_E">
<details creator="veraPDF Consortium" created="2020-12-25T04:59:15.826-03:00">
<details creator="veraPDF Consortium" created="2020-12-25T07:59:15.826Z">
<name>PDF/A-4E validation profile</name>
<description>Validation rules against ISO 19005-4:2020, Level E</description>
</details>
Expand Down Expand Up @@ -904,7 +904,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
4 changes: 2 additions & 2 deletions PDF_A/PDFA-4F.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="PDFA_4_F">
<details creator="veraPDF Consortium" created="2020-12-25T04:59:15.826-03:00">
<details creator="veraPDF Consortium" created="2020-12-25T07:59:15.826Z">
<name>PDF/A-4F validation profile</name>
<description>Validation rules against ISO 19005-4:2020, Level F</description>
</details>
Expand Down Expand Up @@ -890,7 +890,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

0 comments on commit 7da9827

Please sign in to comment.