>When we parse it, how many nodes do we have?
If you parse it via some parser, usually, there is some provision allowing user to instruct the parser to preserve or ignore purely whitespace text node.
The counting would be this.
[1] preserve whitespace : totally 2 element nodes + 1 attribute node + 3 text nodes.
[2] ignore whitespace : totally 2 element nodes + 1 attribute node + 1 text node.
So, there are 4 nodes totally when we ignore whitespace. If we want to make a new version from this old version and the change rate is 5%, the number of different nodes in new version would be 4*5%, right?
If the original is (2,1,1), the new version would be (2,1,1)*(1+5%). But it sounds terribly like calculating principal plus interests from your saving accounts with the bank. So I don't know the meaning behind it.
Because I see the total nodes in original are 4. And we make new version that change ratios is 5%. Therefore, the number of nodes in new version that is different to nodes in old version should be 4*5%. It is what I understant. We don't need to know what kind of nodes changes. It might be changes in content of text node, or insertion of new nodes... The important thing is how many nodes have changed.
Sorry that I don't understand when you wrote (2,1,1)*(1+5%). Why do we need plus one?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.