-
Notifications
You must be signed in to change notification settings - Fork 10.3k
XFA - Create Form DOM in merging template and data trees #13018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
calixteman
commented
Feb 24, 2021
- Spec: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.364.2157&rep=rep1&type=pdf#page=171;
- support for the 2 ways of merging: consumeData and matchTemplate;
- create additional nodes in template DOM when occur node allows it;
- support for global values in data DOM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. It could use some more comments in parts that are algorithms out of the spec even if it's just paraphrasing the spec.
src/core/document.js
Outdated
@@ -732,6 +734,53 @@ class PDFDocument { | |||
}); | |||
} | |||
|
|||
get xfaData() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used anywhere?
src/core/xfa/template.js
Outdated
); | ||
} | ||
|
||
static [$newInstance]() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to use the $ format for a static field?
src/core/xfa/xfa_object.js
Outdated
@@ -159,6 +218,7 @@ class XFAObject { | |||
|
|||
[$dump]() { | |||
const dumped = Object.create(null); | |||
// dumped.$nodeName = this[$nodeName]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
src/core/xfa/xfa_object.js
Outdated
@@ -640,10 +750,24 @@ class Option10 extends IntegerObject { | |||
} | |||
} | |||
|
|||
function isChild(node, parentNode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this only works on XFAObjects can it be in the class instead. e.g. someNode[$isChildOf](parentNode)
Also, a slightly more accurate name would be isDescendent
} | ||
} | ||
|
||
_findDataByNameToConsume(name, dataNode, global) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some comments on what is being searched first, second, ....
- Spec: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.364.2157&rep=rep1&type=pdf#page=171; - support for the 2 ways of merging: consumeData and matchTemplate; - create additional nodes in template DOM when occur node allows it; - support for global values in data DOM.
/botio-linux unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @brendandahl received. Current queue size: 0 Live output at: http://54.67.70.0:8877/ec5ab465eef8755/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/ec5ab465eef8755/output.txt Total script time: 3.60 mins
|