1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

XFA -- Add attributes and children in XFAObject

- in order to evaluate SOM expressions nodes and their attributes must be checked in the same order as in the xml;
 - add an object XFAObjectArray with a parameter max to handle multiple children with the same name.
This commit is contained in:
Calixte Denizet 2021-02-03 18:55:56 +01:00
parent 86a4ba55c5
commit 7e0554afe2
3 changed files with 105 additions and 28 deletions

View file

@ -19,6 +19,7 @@ import {
OptionObject,
StringObject,
XFAObject,
XFAObjectArray,
} from "./xfa_object.js";
const CONFIG_NS_ID = NamespaceIds.config.id;
@ -31,7 +32,7 @@ class Acrobat extends XFAObject {
this.common = null;
this.validate = null;
this.validateApprovalSignatures = null;
this.submitUrl = [];
this.submitUrl = new XFAObjectArray();
}
}
@ -60,7 +61,7 @@ class Config extends XFAObject {
this.acrobat = null;
this.present = null;
this.trace = null;
this.agent = [];
this.agent = new XFAObjectArray();
}
}
@ -87,14 +88,14 @@ class Present extends XFAObject {
this.script = null;
this.validate = null;
this.xdp = null;
this.driver = [];
this.labelPrinter = [];
this.pcl = [];
this.pdf = [];
this.ps = [];
this.submitUrl = [];
this.webClient = [];
this.zpl = [];
this.driver = new XFAObjectArray();
this.labelPrinter = new XFAObjectArray();
this.pcl = new XFAObjectArray();
this.pdf = new XFAObjectArray();
this.ps = new XFAObjectArray();
this.submitUrl = new XFAObjectArray();
this.webClient = new XFAObjectArray();
this.zpl = new XFAObjectArray();
}
}