XFA subform with occur min=0 and no bound data displaying
Subfrom nomin displays even though it's subform is set to <occur max=-1 min=0> If we look through specs of XFA 3.3 : https://www.pdfa.org/norm-refs/XFA-3_3.pdf - The min attribute is used when processing a form that contains data. Regardless of the data at least this number of instances is included. It is permissible to set this value to zero, in which case the container is entirely excluded if there is no data for it. However, in our case it doesn't happen, because we let our empty dataNode get through. Though by setting a clause: - eliminate unmatched data with occur min=0 we are checking our empty data and sending it to uselessNode array where at the end it gets removed;
This commit is contained in:
parent
6a15973a1b
commit
56b502391c
@ -635,6 +635,13 @@ class Binder {
|
|||||||
/* skipConsumed = */ this.emptyMerge
|
/* skipConsumed = */ this.emptyMerge
|
||||||
).next().value;
|
).next().value;
|
||||||
if (!match) {
|
if (!match) {
|
||||||
|
// If there is no match (no data) and `min === 0` then
|
||||||
|
// the container is entirely excluded.
|
||||||
|
// https://www.pdfa.org/norm-refs/XFA-3_3.pdf#G12.1428332
|
||||||
|
if (min === 0) {
|
||||||
|
uselessNodes.push(child);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// We're in matchTemplate mode so create a node in data to reflect
|
// We're in matchTemplate mode so create a node in data to reflect
|
||||||
// what we've in template.
|
// what we've in template.
|
||||||
const nsId =
|
const nsId =
|
||||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -213,6 +213,7 @@
|
|||||||
!issue4402_reduced.pdf
|
!issue4402_reduced.pdf
|
||||||
!issue845r.pdf
|
!issue845r.pdf
|
||||||
!issue3405r.pdf
|
!issue3405r.pdf
|
||||||
|
!issue14130.pdf
|
||||||
!issue7339_reduced.pdf
|
!issue7339_reduced.pdf
|
||||||
!issue3438.pdf
|
!issue3438.pdf
|
||||||
!issue11403_reduced.pdf
|
!issue11403_reduced.pdf
|
||||||
|
BIN
test/pdfs/issue14130.pdf
Normal file
BIN
test/pdfs/issue14130.pdf
Normal file
Binary file not shown.
@ -4390,6 +4390,13 @@
|
|||||||
"link": false,
|
"link": false,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "issue14130",
|
||||||
|
"file": "pdfs/issue14130.pdf",
|
||||||
|
"md5": "82e7efb0a10122e793fc64348d93dc4e",
|
||||||
|
"enableXfa": true,
|
||||||
|
"rounds": 1,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "issue6151",
|
{ "id": "issue6151",
|
||||||
"file": "pdfs/issue6151.pdf",
|
"file": "pdfs/issue6151.pdf",
|
||||||
"md5": "926f8c6b25e6f0978759f7947d70e079",
|
"md5": "926f8c6b25e6f0978759f7947d70e079",
|
||||||
|
Loading…
Reference in New Issue
Block a user