You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2006/07/15 17:22:44 UTC

svn commit: r422273 [3/5] - in /incubator/xap/trunk: WebContent/examples/dojo/ src/xap/ src/xap/bridges/basic/ src/xap/bridges/dojo/ src/xap/bridges/google/ src/xap/bridges/zimbra/ src/xap/components/zimbra/ src/xap/macro/ src/xap/mco/ src/xap/requests...

Modified: incubator/xap/trunk/src/xap/util/Utils.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/util/Utils.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/util/Utils.js (original)
+++ incubator/xap/trunk/src/xap/util/Utils.js Sat Jul 15 10:22:41 2006
@@ -21,27 +21,29 @@
  * @author ikaplansky
  */
 
-Utils = function(){}
+dojo.provide("xap.util.Utils") ;
 
-Utils.importFile = function( path ) {
-	if( Utils.s_pathCache == null ) {
-		Utils.s_pathCache = new Object();
+xap.util.Utils = function(){}
+
+xap.util.Utils.importFile = function( path ) {
+	if( xap.util.Utils.s_pathCache == null ) {
+		xap.util.Utils.s_pathCache = new Object();
 	}
-	if ( Utils.s_pathCache[path] ){
+	if ( xap.util.Utils.s_pathCache[path] ){
 		return;
 	}
-	Utils.s_pathCache[path] = true;
+	xap.util.Utils.s_pathCache[path] = true;
 	var scriptElement = "<script language=\"JavaScript\" " +
 		"type=\"text/javascript\" src=\"" + path + "\"></script>";
 	document.write( scriptElement );
 }
 
-Utils.s_pathCache = null;
+xap.util.Utils.s_pathCache = null;
 
 /**
  * Method for debugging---less than a full object-dump, more than toString()
 **/
-Utils.interrogate = function(obj){
+xap.util.Utils.interrogate = function(obj){
 	var s="" ;
 	if (typeof obj != "object"){
 		s = "<not an object>" ;
@@ -61,8 +63,8 @@
  * @param elem
  * @return true/false if the array does/n't contain at least one el: el == elem
 **/
-Utils.doesArrayContain = function(anArray, anObject){
-	return (Utils.indexOfFirst(anArray, anObject)>-1) ;
+xap.util.Utils.doesArrayContain = function(anArray, anObject){
+	return (xap.util.Utils.indexOfFirst(anArray, anObject)>-1) ;
 }
 
 /**
@@ -72,7 +74,7 @@
  * @return index&gt;=0 if the array contains at least one el: el == elem, -1 otherwise:
 **/
 
-Utils.indexOfFirst = function(anArray, anObject){
+xap.util.Utils.indexOfFirst = function(anArray, anObject){
 	var result=-1 ;
 	for (var i=0; i<anArray.length; ++i){
 		if (anArray[i]==anObject){

Modified: incubator/xap/trunk/src/xap/util/XapException.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/util/XapException.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/util/XapException.js (original)
+++ incubator/xap/trunk/src/xap/util/XapException.js Sat Jul 15 10:22:41 2006
@@ -17,6 +17,7 @@
 
 //Let Dojo know what to expect from this file:
 Xap.provide('xap.util.XapException'); 
+Xap.require('xap.util.XapExceptionRes'); 
 
  
  /**
@@ -45,20 +46,20 @@
  * classname-methodname
  */
 
-XapException = function( msgId, args, cause, location ) {
-	// any time when this exception is subclassed, the XapException constructor
+xap.util.XapException = function( msgId, args, cause, location ) {
+	// any time when this exception is subclassed, the xap.util.XapException constructor
 	// gets called without any args to define the prototype of the subclass.
 	// we want to ignore those calls.
 	if( msgId ) {
 		this._msgId = msgId;
-		this._localizedMessage = ResourceDictionary.getMessage( msgId,
+		this._localizedMessage = xap.util.ResourceDictionary.getMessage( msgId,
 			this.getClassName(), args );
 		this._cause = cause;
 		this._location = location;
 	}
 }
 
-XapException.CLASSNAME = "XapException";
+xap.util.XapException.CLASSNAME = "xap.util.XapException";
 
 //-----------------------------------------------------------------------
 // Public Methods.
@@ -70,11 +71,11 @@
  * 
  * @return The cause exception.
  */
-XapException.prototype.getCause = function() {
+xap.util.XapException.prototype.getCause = function() {
 	return this._cause;
 }
 
-XapException.prototype.getLocation = function() {
+xap.util.XapException.prototype.getLocation = function() {
 	return this._location;
 }
 
@@ -84,27 +85,27 @@
  *
  * @return The message id.
  */
-XapException.prototype.getMessageId = function() {
+xap.util.XapException.prototype.getMessageId = function() {
 	return this._msgId;
 }
 
-XapException.prototype.getMessage = function() {
+xap.util.XapException.prototype.getMessage = function() {
 	return this._localizedMessage;
 }
 
-XapException.prototype.toString = function() {
+xap.util.XapException.prototype.toString = function() {
 	return this._localizedMessage;
 }
 
-XapException.prototype.getClassName = function() {
-	return XapException.CLASSNAME;
+xap.util.XapException.prototype.getClassName = function() {
+	return xap.util.XapException.CLASSNAME;
 }
 
 /**
  * Converts an exception to a string. This should work for
- * XapException, xap.util.Exception and built-in JS exceptions
+ * xap.util.XapException, xap.util.Exception and built-in JS exceptions
  */
-XapException.exceptionToString = function(exception){
+xap.util.XapException.exceptionToString = function(exception){
 	var s = new String();
 	
 	if (!exception){
@@ -124,7 +125,7 @@
 	}
 	
 	if (exception.getCause && exception.getCause()){
-		s+="Caused by:\n" + XapException.exceptionToString(exception.getCause());
+		s+="Caused by:\n" + xap.util.XapException.exceptionToString(exception.getCause());
 	}
 	
 	//next-to-last resort just use toString

Modified: incubator/xap/trunk/src/xap/util/XmlUtils.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/util/XmlUtils.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/util/XmlUtils.js (original)
+++ incubator/xap/trunk/src/xap/util/XmlUtils.js Sat Jul 15 10:22:41 2006
@@ -23,20 +23,20 @@
 Xap.require("xap.util.Character");
 
 
-XmlUtils = function(){}
+xap.util.XmlUtils = function(){}
 
 // We need to special-case validating tag names to include this
-XmlUtils.INDENTATION = "    ";
+xap.util.XmlUtils.INDENTATION = "    ";
 
 /**
  * Provides an indentation String for the given level of indentation.
  *
  * @param indentationLevel The level of indentation.
  */
-XmlUtils.getIndentation = function( indentationLevel ) {
+xap.util.XmlUtils.getIndentation = function( indentationLevel ) {
     var indentation = "";
     for ( var i = 0; i < indentationLevel; i++ ) {
-        indentation += XmlUtils.INDENTATION;
+        indentation += xap.util.XmlUtils.INDENTATION;
     }
     return indentation;
 }
@@ -48,7 +48,7 @@
  * @return - the encoded string
  * @see #xmlDecode(String)
  */
-XmlUtils.encode = function( s ) {
+xap.util.XmlUtils.encode = function( s ) {
     if ( s == null ) {
 		return "";
     }
@@ -84,7 +84,7 @@
  * @return - the encoded string
  * @see #xmlDecode(String)
  */
-XmlUtils.encodeDoubleQuotes = function( s ) {
+xap.util.XmlUtils.encodeDoubleQuotes = function( s ) {
     if ( s == null ) {
 		return "";
     }
@@ -108,7 +108,7 @@
  * @return - the decoded string
  * @see #xmlEncode(String)
  */
-XmlUtils.decode = function( str ) {
+xap.util.XmlUtils.decode = function( str ) {
 	if ( str == null ) {
         return "";
     }
@@ -152,7 +152,7 @@
  * @param tagName - the string to check
  * @return - true if valid, false otherwise
  */
-XmlUtils.isValidXmlTagName = function( tagName ) {
+xap.util.XmlUtils.isValidXmlTagName = function( tagName ) {
     if( tagName == null ) {
         return false;
     }

Modified: incubator/xap/trunk/src/xap/xml/DocumentContainer.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/DocumentContainer.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/xml/DocumentContainer.js (original)
+++ incubator/xap/trunk/src/xap/xml/DocumentContainer.js Sat Jul 15 10:22:41 2006
@@ -20,7 +20,7 @@
 Xap.provide('xap.xml.DocumentContainer'); 
 
 /**
- * @fileoverview A Container that holds xml documents.
+ * @fileoverview A xap.session.Container that holds xml documents.
  * 
  * @author jmargaris
  */
@@ -28,53 +28,53 @@
 
 /**
  * 
- * Creates a new DocumentContainer.
+ * Creates a new xap.xml.DocumentContainer.
  * 
- * @class DocumentContainer is a version of Container that holds
- * xml documents. It extends the normal Container by adding
+ * @class xap.xml.DocumentContainer is a version of xap.session.Container that holds
+ * xml documents. It extends the normal xap.session.Container by adding
  * the <code>getUiDocument</code> method that returns the starting
  * UI document that exists at startup for all applications.
  * 
- * @see Container
+ * @see xap.session.Container
  * @constructor
  * 
- * @param {ClientSession} session The current session
+ * @param {xap.session.ClientSession} session The current session
  */										
-DocumentContainer = function( session ){
-	Container.call(this, session);
+xap.xml.DocumentContainer = function( session ){
+	xap.session.Container.call(this, session);
 	
 	//add all the initial documents
-	for ( var i = 0; i < DocumentContainer.RESERVED_DOCUMENT_NAMES.length; i++ ) {
-		var doc = new Document( null );
-		var root = doc.createElement( DocumentContainer.RESERVED_DOCUMENT_NAMES[i]);
-        if ( DocumentContainer.UI_DOCUMENT_NAME == 
-        	   DocumentContainer.RESERVED_DOCUMENT_NAMES[i] ) {
+	for ( var i = 0; i < xap.xml.DocumentContainer.RESERVED_DOCUMENT_NAMES.length; i++ ) {
+		var doc = new xap.xml.dom.Document( null );
+		var root = doc.createElement( xap.xml.DocumentContainer.RESERVED_DOCUMENT_NAMES[i]);
+        if ( xap.xml.DocumentContainer.UI_DOCUMENT_NAME == 
+        	   xap.xml.DocumentContainer.RESERVED_DOCUMENT_NAMES[i] ) {
             // The client session should never be null during actual
             // runtime, but could be null during various unit tests.
             root.setAttribute( "id", "xap:ui-root" );
         }
         doc.setRootElement( root );
-        this.put( DocumentContainer.RESERVED_DOCUMENT_NAMES[i] , doc);
+        this.put( xap.xml.DocumentContainer.RESERVED_DOCUMENT_NAMES[i] , doc);
 	}
 }
 
-DocumentContainer.prototype = new Container;
+xap.xml.DocumentContainer.prototype = new xap.session.Container;
 
 /**
  * A constant name for the UI document.
  */
-DocumentContainer.UI_DOCUMENT_NAME = "xal";
+xap.xml.DocumentContainer.UI_DOCUMENT_NAME = "xal";
 
 
 /** @private */
-DocumentContainer.RESERVED_DOCUMENT_NAMES = new Array( 
-											DocumentContainer.UI_DOCUMENT_NAME );
+xap.xml.DocumentContainer.RESERVED_DOCUMENT_NAMES = new Array( 
+											xap.xml.DocumentContainer.UI_DOCUMENT_NAME );
 											
 											
 /**
  * Returns the UI document, this is a simple wrapper
  * around get() with the UI_DOCUMENT_NAME.
  */
-DocumentContainer.prototype.getUiDocument = function(){
-	return this.get(DocumentContainer.UI_DOCUMENT_NAME);
+xap.xml.DocumentContainer.prototype.getUiDocument = function(){
+	return this.get(xap.xml.DocumentContainer.UI_DOCUMENT_NAME);
 }

Modified: incubator/xap/trunk/src/xap/xml/InvalidXmlException.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/InvalidXmlException.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/xml/InvalidXmlException.js (original)
+++ incubator/xap/trunk/src/xap/xml/InvalidXmlException.js Sat Jul 15 10:22:41 2006
@@ -20,68 +20,68 @@
 
  
  /**
- * Creates a new InvalidXmlException object.
+ * Creates a new xap.xml.InvalidXmlException object.
  * @constructor
  * @param msgId The message id of the exception. The actual message is looked up
- * in the corresponding resource file (InvalidXmlExceptionRes.js).
+ * in the corresponding resource file (xap.xml.InvalidXmlExceptionRes.js).
  * @param args The array of arguments for the message format pattern
  * @param cause The cause exception
  * 
- * @fileoverview This is thrown from by {@link AttributeChangeListener} and {@link
- * StructureChangeListener} "before" methods.
- * @class This is thrown from by {@link AttributeChangeListener} and {@link
- * StructureChangeListener} "before" methods.  Consequently, they are thrown
+ * @fileoverview This is thrown from by {@link xap.xml.dom.events.AttributeChangeListener} and {@link
+ * xap.xml.dom.events.StructureChangeListener} "before" methods.
+ * @class This is thrown from by {@link xap.xml.dom.events.AttributeChangeListener} and {@link
+ * xap.xml.dom.events.StructureChangeListener} "before" methods.  Consequently, they are thrown
  * by many of the DOM API methods.  When thrown, it signals that the operation
- * being performed on the Document was rejected by one of the event listeners.
+ * being performed on the xap.xml.dom.Document was rejected by one of the event listeners.
  * <p>
  * @author ikaplansky
  */
-InvalidXmlException = function( msgId, args, cause ) {
-    XapException.call( this, msgId, args, cause );
+xap.xml.InvalidXmlException = function( msgId, args, cause ) {
+    xap.util.XapException.call( this, msgId, args, cause );
 }
-InvalidXmlException.prototype = new XapException;
+xap.xml.InvalidXmlException.prototype = new xap.util.XapException;
 
 
 //-----------------------------------------------------------------------
 // Constants.
 //-----------------------------------------------------------------------
-InvalidXmlException.CLASSNAME = "InvalidXmlException";
+xap.xml.InvalidXmlException.CLASSNAME = "xap.xml.InvalidXmlException";
 
 /**
  * {0} The attribute name<br>
  * {1} The xml of the Element that's missing the attribute
  */
-InvalidXmlException.MISSING_ATTRIBUTE_MSGID = "missingAttribute";
+xap.xml.InvalidXmlException.MISSING_ATTRIBUTE_MSGID = "missingAttribute";
 
 /**
  * {0} The name of the function that threw the exception
  */
-InvalidXmlException.NULL_LOCALNAME_MSGID = "nullLocalName";
+xap.xml.InvalidXmlException.NULL_LOCALNAME_MSGID = "nullLocalName";
 
 /**
  * {0} The id of the Element
  */
-InvalidXmlException.ID_CONFLICT_MSGID = "idConflict";
+xap.xml.InvalidXmlException.ID_CONFLICT_MSGID = "idConflict";
 
 /**
  * {0} The prefix string
  */
-InvalidXmlException.PREFIX_CONFLICT_MSGID = "prefixConflict";
+xap.xml.InvalidXmlException.PREFIX_CONFLICT_MSGID = "prefixConflict";
 
 //-----------------------------------------------------------------------
 // Public Class Methods.
 //-----------------------------------------------------------------------
-InvalidXmlException.elementToString = function( element ) {
+xap.xml.InvalidXmlException.elementToString = function( element ) {
 	return element.toXml( true );
 }
 
 
-InvalidXmlException.prototype.toString = function() {
+xap.xml.InvalidXmlException.prototype.toString = function() {
 	var buf = "[InvalidXmlException:\t" + 
-			  XapException.prototype.toString.call( this ) + "]";
+			  xap.util.XapException.prototype.toString.call( this ) + "]";
 	return buf;
 }
 
-InvalidXmlException.prototype.getClassName = function() {
-	return InvalidXmlException.CLASSNAME;
+xap.xml.InvalidXmlException.prototype.getClassName = function() {
+	return xap.xml.InvalidXmlException.CLASSNAME;
 }

Modified: incubator/xap/trunk/src/xap/xml/InvalidXmlExceptionRes.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/InvalidXmlExceptionRes.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/xml/InvalidXmlExceptionRes.js (original)
+++ incubator/xap/trunk/src/xap/xml/InvalidXmlExceptionRes.js Sat Jul 15 10:22:41 2006
@@ -19,16 +19,16 @@
 Xap.provide('xap.xml.InvalidXmlExceptionRes'); 
  
  /**
- * @fileoverview The resource file for InvalidXmlException.js
- * @class The resource file for InvalidXmlException.js
+ * @fileoverview The resource file for xap.xml.InvalidXmlException.js
+ * @class The resource file for xap.xml.InvalidXmlException.js
  * <p>
  * @author ikaplansky
  */
-InvalidXmlExceptionRes = function() {
+xap.xml.InvalidXmlExceptionRes = function() {
 	this.messages = new Object();
-	this.messages[InvalidXmlException.MISSING_ATTRIBUTE_MSGID] = "Missing required attribute {0} on element: {1}";
-	this.messages[InvalidXmlException.NULL_LOCALNAME_MSGID] = "The localName supplied to the method is null, cannot create an Element with a null localName.";
-	this.messages[InvalidXmlException.ID_CONFLICT_MSGID] = "An element with id ''{0}'' already exists in this document.";
-	this.messages[InvalidXmlException.PREFIX_CONFLICT_MSGID] = "The document fragment being added contains a prefix that has already been defined for this document but does not match the previously defined namespace.  [Defined prefix: '{'''{0}'',''{1}'''}'] [Prefix being added: '{'''{2}'',''{3}'''}']";
+	this.messages[xap.xml.InvalidXmlException.MISSING_ATTRIBUTE_MSGID] = "Missing required attribute {0} on element: {1}";
+	this.messages[xap.xml.InvalidXmlException.NULL_LOCALNAME_MSGID] = "The localName supplied to the method is null, cannot create an Element with a null localName.";
+	this.messages[xap.xml.InvalidXmlException.ID_CONFLICT_MSGID] = "An element with id ''{0}'' already exists in this document.";
+	this.messages[xap.xml.InvalidXmlException.PREFIX_CONFLICT_MSGID] = "The document fragment being added contains a prefix that has already been defined for this document but does not match the previously defined namespace.  [Defined prefix: '{'''{0}'',''{1}'''}'] [Prefix being added: '{'''{2}'',''{3}'''}']";
 }
 

Modified: incubator/xap/trunk/src/xap/xml/NamespaceHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/NamespaceHandler.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/xml/NamespaceHandler.js (original)
+++ incubator/xap/trunk/src/xap/xml/NamespaceHandler.js Sat Jul 15 10:22:41 2006
@@ -18,7 +18,7 @@
 Xap.provide('xap.xml.NamespaceHandler'); 
 
 /**
- * @fileoverview The base class for all NamespaceHandlers that handle
+ * @fileoverview The base class for all xap.xml.NamespaceHandlers that handle
  * top-level XML blocks based on namespace URI.
  * 
  * @author ikaplansky
@@ -27,32 +27,32 @@
  */
  
 /**
- * This is a "base class" for NamespaceHandler implementations and should not
+ * This is a "base class" for xap.xml.NamespaceHandler implementations and should not
  * be instantiated directly. 
  * 
- * @class The base class for all NamespaceHandlers that handle
- * top-level XML blocks based on namespace URI. Subclasses of NamespaceHandler
+ * @class The base class for all xap.xml.NamespaceHandlers that handle
+ * top-level XML blocks based on namespace URI. Subclasses of xap.xml.NamespaceHandler
  * should override <code>receiveDispatch</code> to handle the XML
  * they are interested in appropriately.
  * <br><br>
- * NamespaceHandlers are registered with the NamespaceHandlerManager,
- * and are called during RequestService.retrieveAndProcess() and other
+ * xap.xml.NamespaceHandlers are registered with the xap.xml.NamespaceHandlerManager,
+ * and are called during xap.requestservice.RequestService.retrieveAndProcess() and other
  * "process" calls.
  * <br><br>
- * An example of a NamespaceHandler implementation is XmodifyNamespaceHandler.
+ * An example of a xap.xml.NamespaceHandler implementation is xap.xml.xmodify.XmodifyNamespaceHandler.
  * 
- * @param {ClientSession} session The current session.
+ * @param {xap.session.ClientSession} session The current session.
  * @constructor
  */
-NamespaceHandler = function( session ) {
+xap.xml.NamespaceHandler = function( session ) {
 	this._session = session;
 }
 
 /**
- * @return {ClientSession} Returns the current session this NamespaceHandler
+ * @return {xap.session.ClientSession} Returns the current session this xap.xml.NamespaceHandler
  * belongs to.
  */
-NamespaceHandler.prototype.getSession = function(){
+xap.xml.NamespaceHandler.prototype.getSession = function(){
 	return this._session;
 }
 
@@ -63,8 +63,8 @@
  * their XML appropriately, for example the XModifyNamespaceHandler
  * overrides this method to implement xmodify commands.
  * 
- * @param {XapElement} element The element the matching uri was found on.
+ * @param {xap.xml.dom.XapElement} element The element the matching uri was found on.
  */
-NamespaceHandler.prototype.receiveDispatch = function( element ) {}
+xap.xml.NamespaceHandler.prototype.receiveDispatch = function( element ) {}
 
 

Modified: incubator/xap/trunk/src/xap/xml/NamespaceHandlerManager.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/NamespaceHandlerManager.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/xml/NamespaceHandlerManager.js (original)
+++ incubator/xap/trunk/src/xap/xml/NamespaceHandlerManager.js Sat Jul 15 10:22:41 2006
@@ -19,8 +19,8 @@
  
  
 /**
- * @fileoverview NamespaceHandlerManager is a registry of namespaces to 
- * NamespaceHandler objects that process the content in that namespace.
+ * @fileoverview xap.xml.NamespaceHandlerManager is a registry of namespaces to 
+ * xap.xml.NamespaceHandler objects that process the content in that namespace.
  *
  * @author ikaplansky
  * @author jmargaris
@@ -29,22 +29,22 @@
  
 
 /**
- * Creates a NamespaceHandlerManager instance.
+ * Creates a xap.xml.NamespaceHandlerManager instance.
  * 
- * @class NamespaceHandlerManager is a registry of namespaces to NamespaceHandler
+ * @class xap.xml.NamespaceHandlerManager is a registry of namespaces to xap.xml.NamespaceHandler
  * objects that handle elements belonging to a specific namespace. When an
- * XML document is processed each top-level namespace is fed to a NamespaceHandler
+ * XML document is processed each top-level namespace is fed to a xap.xml.NamespaceHandler
  * for that namespace. Currently the mapping of namespace URI to namespace
  * handler is hard-coded. We should probably allow users to add their own 
  * mappings to support new namespaces like data.
  * 
  * @constructor
- * @param {ClientSession} session The client session.
+ * @param {xap.session.ClientSession} session The client session.
  *  
  */
-NamespaceHandlerManager = function( session ) {
+xap.xml.NamespaceHandlerManager = function( session ) {
 	this._session = session;
-	this._namespaceToHandlersMap = new Hashtable();
+	this._namespaceToHandlersMap = new xap.util.Hashtable();
 	this._loadConfig();
 }
 
@@ -55,31 +55,31 @@
 /**
  *  Constant for "http://www.openxal.org/xmodify"
  */
-NamespaceHandlerManager.XMODIFY_NAMESPACE = "http://www.openxal.org/xmodify";
+xap.xml.NamespaceHandlerManager.XMODIFY_NAMESPACE = "http://www.openxal.org/xmodify";
 
 /**
  *  Constant for "http://www.openxal.org/mco"
  */
-NamespaceHandlerManager.MCO_NAMESPACE = "http://www.openxal.org/mco";
+xap.xml.NamespaceHandlerManager.MCO_NAMESPACE = "http://www.openxal.org/mco";
 
 /**
  * Constant for "http://www.openxal.org/macro"
  */
-NamespaceHandlerManager.MACRO_NAMESPACE = "http://www.openxal.org/macro";
+xap.xml.NamespaceHandlerManager.MACRO_NAMESPACE = "http://www.openxal.org/macro";
 
 /**
  * Constant for "http://www.openxal.org/xal"
  */
-NamespaceHandlerManager.XAL_NAMESPACE = "http://www.openxal.org/xal";
+xap.xml.NamespaceHandlerManager.XAL_NAMESPACE = "http://www.openxal.org/xal";
 
 /** @private */
-NamespaceHandlerManager.s_log = xap.util.LogFactory.getLog( "NamespaceHandler" );
+xap.xml.NamespaceHandlerManager.s_log = xap.util.LogFactory.getLog( "xap.xml.NamespaceHandler" );
 
 
 //-----------------------------------------------------------------------
 // Public Methods.
 //-----------------------------------------------------------------------
-NamespaceHandlerManager.prototype.dispatch = function( element ) {
+xap.xml.NamespaceHandlerManager.prototype.dispatch = function( element ) {
 	if( ! this.isNamespaceRegistered( element.getNamespaceUri() )) {
         // TODO - internationalize
 		throw new xap.util.Exception( "The namespace supplied [" + 
@@ -90,9 +90,9 @@
 	try {
 		handler.receiveDispatch( element );
 	} catch ( e ) {
-		NamespaceHandlerManager.s_log.debug( "NamespaceHandler.dispatch:" + e );
-		throw new ParserException(
-        	ParserException.NAMESPACE_HANDLER_FAILURE,
+		xap.xml.NamespaceHandlerManager.s_log.debug( "xap.xml.NamespaceHandler.dispatch:" + e );
+		throw new xap.xml.sax.ParserException(
+        	xap.xml.sax.ParserException.NAMESPACE_HANDLER_FAILURE,
         	new Array( handler + " " + element.getNamespaceUri(), "-1", "-1" ),
 			e );
 	}
@@ -104,7 +104,7 @@
  * @param ns the namespace to be checked.
  * @return true if the namespace supplied is valid, false otherwise.
  */
-NamespaceHandlerManager.prototype.isNamespaceRegistered = function( ns ) {
+xap.xml.NamespaceHandlerManager.prototype.isNamespaceRegistered = function( ns ) {
 	return ( this._namespaceToHandlersMap.get( ns ) != null );
 }
 
@@ -115,18 +115,18 @@
 /**
  * @private
  */
-NamespaceHandlerManager.prototype._loadConfig = function() {
+xap.xml.NamespaceHandlerManager.prototype._loadConfig = function() {
 	this._namespaceToHandlersMap.put( 
-		NamespaceHandlerManager.XMODIFY_NAMESPACE, new XmodifyNamespaceHandler( this._session ) );
+		xap.xml.NamespaceHandlerManager.XMODIFY_NAMESPACE, new xap.xml.xmodify.XmodifyNamespaceHandler( this._session ) );
 	
 	this._namespaceToHandlersMap.put( 
-		NamespaceHandlerManager.MCO_NAMESPACE, new McoNamespaceHandler( this._session ) );
+		xap.xml.NamespaceHandlerManager.MCO_NAMESPACE, new xap.mco.McoNamespaceHandler( this._session ) );
 		
 	this._namespaceToHandlersMap.put( 
-		NamespaceHandlerManager.MACRO_NAMESPACE, new MacroNamespaceHandler( this._session ) );
+		xap.xml.NamespaceHandlerManager.MACRO_NAMESPACE, new xap.macro.MacroNamespaceHandler( this._session ) );
 		
 	this._namespaceToHandlersMap.put( 
-		NamespaceHandlerManager.XAL_NAMESPACE, new XalNamespaceHandler( this._session ) );
+		xap.xml.NamespaceHandlerManager.XAL_NAMESPACE, new xap.xml.XalNamespaceHandler( this._session ) );
 }
 //Let Dojo know what to expect from this file:
 Xap.provide('xap.xml.NamespaceHandlerManager'); 

Modified: incubator/xap/trunk/src/xap/xml/XalNamespaceHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/XalNamespaceHandler.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/xml/XalNamespaceHandler.js (original)
+++ incubator/xap/trunk/src/xap/xml/XalNamespaceHandler.js Sat Jul 15 10:22:41 2006
@@ -28,10 +28,10 @@
  
  
  /** 
-  * Creates a XalNamespaceHandler instance, typically there is no need
-  * to contruct a XalNamespaceHandler directly.
+  * Creates a xap.xml.XalNamespaceHandler instance, typically there is no need
+  * to contruct a xap.xml.XalNamespaceHandler directly.
   * 
-  * @class The XalNamespaceHandler handles elements with the xal namespace
+  * @class The xap.xml.XalNamespaceHandler handles elements with the xal namespace
   * that are at the first level of a document being processed.
   * Currently what this does it take the element being processed and append
   * it to the root of the UI document.
@@ -44,20 +44,20 @@
   * @constructor
   * 
   */
-XalNamespaceHandler = function( session ){
-	NamespaceHandler.call(this, session);
+xap.xml.XalNamespaceHandler = function( session ){
+	xap.xml.NamespaceHandler.call(this, session);
 }
 
-XalNamespaceHandler.prototype = new NamespaceHandler;
+xap.xml.XalNamespaceHandler.prototype = new xap.xml.NamespaceHandler;
 
 //-----------------------------------------------------------------------
 // Class variables.
 //-----------------------------------------------------------------------
-XalNamespaceHandler.s_log = xap.util.LogFactory.getLog( "XalNamespaceHandler" );
+xap.xml.XalNamespaceHandler.s_log = xap.util.LogFactory.getLog( "xap.xml.XalNamespaceHandler" );
 
 
 //-----------------------------------------------------------------------
-// NamespaceHandler Implementation.
+// xap.xml.NamespaceHandler Implementation.
 //-----------------------------------------------------------------------
 
 /**
@@ -68,8 +68,8 @@
  * children
  * @throws UpdateException
  */
-XalNamespaceHandler.prototype.receiveDispatch = function( element ) {
-	XalNamespaceHandler.s_log.debug("receiveDispatch:" + element);
+xap.xml.XalNamespaceHandler.prototype.receiveDispatch = function( element ) {
+	xap.xml.XalNamespaceHandler.s_log.debug("receiveDispatch:" + element);
 	 
 	 //get the root and just append to it
 	 var uiDocument = this.getSession().getDocumentContainer().getUiDocument();

Modified: incubator/xap/trunk/src/xap/xml/dom/Document.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/dom/Document.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/xml/dom/Document.js (original)
+++ incubator/xap/trunk/src/xap/xml/dom/Document.js Sat Jul 15 10:22:41 2006
@@ -22,42 +22,42 @@
 Xap.require("xap.util.ArrayHelper");
  
 /**
- * @fileoverview The Document object represents an entire XML document. 
+ * @fileoverview The xap.xml.dom.Document object represents an entire XML document. 
  * Conceptually, it is the root of the document tree, and provides the 
  * primary access to the document's data.
  *
  * @author ikaplansky
  * @author jmargaris
  * 
- * @see XapElement
+ * @see xap.xml.dom.XapElement
  */
  
  /** 
-  * Creates a Document instance.
+  * Creates a xap.xml.dom.Document instance.
   * @extends google.XDocument
-  * @class The Document object represents an entire XML document. Conceptually, it
+  * @class The xap.xml.dom.Document object represents an entire XML document. Conceptually, it
   * is the root of the document tree, and provides the primary access to the
   * document's data.
   *
   * <br><br>
   *
-  * Listeners may be registered at the Document level to hear changes
+  * Listeners may be registered at the xap.xml.dom.Document level to hear changes
   * in the entire document.
   *
   * <ul>
-  *   <li>StructureChangeListener.js 
-  *   <li>AttributeChangeListener.js
+  *   <li>xap.xml.dom.events.StructureChangeListener.js 
+  *   <li>xap.xml.dom.events.AttributeChangeListener.js
   * </ul>
   *
   * <br>
   *
-  * The Document has a map of id to Element for every Element.  Therefore
+  * The xap.xml.dom.Document has a map of id to Element for every Element.  Therefore
   * it is able to provide efficient hash based element lookup by id.
   * 
   * @constructor
   * @param rootElement The root Element for the newly created document.
   */
-Document = function( rootElement ) {
+xap.xml.dom.Document = function( rootElement ) {
 	 google.XDocument.call(this);
     this._rootElement = rootElement;
     this._documentEncoding = null;
@@ -67,10 +67,10 @@
     
     this._idToElementMap = new Object();
     this._prefixToNamespaceMap = new Object();
-    this._uidProvider = new UidProvider();
+    this._uidProvider = new xap.util.UidProvider();
 }
 
-Document.prototype = new google.XDocument();
+xap.xml.dom.Document.prototype = new google.XDocument();
 
 
 //-----------------------------------------------------------------------
@@ -80,46 +80,46 @@
 /**
  * @private
  */
-Document.XML_DECL_WITHOUT_ENC = "<?xml version=\"1.0\"?>";
+xap.xml.dom.Document.XML_DECL_WITHOUT_ENC = "<?xml version=\"1.0\"?>";
 
 /**
  * @private
  */
-Document.BEFORE_ADD = 0;
+xap.xml.dom.Document.BEFORE_ADD = 0;
 
 /**
  * @private
  */
-Document.BEFORE_REMOVE = 1;
+xap.xml.dom.Document.BEFORE_REMOVE = 1;
 
 /**
  * @private
  */
-Document.ON_ADD = 2;
+xap.xml.dom.Document.ON_ADD = 2;
 
 /**
  * @private
  */
-Document.ON_REMOVE = 3;
+xap.xml.dom.Document.ON_REMOVE = 3;
 
 
 //-----------------------------------------------------------------------
-// Document Interface.
+// xap.xml.dom.Document Interface.
 //-----------------------------------------------------------------------
 /**
- * Creates a new XapElement with the specified name, prefix and namespace.
+ * Creates a new xap.xml.dom.XapElement with the specified name, prefix and namespace.
  * 
  * @param localName The local name of the new node
  * @param prefix The prefix of the new node.
  * @param ns The namespace of the new node
  */
-Document.prototype.createElement = function( localName, prefix, ns ) {
+xap.xml.dom.Document.prototype.createElement = function( localName, prefix, ns ) {
 	if( localName == null ) {
-    	throw new InvalidXmlException( 
-    		InvalidXmlException.NULL_LOCALNAME_MSGID,
-    		new Array( "Document.createElement" ));
+    	throw new xap.xml.InvalidXmlException( 
+    		xap.xml.InvalidXmlException.NULL_LOCALNAME_MSGID,
+    		new Array( "xap.xml.dom.Document.createElement" ));
     }
-    var e = new XapElement(localName, null, null, null,this._uidProvider );
+    var e = new xap.xml.dom.XapElement(localName, null, null, null,this._uidProvider );
     
     //if there is no namespace then create it with a blank one
     //so we can serialize back out properly
@@ -129,58 +129,58 @@
 }
 
 /**
- * @return The root XapElement of this Document
+ * @return The root xap.xml.dom.XapElement of this xap.xml.dom.Document
  */
-Document.prototype.getRootElement = function() {
+xap.xml.dom.Document.prototype.getRootElement = function() {
 	return this._rootElement;
 }
 
 /**
- * @return The encoding of this Document
+ * @return The encoding of this xap.xml.dom.Document
  */
-Document.prototype.getEncoding = function() {
+xap.xml.dom.Document.prototype.getEncoding = function() {
 	return this._documentEncoding;
 }
 
 /**
- * Adds an AttributeChangeListener to this Document
- * @param listener The AttributeChangeListener to add
+ * Adds an xap.xml.dom.events.AttributeChangeListener to this xap.xml.dom.Document
+ * @param listener The xap.xml.dom.events.AttributeChangeListener to add
  */
-Document.prototype.addAttributeChangeListener = function( listener ) {
+xap.xml.dom.Document.prototype.addAttributeChangeListener = function( listener ) {
 	this._attributeChangeListeners.push( listener );
 }
 
 /**
- * Removes the specified AttributeChangeListener
+ * Removes the specified xap.xml.dom.events.AttributeChangeListener
  * @param The listener to remove
  */
-Document.prototype.removeAttributeChangeListener = function( listener ) {
+xap.xml.dom.Document.prototype.removeAttributeChangeListener = function( listener ) {
 	return xap.util.ArrayHelper.removeElement(this._attributeChangeListeners, listener);
 }
 
 /**
- * Adds a StructureChangeListener to this Document
+ * Adds a xap.xml.dom.events.StructureChangeListener to this xap.xml.dom.Document
  * @param listener The listener to add
  */
-Document.prototype.addStructureChangeListener = function( listener ) {
+xap.xml.dom.Document.prototype.addStructureChangeListener = function( listener ) {
 	this._structureChangeListeners.push( listener );
 }
 
 /**
- * Removes the specified StructureChangeListener from this Document.
+ * Removes the specified xap.xml.dom.events.StructureChangeListener from this xap.xml.dom.Document.
  * @param listener The listener to remove.
  */
-Document.prototype.removeStructureChangeListener = function( listener ) {
+xap.xml.dom.Document.prototype.removeStructureChangeListener = function( listener ) {
 	return xap.util.ArrayHelper.removeElement(this._structureChangeListeners, listener);
 }
 
 /**
- * Returns the XapElement with the specified id attribute value. The Document 
- * maintains a hashmap of ids to XapElements for faster lookup.
+ * Returns the xap.xml.dom.XapElement with the specified id attribute value. The xap.xml.dom.Document 
+ * maintains a hashmap of ids to xap.xml.dom.XapElements for faster lookup.
  * 
- * @param id The id attribute value of the XapElement to look up.
+ * @param id The id attribute value of the xap.xml.dom.XapElement to look up.
  */
-Document.prototype.getElementById = function( id ) {
+xap.xml.dom.Document.prototype.getElementById = function( id ) {
 	if( this._idToElementMap == null ) {
 		return null;
 	}
@@ -188,11 +188,11 @@
 }
 
 /**
- * Sets the root XapElement on this Document
+ * Sets the root xap.xml.dom.XapElement on this xap.xml.dom.Document
  * 
- * @param root The XapElement to serve as the root of this Document
+ * @param root The xap.xml.dom.XapElement to serve as the root of this xap.xml.dom.Document
  */
-Document.prototype.setRootElement = function( root ) {
+xap.xml.dom.Document.prototype.setRootElement = function( root ) {
 	
 	//TODO waht about appendChild and remove child()? we need to
 	//override those too?
@@ -204,15 +204,15 @@
 		return;
 	} 
 
-	// remove the current root element from this Document.
+	// remove the current root element from this xap.xml.dom.Document.
 	this._removeExistingRoot();
 	
 	if ( root != null ) {
-		var event = new StructureChangeEvent( null, root );
+		var event = new xap.xml.dom.events.StructureChangeEvent( null, root );
         
    
 		this._notifyListenersOfStructureChange
-			( this._structureChangeListeners, event, Document.BEFORE_ADD );
+			( this._structureChangeListeners, event, xap.xml.dom.Document.BEFORE_ADD );
       
         
 		// Take the element from the event because they have the
@@ -243,7 +243,7 @@
 		this._addDocumentFragmentToIdMapAndCheckForPrefixCollisions( this._rootElement );
         
 		this._notifyListenersOfStructureChange( 
-			this._structureChangeListeners, event, Document.ON_ADD );
+			this._structureChangeListeners, event, xap.xml.dom.Document.ON_ADD );
         
         
 	} else {
@@ -252,30 +252,30 @@
 }
 
 /**
- * Returns an XML string representation of this Document.
+ * Returns an XML string representation of this xap.xml.dom.Document.
  * 
  * @param prettyPrint The boolean to control the format of the resulted XML string
- * @return The XML representation of this Document
+ * @return The XML representation of this xap.xml.dom.Document
  */
-Document.prototype.toXml = function( prettyPrint ) {
+xap.xml.dom.Document.prototype.toXml = function( prettyPrint ) {
 	return this._toStringHelper( prettyPrint, true );
 }
 
 /**
- * Returns an XML string representation of this Document omitting all auto
+ * Returns an XML string representation of this xap.xml.dom.Document omitting all auto
  * generated ids (i.e. id attributes whose values were auto-generated are not
  * displayed).
  * @param prettyPrint The boolean to control the format of the resulted XML string
- * @return The XML representation of this Document without autoassigned ids.
+ * @return The XML representation of this xap.xml.dom.Document without autoassigned ids.
  */
-Document.prototype.toXmlWithoutAutoAssignedIds = function( prettyPrint ) {
+xap.xml.dom.Document.prototype.toXmlWithoutAutoAssignedIds = function( prettyPrint ) {
 	return this._toStringHelper( prettyPrint, false );
 }
 
 /**
- * @return The string representation of this Document object.
+ * @return The string representation of this xap.xml.dom.Document object.
  */
-Document.prototype.toString = function() {
+xap.xml.dom.Document.prototype.toString = function() {
 	return this._toStringHelper( true, false );
 }
 
@@ -285,10 +285,10 @@
 //-----------------------------------------------------------------------
 
 /**
- * Returns the UidProvider for this document.
+ * Returns the xap.util.UidProvider for this document.
  * @private
  */
-Document.prototype._getUidProvider = function() {
+xap.xml.dom.Document.prototype._getUidProvider = function() {
 	return this._uidProvider;
 }
 
@@ -303,7 +303,7 @@
  * @param namespace The namespace for which a prefix is desired.
  * @private
  */
-Document.prototype._getPrefixForNamespace = function ( namespace ) {
+xap.xml.dom.Document.prototype._getPrefixForNamespace = function ( namespace ) {
 	if ( this._prefixToNamespaceMap == null ) {
     	return null;
     }
@@ -323,7 +323,7 @@
 /**
  * @private
  */            
-Document.prototype._addDocumentFragmentToIdMapAndCheckForPrefixCollisions = function( e ) {
+xap.xml.dom.Document.prototype._addDocumentFragmentToIdMapAndCheckForPrefixCollisions = function( e ) {
 	this._addIdToElementMapping( e.getAttribute( "id" ), e );
 	this._checkPrefixForCollisionAndRegister( e );
 	e._notifyListenersOnAddedToDocument( this );
@@ -338,7 +338,7 @@
 /**
  * @private
  */            
-Document.prototype._removeDocumentFragmentFromIdMap = function( e ) {
+xap.xml.dom.Document.prototype._removeDocumentFragmentFromIdMap = function( e ) {
 	this._idToElementMap[e.getAttribute( "id" )] = null;
 	e._notifyListenersOnRemovedFromDocument( this );
 	for( var i=0; i < e.childNodes.length; i++ ) {
@@ -357,7 +357,7 @@
  * @return The namespace associated with the supplied prefix.
  * @private
  */
-Document.prototype._getNamespaceForPrefix = function( prefix ) {
+xap.xml.dom.Document.prototype._getNamespaceForPrefix = function( prefix ) {
 	if( this._prefixToNamespaceMap == null) {
 		return null;
 	}
@@ -375,7 +375,7 @@
  * registered with a different namespace.
  * @private
  */
-Document.prototype._registerPrefix = function( prefix, ns ) { 
+xap.xml.dom.Document.prototype._registerPrefix = function( prefix, ns ) { 
     if( this._prefixToNamespaceMap == null ) {
 		this._prefixToNamespaceMap = new Object();
 	}
@@ -387,19 +387,19 @@
 /**
  * @private
  */            
-Document.prototype._removeExistingRoot = function() {
+xap.xml.dom.Document.prototype._removeExistingRoot = function() {
 	if ( this._rootElement != null ) {
-		var event = new StructureChangeEvent( null, this._rootElement );
+		var event = new xap.xml.dom.events.StructureChangeEvent( null, this._rootElement );
   
 		this._notifyListenersOfStructureChange
-			( this._structureChangeListeners, event, Document.BEFORE_REMOVE );
+			( this._structureChangeListeners, event, xap.xml.dom.Document.BEFORE_REMOVE );
         
 		this._rootElement.setOwnerDocument( null );
 		this.removeChild(this._rootElement);
 		this._removeDocumentFragmentFromIdMap( this._rootElement );
          
       this._notifyListenersOfStructureChange
-          ( this._structureChangeListeners, event, Document.ON_REMOVE );
+          ( this._structureChangeListeners, event, xap.xml.dom.Document.ON_REMOVE );
        
 	}
 }
@@ -407,7 +407,7 @@
 /**
  * @private
  */            
-Document.prototype._notifyListenersOfStructureChange = function( v, e, type ) {
+xap.xml.dom.Document.prototype._notifyListenersOfStructureChange = function( v, e, type ) {
 	if ( v != null ) {
 		for ( var i = 0; i < v.length; i ++ ) {
         	var listener = v[i];
@@ -437,13 +437,13 @@
 /**
  * @private
  */            
-Document.prototype._addIdToElementMapping = function( id, e ) { 
+xap.xml.dom.Document.prototype._addIdToElementMapping = function( id, e ) { 
 	if( this._idToElementMap == null ) {
 		this._idToElementMap = new Object();
 	}
 	if( this._idToElementMap[id] != null ) {
-		throw new InvalidXmlException(
-				InvalidXmlException.ID_CONFLICT_MSGID, 
+		throw new xap.xml.InvalidXmlException(
+				xap.xml.InvalidXmlException.ID_CONFLICT_MSGID, 
 				new Array( id ));
 	}
 	this._idToElementMap[id] = e;
@@ -452,7 +452,7 @@
 /**
  * @private
  */            
-Document.prototype._checkPrefixForCollisionAndRegister = function( e ) { 
+xap.xml.dom.Document.prototype._checkPrefixForCollisionAndRegister = function( e ) { 
     if( e.getPrefix() == null ) {
         return;
     }
@@ -463,8 +463,8 @@
         var currentNs = this._prefixToNamespaceMap[e.getPrefix()];
         var newNs = e.getNamespaceUri();
         if( currentNs != newNs ) {
-            throw new InvalidXmlException(
-                    InvalidXmlException.PREFIX_CONFLICT_MSGID, 
+            throw new xap.xml.InvalidXmlException(
+                    xap.xml.InvalidXmlException.PREFIX_CONFLICT_MSGID, 
                     new Array( e.getPrefix(),
                     		   currentNs, 
                                e.getPrefix(), 
@@ -478,7 +478,7 @@
 /**
  * @private
  */            
-Document.prototype._toStringHelper = function( prettyPrint, withInternalIds ) {
+xap.xml.dom.Document.prototype._toStringHelper = function( prettyPrint, withInternalIds ) {
 	var elementOutput = "";
 	if( this._rootElement != null ) {
 		if( withInternalIds ) {
@@ -492,7 +492,7 @@
     // calculate initial length of string buffer (since total size is 
     // already known). And append the xml decl to it.
     if( this._documentEncoding == null ) {
-    	sbuf += Document.XML_DECL_WITHOUT_ENC;
+    	sbuf += xap.xml.dom.Document.XML_DECL_WITHOUT_ENC;
     } else {
         sbuf += "<?xml version=\"1.0\" encoding=\"" + this._documentEncoding +
         	    "\"?>";

Modified: incubator/xap/trunk/src/xap/xml/dom/XapElement.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/dom/XapElement.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/xml/dom/XapElement.js (original)
+++ incubator/xap/trunk/src/xap/xml/dom/XapElement.js Sat Jul 15 10:22:41 2006
@@ -34,21 +34,21 @@
  //TODO exception handling in this class is all messed up
 
 /**
- * This constructor should not be used directly.  Use Document.createElement() 
- * to create a new XapElement instance.
+ * This constructor should not be used directly.  Use xap.xml.dom.Document.createElement() 
+ * to create a new xap.xml.dom.XapElement instance.
  * 
  * @class An DOM element node implementation that supports attribute
  * and structure change listeners.
  * 
- * @param elementName The local name for the XapElement
- * @param{Document} ownerDoc The owner Document
- * @param parentEl The parent XapElement
- * @param id The id attribute to use for the new XapElement
- * @param{xap.util.UidProvider} uidProvider The UidProvider instance used to generate the id for this
- * XapElement.
+ * @param elementName The local name for the xap.xml.dom.XapElement
+ * @param{xap.xml.dom.Document} ownerDoc The owner xap.xml.dom.Document
+ * @param parentEl The parent xap.xml.dom.XapElement
+ * @param id The id attribute to use for the new xap.xml.dom.XapElement
+ * @param{xap.util.UidProvider} uidProvider The xap.util.UidProvider instance used to generate the id for this
+ * xap.xml.dom.XapElement.
  * 
  */
-XapElement = function(elementName, ownerDoc, parentEl, id, uidProvider ){
+xap.xml.dom.XapElement = function(elementName, ownerDoc, parentEl, id, uidProvider ){
 	
 	google.XNode.call(this, google.DOM_ELEMENT_NODE, elementName, null, ownerDoc)
 	this._namespaceUri = null;
@@ -69,10 +69,10 @@
 		this.setAttribute( "id", uidProvider.nextId() );
 	}
 }
-XapElement.prototype = new google.XNode();
+xap.xml.dom.XapElement.prototype = new google.XNode();
 
 // Venkman gets class string from here:
-XapElement.prototype.constructor = XapElement ;
+xap.xml.dom.XapElement.prototype.constructor = xap.xml.dom.XapElement ;
 
 
 
@@ -81,38 +81,38 @@
 //-----------------------------------------------------------------------
 
 /** @private */
-XapElement.CANNOT_SET_ID_ATTRIBUTE_WHEN_PART_OF_DOCUMENT = "cannotSetIdAttributeWhenPartOfOwnerDocument";
+xap.xml.dom.XapElement.CANNOT_SET_ID_ATTRIBUTE_WHEN_PART_OF_DOCUMENT = "cannotSetIdAttributeWhenPartOfOwnerDocument";
 
 // {0} - The length of the array.
 // {1} - The specified index of the key value pair.
 /** @private */
-XapElement.CANT_REMOVE_KEY_VALUE_PAIR_FROM_ARRAY = "cantRemoveKeyValuePair";
+xap.xml.dom.XapElement.CANT_REMOVE_KEY_VALUE_PAIR_FROM_ARRAY = "cantRemoveKeyValuePair";
 
 // No-args
 /** @private */
-XapElement.DOC_OWNERSHIP_FAILURE = "docOwnershipNotificationFailure";
+xap.xml.dom.XapElement.DOC_OWNERSHIP_FAILURE = "docOwnershipNotificationFailure";
 
 
 /** @private */
-XapElement.CLASSNAME = "XapElement";
+xap.xml.dom.XapElement.CLASSNAME = "xap.xml.dom.XapElement";
 
 /** @private */
-XapElement.INITIAL_ATTRIBUTES_ARRAY_SIZE = 4 * 2;
+xap.xml.dom.XapElement.INITIAL_ATTRIBUTES_ARRAY_SIZE = 4 * 2;
 
 /** @private */
-XapElement.INITIAL_LISTENER_ARRAY_SIZE = 2 * 2;
+xap.xml.dom.XapElement.INITIAL_LISTENER_ARRAY_SIZE = 2 * 2;
 
 /** @private */
-XapElement.INDENT = "  ";
+xap.xml.dom.XapElement.INDENT = "  ";
 
-XapElement.BEFORE_ATTRIBUTE_REMOVED = "beforeAttributeRemoved";
-XapElement.ON_ATTRIBUTE_REMOVED = "onAttributeRemoved";
-XapElement.BEFORE_ATTRIBUTE_SET = "beforeAttributeSet";
-XapElement.ON_ATTRIBUTE_SET = "onAttributeSet";
-XapElement.BEFORE_CHILD_REMOVED = "beforeChildRemoved";
-XapElement.BEFORE_CHILD_ADDED = "beforeChildAdded";
-XapElement.ON_CHILD_REMOVED= "onChildRemoved";
-XapElement.ON_CHILD_ADDED= "onChildAdded";
+xap.xml.dom.XapElement.BEFORE_ATTRIBUTE_REMOVED = "beforeAttributeRemoved";
+xap.xml.dom.XapElement.ON_ATTRIBUTE_REMOVED = "onAttributeRemoved";
+xap.xml.dom.XapElement.BEFORE_ATTRIBUTE_SET = "beforeAttributeSet";
+xap.xml.dom.XapElement.ON_ATTRIBUTE_SET = "onAttributeSet";
+xap.xml.dom.XapElement.BEFORE_CHILD_REMOVED = "beforeChildRemoved";
+xap.xml.dom.XapElement.BEFORE_CHILD_ADDED = "beforeChildAdded";
+xap.xml.dom.XapElement.ON_CHILD_REMOVED= "onChildRemoved";
+xap.xml.dom.XapElement.ON_CHILD_ADDED= "onChildAdded";
 
 
 
@@ -121,22 +121,22 @@
  * encoding attributes, only double quotes will be encoded.
  * @private
  */
-XapElement.ENCODE_ONLY_DOUBLE_QUOTES_IN_ATTRIBUTES = 0;
+xap.xml.dom.XapElement.ENCODE_ONLY_DOUBLE_QUOTES_IN_ATTRIBUTES = 0;
 /**
  * Passed to the private method _toStringHelper(), this means that when
  * encoding attributes, everything will be encoded except single ticks.
  * @private
  */
-XapElement.ENCODE_EVERYTHING_BUT_SINGLE_TICKS_IN_ATTRIBUTES = 1;
+xap.xml.dom.XapElement.ENCODE_EVERYTHING_BUT_SINGLE_TICKS_IN_ATTRIBUTES = 1;
 /**
  * Passed to the private method _toStringHelper(), this means that when
  * encoding attributes, everything will be encoded.
  * @private
  */
-XapElement.ENCODE_EVERYTHING_IN_ATTRIBUTES = 2;
+xap.xml.dom.XapElement.ENCODE_EVERYTHING_IN_ATTRIBUTES = 2;
 
 /** @private */
-XapElement.s_log = xap.util.LogFactory.getLog( "DocumentObjectModel" );
+xap.xml.dom.XapElement.s_log = xap.util.LogFactory.getLog( "xap.xml.dom.DocumentObjectModel" );
 
 //-----------------------------------------------------------------------
 // Public Class Methods.
@@ -146,9 +146,9 @@
  * Returns true if the ID was a system generated one rather than
  * an end-use assigned one.
  */
-XapElement.isGeneratedId = function( id ) {
+xap.xml.dom.XapElement.isGeneratedId = function( id ) {
 	return ( id != null &&
-             id.indexOf( UidProvider.XAP_ID_PREFIX, 0 ) != -1 );
+             id.indexOf( xap.util.UidProvider.XAP_ID_PREFIX, 0 ) != -1 );
 }
 
 
@@ -162,20 +162,20 @@
  * @return a unique i.d.
  * @private 
 **/
-XapElement._createUniqueElementId = function() {
-	return UidProvider.createId();
+xap.xml.dom.XapElement._createUniqueElementId = function() {
+	return xap.util.UidProvider.createId();
 }
 
 
 /**  Appends this class' indentation string to a prexisting string:
  *   @param{int} indent The indentation level.
  *   @param{Swtring}sbuf The string to which to append the indentation.
- *   @see XapElement.INDENT
+ *   @see xap.xml.dom.XapElement.INDENT
  * @private 
  **/
-XapElement._writeIndent = function ( sbuf, indent ) {
+xap.xml.dom.XapElement._writeIndent = function ( sbuf, indent ) {
 	for ( var i = 0; i < indent; i++ ) {
-		sbuf += XapElement.INDENT;
+		sbuf += xap.xml.dom.XapElement.INDENT;
 	}
 }
 
@@ -190,7 +190,7 @@
  * @param{String} name The name of the attribute to set
  * @param{String} value The value of the attribute to set
  */
-XapElement.prototype.setAttribute = function(name, value){
+xap.xml.dom.XapElement.prototype.setAttribute = function(name, value){
 	
 	var doc = this.getOwnerDocument();
   
@@ -200,9 +200,9 @@
 		isIdAttribute = true;
  		if ( doc != null ) {
  			throw new xap.util.Exception
-      		( ResourceDictionary.getMessage
-	    		( XapElement.CANNOT_SET_ID_ATTRIBUTE_WHEN_PART_OF_DOCUMENT, 
-	      		XapElement.CLASSNAME ) );
+      		( xap.util.ResourceDictionary.getMessage
+	    		( xap.xml.dom.XapElement.CANNOT_SET_ID_ATTRIBUTE_WHEN_PART_OF_DOCUMENT, 
+	      		xap.xml.dom.XapElement.CLASSNAME ) );
 		}
 	}
     
@@ -210,14 +210,14 @@
 	var attributeChangeListenersExist = 
     	this._doAnyAttributeChangeListenersExist( doc );
     if ( attributeChangeListenersExist ) {
-	    event = new AttributeChangeEvent( this, name, value );
-	    this._fireAttributeChangeEvent( doc, event, XapElement.BEFORE_ATTRIBUTE_SET);
+	    event = new xap.xml.dom.events.AttributeChangeEvent( this, name, value );
+	    this._fireAttributeChangeEvent( doc, event, xap.xml.dom.XapElement.BEFORE_ATTRIBUTE_SET);
 	    // Listeners have the opportunity to modify the value.
 	    // Make sure we get the latest value out of the event.
 	    value = event.getNewValue();
 	    if ( value == null ) {
-	    	 throw new ChangeRejectedException
-                ( ChangeRejectedException.CHANGE_ATTRIBUTE_TO_NULL_MSGID, 
+	    	 throw new xap.xml.dom.events.ChangeRejectedException
+                ( xap.xml.dom.events.ChangeRejectedException.CHANGE_ATTRIBUTE_TO_NULL_MSGID, 
                   null, null, event );
 	    }
     }
@@ -229,7 +229,7 @@
 	 google.XNode.prototype.setAttribute.call(this, name, value);
 	 
 	if ( attributeChangeListenersExist ) {
-		this._fireAttributeChangeEvent( doc, event, XapElement.ON_ATTRIBUTE_SET);
+		this._fireAttributeChangeEvent( doc, event, xap.xml.dom.XapElement.ON_ATTRIBUTE_SET);
 	}
 }
 
@@ -237,19 +237,19 @@
  * Removes the attribute with the given name.
  * @param {String} name The name of the attribute to remove.
  */
-XapElement.prototype.removeAttribute = function(name) {
+xap.xml.dom.XapElement.prototype.removeAttribute = function(name) {
 	var doc = this.getOwnerDocument();
 	if (doc!=null && name=="id"){
   		throw "Can't change ID of element already in document";
   	}
 	
-   var event = new AttributeChangeEvent(this, name, null);
+   var event = new xap.xml.dom.events.AttributeChangeEvent(this, name, null);
    
-   this._fireAttributeChangeEvent( doc, event, XapElement.BEFORE_ATTRIBUTE_REMOVED);
+   this._fireAttributeChangeEvent( doc, event, xap.xml.dom.XapElement.BEFORE_ATTRIBUTE_REMOVED);
    // Actually perform the removal:
    google.XNode.prototype.removeAttribute.call(this, name);
    
-   this._fireAttributeChangeEvent( doc, event, XapElement.ON_ATTRIBUTE_REMOVED);
+   this._fireAttributeChangeEvent( doc, event, xap.xml.dom.XapElement.ON_ATTRIBUTE_REMOVED);
        
   	// We never allow elements not to have IDs - if the id attribute tries
 	// to be removed - remove it then reset it with one of our IDs
@@ -272,7 +272,7 @@
  * @param {google.XNode} newNode The new child to insert.
  * @param {google.XNode} oldNode The existing child to insert before.
  */
-XapElement.prototype.insertBefore = function(newNode, oldNode) {
+xap.xml.dom.XapElement.prototype.insertBefore = function(newNode, oldNode) {
 	return this._insertBefore( newNode, oldNode );
 }
 /**
@@ -280,7 +280,7 @@
  * 
  * @param {google.XNode} child The child text or element node to append.
  */
-XapElement.prototype.appendChild = function(child){
+xap.xml.dom.XapElement.prototype.appendChild = function(child){
 	return this._insertBefore( child );  
 }
 
@@ -290,7 +290,7 @@
  * 
  * @param {google.XNode} child The child text or element node to remove.
  */
-XapElement.prototype.removeChild = function(child){
+xap.xml.dom.XapElement.prototype.removeChild = function(child){
 	if ( this.childNodes == null ) {
 		return null;
 	}
@@ -300,7 +300,7 @@
 	//TODO what if o is not a child?  
 	if(child == null){
 //		throw new xap.util.Exception
-//                ( ResourceDictionary.getMessage
+//                ( xap.util.ResourceDictionary.getMessage
 //                  ( CANNOT_REMOVE_NULL_CHILD, ElementImpl.class ) );
 //	    }
 //	    
@@ -317,8 +317,8 @@
 	
 	//notify listeners before the change takes place
 	if ( structureChangeListenerExists ) {
-		event = new StructureChangeEvent(this, child, index);
-		this._fireStructureChangeEvent( doc, event, XapElement.BEFORE_CHILD_REMOVED);
+		event = new xap.xml.dom.events.StructureChangeEvent(this, child, index);
+		this._fireStructureChangeEvent( doc, event, xap.xml.dom.XapElement.BEFORE_CHILD_REMOVED);
 	}
 
 	//make the actual change
@@ -335,7 +335,7 @@
 	   
 	//notify listeners on attribute change
 	if ( structureChangeListenerExists ) {
-		this._fireStructureChangeEvent( doc, event, XapElement.ON_CHILD_REMOVED);
+		this._fireStructureChangeEvent( doc, event, xap.xml.dom.XapElement.ON_CHILD_REMOVED);
 	}
 	
 	//TODO child here could be changed by the before event?
@@ -347,7 +347,7 @@
  * Returns the owner document. We should probably defeature
  * this at some point or unify it with the XNode impl.
  */
-XapElement.prototype.getOwnerDocument = function() {
+xap.xml.dom.XapElement.prototype.getOwnerDocument = function() {
 	if ( this._ownerDocument == null ) {
         if ( this.getParent() == null ) {
             return null;
@@ -366,7 +366,7 @@
  * the document itself a parent in getParent();
  * We need to clean this up at some point
  */
-XapElement.prototype.getParent = function() {
+xap.xml.dom.XapElement.prototype.getParent = function() {
 	if (!this.parentNode) return null;
 	if (this.parentNode.nodeType!=google.DOM_ELEMENT_NODE) return null;
     return this.parentNode;
@@ -375,14 +375,14 @@
 /**
  * Returns the element namespace prefix
  */
-XapElement.prototype.getPrefix = function() {
+xap.xml.dom.XapElement.prototype.getPrefix = function() {
     return this._prefix;
 }
 
 /**
  * Returns the namespace uri for the element.
  */
-XapElement.prototype.getNamespaceUri = function() {
+xap.xml.dom.XapElement.prototype.getNamespaceUri = function() {
     return this._namespaceUri;
 }
 
@@ -392,7 +392,7 @@
  * needs to use localName instead of nodeName or 
  * something like that?
  */
-XapElement.prototype.getLocalName = function() {
+xap.xml.dom.XapElement.prototype.getLocalName = function() {
     return this.nodeName;
 }
 
@@ -402,14 +402,14 @@
  * 
  * @param prettyPrint If true print this in human-readable form with spacing.
  */
-XapElement.prototype.toXml = function ( prettyPrint ) {
+xap.xml.dom.XapElement.prototype.toXml = function ( prettyPrint ) {
 	var sbuf = "";
 	sbuf = this._toStringHelper( this,
                     sbuf,
                     0, 
                     prettyPrint,
                     true,
-                    XapElement.ENCODE_EVERYTHING_IN_ATTRIBUTES );
+                    xap.xml.dom.XapElement.ENCODE_EVERYTHING_IN_ATTRIBUTES );
 	return sbuf;
 }
 
@@ -419,14 +419,14 @@
  * 
  * @param prettyPrint If true print this in human-readable form with spacing.
  */
-XapElement.prototype.toXmlWithoutAutoAssignedIds = function( prettyPrint ) {
+xap.xml.dom.XapElement.prototype.toXmlWithoutAutoAssignedIds = function( prettyPrint ) {
 	var sbuf = "";
 	sbuf = this._toStringHelper( this,
                     sbuf,
                     0,
                     prettyPrint,
                     false,
-                    XapElement.ENCODE_EVERYTHING_IN_ATTRIBUTES );
+                    xap.xml.dom.XapElement.ENCODE_EVERYTHING_IN_ATTRIBUTES );
 	return sbuf;
 }
 
@@ -438,14 +438,14 @@
  * 
  * @param prettyPrint If true print this in human-readable form with spacing.
  */
-XapElement.prototype.toXmlWithSimpleAttributeEncoding = function( prettyPrint ) {
+xap.xml.dom.XapElement.prototype.toXmlWithSimpleAttributeEncoding = function( prettyPrint ) {
 	var sbuf = "";
 	sbuf = this._toStringHelper( this,
                     sbuf,
                     0,
                     prettyPrint,
                     true,
-                    XapElement.ENCODE_ONLY_DOUBLE_QUOTES_IN_ATTRIBUTES );
+                    xap.xml.dom.XapElement.ENCODE_ONLY_DOUBLE_QUOTES_IN_ATTRIBUTES );
 	return sbuf;
 }
 /**
@@ -457,7 +457,7 @@
  * 
  * @param prettyPrint If true print this in human-readable form with spacing.
  */
-XapElement.prototype.toXmlWithSimpleAttributeEncodingWithoutAutoAssignedIds = 
+xap.xml.dom.XapElement.prototype.toXmlWithSimpleAttributeEncodingWithoutAutoAssignedIds = 
 	function ( prettyPrint ) {
 	var sbuf = "";
 	sbuf = this._toStringHelper( this,
@@ -465,99 +465,99 @@
                     0,
                     prettyPrint,
                     false,
-                    XapElement.ENCODE_ONLY_DOUBLE_QUOTES_IN_ATTRIBUTES );
+                    xap.xml.dom.XapElement.ENCODE_ONLY_DOUBLE_QUOTES_IN_ATTRIBUTES );
 	return sbuf;
 }
 
 /////////////////////////
 
 /**
- * Adds an AttributeChangeListener to the element. This listener
+ * Adds an xap.xml.dom.events.AttributeChangeListener to the element. This listener
  * will be notified whenever an attribute is set or removed.
  * 
- * @param {AttributeChangeListener} listener A class that extends
- * AttributeChangeListener or implements the same methods.
+ * @param {xap.xml.dom.events.AttributeChangeListener} listener A class that extends
+ * xap.xml.dom.events.AttributeChangeListener or implements the same methods.
  * 
  */
-XapElement.prototype.addAttributeChangeListener = function ( listener ) {
+xap.xml.dom.XapElement.prototype.addAttributeChangeListener = function ( listener ) {
 	this._getAttributeChangeListeners().push( listener );
 }
 
 /**
- * Removes an AttributeChangeListener from the element.
+ * Removes an xap.xml.dom.events.AttributeChangeListener from the element.
  * 
- * @param {AttributeChangeListener} listener A class that extends
- * AttributeChangeListener or implements the same methods.
+ * @param {xap.xml.dom.events.AttributeChangeListener} listener A class that extends
+ * xap.xml.dom.events.AttributeChangeListener or implements the same methods.
  * 
  */
-XapElement.prototype.removeAttributeChangeListener = function( listener ) {
+xap.xml.dom.XapElement.prototype.removeAttributeChangeListener = function( listener ) {
 	xap.util.ArrayHelper.removeElement( this._getAttributeChangeListeners(), listener );
 }
 
 /**
- * Adds a StructureChangeListener to the element. This listener
+ * Adds a xap.xml.dom.events.StructureChangeListener to the element. This listener
  * will be notified whenever a child node is added or removed from this element.
  * 
- * @param {StructureChangeListener} listener A class that extends
- * StructureChangeListener or implements the same methods.
+ * @param {xap.xml.dom.events.StructureChangeListener} listener A class that extends
+ * xap.xml.dom.events.StructureChangeListener or implements the same methods.
  * 
  */
-XapElement.prototype.addStructureChangeListener = function ( listener ) {
+xap.xml.dom.XapElement.prototype.addStructureChangeListener = function ( listener ) {
     this._getStructureChangeListeners().push( listener );
 }
 
 /**
- * Removes a StructureChangeListener from the element.
+ * Removes a xap.xml.dom.events.StructureChangeListener from the element.
  * 
- * @param {StructureChangeListener} listener A class that extends
- * StructureChangeListener or implements the same methods.
+ * @param {xap.xml.dom.events.StructureChangeListener} listener A class that extends
+ * xap.xml.dom.events.StructureChangeListener or implements the same methods.
  * 
  */
-XapElement.prototype.removeStructureChangeListener = function( listener ) {
+xap.xml.dom.XapElement.prototype.removeStructureChangeListener = function( listener ) {
 	xap.util.ArrayHelper.removeElement( this._getStructureChangeListeners(), listener );
 }
 
 /**
- * Adds a DocumentOwnershipListener to the element. This listener
+ * Adds a xap.xml.dom.DocumentOwnershipListener to the element. This listener
  * will be notified this element is added to or removed from a document.
  * 
- * @param {DocumentOwnershipListener} listener A class that extends
- * DocumentOwnershipListener or implements the same methods.
+ * @param {xap.xml.dom.DocumentOwnershipListener} listener A class that extends
+ * xap.xml.dom.DocumentOwnershipListener or implements the same methods.
  * 
  */
-XapElement.prototype.addDocumentOwnershipListener = function( listener ) {
+xap.xml.dom.XapElement.prototype.addDocumentOwnershipListener = function( listener ) {
 	this._getDocumentOwnershipListeners().push( listener );
 }
 
 /**
- * Removes a DocumentOwnershipListener from the element. 
+ * Removes a xap.xml.dom.DocumentOwnershipListener from the element. 
  * 
- * @param {DocumentOwnershipListener} listener A class that extends
- * DocumentOwnershipListener or implements the same methods.
+ * @param {xap.xml.dom.DocumentOwnershipListener} listener A class that extends
+ * xap.xml.dom.DocumentOwnershipListener or implements the same methods.
  * 
  */
-XapElement.prototype.removeDocumentOwnershipListener = function( listener) {
+xap.xml.dom.XapElement.prototype.removeDocumentOwnershipListener = function( listener) {
 	xap.util.ArrayHelper.removeElement( this._getDocumentOwnershipListeners(), listener );
 }
 
 
 /**
  * Creates a shallow clone of the element.
- * @type XapElement
+ * @type xap.xml.dom.XapElement
  * @param withIds If true the clone will have the same ID as the original
  * element; auto-generated IDs are never cloned.
  */
-XapElement.prototype.clone = function ( withIds ) {
+xap.xml.dom.XapElement.prototype.clone = function ( withIds ) {
 	return this._cloneHelper( false, withIds, null );
 }
 
 /**
  * Creates a deep clone of the element.
- * @type XapElement
+ * @type xap.xml.dom.XapElement
  * @param withIds If true the clones will have the same IDs as the original
  * elements; auto-generated IDs are never cloned.
  */
-XapElement.prototype.deepClone = function( withIds ) {
+xap.xml.dom.XapElement.prototype.deepClone = function( withIds ) {
 	return this._cloneHelper( true, withIds, null );
 }
 
@@ -574,7 +574,7 @@
  * @param newNode The new child to add
  * @param oldNode The node to add before, null means append new child to end.
  */
-XapElement.prototype._insertBefore = function(newNode, oldNode) {
+xap.xml.dom.XapElement.prototype._insertBefore = function(newNode, oldNode) {
 	
 	//TODO check newNode for null?
 	
@@ -594,15 +594,15 @@
 	var event = null;
 	
 	if ( structureChangeListenersExist ) {
-		event = new StructureChangeEvent( this, newNode, index );
-		this._fireStructureChangeEvent( doc, event, XapElement.BEFORE_CHILD_ADDED);
+		event = new xap.xml.dom.events.StructureChangeEvent( this, newNode, index );
+		this._fireStructureChangeEvent( doc, event, xap.xml.dom.XapElement.BEFORE_CHILD_ADDED);
 		// The listeners have the opportunity to modify what is getting 
 		// added, so make sure that what we add is the subtree on the 
 		// event, not the element passed to this method.
 		newNode = event.getChange();
 		if ( newNode == null ) {
-			throw new ChangeRejectedException
-                ( ChangeRejectedException.CHANGE_CHILD_TO_NULL_MSGID,
+			throw new xap.xml.dom.events.ChangeRejectedException
+                ( xap.xml.dom.events.ChangeRejectedException.CHANGE_CHILD_TO_NULL_MSGID,
                   null, null, event );
 		}
 	}
@@ -645,7 +645,7 @@
    }
     
 	if ( structureChangeListenersExist ) {
-		this._fireStructureChangeEvent( doc, event, XapElement.ON_CHILD_ADDED);
+		this._fireStructureChangeEvent( doc, event, xap.xml.dom.XapElement.ON_CHILD_ADDED);
 	}
 	return newNode;    
 }
@@ -657,7 +657,7 @@
  * 
  * @param doc the owner document.
  */
-XapElement.prototype._setOwnerDocument = function( doc ) {
+xap.xml.dom.XapElement.prototype._setOwnerDocument = function( doc ) {
 	this._ownerDocument = doc;
 }
 
@@ -671,7 +671,7 @@
  * 
  * @param ns the namespace URI to set.
  */
-XapElement.prototype._setNamespaceUri = function( ns ) {
+xap.xml.dom.XapElement.prototype._setNamespaceUri = function( ns ) {
     this._namespaceUri = ns;
 }
 
@@ -682,12 +682,12 @@
  * 
  * @param prefix the prefix to set.
  */
-XapElement.prototype._setPrefix = function( prefix ) {
+xap.xml.dom.XapElement.prototype._setPrefix = function( prefix ) {
     this._prefix = prefix;
 }
 
 /** @private */
-XapElement.prototype._notifyListenersOnRemovedFromDocument = function( doc ) {
+xap.xml.dom.XapElement.prototype._notifyListenersOnRemovedFromDocument = function( doc ) {
 
  	var listeners = this._getDocumentOwnershipListeners();
 	for ( var i = 0; i < listeners.length; i++ ) {
@@ -700,16 +700,16 @@
             i = i - 1;
           }
       } catch ( t ) {
-      	XapElement.s_log.exception
-                  ( ResourceDictionary.getMessage
-                    ( XapElement.DOC_OWNERSHIP_FAILURE, 
-                    XapElement.CLASSNAME ), t );
+      	xap.xml.dom.XapElement.s_log.exception
+                  ( xap.util.ResourceDictionary.getMessage
+                    ( xap.xml.dom.XapElement.DOC_OWNERSHIP_FAILURE, 
+                    xap.xml.dom.XapElement.CLASSNAME ), t );
       }
 	}  
 }
 
 /** @private */
-XapElement.prototype._notifyListenersOnAddedToDocument = function( doc ) {
+xap.xml.dom.XapElement.prototype._notifyListenersOnAddedToDocument = function( doc ) {
      var listeners = this._getDocumentOwnershipListeners();
      for ( var i = 0; i < listeners.length; i++ ) {
          var listener = listeners[i];
@@ -721,10 +721,10 @@
              	i = i - 1;
              }
          } catch ( t ) {
-         	XapElement.s_log.exception
-                     ( ResourceDictionary.getMessage
-                       ( XapElement.DOC_OWNERSHIP_FAILURE, 
-                         XapElement.CLASSNAME ), t );
+         	xap.xml.dom.XapElement.s_log.exception
+                     ( xap.util.ResourceDictionary.getMessage
+                       ( xap.xml.dom.XapElement.DOC_OWNERSHIP_FAILURE, 
+                         xap.xml.dom.XapElement.CLASSNAME ), t );
          }
      }
 }
@@ -734,7 +734,7 @@
 //-----------------------------------------------------------------------
 
 /** @private */
-XapElement.prototype._getAttributeChangeListeners = function() {
+xap.xml.dom.XapElement.prototype._getAttributeChangeListeners = function() {
 	if( this._attributeChangeListeners == null ) {
 		this._attributeChangeListeners = new Array();
 	}
@@ -742,7 +742,7 @@
 }
 
 /** @private */
-XapElement.prototype._getStructureChangeListeners = function() {
+xap.xml.dom.XapElement.prototype._getStructureChangeListeners = function() {
 	if( this._structureChangeListeners == null ) {
 		this._structureChangeListeners = new Array();
 	}
@@ -750,7 +750,7 @@
 }
 
 /** @private */
-XapElement.prototype._getDocumentOwnershipListeners = function() {
+xap.xml.dom.XapElement.prototype._getDocumentOwnershipListeners = function() {
 	if( this._documentOwnershipListeners == null ) {
 		this._documentOwnershipListeners = new Array();
 	}
@@ -771,12 +771,12 @@
  * @param attributeEncodingChoice is one of the private constants on this 
  * class.
  */
-XapElement.prototype._toStringHelper = function( node, sbuf, indent, prettyPrint,
+xap.xml.dom.XapElement.prototype._toStringHelper = function( node, sbuf, indent, prettyPrint,
 				   							 withInternalIds, 
 				   							 attributeEncodingChoice ) {
 	if( node.nodeType == google.DOM_TEXT_NODE ) {
 		// if its a string, simply print it XML-encoded
-        sbuf += XmlUtils.encode( node.nodeValue );
+        sbuf += xap.util.XmlUtils.encode( node.nodeValue );
     } else {
         if ( prettyPrint && node.getParent() != null ) {
         	var index = xap.util.ArrayHelper.indexOf(node.getParent().childNodes, node );
@@ -789,7 +789,7 @@
         		 if ( index == 0 || 
         		 	( node.getParent().childNodes[index-1].nodeType==google.DOM_ELEMENT_NODE)) {
         	    	sbuf += '\n';
-        	    	XapElement._writeIndent( sbuf, indent );
+        	    	xap.xml.dom.XapElement._writeIndent( sbuf, indent );
         		 }
         	}
         }
@@ -834,7 +834,7 @@
 			} else {
 				sbuf += "xmlns:" + node.getPrefix();
 			}
-			sbuf += "=\"" + XmlUtils.encode(node.getNamespaceUri()) + "\"";
+			sbuf += "=\"" + xap.util.XmlUtils.encode(node.getNamespaceUri()) + "\"";
 		}
 		
 		for( var i=0; i<node.attributes.length; i++ ) {
@@ -844,25 +844,25 @@
 		    if(!withInternalIds) {
 		    	// if we are pretty-printing and its our generated ID
 		    	// do not print it
-		    	if( "id" == key && XapElement.isGeneratedId( value )) {
+		    	if( "id" == key && xap.xml.dom.XapElement.isGeneratedId( value )) {
 		    		continue;
 		    	}
 		    }
 		    
 			sbuf += ' ' + key + "=\"";
             switch ( attributeEncodingChoice ) {
-            case XapElement.ENCODE_ONLY_DOUBLE_QUOTES_IN_ATTRIBUTES:
-                sbuf += XmlUtils.encodeDoubleQuotes( value );
+            case xap.xml.dom.XapElement.ENCODE_ONLY_DOUBLE_QUOTES_IN_ATTRIBUTES:
+                sbuf += xap.util.XmlUtils.encodeDoubleQuotes( value );
                 break;
-            case XapElement.ENCODE_EVERYTHING_BUT_SINGLE_TICKS_IN_ATTRIBUTES:
-                // NOTE: This is not on XmlUtils because that's a public
+            case xap.xml.dom.XapElement.ENCODE_EVERYTHING_BUT_SINGLE_TICKS_IN_ATTRIBUTES:
+                // NOTE: This is not on xap.util.XmlUtils because that's a public
                 //       class.
                 sbuf += this._encodeEverythingButSingleTicks( value );
                 break;
-            case XapElement.ENCODE_EVERYTHING_IN_ATTRIBUTES:
+            case xap.xml.dom.XapElement.ENCODE_EVERYTHING_IN_ATTRIBUTES:
                 // Fallthrough to the default.
             default:
-                sbuf += XmlUtils.encode( value );
+                sbuf += xap.util.XmlUtils.encode( value );
             }
             sbuf += '\"';
 		}
@@ -891,7 +891,7 @@
 				// if this element had a text node it is not valid to
 				// write whitespace
 				sbuf += '\n';
-				XapElement._writeIndent( sbuf, indent );
+				xap.xml.dom.XapElement._writeIndent( sbuf, indent );
 			}
 
 			sbuf += "</";
@@ -905,7 +905,7 @@
 }
 
 
-XapElement.prototype._fireStructureChangeEvent = function( doc, event, methodName){
+xap.xml.dom.XapElement.prototype._fireStructureChangeEvent = function( doc, event, methodName){
 	if (doc){
 		this._notifyListeners(doc._structureChangeListeners,
 			event, methodName);
@@ -915,7 +915,7 @@
 }
 
 
-XapElement.prototype._fireAttributeChangeEvent = function( doc, event, methodName){
+xap.xml.dom.XapElement.prototype._fireAttributeChangeEvent = function( doc, event, methodName){
 	if (doc){
 		this._notifyListeners(doc._attributeChangeListeners,
 			event, methodName);
@@ -932,9 +932,9 @@
  * @param listeners The array of listeners
  * @param event The event to fire.
  * @param methodName The name of the event to fire
- * @throws ChangeRejectedException
+ * @throws xap.xml.dom.events.ChangeRejectedException
  */
-XapElement.prototype._notifyListeners = function( listeners, event, methodName){
+xap.xml.dom.XapElement.prototype._notifyListeners = function( listeners, event, methodName){
 	if (!listeners) return;
 	
 	for (var i =0; i<listeners.length; i++){
@@ -952,7 +952,7 @@
 
 
 /** @private */
-XapElement.prototype._doAnyAttributeChangeListenersExist = function( doc ) {
+xap.xml.dom.XapElement.prototype._doAnyAttributeChangeListenersExist = function( doc ) {
 	var normalListeners = null;
 	if ( doc != null ) {
 		normalListeners = doc._attributeChangeListeners;
@@ -967,7 +967,7 @@
 }
 
 /** @private */
-XapElement.prototype._doAnyStructureChangeListenersExist = function( doc ) {
+xap.xml.dom.XapElement.prototype._doAnyStructureChangeListenersExist = function( doc ) {
 	var normalListeners = null;
 	if ( doc != null ) {
 		normalListeners = doc._structureChangeListeners;
@@ -985,8 +985,8 @@
 
 
 /** @private */
-XapElement.prototype._cloneHelper = function( deep, withIds, parser ) {
-	var e = new XapElement( this.nodeName );
+xap.xml.dom.XapElement.prototype._cloneHelper = function( deep, withIds, parser ) {
+	var e = new xap.xml.dom.XapElement( this.nodeName );
 
 	e._setNamespaceUri( this._namespaceUri );
 	e._setPrefix( this._prefix );
@@ -997,7 +997,7 @@
    
 	if ( withIds == false ) {
 		var id = e.getAttribute( "id" );
-			if ( XapElement.isGeneratedId( id ) ) {
+			if ( xap.xml.dom.XapElement.isGeneratedId( id ) ) {
     		// This is kind of weird.  We are going to use this element's
     		// unique ID generation, because in the case of cloning
     		// elements for use in XUpdate we need a common scheme for
@@ -1011,9 +1011,9 @@
 			} else {
 				var doc = this.getOwnerDocument();
 				e.setAttribute( "id", (doc == null ?
-                                      XapElement._createUniqueElementId() :
+                                      xap.xml.dom.XapElement._createUniqueElementId() :
                                       ( doc._getUidProvider() == null ? 
-                                        XapElement._createUniqueElementId() :
+                                        xap.xml.dom.XapElement._createUniqueElementId() :
                                         doc._getUidProvider().nextId() ) ));
     		}
     	}
@@ -1041,7 +1041,7 @@
 
 
 /** @private */
-XapElement.prototype._encodeEverythingButSingleTicks = function( s ) {
+xap.xml.dom.XapElement.prototype._encodeEverythingButSingleTicks = function( s ) {
     if ( s == null ) { return ""; }
 	var buffer = new Array( s.length );
 	var c;

Modified: incubator/xap/trunk/src/xap/xml/dom/XapElementRes.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/dom/XapElementRes.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/xml/dom/XapElementRes.js (original)
+++ incubator/xap/trunk/src/xap/xml/dom/XapElementRes.js Sat Jul 15 10:22:41 2006
@@ -16,12 +16,12 @@
  */
  
  /**
- * @fileoverview A resource file for XapElement.js.
- * @class A resource file for XapElement.js.
+ * @fileoverview A resource file for xap.xml.dom.XapElement.js.
+ * @class A resource file for xap.xml.dom.XapElement.js.
  */
-XapElementRes = function() {
+xap.xml.dom.XapElementRes = function() {
 	this.messages = new Object();
 	this.messages[XapElement.CANNOT_SET_ID_ATTRIBUTE_WHEN_PART_OF_DOCUMENT] = "This element is part of a document.  The \"id\" attribute cannot be set on an element after it has been added to a document.";
 	this.messages[XapElement.CANT_REMOVE_KEY_VALUE_PAIR_FROM_ARRAY] = "Can''t remove key/value pair from an array of size {0} where the key index is specified as {1}.";
-	this.messages[XapElement.DOC_OWNERSHIP_FAILURE] = "There was an error notifying a DocumentOwnershipListener, continuing gracefully.";
+	this.messages[XapElement.DOC_OWNERSHIP_FAILURE] = "There was an error notifying a xap.xml.dom.DocumentOwnershipListener, continuing gracefully.";
 }

Modified: incubator/xap/trunk/src/xap/xml/dom/events/AttributeChangeEvent.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/dom/events/AttributeChangeEvent.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/xml/dom/events/AttributeChangeEvent.js (original)
+++ incubator/xap/trunk/src/xap/xml/dom/events/AttributeChangeEvent.js Sat Jul 15 10:22:41 2006
@@ -27,26 +27,26 @@
 
 
 /**
- * Creates an AttributeChangeEvent instance.
+ * Creates an xap.xml.dom.events.AttributeChangeEvent instance.
  * 
- * @class AttributeChangeEvent objects are passed to methods on {@link
- * AttributeChangeListener}.  They contain information about attribute
+ * @class xap.xml.dom.events.AttributeChangeEvent objects are passed to methods on {@link
+ * xap.xml.dom.events.AttributeChangeListener}.  They contain information about attribute
  * changes.
  * 
- * @see AttributeChangeListener
+ * @see xap.xml.dom.events.AttributeChangeListener
  * 
- * @param source The source XapElement
+ * @param source The source xap.xml.dom.XapElement
  * @param name The attribute name
  * @param newValue The new value for the attribute
  */
-AttributeChangeEvent = function( source, name, newValue ) {
-	DomChangeEvent.call( this, source );
+xap.xml.dom.events.AttributeChangeEvent = function( source, name, newValue ) {
+	xap.xml.dom.events.DomChangeEvent.call( this, source );
 	this._attributeName = name;
   	this._oldValue = source.getAttribute( this._attributeName );
 	this._newValue = newValue;
 }
 
-AttributeChangeEvent.prototype = new DomChangeEvent;
+xap.xml.dom.events.AttributeChangeEvent.prototype = new xap.xml.dom.events.DomChangeEvent;
 
 
 //-----------------------------------------------------------------------
@@ -60,7 +60,7 @@
  * 
  * @return The name of the attribute being changed.
  */
-AttributeChangeEvent.prototype.getName = function() {
+xap.xml.dom.events.AttributeChangeEvent.prototype.getName = function() {
 	return this._attributeName;
 }
 
@@ -71,7 +71,7 @@
  * 
  * @return The value of the attribute before the change.
  */
-AttributeChangeEvent.prototype.getOldValue = function() {
+xap.xml.dom.events.AttributeChangeEvent.prototype.getOldValue = function() {
 	return this._oldValue;
 }
 
@@ -82,7 +82,7 @@
  * 
  * @return The new value of the attribute.
  */
-AttributeChangeEvent.prototype.getNewValue = function() {
+xap.xml.dom.events.AttributeChangeEvent.prototype.getNewValue = function() {
 	return this._newValue;
 }
 
@@ -100,7 +100,7 @@
  * @exception UnsupportedOperationException if the attribute value
  * has already been accepted by all attribute listeners.
  */
-AttributeChangeEvent.prototype.setNewValue = function( value ) {
+xap.xml.dom.events.AttributeChangeEvent.prototype.setNewValue = function( value ) {
 	if ( value == null ) {
 		// TODO - internationalize
 		throw new xap.util.Exception
@@ -112,7 +112,7 @@
 		throw new xap.util.Exception
 			("You may only change the new value of attributes " +
 			"before the change has been committed (accepted by " +
-			"all registered AttributeChangeListener objects)");
+			"all registered xap.xml.dom.events.AttributeChangeListener objects)");
 	}
 	if ( this._newValue != null && this._newValue == this._oldValue ) {  
 		// TODO - 

Modified: incubator/xap/trunk/src/xap/xml/dom/events/AttributeChangeListener.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/dom/events/AttributeChangeListener.js?rev=422273&r1=422272&r2=422273&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/xml/dom/events/AttributeChangeListener.js (original)
+++ incubator/xap/trunk/src/xap/xml/dom/events/AttributeChangeListener.js Sat Jul 15 10:22:41 2006
@@ -25,25 +25,25 @@
  */
 
 /**
- * @class AttributeChangeListener is notified of changes to
- * XML element attributes. Listeners may be added to individual XapElement objects 
- * or on the Document as a whole.  They are ordered and will be called in the 
- * order in which they were registered.  Listeners registered at the Document 
- * level will be called before listeners registered at the XapElement level.
+ * @class xap.xml.dom.events.AttributeChangeListener is notified of changes to
+ * XML element attributes. Listeners may be added to individual xap.xml.dom.XapElement objects 
+ * or on the xap.xml.dom.Document as a whole.  They are ordered and will be called in the 
+ * order in which they were registered.  Listeners registered at the xap.xml.dom.Document 
+ * level will be called before listeners registered at the xap.xml.dom.XapElement level.
  * Objects that wish to listen for attribute changes should either
  * extend this object or implement that same method names.
  *
- * @see XapElement#addAttributeChangeListener
- * @see XapElement#removeAttributeChangeListener
- * @see Document#addAttributeChangeListener
- * @see Document#removeAttributeChangeListener
+ * @see xap.xml.dom.XapElement#addAttributeChangeListener
+ * @see xap.xml.dom.XapElement#removeAttributeChangeListener
+ * @see xap.xml.dom.Document#addAttributeChangeListener
+ * @see xap.xml.dom.Document#removeAttributeChangeListener
  */
 
 
 //-----------------------------------------------------------------------
 // Constructors.
 //-----------------------------------------------------------------------
-AttributeChangeListener = function(){}
+xap.xml.dom.events.AttributeChangeListener = function(){}
 
 
 //-----------------------------------------------------------------------
@@ -59,12 +59,12 @@
  * their review.  Should they decide to modify it, the final value will
  * reflect their changes too.
  * 
- * @param event The AttributeChangeEvent representing the change.
- * @exception ChangeRejectedException Implementors may throw this 
+ * @param event The xap.xml.dom.events.AttributeChangeEvent representing the change.
+ * @exception xap.xml.dom.events.ChangeRejectedException Implementors may throw this 
  * if they wish to provide a reason that they rejected the change
  * in the exception message.
  */
-AttributeChangeListener.prototype.beforeAttributeSet = function( event ) {}
+xap.xml.dom.events.AttributeChangeListener.prototype.beforeAttributeSet = function( event ) {}
 
 /**
  * This method is called after Element.setAttribute() and after all
@@ -72,21 +72,21 @@
  * attribute on the Element object has already been changed.
  * Listeners may not modify the value or reject the change.
  * 
- * @param event The AttributeChangeEvent representing the change.
+ * @param event The xap.xml.dom.events.AttributeChangeEvent representing the change.
  */
-AttributeChangeListener.prototype.onAttributeSet = function( event ){}
+xap.xml.dom.events.AttributeChangeListener.prototype.onAttributeSet = function( event ){}
 
 
 /**
  * This method is called after Element.removeAttribute() is called,
  * but before the attribute is actually removed.  Listeners have
  * the opportunity to reject the removal by throwing a 
- * ChangeRejectedException.
+ * xap.xml.dom.events.ChangeRejectedException.
  *
- * @param event The AttributeChangeEvent representing the change.
- * @exception ChangeRejectedException thrown to reject the remove.
+ * @param event The xap.xml.dom.events.AttributeChangeEvent representing the change.
+ * @exception xap.xml.dom.events.ChangeRejectedException thrown to reject the remove.
  */
-AttributeChangeListener.prototype.beforeAttributeRemoved = function( event ){}
+xap.xml.dom.events.AttributeChangeListener.prototype.beforeAttributeRemoved = function( event ){}
 
 /**
  * This method is called after Element.removeAttribute() is called
@@ -94,7 +94,7 @@
  * method is called the attribute has already been removed from
  * the element.
  *
- * @param event The AttributeChangeEvent representing the remove.
+ * @param event The xap.xml.dom.events.AttributeChangeEvent representing the remove.
  */
-AttributeChangeListener.prototype.onAttributeRemoved = function( event ){}
+xap.xml.dom.events.AttributeChangeListener.prototype.onAttributeRemoved = function( event ){}