diff --git a/PDF_UA/PDFUA-1.xml b/PDF_UA/PDFUA-1.xml index dec82aa2..633c522c 100644 --- a/PDF_UA/PDFUA-1.xml +++ b/PDF_UA/PDFUA-1.xml @@ -79,7 +79,7 @@ Tagged content should not present inside content marked as Artifact - isTaggedContent == false || parentsTags.split('&').filter(elem => elem == 'Artifact').length == 0 + isTaggedContent == false || parentsTags.contains('Artifact') == false Tagged content (parent struct element %1) is present inside content marked as Artifact @@ -91,7 +91,7 @@ Content shall be marked as Artifact or tagged as real content - isTaggedContent == true || parentsTags.split('&').filter(elem => elem == 'Artifact').length > 0 + isTaggedContent == true || parentsTags.contains('Artifact') == true Content is neither marked as Artifact nor tagged as real content diff --git a/PDF_UA/PDFUA-2-ISO32005.xml b/PDF_UA/PDFUA-2-ISO32005.xml index f0611e8d..cd016f15 100644 --- a/PDF_UA/PDFUA-2-ISO32005.xml +++ b/PDF_UA/PDFUA-2-ISO32005.xml @@ -91,7 +91,7 @@ Content that is not considered real shall be an artifact - isTaggedContent == true || parentsTags.split('&').filter(elem => elem == 'Artifact').length > 0 + isTaggedContent == true || parentsTags.contains('Artifact') == true Content is neither marked as Artifact nor tagged as real content diff --git a/PDF_UA/PDFUA-2.xml b/PDF_UA/PDFUA-2.xml index 09686967..9b219917 100644 --- a/PDF_UA/PDFUA-2.xml +++ b/PDF_UA/PDFUA-2.xml @@ -91,7 +91,7 @@ Content that is not considered real shall be an artifact - isTaggedContent == true || parentsTags.split('&').filter(elem => elem == 'Artifact').length > 0 + isTaggedContent == true || parentsTags.contains('Artifact') == true Content is neither marked as Artifact nor tagged as real content diff --git a/PDF_UA/WCAG-2-2-Complete.xml b/PDF_UA/WCAG-2-2-Complete.xml index c30d9b17..499561bb 100644 --- a/PDF_UA/WCAG-2-2-Complete.xml +++ b/PDF_UA/WCAG-2-2-Complete.xml @@ -21,7 +21,7 @@ Tagged content should not present inside content marked as Artifact - (isTaggedContent == false || isArtifact == true) || parentsTags.split('&').filter(elem => elem == 'Artifact').length == 0 + (isTaggedContent == false || isArtifact == true) || parentsTags.contains('Artifact') == false Tagged content (parent struct element %1) is present inside content marked as Artifact @@ -33,7 +33,7 @@ Content shall be marked as Artifact or tagged as real content - isTaggedContent == true || parentsTags.split('&').filter(elem => elem == 'Artifact').length > 0 + isTaggedContent == true || parentsTags.contains('Artifact') == true Content is neither marked as Artifact nor tagged as real content @@ -1728,7 +1728,7 @@ TOCI shall contain one or more text lines - errorCodes.split(',').filter(elem => elem == 1000).length == 0 + errorCodes.contains('1000') == false TOCI doesn't have a text @@ -1742,11 +1742,11 @@ TOCI page label shall match the destination page - errorCodes.split(',').filter(elem => elem == 1002).length == 0 + errorCodes.contains('1002') == false TOCI has a wrong page label. Possible page number(s), which page label could be used: %1 - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1002)] + errorArguments.get(errorCodes.indexOf('1002')).get(0) structureID @@ -1756,7 +1756,7 @@ TOCI shall have a right alignment that matches a right alignment of other TOCIs - errorCodes.split(',').filter(elem => elem == 1003).length == 0 + errorCodes.contains('1003') == false TOCI has a bad right alignment @@ -1770,7 +1770,7 @@ This list and neighbor list(s) should be tagged as one list - errorCodes.split(',').filter(elem => elem == 1200).length == 0 + errorCodes.contains('1200') == false This list and neighbor list(s) should be tagged as one list @@ -1784,7 +1784,7 @@ This TOC and neighbor TOC(s) should be tagged as one TOC - errorCodes.split(',').filter(elem => elem == 1006).length == 0 + errorCodes.contains('1006') == false This TOC and neighbor TOC(s) should be tagged as one TOC @@ -1798,12 +1798,12 @@ The number of rows of this table does not match the number of rows of the visual representation of this table - errorCodes.split(',').filter(elem => elem == 1104).length == 0 + errorCodes.contains('1104') == false The number of rows %1 of this table does not match the number of rows %2 of the visual representation of this table - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1104)].split(';')[0] - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1104)].split(';')[1] + errorArguments.get(errorCodes.indexOf('1104')).get(0) + errorArguments.get(errorCodes.indexOf('1104')).get(1) structureID @@ -1812,12 +1812,12 @@ The number of columns of this table does not match the number of columns of the visual representation of this table - errorCodes.split(',').filter(elem => elem == 1105).length == 0 + errorCodes.contains('1105') == false The number of columns %1 of this table does not match the number of columns %2 of the visual representation of this table - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1105)].split(';')[0] - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1105)].split(';')[1] + errorArguments.get(errorCodes.indexOf('1105')).get(0) + errorArguments.get(errorCodes.indexOf('1105')).get(1) structureID @@ -1826,12 +1826,12 @@ The row span of this table cell does not match the row span of the visual representation of this table cell - errorCodes.split(',').filter(elem => elem == 1106).length == 0 + errorCodes.contains('1106') == false The row span %1 of this table cell does not match the row span %2 of the visual representation of this table cell - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1106)].split(';')[0] - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1106)].split(';')[1] + errorArguments.get(errorCodes.indexOf('1106')).get(0) + errorArguments.get(errorCodes.indexOf('1106')).get(1) structureID @@ -1840,12 +1840,12 @@ The column span of this table cell does not match the column span of the visual representation of this table cell - errorCodes.split(',').filter(elem => elem == 1107).length == 0 + errorCodes.contains('1107') == false The column span %1 of this table cell does not match the column span %2 of the visual representation of this table cell - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1107)].split(';')[0] - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1107)].split(';')[1] + errorArguments.get(errorCodes.indexOf('1107')).get(0) + errorArguments.get(errorCodes.indexOf('1107')).get(1) structureID @@ -1868,7 +1868,7 @@ This cell is below than some cells in the next row - errorCodes.split(',').filter(elem => elem == 1100).length == 0 + errorCodes.contains('1100') == false This cell is below than some cells in the next row @@ -1882,7 +1882,7 @@ This cell is above than some cells in the previous row - errorCodes.split(',').filter(elem => elem == 1101).length == 0 + errorCodes.contains('1101') == false This cell is above than some cells in the previous row @@ -1896,7 +1896,7 @@ This cell is to the right of some cells in the next column - errorCodes.split(',').filter(elem => elem == 1102).length == 0 + errorCodes.contains('1102') == false This cell is to the right of some cells in the next column @@ -1910,7 +1910,7 @@ This cell is to the left of some cells in the previous column - errorCodes.split(',').filter(elem => elem == 1103).length == 0 + errorCodes.contains('1103') == false This cell is to the left of some cells in the previous column @@ -1938,7 +1938,7 @@ TOCI text should be presented in the document - errorCodes.split(',').filter(elem => elem == 1007).length == 0 + errorCodes.contains('1007') == false TOCI text is not found in the document @@ -1952,14 +1952,12 @@ TOCI text should be presented on a destination page - errorCodes.split(',').filter(elem => elem == 1008).length == 0 + errorCodes.contains('1008') == false TOCI text is not found on a destination page %wrongDestinationPage%. Possible destination page number(s): %possiblePageNumbers% - errorArguments.split(';;')[errorCodes.split(',') - .findIndex(elem => elem == 1008)].split(';')[0] - errorArguments.split(';;')[errorCodes.split(',') - .findIndex(elem => elem == 1008)].split(';')[1] + errorArguments.get(errorCodes.indexOf('1008')).get(0) + errorArguments.get(errorCodes.indexOf('1008')).get(1) structureID @@ -1968,11 +1966,11 @@ TOCI should have a destination - errorCodes.split(',').filter(elem => elem == 1009).length == 0 + errorCodes.contains('1009') == false TOCI doesn't have a destination. Possible destination page number(s): %1 - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1009)] + errorArguments.get(errorCodes.indexOf(1009)).get(0) structureID @@ -1982,11 +1980,11 @@ TOCI should have a correct page label - errorCodes.split(',').filter(elem => elem == 1010).length == 0 + errorCodes.contains('1010') == false TOCI has a wrong page label. Possible page number(s), which page label could be used: %1 - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1010)] + errorArguments.get(errorCodes.indexOf('1010')).get(0) structureID @@ -1996,14 +1994,12 @@ TOCI should have a correct numbering - errorCodes.split(',').filter(elem => elem == 1011).length == 0 + errorCodes.contains('1011') == false TOCI has a wrong numbering. The heading number cannot start with %wrongNumbering% - errorArguments.split(';;')[errorCodes.split(',') - .findIndex(elem => elem == 1011)].split(';')[0] - errorArguments.split(';;')[errorCodes.split(',') - .findIndex(elem => elem == 1011)].split(';')[1] + errorArguments.get(errorCodes.indexOf('1011')).get(0) + errorArguments.get(errorCodes.indexOf('1011')).get(1) structureID @@ -2012,7 +2008,7 @@ List should contain list items - errorCodes.split(',').filter(elem => elem == 1201).length == 0 + errorCodes.contains('1201') == false List contains only one child - list @@ -2022,7 +2018,7 @@ The structure type and attributes of a list item shall be semantically appropriate - errorCodes.split(',').filter(elem => elem == 1202).length == 0 + errorCodes.contains('1202') == false This list item should be tagged as several different list items @@ -2052,7 +2048,7 @@ The structure type and attributes of a heading shall be semantically appropriate - errorCodes.split(',').filter(elem => elem == 1300).length == 0 + errorCodes.contains('1300') == false This node is the single child with content. One of its ancestor nodes should be tagged as heading instead of this one diff --git a/PDF_UA/WCAG-2-2-Machine.xml b/PDF_UA/WCAG-2-2-Machine.xml index 6d0d55e0..2c5bd3cb 100644 --- a/PDF_UA/WCAG-2-2-Machine.xml +++ b/PDF_UA/WCAG-2-2-Machine.xml @@ -21,7 +21,7 @@ Tagged content should not present inside content marked as Artifact - (isTaggedContent == false || isArtifact == true) || parentsTags.split('&').filter(elem => elem == 'Artifact').length == 0 + (isTaggedContent == false || isArtifact == true) || parentsTags.contains('Artifact') == false Tagged content (parent struct element %1) is present inside content marked as Artifact @@ -33,7 +33,7 @@ Content shall be marked as Artifact or tagged as real content - isTaggedContent == true || parentsTags.split('&').filter(elem => elem == 'Artifact').length > 0 + isTaggedContent == true || parentsTags.contains('Artifact') == true Content is neither marked as Artifact nor tagged as real content @@ -1420,7 +1420,7 @@ TOCI shall contain one or more text lines - errorCodes.split(',').filter(elem => elem == 1000).length == 0 + errorCodes.contains('1000') == false TOCI doesn't have a text diff --git a/PDF_UA/WCAG-2-2.xml b/PDF_UA/WCAG-2-2.xml index 49808003..4ed4d843 100644 --- a/PDF_UA/WCAG-2-2.xml +++ b/PDF_UA/WCAG-2-2.xml @@ -473,7 +473,7 @@ TOCI shall contain one or more text lines - errorCodes.split(',').filter(elem => elem == 1000).length == 0 + errorCodes.contains('1000') == false TOCI doesn't have a text @@ -487,11 +487,11 @@ TOCI page label shall match the destination page - errorCodes.split(',').filter(elem => elem == 1002).length == 0 + errorCodes.contains('1002') == false TOCI has a wrong page label. Possible page number(s), which page label could be used: %1 - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1002)] + errorArguments.get(errorCodes.indexOf('1002')).get(0) structureID @@ -501,7 +501,7 @@ TOCI shall have a right alignment that matches a right alignment of other TOCIs - errorCodes.split(',').filter(elem => elem == 1003).length == 0 + errorCodes.contains('1003') == false TOCI has a bad right alignment @@ -515,7 +515,7 @@ This list and neighbor list(s) should be tagged as one list - errorCodes.split(',').filter(elem => elem == 1200).length == 0 + errorCodes.contains('1200') == false This list and neighbor list(s) should be tagged as one list @@ -529,7 +529,7 @@ This TOC and neighbor TOC(s) should be tagged as one TOC - errorCodes.split(',').filter(elem => elem == 1006).length == 0 + errorCodes.contains('1006') == false This TOC and neighbor TOC(s) should be tagged as one TOC @@ -543,12 +543,12 @@ The number of rows of this table does not match the number of rows of the visual representation of this table - errorCodes.split(',').filter(elem => elem == 1104).length == 0 + errorCodes.contains('1104') == false The number of rows %1 of this table does not match the number of rows %2 of the visual representation of this table - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1104)].split(';')[0] - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1104)].split(';')[1] + errorArguments.get(errorCodes.indexOf('1104')).get(0) + errorArguments.get(errorCodes.indexOf('1104')).get(1) structureID @@ -557,12 +557,12 @@ The number of columns of this table does not match the number of columns of the visual representation of this table - errorCodes.split(',').filter(elem => elem == 1105).length == 0 + errorCodes.contains('1105') == false The number of columns %1 of this table does not match the number of columns %2 of the visual representation of this table - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1105)].split(';')[0] - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1105)].split(';')[1] + errorArguments.get(errorCodes.indexOf('1105')).get(0) + errorArguments.get(errorCodes.indexOf('1105')).get(1) structureID @@ -571,12 +571,12 @@ The row span of this table cell does not match the row span of the visual representation of this table cell - errorCodes.split(',').filter(elem => elem == 1106).length == 0 + errorCodes.contains('1106') == false The row span %1 of this table cell does not match the row span %2 of the visual representation of this table cell - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1106)].split(';')[0] - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1106)].split(';')[1] + errorArguments.get(errorCodes.indexOf('1106')).get(0) + errorArguments.get(errorCodes.indexOf('1106')).get(1) structureID @@ -585,12 +585,12 @@ The column span of this table cell does not match the column span of the visual representation of this table cell - errorCodes.split(',').filter(elem => elem == 1107).length == 0 + errorCodes.contains('1107') == false The column span %1 of this table cell does not match the column span %2 of the visual representation of this table cell - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1107)].split(';')[0] - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1107)].split(';')[1] + errorArguments.get(errorCodes.indexOf('1107')).get(0) + errorArguments.get(errorCodes.indexOf('1107')).get(1) structureID @@ -613,7 +613,7 @@ This cell is below than some cells in the next row - errorCodes.split(',').filter(elem => elem == 1100).length == 0 + errorCodes.contains('1100') == false This cell is below than some cells in the next row @@ -627,7 +627,7 @@ This cell is above than some cells in the previous row - errorCodes.split(',').filter(elem => elem == 1101).length == 0 + errorCodes.contains('1101') == false This cell is above than some cells in the previous row @@ -641,7 +641,7 @@ This cell is to the right of some cells in the next column - errorCodes.split(',').filter(elem => elem == 1102).length == 0 + errorCodes.contains('1102') == false This cell is to the right of some cells in the next column @@ -655,7 +655,7 @@ This cell is to the left of some cells in the previous column - errorCodes.split(',').filter(elem => elem == 1103).length == 0 + errorCodes.contains('1103') == false This cell is to the left of some cells in the previous column @@ -683,7 +683,7 @@ TOCI text should be presented in the document - errorCodes.split(',').filter(elem => elem == 1007).length == 0 + errorCodes.contains('1007') == false TOCI text is not found in the document @@ -697,14 +697,12 @@ TOCI text should be presented on a destination page - errorCodes.split(',').filter(elem => elem == 1008).length == 0 + errorCodes.contains('1008') == false TOCI text is not found on a destination page %wrongDestinationPage%. Possible destination page number(s): %possiblePageNumbers% - errorArguments.split(';;')[errorCodes.split(',') - .findIndex(elem => elem == 1008)].split(';')[0] - errorArguments.split(';;')[errorCodes.split(',') - .findIndex(elem => elem == 1008)].split(';')[1] + errorArguments.get(errorCodes.indexOf('1008')).get(0) + errorArguments.get(errorCodes.indexOf('1008')).get(1) structureID @@ -713,11 +711,11 @@ TOCI should have a destination - errorCodes.split(',').filter(elem => elem == 1009).length == 0 + errorCodes.contains('1009') == false TOCI doesn't have a destination. Possible destination page number(s): %1 - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1009)] + errorArguments.get(errorCodes.indexOf(1009)).get(0) structureID @@ -727,11 +725,11 @@ TOCI should have a correct page label - errorCodes.split(',').filter(elem => elem == 1010).length == 0 + errorCodes.contains('1010') == false TOCI has a wrong page label. Possible page number(s), which page label could be used: %1 - errorArguments.split(';;')[errorCodes.split(',').findIndex(elem => elem == 1010)] + errorArguments.get(errorCodes.indexOf('1010')).get(0) structureID @@ -741,14 +739,12 @@ TOCI should have a correct numbering - errorCodes.split(',').filter(elem => elem == 1011).length == 0 + errorCodes.contains('1011') == false TOCI has a wrong numbering. The heading number cannot start with %wrongNumbering% - errorArguments.split(';;')[errorCodes.split(',') - .findIndex(elem => elem == 1011)].split(';')[0] - errorArguments.split(';;')[errorCodes.split(',') - .findIndex(elem => elem == 1011)].split(';')[1] + errorArguments.get(errorCodes.indexOf('1011')).get(0) + errorArguments.get(errorCodes.indexOf('1011')).get(1) structureID @@ -757,7 +753,7 @@ List should contain list items - errorCodes.split(',').filter(elem => elem == 1201).length == 0 + errorCodes.contains('1201') == false List contains only one child - list @@ -767,7 +763,7 @@ The structure type and attributes of a list item shall be semantically appropriate - errorCodes.split(',').filter(elem => elem == 1202).length == 0 + errorCodes.contains('1202') == false This list item should be tagged as several different list items @@ -797,7 +793,7 @@ The structure type and attributes of a heading shall be semantically appropriate - errorCodes.split(',').filter(elem => elem == 1300).length == 0 + errorCodes.contains('1300') == false This node is the single child with content. One of its ancestor nodes should be tagged as heading instead of this one diff --git a/PDF_UA/WTPDF-1-0-Accessibility.xml b/PDF_UA/WTPDF-1-0-Accessibility.xml index c661d7dd..ee5feb61 100644 --- a/PDF_UA/WTPDF-1-0-Accessibility.xml +++ b/PDF_UA/WTPDF-1-0-Accessibility.xml @@ -9,7 +9,7 @@ File conforming to the WTPDF 1.0 conformance level for accessibility shall include a PDF Declaration with the URI identifier "http://pdfa.org/declarations/wtpdf#accessibility1.0" as its pdfd:conformsTo entry - declarations.split(',').filter(declarations => declarations == 'http://pdfa.org/declarations/wtpdf#accessibility1.0').length == 1 + declarations.contains('http://pdfa.org/declarations/wtpdf#accessibility1.0') == true File conforming to the WTPDF 1.0 conformance level for accessibility doesn't include a PDF Declaration with the URI identifier "http://pdfa.org/declarations/wtpdf#accessibility1.0" as its pdfd:conformsTo entry @@ -43,7 +43,7 @@ Content that is not considered real shall be an artifact - isTaggedContent == true || parentsTags.split('&').filter(elem => elem == 'Artifact').length > 0 + isTaggedContent == true || parentsTags.contains('Artifact') == true Content is neither marked as Artifact nor tagged as real content diff --git a/PDF_UA/WTPDF-1-0-Reuse.xml b/PDF_UA/WTPDF-1-0-Reuse.xml index 8f1402c6..331c4af9 100644 --- a/PDF_UA/WTPDF-1-0-Reuse.xml +++ b/PDF_UA/WTPDF-1-0-Reuse.xml @@ -9,7 +9,7 @@ File conforming to the WTPDF 1.0 conformance level for reuse shall include a PDF Declaration with the URI identifier "http://pdfa.org/declarations/wtpdf#reuse1.0" as its pdfd:conformsTo entry - declarations.split(',').filter(declarations => declarations == 'http://pdfa.org/declarations/wtpdf#reuse1.0').length == 1 + declarations.contains('http://pdfa.org/declarations/wtpdf#reuse1.0') == true File conforming to the WTPDF 1.0 conformance level for reuse doesn't include a PDF Declaration with the URI identifier "http://pdfa.org/declarations/wtpdf#reuse1.0" as its pdfd:conformsTo entry @@ -43,7 +43,7 @@ Content that is not considered real shall be an artifact - isTaggedContent == true || parentsTags.split('&').filter(elem => elem == 'Artifact').length > 0 + isTaggedContent == true || parentsTags.contains('Artifact') == true Content is neither marked as Artifact nor tagged as real content