incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtu...@apache.org
Subject svn commit: r447875 - /incubator/xap/trunk/src/xap/data/DataNamespaceHandler.js
Date Tue, 19 Sep 2006 15:13:55 GMT
Author: mturyn
Date: Tue Sep 19 08:13:54 2006
New Revision: 447875

URL: http://svn.apache.org/viewvc?view=rev&rev=447875
Log:
Moved from a local registry for documents to the session's DocumentContainer instance.

Modified:
    incubator/xap/trunk/src/xap/data/DataNamespaceHandler.js

Modified: incubator/xap/trunk/src/xap/data/DataNamespaceHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/data/DataNamespaceHandler.js?view=diff&rev=447875&r1=447874&r2=447875
==============================================================================
--- incubator/xap/trunk/src/xap/data/DataNamespaceHandler.js (original)
+++ incubator/xap/trunk/src/xap/data/DataNamespaceHandler.js Tue Sep 19 08:13:54 2006
@@ -20,7 +20,7 @@
 Xap.require("xap.taghandling.PluginDocumentHandler");
 Xap.require("xap.xml.dom.Document"); 
 //Xap.require("xap.xml.DocumentLocation") ;
-//Xap.require("xap.xml.DocumentRegistry") ; 
+Xap.require("xap.xml.DocumentContainer");
 Xap.require("xap.xml.dom.XapElement"); 
 //Xap.require("xap.xml.NamespaceHandler") ; 
 Xap.require("xap.xml.sax.ParserException");
@@ -60,15 +60,7 @@
 				
 			//IMPORTANT DOC what if the doc is already there? that would be bad
 			//we need to document that they not use these names
-			
-			// TODO:  Get this right:
-			//		s.getDocumentRegistry().registerDocument(
-			//										DocumentLocation,
-			//										xap.data.DataNamespaceHandler.DOCUMENT_NAMES[i],
-			//										dataDocument
-			//													) ;
-			//
-			this._documentRegistry[currentDocumentName] = dataDocument;
+			this._session.getDocumentContainer().put(currentDocumentName, dataDocument);
 	
 	//for each document, create  namespace
 	//handler for that document
@@ -174,15 +166,14 @@
 		/*String*/
 		var currentDocumentName = xap.data.DataNamespaceHandler.DOCUMENT_NAMES[i];
 		/*Element*/
-		var definition 
-			= clientSession.getPluginRegistry().getPluginDefinition(element.getLocalName(), element.getNamespaceUri(),
currentDocumentName);
+		var definition = clientSession.getPluginRegistry().getPluginDefinition(element.getLocalName(),
element.getNamespaceUri(), currentDocumentName);
 			
 	//we found a definition matching the tag name, namespace
 	//and data doc name, so we are good to go
 		if (definition != null) {
 			// In the absence of a separate document registry:
 			/*Document*/
-			var destinationDocument = this._documentRegistry[currentDocumentName];
+			var destinationDocument = this._session.getDocumentContainer().get(currentDocumentName);
 			if (destinationDocument != null) {
 				destinationDocument.getRootElement().appendChild(element);
 						



Mime
View raw message