X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/d3bd4d6524e46d6732f758b2854afeff1c890b2a..90a4709555ba28d2175c7a359d538e7775f9bf64:/src/smartxml/smartxml.js?ds=inline diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index 6f12667..47c527f 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -10,9 +10,6 @@ define([ 'use strict'; /* globals Node */ -var TEXT_NODE = Node.TEXT_NODE; - - var DocumentNode = function(nativeNode, document) { if(!document) { @@ -51,7 +48,7 @@ $.extend(DocumentNode.prototype, { if(!(this.document.containsNode(this))) { return null; } - + var nodePath = [this].concat(this.parents()), toret, idx; ancestor = ancestor || this.document.root; @@ -269,6 +266,8 @@ var Document = function(xml) { this._nodeTransformations = {}; this._textNodeTransformations = {}; this._elementNodeTransformations = {}; + + this.registerExtension(coreTransformations); }; $.extend(Document.prototype, Backbone.Events, { @@ -481,7 +480,6 @@ $.extend(Document.prototype, Backbone.Events, { return { documentFromXML: function(xml) { var doc = new Document(xml); - doc.registerExtension(coreTransformations); return doc; },