1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-28 23:28:16 +02:00

XFA - Remove namespace from nodes under xfa:data node

- in real life some xfa contains xml like <xfa:data><xfa:Foo><xfa:Bar>...</xfa:data>
    since there are no Foo or Bar in the xfa namespace the JS representation are empty
    and that leads to errors.
  - so the idea is to make all nodes under xfa:data namespace agnostic which means
    that ns are removed from nodes in the parser but only xfa:data descendants.
This commit is contained in:
Calixte Denizet 2021-07-21 16:24:53 +02:00
parent 6c9b6bc599
commit 5555114bb3
6 changed files with 43 additions and 5 deletions

View file

@ -60,6 +60,7 @@ const $isCDATAXml = Symbol();
const $isBindable = Symbol();
const $isDataValue = Symbol();
const $isDescendent = Symbol();
const $isNsAgnostic = Symbol();
const $isSplittable = Symbol();
const $isThereMoreWidth = Symbol();
const $isTransparent = Symbol();
@ -160,6 +161,10 @@ class XFAObject {
);
}
[$isNsAgnostic]() {
return false;
}
[$acceptWhitespace]() {
return false;
}
@ -1087,6 +1092,7 @@ export {
$isCDATAXml,
$isDataValue,
$isDescendent,
$isNsAgnostic,
$isSplittable,
$isThereMoreWidth,
$isTransparent,