+ getChangeRoot: desc.getChangeRoot || function() {
+ return this.document.root;
+ },
+ wrapNodeProperty: function(object, propName, value) {
+ var transformation = this,
+ lastRunNumber = 0,
+ path;
+
+ value = value || object[propName];
+ if(value && value.nodeType) {
+ path = value.getPath();
+ Object.defineProperty(object, propName, {
+ get: function() {
+ if((lastRunNumber !== transformation.runCount) && path) {
+ value = transformation.document.getNodeByPath(path);
+ lastRunNumber = transformation.runCount;
+ }
+ return value;
+ }
+ });
+ }
+ }