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 jm...@apache.org on 2006/06/27 23:06:11 UTC

svn commit: r417619 [1/2] - in /incubator/xap/trunk/src: google/ xap/ xap/bridges/basic/ xap/bridges/google/ xap/bridges/zimbra/ xap/components/zimbra/ xap/macro/ xap/mco/ xap/requestservice/ xap/session/ xap/taghandling/ xap/util/ xap/xml/ xap/xml/dom...

Author: jmargaris
Date: Tue Jun 27 16:06:08 2006
New Revision: 417619

URL: http://svn.apache.org/viewvc?rev=417619&view=rev
Log:
Now working with dojo eval() way of loading code dynamically

Modified:
    incubator/xap/trunk/src/google/README.txt
    incubator/xap/trunk/src/google/dom.js
    incubator/xap/trunk/src/google/misc.js
    incubator/xap/trunk/src/google/xpath.js
    incubator/xap/trunk/src/xap/Xap.js
    incubator/xap/trunk/src/xap/bridges/basic/TextViewBridge.js
    incubator/xap/trunk/src/xap/bridges/google/GoogleBridge.js
    incubator/xap/trunk/src/xap/bridges/google/GoogleIconBridge.js
    incubator/xap/trunk/src/xap/bridges/google/GoogleIconsBridge.js
    incubator/xap/trunk/src/xap/bridges/google/GoogleInfoWindowBridge.js
    incubator/xap/trunk/src/xap/bridges/google/GoogleMapBridge.js
    incubator/xap/trunk/src/xap/bridges/google/GoogleMarkerBridge.js
    incubator/xap/trunk/src/xap/bridges/google/GoogleMarkersBridge.js
    incubator/xap/trunk/src/xap/bridges/zimbra/DwtButtonBridge.js
    incubator/xap/trunk/src/xap/bridges/zimbra/DwtCompositeBridge.js
    incubator/xap/trunk/src/xap/bridges/zimbra/DwtControlBridge.js
    incubator/xap/trunk/src/xap/bridges/zimbra/DwtHorizontalLayoutPanelBridge.js
    incubator/xap/trunk/src/xap/bridges/zimbra/DwtLabelBridge.js
    incubator/xap/trunk/src/xap/bridges/zimbra/DwtSplitChildBridge.js
    incubator/xap/trunk/src/xap/bridges/zimbra/DwtSplitterBridge.js
    incubator/xap/trunk/src/xap/bridges/zimbra/DwtTabBridge.js
    incubator/xap/trunk/src/xap/bridges/zimbra/DwtTabViewBridge.js
    incubator/xap/trunk/src/xap/bridges/zimbra/DwtTextFieldBridge.js
    incubator/xap/trunk/src/xap/bridges/zimbra/DwtTreeBridge.js
    incubator/xap/trunk/src/xap/bridges/zimbra/DwtTreeItemBridge.js
    incubator/xap/trunk/src/xap/bridges/zimbra/DwtVerticalLayoutPanelBridge.js
    incubator/xap/trunk/src/xap/components/zimbra/DwtHorizontalLayoutPanel.js
    incubator/xap/trunk/src/xap/components/zimbra/DwtSplitChild.js
    incubator/xap/trunk/src/xap/components/zimbra/DwtSplitter.js
    incubator/xap/trunk/src/xap/components/zimbra/DwtTablePanel.js
    incubator/xap/trunk/src/xap/components/zimbra/DwtVerticalLayoutPanel.js
    incubator/xap/trunk/src/xap/macro/Macro.js
    incubator/xap/trunk/src/xap/macro/MacroNamespaceHandler.js
    incubator/xap/trunk/src/xap/mco/McoInvocationException.js
    incubator/xap/trunk/src/xap/mco/McoInvocationExceptionRes.js
    incubator/xap/trunk/src/xap/mco/McoNamespaceHandler.js
    incubator/xap/trunk/src/xap/requestservice/NetServiceListener.js
    incubator/xap/trunk/src/xap/requestservice/RequestService.js
    incubator/xap/trunk/src/xap/session/ClientEvent.js
    incubator/xap/trunk/src/xap/session/ClientSession.js
    incubator/xap/trunk/src/xap/session/Container.js
    incubator/xap/trunk/src/xap/session/DeclarativeArgumentParser.js
    incubator/xap/trunk/src/xap/session/EventHandler.js
    incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js
    incubator/xap/trunk/src/xap/taghandling/PluginDocumentHandler.js
    incubator/xap/trunk/src/xap/taghandling/PluginRegistry.js
    incubator/xap/trunk/src/xap/taghandling/PluginRegistryImpl.js
    incubator/xap/trunk/src/xap/taghandling/plugin.xml
    incubator/xap/trunk/src/xap/util/BaseException.js
    incubator/xap/trunk/src/xap/util/Character.js
    incubator/xap/trunk/src/xap/util/Hashtable.js
    incubator/xap/trunk/src/xap/util/HttpUtils.js
    incubator/xap/trunk/src/xap/util/IllegalArgumentException.js
    incubator/xap/trunk/src/xap/util/IllegalStateException.js
    incubator/xap/trunk/src/xap/util/LogFactory.js
    incubator/xap/trunk/src/xap/util/Profiler.js
    incubator/xap/trunk/src/xap/util/ResourceDictionary.js
    incubator/xap/trunk/src/xap/util/UidProvider.js
    incubator/xap/trunk/src/xap/util/Utils.js
    incubator/xap/trunk/src/xap/util/Vector.js
    incubator/xap/trunk/src/xap/util/XapException.js
    incubator/xap/trunk/src/xap/util/XmlUtils.js
    incubator/xap/trunk/src/xap/xml/DocumentContainer.js
    incubator/xap/trunk/src/xap/xml/InvalidXmlException.js
    incubator/xap/trunk/src/xap/xml/InvalidXmlExceptionRes.js
    incubator/xap/trunk/src/xap/xml/NamespaceHandler.js
    incubator/xap/trunk/src/xap/xml/NamespaceHandlerManager.js
    incubator/xap/trunk/src/xap/xml/XalNamespaceHandler.js
    incubator/xap/trunk/src/xap/xml/dom/Document.js
    incubator/xap/trunk/src/xap/xml/dom/XapElement.js
    incubator/xap/trunk/src/xap/xml/dom/XapElementRes.js
    incubator/xap/trunk/src/xap/xml/dom/events/AttributeChangeEvent.js
    incubator/xap/trunk/src/xap/xml/dom/events/AttributeChangeListener.js
    incubator/xap/trunk/src/xap/xml/dom/events/ChangeRejectedException.js
    incubator/xap/trunk/src/xap/xml/dom/events/ChangeRejectedExceptionRes.js
    incubator/xap/trunk/src/xap/xml/dom/events/DocumentOwnershipListener.js
    incubator/xap/trunk/src/xap/xml/dom/events/DomChangeEvent.js
    incubator/xap/trunk/src/xap/xml/dom/events/StructureChangeEvent.js
    incubator/xap/trunk/src/xap/xml/dom/events/StructureChangeListener.js
    incubator/xap/trunk/src/xap/xml/sax/EmptyDocumentException.js
    incubator/xap/trunk/src/xap/xml/sax/EmptyDocumentExceptionRes.js
    incubator/xap/trunk/src/xap/xml/sax/ParserException.js
    incubator/xap/trunk/src/xap/xml/sax/ParserExceptionRes.js
    incubator/xap/trunk/src/xap/xml/sax/SaxContentHandler.js
    incubator/xap/trunk/src/xap/xml/sax/SaxParser.js
    incubator/xap/trunk/src/xap/xml/xmodify/CommandDirective.js
    incubator/xap/trunk/src/xap/xml/xmodify/DirectiveSet.js
    incubator/xap/trunk/src/xap/xml/xmodify/UpdateDirective.js
    incubator/xap/trunk/src/xap/xml/xmodify/Xmodify.js
    incubator/xap/trunk/src/xap/xml/xmodify/XmodifyException.js
    incubator/xap/trunk/src/xap/xml/xmodify/XmodifyNamespaceHandler.js

Modified: incubator/xap/trunk/src/google/README.txt
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/google/README.txt?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/google/README.txt (original)
+++ incubator/xap/trunk/src/google/README.txt Tue Jun 27 16:06:08 2006
@@ -8,4 +8,6 @@
 
 dom.js
 misc.js
-xpath.js
\ No newline at end of file
+xpath.js
+
+Unfortunately none of this stuff is scoped to any top-level object, we will probably have to fix that at some point. I've already changes some of the code to work better with dynamic loading via eval()
\ No newline at end of file

Modified: incubator/xap/trunk/src/google/dom.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/google/dom.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/google/dom.js (original)
+++ incubator/xap/trunk/src/google/dom.js Tue Jun 27 16:06:08 2006
@@ -22,7 +22,7 @@
 // Spec. However, different browsers actually pass very different
 // values at the API.
 //
-function xmlResolveEntities(s) {
+xmlResolveEntities = function(s) {
 
   var parts = stringSplit(s, '&');
 
@@ -73,7 +73,7 @@
 
 // Parses the given XML string with our custom, JavaScript XML parser. Written
 // by Steffen Meschkat (mesch@google.com).
-function xmlParse(xml) {
+xmlParse = function(xml) {
   Timer.start('xmlparse');
   var regex_empty = /\/$/;
 
@@ -149,7 +149,7 @@
 // where we can't reuse the HTML DOM for parsing our own XML, and for
 // Safari, where it is too expensive to have the template processor
 // operate on native DOM nodes.
-function XNode(type, name, value, owner) {
+XNode = function(type, name, value, owner) {
   this.attributes = [];
   this.childNodes = [];
 
@@ -373,7 +373,7 @@
 }
 
 
-function XDocument() {
+XDocument = function() {
   XNode.call(this, DOM_DOCUMENT_NODE, '#document', null, this);
   this.documentElement = null;
 }

Modified: incubator/xap/trunk/src/google/misc.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/google/misc.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/google/misc.js (original)
+++ incubator/xap/trunk/src/google/misc.js Tue Jun 27 16:06:08 2006
@@ -6,18 +6,18 @@
 // Author: Steffen Meschkat <me...@google.com>
 //
 
-function el(i) {
+el = function(i) {
   return document.getElementById(i);
 }
 
-function px(x) {
+px  = function(x) {
   return x + 'px';
 }
 
 // Split a string s at all occurrences of character c. This is like
 // the split() method of the string object, but IE omits empty
 // strings, which violates the invariant (s.split(x).join(x) == s).
-function stringSplit(s, c) {
+stringSplit = function(s, c) {
   var a = s.indexOf(c);
   if (a == -1) {
     return [ s ];
@@ -41,7 +41,7 @@
 // Returns the text value if a node; for nodes without children this
 // is the nodeValue, for nodes with children this is the concatenation
 // of the value of all children.
-function xmlValue(node) {
+xmlValue = function(node) {
   if (!node) {
     return '';
   }
@@ -63,7 +63,7 @@
 }
 
 // Returns the representation of a node as XML text.
-function xmlText(node) {
+xmlText  =function(node) {
   var ret = '';
   if (node.nodeType == DOM_TEXT_NODE) {
     ret += xmlEscapeText(node.nodeValue);
@@ -100,7 +100,7 @@
 }
 
 // Applies the given function to each element of the array.
-function mapExec(array, func) {
+mapExec = function(array, func) {
   for (var i = 0; i < array.length; ++i) {
     func(array[i]);
   }
@@ -108,7 +108,7 @@
 
 // Returns an array that contains the return value of the given
 // function applied to every element of the input array.
-function mapExpr(array, func) {
+mapExpr = function(array, func) {
   var ret = [];
   for (var i = 0; i < array.length; ++i) {
     ret.push(func(array[i]));
@@ -117,7 +117,7 @@
 };
 
 // Reverses the given array in place.
-function reverseInplace(array) {
+reverseInplace = function(array) {
   for (var i = 0; i < array.length / 2; ++i) {
     var h = array[i];
     var ii = array.length - i - 1;
@@ -127,13 +127,13 @@
 }
 
 // Shallow-copies an array.
-function copyArray(dst, src) { 
+copyArray = function(dst, src) { 
   for (var i = 0; i < src.length; ++i) {
     dst.push(src[i]);
   }
 }
 
-function assert(b) {
+assert = function(b) {
   if (!b) {
     throw 'assertion failed';
   }
@@ -141,28 +141,28 @@
 
 // Based on
 // <http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247>
-var DOM_ELEMENT_NODE = 1;
-var DOM_ATTRIBUTE_NODE = 2;
-var DOM_TEXT_NODE = 3;
-var DOM_CDATA_SECTION_NODE = 4;
-var DOM_ENTITY_REFERENCE_NODE = 5;
-var DOM_ENTITY_NODE = 6;
-var DOM_PROCESSING_INSTRUCTION_NODE = 7;
-var DOM_COMMENT_NODE = 8;
-var DOM_DOCUMENT_NODE = 9;
-var DOM_DOCUMENT_TYPE_NODE = 10;
-var DOM_DOCUMENT_FRAGMENT_NODE = 11;
-var DOM_NOTATION_NODE = 12;
+DOM_ELEMENT_NODE = 1;
+DOM_ATTRIBUTE_NODE = 2;
+DOM_TEXT_NODE = 3;
+DOM_CDATA_SECTION_NODE = 4;
+DOM_ENTITY_REFERENCE_NODE = 5;
+DOM_ENTITY_NODE = 6;
+DOM_PROCESSING_INSTRUCTION_NODE = 7;
+DOM_COMMENT_NODE = 8;
+DOM_DOCUMENT_NODE = 9;
+DOM_DOCUMENT_TYPE_NODE = 10;
+DOM_DOCUMENT_FRAGMENT_NODE = 11;
+DOM_NOTATION_NODE = 12;
 
 
-var xpathdebug = false; // trace xpath parsing
-var xsltdebug = false; // trace xslt processing
+xpathdebug = false; // trace xpath parsing
+xsltdebug = false; // trace xslt processing
 
 
 // Escape XML special markup chracters: tag delimiter < > and entity
 // reference start delimiter &. The escaped string can be used in XML
 // text portions (i.e. between tags).
-function xmlEscapeText(s) {
+xmlEscapeText = function(s) {
   return s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
 }
 
@@ -170,21 +170,21 @@
 // reference start delimiter & and quotes ". The escaped string can be
 // used in double quoted XML attribute value portions (i.e. in
 // attributes within start tags).
-function xmlEscapeAttr(s) {
+xmlEscapeAttr = function(s) {
   return xmlEscapeText(s).replace(/\"/g, '&quot;');
 }
 
 // Escape markup in XML text, but don't touch entity references. The
 // escaped string can be used as XML text (i.e. between tags).
-function xmlEscapeTags(s) {
+xmlEscapeTags = function(s) {
   return s.replace(/</g, '&lt;').replace(/>/g, '&gt;');
 }
 
 // An implementation of the debug log. 
 
-var logging__ = true;
+logging__ = true;
 
-function Log() {};
+Log = function() {};
 
 Log.lines = [];
 
@@ -250,6 +250,6 @@
 }
 
 
-function Timer() {}
+Timer = function() {}
 Timer.start = function() {}
 Timer.end = function() {}

Modified: incubator/xap/trunk/src/google/xpath.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/google/xpath.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/google/xpath.js (original)
+++ incubator/xap/trunk/src/google/xpath.js Tue Jun 27 16:06:08 2006
@@ -43,7 +43,7 @@
 // @return an expression object that can be evaluated with an
 // expression context.
 
-function xpathParse(expr) {
+xpathParse = function(expr) {
   if (xpathdebug) {
     Log.write('XPath parse ' + expr);
   }
@@ -191,13 +191,13 @@
   return result;
 }
 
-var xpathParseCache = {};
+xpathParseCache = {};
 
-function xpathCacheLookup(expr) {
+xpathCacheLookup = function(expr) {
   return xpathParseCache[expr];
 }
 
-function xpathReduce(stack, ahead) {
+xpathReduce = function(stack, ahead) {
   var cand = null;
 
   if (stack.length > 0) {
@@ -256,7 +256,7 @@
   return ret;
 }
 
-function xpathMatchStack(stack, pattern) {
+xpathMatchStack = function(stack, pattern) {
 
   // NOTE(mesch): The stack matches for variable cardinality are
   // greedy but don't do backtracking. This would be an issue only
@@ -328,11 +328,11 @@
   }
 }
 
-function xpathTokenPrecedence(tag) {
+xpathTokenPrecedence = function(tag) {
   return tag.prec || 2;
 }
 
-function xpathGrammarPrecedence(frame) {
+xpathGrammarPrecedence = function(frame) {
   var ret = 0;
 
   if (frame.rule) { /* normal reduce */
@@ -358,7 +358,7 @@
   return ret;
 }
 
-function stackToString(stack) {
+stackToString = function(stack) {
   var ret = '';
   for (var i = 0; i < stack.length; ++i) {
     if (ret) {
@@ -403,7 +403,7 @@
 //   variables in XPath. (A variable is visible to all subsequent
 //   siblings, not only to its children.)
 
-function ExprContext(node, position, nodelist, parent) {
+ExprContext = function(node, position, nodelist, parent) {
   this.node = node;
   this.position = position || 0;
   this.nodelist = nodelist || [ node ];
@@ -474,7 +474,7 @@
 //   Node objects.
 //
 
-function StringValue(value) {
+StringValue = function(value) {
   this.value = value;
   this.type = 'string';
 }
@@ -495,7 +495,7 @@
   throw this + ' ' + Error().stack;
 }
 
-function BooleanValue(value) {
+BooleanValue = function(value) {
   this.value = value;
   this.type = 'boolean';
 }
@@ -516,7 +516,7 @@
   throw this + ' ' + Error().stack;
 }
 
-function NumberValue(value) {
+NumberValue = function(value) {
   this.value = value;
   this.type = 'number';
 }
@@ -537,7 +537,7 @@
   throw this + ' ' + Error().stack;
 }
 
-function NodeSetValue(value) {
+NodeSetValue = function(value) {
   this.value = value;
   this.type = 'node-set';
 }
@@ -579,7 +579,7 @@
 // parseTree(indent) -- returns a parse tree representation of the
 // expression (defined in xsltdebug.js).
 
-function TokenExpr(m) {
+TokenExpr = function(m) {
   this.value = m;
 }
 
@@ -587,7 +587,7 @@
   return new StringValue(this.value);
 };
 
-function LocationExpr() {
+LocationExpr = function() {
   this.absolute = false;
   this.steps = [];
 }
@@ -618,7 +618,7 @@
   return new NodeSetValue(nodes);
 };
 
-function xPathStep(nodes, steps, step, input, ctx) {
+xPathStep = function(nodes, steps, step, input, ctx) {
   var s = steps[step];
   var ctx2 = ctx.clone(input);
   var nodelist = s.evaluate(ctx2).nodeSetValue();
@@ -632,7 +632,7 @@
   }
 }
 
-function StepExpr(axis, nodetest, predicate) {
+StepExpr = function(axis, nodetest, predicate) {
   this.axis = axis;
   this.nodetest = nodetest;
   this.predicate = predicate || [];
@@ -740,7 +740,7 @@
   return new NodeSetValue(nodelist);
 };
 
-function NodeTestAny() {
+NodeTestAny = function() {
   this.value = new BooleanValue(true);
 }
 
@@ -748,25 +748,25 @@
   return this.value;
 };
 
-function NodeTestElement() {}
+NodeTestElement = function() {}
 
 NodeTestElement.prototype.evaluate = function(ctx) {
   return new BooleanValue(ctx.node.nodeType == DOM_ELEMENT_NODE);
 }
 
-function NodeTestText() {}
+NodeTestText = function() {}
 
 NodeTestText.prototype.evaluate = function(ctx) {
   return new BooleanValue(ctx.node.nodeType == DOM_TEXT_NODE);
 }
 
-function NodeTestComment() {}
+NodeTestComment = function() {}
 
 NodeTestComment.prototype.evaluate = function(ctx) {
   return new BooleanValue(ctx.node.nodeType == DOM_COMMENT_NODE);
 }
 
-function NodeTestPI(target) {
+NodeTestPI = function(target) {
   this.target = target;
 }
 
@@ -776,7 +776,7 @@
                (!this.target || ctx.node.nodeName == this.target));
 }
 
-function NodeTestNC(nsprefix) {
+NodeTestNC = function(nsprefix) {
   this.regex = new RegExp("^" + nsprefix + ":");
   this.nsprefix = nsprefix;
 }
@@ -786,7 +786,7 @@
   return new BooleanValue(this.regex.match(n.nodeName));
 }
 
-function NodeTestName(name) {
+NodeTestName = function(name) {
   this.name = name;
 }
 
@@ -795,7 +795,7 @@
   return new BooleanValue(n.nodeName == this.name);
 }
 
-function PredicateExpr(expr) {
+PredicateExpr = function(expr) {
   this.expr = expr;
 }
 
@@ -811,7 +811,7 @@
   }
 };
 
-function FunctionCallExpr(name) {
+FunctionCallExpr = function(name) {
   this.name = name;
   this.args = [];
 }
@@ -1148,7 +1148,7 @@
   }
 };
 
-function UnionExpr(expr1, expr2) {
+UnionExpr = function(expr1, expr2) {
   this.expr1 = expr1;
   this.expr2 = expr2;
 }
@@ -1170,7 +1170,7 @@
   return new NodeSetValue(nodes2);
 };
 
-function PathExpr(filter, rel) {
+PathExpr = function(filter, rel) {
   this.filter = filter;
   this.rel = rel;
 }
@@ -1187,7 +1187,7 @@
   return new NodeSetValue(nodes1);
 };
 
-function FilterExpr(expr, predicate) {
+FilterExpr = function(expr, predicate) {
   this.expr = expr;
   this.predicate = predicate;
 }
@@ -1208,7 +1208,7 @@
   return new NodeSetValue(nodes);
 }
 
-function UnaryMinusExpr(expr) {
+UnaryMinusExpr = function(expr) {
   this.expr = expr;
 }
 
@@ -1216,7 +1216,7 @@
   return new NumberValue(-this.expr.evaluate(ctx).numberValue());
 };
 
-function BinaryExpr(expr1, op, expr2) {
+BinaryExpr = function(expr1, op, expr2) {
   this.expr1 = expr1;
   this.expr2 = expr2;
   this.op = op;
@@ -1382,7 +1382,7 @@
   return new BooleanValue(ret);
 }
 
-function LiteralExpr(value) {
+LiteralExpr = function(value) {
   this.value = value;
 }
 
@@ -1390,7 +1390,7 @@
   return new StringValue(this.value);
 };
 
-function NumberExpr(value) {
+NumberExpr = function(value) {
   this.value = value;
 }
 
@@ -1398,7 +1398,7 @@
   return new NumberValue(this.value);
 };
 
-function VariableExpr(name) {
+VariableExpr = function(name) {
   this.name = name;
 }
 
@@ -1415,81 +1415,81 @@
 // expression in an actual context. These factory functions are used
 // in the specification of the grammar rules, below.
 
-function makeTokenExpr(m) {
+makeTokenExpr = function(m) {
   return new TokenExpr(m);
 }
 
-function passExpr(e) {
+passExpr = function(e) {
   return e;
 }
 
-function makeLocationExpr1(slash, rel) {
+makeLocationExpr1 = function(slash, rel) {
   rel.absolute = true;
   return rel;
 }
 
-function makeLocationExpr2(dslash, rel) {
+makeLocationExpr2 = function(dslash, rel) {
   rel.absolute = true;
   rel.prependStep(makeAbbrevStep(dslash.value));
   return rel;
 }
 
-function makeLocationExpr3(slash) {
+makeLocationExpr3 = function(slash) {
   var ret = new LocationExpr();
   ret.appendStep(makeAbbrevStep('.'));
   ret.absolute = true;
   return ret;
 }
 
-function makeLocationExpr4(dslash) {
+makeLocationExpr4 = function(dslash) {
   var ret = new LocationExpr();
   ret.absolute = true;
   ret.appendStep(makeAbbrevStep(dslash.value));
   return ret;
 }
 
-function makeLocationExpr5(step) {
+makeLocationExpr5 = function(step) {
   var ret = new LocationExpr();
   ret.appendStep(step);
   return ret;
 }
 
-function makeLocationExpr6(rel, slash, step) {
+makeLocationExpr6 = function(rel, slash, step) {
   rel.appendStep(step);
   return rel;
 }
 
-function makeLocationExpr7(rel, dslash, step) {
+makeLocationExpr7 = function(rel, dslash, step) {
   rel.appendStep(makeAbbrevStep(dslash.value));
   return rel;
 }
 
-function makeStepExpr1(dot) {
+makeStepExpr1 = function(dot) {
   return makeAbbrevStep(dot.value);
 }
 
-function makeStepExpr2(ddot) {
+makeStepExpr2 = function(ddot) {
   return makeAbbrevStep(ddot.value);
 }
 
-function makeStepExpr3(axisname, axis, nodetest) {
+makeStepExpr3 = function(axisname, axis, nodetest) {
   return new StepExpr(axisname.value, nodetest);
 }
 
-function makeStepExpr4(at, nodetest) {
+makeStepExpr4 = function(at, nodetest) {
   return new StepExpr('attribute', nodetest);
 }
 
-function makeStepExpr5(nodetest) {
+makeStepExpr5 = function(nodetest) {
   return new StepExpr('child', nodetest);
 }
 
-function makeStepExpr6(step, predicate) {
+makeStepExpr6 = function(step, predicate) {
   step.appendPredicate(predicate);
   return step;
 }
 
-function makeAbbrevStep(abbrev) {
+makeAbbrevStep = function(abbrev) {
   switch (abbrev) {
   case '//':
     return new StepExpr('descendant-or-self', new NodeTestAny);
@@ -1502,19 +1502,19 @@
   }
 }
 
-function makeNodeTestExpr1(asterisk) {
+makeNodeTestExpr1 = function(asterisk) {
   return new NodeTestElement;
 }
 
-function makeNodeTestExpr2(ncname, colon, asterisk) {
+makeNodeTestExpr2 = function(ncname, colon, asterisk) {
   return new NodeTestNC(ncname.value);
 }
 
-function makeNodeTestExpr3(qname) {
+makeNodeTestExpr3 = function(qname) {
   return new NodeTestName(qname.value);
 }
 
-function makeNodeTestExpr4(typeo, parenc) {
+makeNodeTestExpr4 = function(typeo, parenc) {
   var type = typeo.value.replace(/\s*\($/, '');
   switch(type) {
   case 'node':
@@ -1531,7 +1531,7 @@
   }
 }
 
-function makeNodeTestExpr5(typeo, target, parenc) {
+makeNodeTestExpr5 = function(typeo, target, parenc) {
   var type = typeo.replace(/\s*\($/, '');
   if (type != 'processing-instruction') {
     throw type + ' ' + Error().stack;
@@ -1539,19 +1539,19 @@
   return new NodeTestPI(target.value);
 }
 
-function makePredicateExpr(pareno, expr, parenc) {
+makePredicateExpr = function(pareno, expr, parenc) {
   return new PredicateExpr(expr);
 }
 
-function makePrimaryExpr(pareno, expr, parenc) {
+makePrimaryExpr = function(pareno, expr, parenc) {
   return expr;
 }
 
-function makeFunctionCallExpr1(name, pareno, parenc) {
+makeFunctionCallExpr1 = function(name, pareno, parenc) {
   return new FunctionCallExpr(name);
 }
 
-function makeFunctionCallExpr2(name, pareno, arg1, args, parenc) {
+makeFunctionCallExpr2 = function(name, pareno, arg1, args, parenc) {
   var ret = new FunctionCallExpr(name);
   ret.appendArg(arg1);
   for (var i = 0; i < args.length; ++i) {
@@ -1560,24 +1560,24 @@
   return ret;
 }
 
-function makeArgumentExpr(comma, expr) {
+makeArgumentExpr = function(comma, expr) {
   return expr;
 }
 
-function makeUnionExpr(expr1, pipe, expr2) {
+makeUnionExpr = function(expr1, pipe, expr2) {
   return new UnionExpr(expr1, expr2);
 }
 
-function makePathExpr1(filter, slash, rel) {
+makePathExpr1 = function(filter, slash, rel) {
   return new PathExpr(filter, rel);
 }
 
-function makePathExpr2(filter, dslash, rel) {
+makePathExpr2 = function(filter, dslash, rel) {
   rel.prependStep(makeAbbrevStep(dslash.value));
   return new PathExpr(filter, rel);
 }
 
-function makeFilterExpr(expr, predicates) {
+makeFilterExpr = function(expr, predicates) {
   if (predicates.length > 0) {
     return new FilterExpr(expr, predicates);
   } else {
@@ -1585,31 +1585,31 @@
   }
 }
 
-function makeUnaryMinusExpr(minus, expr) {
+makeUnaryMinusExpr = function(minus, expr) {
   return new UnaryMinusExpr(expr);
 }
 
-function makeBinaryExpr(expr1, op, expr2) {
+makeBinaryExpr = function(expr1, op, expr2) {
   return new BinaryExpr(expr1, op, expr2);
 }
 
-function makeLiteralExpr(token) {
+makeLiteralExpr = function(token) {
   // remove quotes from the parsed value:
   var value = token.value.substring(1, token.value.length - 1);
   return new LiteralExpr(value);
 }
 
-function makeNumberExpr(token) {
+makeNumberExpr = function(token) {
   return new NumberExpr(token.value);
 }
 
-function makeVariableReference(dollar, name) {
+makeVariableReference = function(dollar, name) {
   return new VariableExpr(name.value);
 }
 
 // Used before parsing for optimization of common simple cases. See
 // the begin of xpathParse() for which they are.
-function makeSimpleExpr(expr) {
+makeSimpleExpr = function(expr) {
   if (expr.charAt(0) == '$') {
     return new VariableExpr(expr.substr(1));
   } else if (expr.charAt(0) == '@') {
@@ -1629,7 +1629,7 @@
   }
 }
 
-function makeSimpleExpr2(expr) {
+makeSimpleExpr2 = function(expr) {
   var steps = expr.split('/');
   var c = new LocationExpr();
   for (var i in steps) {
@@ -1642,7 +1642,7 @@
 
 // The axes of XPath expressions.
 
-var xpathAxis = {
+xpathAxis = {
   ANCESTOR_OR_SELF: 'ancestor-or-self',
   ANCESTOR: 'ancestor',
   ATTRIBUTE: 'attribute',
@@ -1658,7 +1658,7 @@
   SELF: 'self'
 };
 
-var xpathAxesRe = [
+xpathAxesRe = [
     xpathAxis.ANCESTOR_OR_SELF,
     xpathAxis.ANCESTOR,
     xpathAxis.ATTRIBUTE,
@@ -1684,58 +1684,58 @@
 // NOTE: tabular formatting is the big exception, but here it should
 // be OK.
 
-var TOK_PIPE =   { label: "|",   prec:   17, re: new RegExp("^\\|") };
-var TOK_DSLASH = { label: "//",  prec:   19, re: new RegExp("^//")  };
-var TOK_SLASH =  { label: "/",   prec:   30, re: new RegExp("^/")   };
-var TOK_AXIS =   { label: "::",  prec:   20, re: new RegExp("^::")  };
-var TOK_COLON =  { label: ":",   prec: 1000, re: new RegExp("^:")  };
-var TOK_AXISNAME = { label: "[axis]", re: new RegExp('^(' + xpathAxesRe + ')') };
-var TOK_PARENO = { label: "(",   prec:   34, re: new RegExp("^\\(") };
-var TOK_PARENC = { label: ")",               re: new RegExp("^\\)") };
-var TOK_DDOT =   { label: "..",  prec:   34, re: new RegExp("^\\.\\.") };
-var TOK_DOT =    { label: ".",   prec:   34, re: new RegExp("^\\.") };
-var TOK_AT =     { label: "@",   prec:   34, re: new RegExp("^@")   };
-
-var TOK_COMMA =  { label: ",",               re: new RegExp("^,") };
-
-var TOK_OR =     { label: "or",  prec:   10, re: new RegExp("^or\\b") };
-var TOK_AND =    { label: "and", prec:   11, re: new RegExp("^and\\b") };
-var TOK_EQ =     { label: "=",   prec:   12, re: new RegExp("^=")   };
-var TOK_NEQ =    { label: "!=",  prec:   12, re: new RegExp("^!=")  };
-var TOK_GE =     { label: ">=",  prec:   13, re: new RegExp("^>=")  };
-var TOK_GT =     { label: ">",   prec:   13, re: new RegExp("^>")   };
-var TOK_LE =     { label: "<=",  prec:   13, re: new RegExp("^<=")  };
-var TOK_LT =     { label: "<",   prec:   13, re: new RegExp("^<")   };
-var TOK_PLUS =   { label: "+",   prec:   14, re: new RegExp("^\\+"), left: true };
-var TOK_MINUS =  { label: "-",   prec:   14, re: new RegExp("^\\-"), left: true };
-var TOK_DIV =    { label: "div", prec:   15, re: new RegExp("^div\\b"), left: true };
-var TOK_MOD =    { label: "mod", prec:   15, re: new RegExp("^mod\\b"), left: true };
-
-var TOK_BRACKO = { label: "[",   prec:   32, re: new RegExp("^\\[") };
-var TOK_BRACKC = { label: "]",               re: new RegExp("^\\]") };
-var TOK_DOLLAR = { label: "$",               re: new RegExp("^\\$") };
-
-var TOK_NCNAME = { label: "[ncname]", re: new RegExp('^[a-z][-\\w]*','i') };
-
-var TOK_ASTERISK = { label: "*", prec: 15, re: new RegExp("^\\*"), left: true };
-var TOK_LITERALQ = { label: "[litq]", prec: 20, re: new RegExp("^'[^\\']*'") };
-var TOK_LITERALQQ = {
+TOK_PIPE =   { label: "|",   prec:   17, re: new RegExp("^\\|") };
+TOK_DSLASH = { label: "//",  prec:   19, re: new RegExp("^//")  };
+TOK_SLASH =  { label: "/",   prec:   30, re: new RegExp("^/")   };
+TOK_AXIS =   { label: "::",  prec:   20, re: new RegExp("^::")  };
+TOK_COLON =  { label: ":",   prec: 1000, re: new RegExp("^:")  };
+TOK_AXISNAME = { label: "[axis]", re: new RegExp('^(' + xpathAxesRe + ')') };
+TOK_PARENO = { label: "(",   prec:   34, re: new RegExp("^\\(") };
+TOK_PARENC = { label: ")",               re: new RegExp("^\\)") };
+TOK_DDOT =   { label: "..",  prec:   34, re: new RegExp("^\\.\\.") };
+TOK_DOT =    { label: ".",   prec:   34, re: new RegExp("^\\.") };
+TOK_AT =     { label: "@",   prec:   34, re: new RegExp("^@")   };
+
+TOK_COMMA =  { label: ",",               re: new RegExp("^,") };
+
+TOK_OR =     { label: "or",  prec:   10, re: new RegExp("^or\\b") };
+TOK_AND =    { label: "and", prec:   11, re: new RegExp("^and\\b") };
+TOK_EQ =     { label: "=",   prec:   12, re: new RegExp("^=")   };
+TOK_NEQ =    { label: "!=",  prec:   12, re: new RegExp("^!=")  };
+TOK_GE =     { label: ">=",  prec:   13, re: new RegExp("^>=")  };
+TOK_GT =     { label: ">",   prec:   13, re: new RegExp("^>")   };
+TOK_LE =     { label: "<=",  prec:   13, re: new RegExp("^<=")  };
+TOK_LT =     { label: "<",   prec:   13, re: new RegExp("^<")   };
+TOK_PLUS =   { label: "+",   prec:   14, re: new RegExp("^\\+"), left: true };
+TOK_MINUS =  { label: "-",   prec:   14, re: new RegExp("^\\-"), left: true };
+TOK_DIV =    { label: "div", prec:   15, re: new RegExp("^div\\b"), left: true };
+TOK_MOD =    { label: "mod", prec:   15, re: new RegExp("^mod\\b"), left: true };
+
+TOK_BRACKO = { label: "[",   prec:   32, re: new RegExp("^\\[") };
+TOK_BRACKC = { label: "]",               re: new RegExp("^\\]") };
+TOK_DOLLAR = { label: "$",               re: new RegExp("^\\$") };
+
+TOK_NCNAME = { label: "[ncname]", re: new RegExp('^[a-z][-\\w]*','i') };
+
+TOK_ASTERISK = { label: "*", prec: 15, re: new RegExp("^\\*"), left: true };
+TOK_LITERALQ = { label: "[litq]", prec: 20, re: new RegExp("^'[^\\']*'") };
+TOK_LITERALQQ = {
   label: "[litqq]",
   prec: 20,
   re: new RegExp('^"[^\\"]*"')
 };
 
-var TOK_NUMBER  = {
+TOK_NUMBER  = {
   label: "[number]",
   prec: 35,
   re: new RegExp('^\\d+(\\.\\d*)?') };
 
-var TOK_QNAME = {
+TOK_QNAME = {
   label: "[qname]",
   re: new RegExp('^([a-z][-\\w]*:)?[a-z][-\\w]*','i')
 };
 
-var TOK_NODEO = {
+TOK_NODEO = {
   label: "[nodetest-start]",
   re: new RegExp('^(processing-instruction|comment|text|node)\\(')
 };
@@ -1748,7 +1748,7 @@
 // NOTE: order of this list is important, because the first match
 // counts. Cf. DDOT and DOT, and AXIS and COLON.
 
-var xpathTokenRules = [
+xpathTokenRules = [
     TOK_DSLASH,
     TOK_SLASH,
     TOK_DDOT,
@@ -1788,25 +1788,25 @@
 // All the nonterminals of the grammar. The nonterminal objects are
 // identified by object identity; the labels are used in the debug
 // output only.
-var XPathLocationPath = { label: "LocationPath" };
-var XPathRelativeLocationPath = { label: "RelativeLocationPath" };
-var XPathAbsoluteLocationPath = { label: "AbsoluteLocationPath" };
-var XPathStep = { label: "Step" };
-var XPathNodeTest = { label: "NodeTest" };
-var XPathPredicate = { label: "Predicate" };
-var XPathLiteral = { label: "Literal" };
-var XPathExpr = { label: "Expr" };
-var XPathPrimaryExpr = { label: "PrimaryExpr" };
-var XPathVariableReference = { label: "Variablereference" };
-var XPathNumber = { label: "Number" };
-var XPathFunctionCall = { label: "FunctionCall" };
-var XPathArgumentRemainder = { label: "ArgumentRemainder" };
-var XPathPathExpr = { label: "PathExpr" };
-var XPathUnionExpr = { label: "UnionExpr" };
-var XPathFilterExpr = { label: "FilterExpr" };
-var XPathDigits = { label: "Digits" };
+XPathLocationPath = { label: "LocationPath" };
+XPathRelativeLocationPath = { label: "RelativeLocationPath" };
+XPathAbsoluteLocationPath = { label: "AbsoluteLocationPath" };
+XPathStep = { label: "Step" };
+XPathNodeTest = { label: "NodeTest" };
+XPathPredicate = { label: "Predicate" };
+XPathLiteral = { label: "Literal" };
+XPathExpr = { label: "Expr" };
+XPathPrimaryExpr = { label: "PrimaryExpr" };
+XPathVariableReference = { label: "Variablereference" };
+XPathNumber = { label: "Number" };
+XPathFunctionCall = { label: "FunctionCall" };
+XPathArgumentRemainder = { label: "ArgumentRemainder" };
+XPathPathExpr = { label: "PathExpr" };
+XPathUnionExpr = { label: "UnionExpr" };
+XPathFilterExpr = { label: "FilterExpr" };
+XPathDigits = { label: "Digits" };
 
-var xpathNonTerminals = [
+xpathNonTerminals = [
     XPathLocationPath,
     XPathRelativeLocationPath,
     XPathAbsoluteLocationPath,
@@ -1827,12 +1827,12 @@
 ];
 
 // Quantifiers that are used in the productions of the grammar.
-var Q_01 = { label: "?" };
-var Q_MM = { label: "*" };
-var Q_1M = { label: "+" };
+Q_01 = { label: "?" };
+Q_MM = { label: "*" };
+Q_1M = { label: "+" };
 
 // Tag for left associativity (right assoc is implied by undefined).
-var ASSOC_LEFT = true;
+ASSOC_LEFT = true;
 
 // The productions of the grammar. Columns of the table:
 //
@@ -1855,7 +1855,7 @@
 // instead. TODO: It shouldn't be necessary to explicitly assign
 // precedences to rules.
 
-var xpathGrammarRules =
+xpathGrammarRules =
   [
    [ XPathLocationPath, [ XPathRelativeLocationPath ], 18,
      passExpr ],
@@ -2003,9 +2003,9 @@
 // structures and will be called right here. It merely takes the
 // counter variables out of the global scope.
 
-var xpathRules = [];
+xpathRules = [];
 
-function xpathParseInit() {
+xpathParseInit = function() {
   if (xpathRules.length) {
     return;
   }
@@ -2087,14 +2087,14 @@
 
 // Local utility functions that are used by the lexer or parser.
 
-function xpathCollectDescendants(nodelist, node) {
+xpathCollectDescendants = function(nodelist, node) {
   for (var n = node.firstChild; n; n = n.nextSibling) {
     nodelist.push(n);
     arguments.callee(nodelist, n);
   }
 }
 
-function xpathCollectDescendantsReverse(nodelist, node) {
+xpathCollectDescendantsReverse = function(nodelist, node) {
   for (var n = node.lastChild; n; n = n.previousSibling) {
     nodelist.push(n);
     arguments.callee(nodelist, n);
@@ -2104,7 +2104,7 @@
 
 // The entry point for the library: match an expression against a DOM
 // node. Returns an XPath value.
-function xpathDomEval(expr, node) {
+xpathDomEval = function(expr, node) {
   var expr1 = xpathParse(expr);
   var ret = expr1.evaluate(new ExprContext(node));
   return ret;
@@ -2112,7 +2112,7 @@
 
 // Utility function to sort a list of nodes. Used by xsltSort() and
 // nxslSelect().
-function xpathSort(input, sort) {
+xpathSort = function(input, sort) {
   if (sort.length == 0) {
     return;
   }
@@ -2164,7 +2164,7 @@
 // the case that numbers should be sorted as strings, which is very
 // uncommon.
 
-function xpathSortByKey(v1, v2) {
+xpathSortByKey = function(v1, v2) {
   // NOTE: Sort key vectors of different length never occur in
   // xsltSort.
 

Modified: incubator/xap/trunk/src/xap/Xap.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/Xap.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/Xap.js (original)
+++ incubator/xap/trunk/src/xap/Xap.js Tue Jun 27 16:06:08 2006
@@ -14,33 +14,34 @@
  *  limitations under the License.
  *
  */
+
+
  
- function Xap() {}
+Xap = function () {}
+
+//make xap load from the xap directory
+dojo.hostenv.setModulePrefix("xap", "../xap");
+
 
+Xap.kwCompoundRequire = function(){
+	dojo.kwCompoundRequire.apply(dojo, arguments);
+}
+
+
+Xap.provide = function(){
+	dojo.provide.apply(dojo,arguments);
+}
 
-/**
- * Creates the given package trail
- *
- * Xap.declarePackage("a.b.c");
- * 
- *
- * @param  {String} packageName The name of the package(s) to create.
- */
-Xap.declarePackage = function( packageName ) {
-
-	var packages = packageName.split(".");
-	
-   var basePackage = window;
-  	
-	for (var i =0; i<packages.length; ++i) {
-		basePackage[packages[i]] = basePackage[packages[i]] || {};
-		basePackage = basePackage[packages[i]];
-	}
+Xap.require = function(){
+	dojo.require.apply(dojo,arguments);
 }
 
 
 
+
+
 Xap.bootstrap = function( sourceRootDir ) {
+	Xap._sourceRootDir = sourceRootDir;
 	Xap.loadXap( sourceRootDir );
 	Xap.loadZimbra( sourceRootDir );
 }
@@ -53,115 +54,102 @@
 
 Xap.loadXap = function( sourceRootDir ) {
 	
-	//google classes
-	Utils.importFile(  sourceRootDir + "/src/google/misc.js" );
-	Utils.importFile(  sourceRootDir + "/src/google/xpath.js" );
-	Utils.importFile(  sourceRootDir + "/src/google/dom.js" );
+	dojo.hostenv.loadUri(sourceRootDir + "/src/google/misc.js");
+	dojo.hostenv.loadUri(sourceRootDir + "/src/google/xpath.js");
+	dojo.hostenv.loadUri(sourceRootDir + "/src/google/dom.js");
 	
 
 	//xap.util
-	Utils.importFile(  sourceRootDir + "/src/xap/util/LogFactory.js" );	
-	Utils.importFile(  sourceRootDir + "/src/xap/util/XmlUtils.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/util/HttpUtils.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/util/UidProvider.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/util/Vector.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/util/Hashtable.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/util/Character.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/util/ResourceDictionary.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/util/XapException.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/util/BaseException.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/util/IllegalArgumentException.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/util/Profiler.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/util/LogFactory.js");	
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/util/XmlUtils.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/util/HttpUtils.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/util/UidProvider.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/util/Vector.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/util/Hashtable.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/util/ResourceDictionary.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/util/XapException.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/util/BaseException.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/util/IllegalArgumentException.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/util/Profiler.js" );
 	
 
 	//xap.session
-	Utils.importFile(  sourceRootDir + "/src/xap/session/Container.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/session/ClientSession.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/session/ClientEvent.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/session/EventHandler.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/session/DeclarativeArgumentParser.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/session/Container.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/session/ClientSession.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/session/ClientEvent.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/session/EventHandler.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/session/DeclarativeArgumentParser.js" );
 	
 	//xap.xml
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/InvalidXmlException.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/InvalidXmlExceptionRes.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/NamespaceHandler.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/NamespaceHandlerManager.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/XalNamespaceHandler.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/DocumentContainer.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/InvalidXmlException.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/InvalidXmlExceptionRes.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/NamespaceHandler.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/NamespaceHandlerManager.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/XalNamespaceHandler.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/DocumentContainer.js" );
 	
 	//xap.xml.sax	
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/sax/SaxParser.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/sax/SaxContentHandler.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/sax/ParserException.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/sax/ParserExceptionRes.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/sax/EmptyDocumentException.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/sax/EmptyDocumentExceptionRes.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/sax/SaxParser.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/sax/SaxContentHandler.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/sax/ParserException.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/sax/ParserExceptionRes.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/sax/EmptyDocumentException.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/sax/EmptyDocumentExceptionRes.js" );
 
 	
 	//xap.xml.xmodify
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/xmodify/Xmodify.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/xmodify/XmodifyNamespaceHandler.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/xmodify/UpdateDirective.js") ;
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/xmodify/CommandDirective.js") ;
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/xmodify/DirectiveSet.js") ;
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/xmodify/XmodifyException.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/xmodify/Xmodify.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/xmodify/XmodifyNamespaceHandler.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/xmodify/UpdateDirective.js") ;
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/xmodify/CommandDirective.js") ;
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/xmodify/DirectiveSet.js") ;
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/xmodify/XmodifyException.js" );
 
 
 
 	
 	//xap.xml.dom
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/dom/XapElement.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/dom/Document.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/dom/XapElement.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/dom/Document.js" );
 	
 	
 	//xap.xml.dom.events
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/dom/events/DomChangeEvent.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/dom/events/AttributeChangeListener.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/dom/events/AttributeChangeEvent.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/dom/events/StructureChangeListener.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/dom/events/StructureChangeEvent.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/xml/dom/events/ChangeRejectedException.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/dom/events/DomChangeEvent.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/dom/events/AttributeChangeListener.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/dom/events/AttributeChangeEvent.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/dom/events/StructureChangeListener.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/dom/events/StructureChangeEvent.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/xml/dom/events/ChangeRejectedException.js" );
 	
 	
 	//xap.mco
-	Utils.importFile(  sourceRootDir + "/src/xap/mco/McoNamespaceHandler.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/mco/McoInvocationException.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/mco/McoInvocationExceptionRes.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/mco/McoNamespaceHandler.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/mco/McoInvocationException.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/mco/McoInvocationExceptionRes.js" );
 
 
 	//xap.macro
- 	Utils.importFile(  sourceRootDir + "/src/xap/macro/MacroNamespaceHandler.js");
-	Utils.importFile(  sourceRootDir + "/src/xap/macro/Macro.js");
+ 	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/macro/MacroNamespaceHandler.js");
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/macro/Macro.js");
         
 
 	//xap.tags (TODO rename?_
-	Utils.importFile(  sourceRootDir + "/src/xap/taghandling/AbstractTagImpl.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/taghandling/PluginDocumentHandler.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/taghandling/PluginRegistryImpl.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/taghandling/AbstractTagImpl.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/taghandling/PluginDocumentHandler.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/taghandling/PluginRegistryImpl.js" );
     
 
-
 	
 	//xap.requestservice
-	Utils.importFile(  sourceRootDir + "/src/xap/requestservice/RequestService.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/requestservice/NetServiceListener.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/requestservice/RequestService.js" );
+	dojo.hostenv.loadUri(  sourceRootDir + "/src/xap/requestservice/NetServiceListener.js" );
 	
-	//xap.bridges
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/zimbra/DwtControlBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/zimbra/DwtCompositeBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/zimbra/DwtLabelBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/zimbra/DwtButtonBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/zimbra/DwtTabViewBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/zimbra/DwtTabBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/zimbra/DwtSplitterBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/zimbra/DwtSplitChildBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/zimbra/DwtTreeBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/zimbra/DwtTreeItemBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/zimbra/DwtTextFieldBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/zimbra/DwtVerticalLayoutPanelBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/zimbra/DwtHorizontalLayoutPanelBridge.js" );
 }
 
+
+//for some reason dojo.hostent.loadUri() doesn't work on some (one?)
+//of these files, it gives an error on this.func being undefined.
+//That's ok as we are going to ditch these files anyway
 Xap.loadZimbra = function( sourceRootDir ) {
 	Utils.importFile(  sourceRootDir + "/src/zimbra/js/msgs/AjxMsg.js" );
 	Utils.importFile(  sourceRootDir + "/src/zimbra/js/core/AjxCore.js" );
@@ -283,19 +271,6 @@
 	Utils.importFile(  sourceRootDir + "/src/xap/components/zimbra/DwtSplitter.js" );
 	Utils.importFile(  sourceRootDir + "/src/xap/components/zimbra/DwtSplitChild.js" );
 	Utils.importFile(  sourceRootDir + "/src/xap/components/zimbra/DwtTablePanel.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/components/zimbra/DwtVerticalLayoutPanel.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/components/zimbra/DwtHorizontalLayoutPanel.js" );
-	
-	//Basic panel components
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/basic/TextViewBridge.js" );	
-	
-	//add custom code here	
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/google/GoogleBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/google/GoogleMapBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/google/GoogleInfoWindowBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/google/GoogleMarkerBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/google/GoogleMarkersBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/google/GoogleIconsBridge.js" );
-	Utils.importFile(  sourceRootDir + "/src/xap/bridges/google/GoogleIconBridge.js" );
-	
+	Utils.importFile(  sourceRootDir + "/src/xap/components/zimbra/DwtVerticalLayoutPanel.js" );	
+	Utils.importFile(  sourceRootDir + "/src/xap/components/zimbra/DwtHorizontalLayoutPanel.js" );	
 }

Modified: incubator/xap/trunk/src/xap/bridges/basic/TextViewBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/basic/TextViewBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/basic/TextViewBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/basic/TextViewBridge.js Tue Jun 27 16:06:08 2006
@@ -29,9 +29,11 @@
  * @class TextViewBridge is the bridge between an XML element
  * representing a blob of html.
  * 
+ * @constructor
+ * 
  * @author bbuffone
  */
-function TextViewBridge() {
+TextViewBridge = function() {
 	AbstractTagImpl.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/google/GoogleBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/google/GoogleBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/google/GoogleBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/google/GoogleBridge.js Tue Jun 27 16:06:08 2006
@@ -14,7 +14,9 @@
  *  limitations under the License.
  *
  */
- 
+
+Xap.provide("xap.bridges.google.GoogleBridge"); 
+
  /**
  * @fileoverview
  * 
@@ -28,9 +30,11 @@
  * @class GoogleBridge is the bridge between an XML element
  * representing a google object.
  * 
+ * @constructor
+ * 
  * @author bbuffone
  */
-function GoogleBridge() {
+GoogleBridge = function() {
 	AbstractTagImpl.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/google/GoogleIconBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/google/GoogleIconBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/google/GoogleIconBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/google/GoogleIconBridge.js Tue Jun 27 16:06:08 2006
@@ -21,6 +21,9 @@
  * A bridge class that controls a GIcon peer.
  */
 
+
+Xap.require("xap.bridges.google.GoogleBridge"); 
+
 /**
  * Creates a GoogleInfoWindowBridge.
  * 
@@ -28,9 +31,11 @@
  * @class GoogleInfoWindowBridge is the bridge between an XML element
  * representing a google maps marker.
  * 
+ * @constructor
+ * 
  * @author bbuffone
  */
-function GoogleIconBridge() {
+GoogleIconBridge = function() {
 	GoogleBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/google/GoogleIconsBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/google/GoogleIconsBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/google/GoogleIconsBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/google/GoogleIconsBridge.js Tue Jun 27 16:06:08 2006
@@ -21,6 +21,8 @@
  * A bridge class that controls a Google object peer.
  */
 
+Xap.require("xap.bridges.google.GoogleBridge"); 
+
 /**
  * Creates a GoogleIconsBridge.
  * 
@@ -28,9 +30,11 @@
  * @class GoogleIconsBridge is the bridge between an XML element
  * representing a google object.
  * 
+ * @constructor
+ * 
  * @author bbuffone
  */
-function GoogleIconsBridge() {
+GoogleIconsBridge = function() {
 	AbstractTagImpl.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/google/GoogleInfoWindowBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/google/GoogleInfoWindowBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/google/GoogleInfoWindowBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/google/GoogleInfoWindowBridge.js Tue Jun 27 16:06:08 2006
@@ -14,7 +14,9 @@
  *  limitations under the License.
  *
  */
- 
+
+Xap.require("xap.bridges.google.GoogleBridge"); 
+
  /**
  * @fileoverview
  * 
@@ -28,9 +30,11 @@
  * @class GoogleInfoWindowBridge is the bridge between an XML element
  * representing a google maps info window.
  * 
+ * @constructor
+ * 
  * @author bbuffone
  */
-function GoogleInfoWindowBridge() {
+GoogleInfoWindowBridge = function() {
 	GoogleBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/google/GoogleMapBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/google/GoogleMapBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/google/GoogleMapBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/google/GoogleMapBridge.js Tue Jun 27 16:06:08 2006
@@ -14,6 +14,8 @@
  *  limitations under the License.
  *
  */
+
+Xap.require("xap.bridges.google.GoogleBridge"); 
  
  /**
  * @fileoverview
@@ -28,9 +30,11 @@
  * @class GoogleMapBridge is the bridge between an XML element
  * representing a google map and GMap2 class.
  * 
+ * @constructor
+ * 
  * @author bbuffone
  */
-function GoogleMapBridge() {
+GoogleMapBridge = function() {
 	GoogleBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/google/GoogleMarkerBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/google/GoogleMarkerBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/google/GoogleMarkerBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/google/GoogleMarkerBridge.js Tue Jun 27 16:06:08 2006
@@ -14,7 +14,9 @@
  *  limitations under the License.
  *
  */
- 
+
+Xap.require("xap.bridges.google.GoogleBridge"); 
+
  /**
  * @fileoverview
  * 
@@ -28,9 +30,11 @@
  * @class GoogleInfoWindowBridge is the bridge between an XML element
  * representing a google maps marker.
  * 
+ * @constructor
+ * 
  * @author bbuffone
  */
-function GoogleMarkerBridge() {
+GoogleMarkerBridge = function() {
 	GoogleBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/google/GoogleMarkersBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/google/GoogleMarkersBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/google/GoogleMarkersBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/google/GoogleMarkersBridge.js Tue Jun 27 16:06:08 2006
@@ -14,7 +14,8 @@
  *  limitations under the License.
  *
  */
- 
+Xap.require("xap.bridges.google.GoogleBridge"); 
+
  /**
  * @fileoverview
  * 
@@ -28,9 +29,11 @@
  * @class GoogleMarkersBridge is the bridge between an XML element
  * representing a google object.
  * 
+ * @constructor
+ * 
  * @author bbuffone
  */
-function GoogleMarkersBridge() {
+GoogleMarkersBridge = function() {
 	AbstractTagImpl.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/zimbra/DwtButtonBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/zimbra/DwtButtonBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/zimbra/DwtButtonBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/zimbra/DwtButtonBridge.js Tue Jun 27 16:06:08 2006
@@ -28,9 +28,11 @@
  * @class DwtButtonBridge is the bridge between an XML element
  * representing a button and the DwtButton Zimbra class.
  * 
+ * @constructor
+ * 
  * @author jmargaris
  */
-function DwtButtonBridge() {
+DwtButtonBridge = function() {
 	DwtLabelBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/zimbra/DwtCompositeBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/zimbra/DwtCompositeBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/zimbra/DwtCompositeBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/zimbra/DwtCompositeBridge.js Tue Jun 27 16:06:08 2006
@@ -15,7 +15,9 @@
  *
  */
  
- /**
+Xap.require("xap.bridges.zimbra.DwtControlBridge"); 
+ 
+/**
  * @fileoverview
  * 
  * A bridge class that controls a DwtComposite peer.
@@ -32,7 +34,7 @@
  * 
  * @author jmargaris
  */
-function DwtCompositeBridge() {
+DwtCompositeBridge = function() {
 	DwtControlBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/zimbra/DwtControlBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/zimbra/DwtControlBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/zimbra/DwtControlBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/zimbra/DwtControlBridge.js Tue Jun 27 16:06:08 2006
@@ -14,8 +14,9 @@
  *  limitations under the License.
  *
  */
- 
- /**
+
+Xap.provide("xap.bridges.zimbra.DwtControlBridge"); 
+/**
  * @fileoverview
  * 
  * A bridge class that controls a DwtControl peer.
@@ -33,7 +34,7 @@
  * 
  * @author jmargaris
  */
- function DwtControlBridge() {
+DwtControlBridge = function() {
 	AbstractTagImpl.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/zimbra/DwtHorizontalLayoutPanelBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/zimbra/DwtHorizontalLayoutPanelBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/zimbra/DwtHorizontalLayoutPanelBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/zimbra/DwtHorizontalLayoutPanelBridge.js Tue Jun 27 16:06:08 2006
@@ -29,7 +29,7 @@
  * 
  * @author jmargaris
  */
-function DwtHorizontalLayoutPanelBridge() {
+DwtHorizontalLayoutPanelBridge = function() {
 	DwtCompositeBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/zimbra/DwtLabelBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/zimbra/DwtLabelBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/zimbra/DwtLabelBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/zimbra/DwtLabelBridge.js Tue Jun 27 16:06:08 2006
@@ -30,7 +30,7 @@
  * 
  * @author jmargaris
  */
-function DwtLabelBridge() {
+DwtLabelBridge = function() {
 	DwtCompositeBridge.call( this );	
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/zimbra/DwtSplitChildBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/zimbra/DwtSplitChildBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/zimbra/DwtSplitChildBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/zimbra/DwtSplitChildBridge.js Tue Jun 27 16:06:08 2006
@@ -31,7 +31,7 @@
  * 
  * @author jmargaris
  */
-function DwtSplitChildBridge() {
+DwtSplitChildBridge = function() {
 	DwtCompositeBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/zimbra/DwtSplitterBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/zimbra/DwtSplitterBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/zimbra/DwtSplitterBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/zimbra/DwtSplitterBridge.js Tue Jun 27 16:06:08 2006
@@ -31,7 +31,7 @@
  * 
  * @author jmargaris
  */
-function DwtSplitterBridge() {
+DwtSplitterBridge = function() {
 	DwtCompositeBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/zimbra/DwtTabBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/zimbra/DwtTabBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/zimbra/DwtTabBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/zimbra/DwtTabBridge.js Tue Jun 27 16:06:08 2006
@@ -30,7 +30,7 @@
  * 
  * @author jmargaris
  */
-function DwtTabBridge() {
+DwtTabBridge = function() {
 	DwtCompositeBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/zimbra/DwtTabViewBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/zimbra/DwtTabViewBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/zimbra/DwtTabViewBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/zimbra/DwtTabViewBridge.js Tue Jun 27 16:06:08 2006
@@ -30,7 +30,7 @@
  * 
  * @author jmargaris
  */
-function DwtTabViewBridge() {
+DwtTabViewBridge = function() {
 	DwtCompositeBridge.call( this );	
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/zimbra/DwtTextFieldBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/zimbra/DwtTextFieldBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/zimbra/DwtTextFieldBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/zimbra/DwtTextFieldBridge.js Tue Jun 27 16:06:08 2006
@@ -31,7 +31,7 @@
  * 
  * @author jmargaris
  */
-function DwtTextFieldBridge() {
+DwtTextFieldBridge = function() {
 	DwtControlBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/zimbra/DwtTreeBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/zimbra/DwtTreeBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/zimbra/DwtTreeBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/zimbra/DwtTreeBridge.js Tue Jun 27 16:06:08 2006
@@ -29,7 +29,7 @@
  * 
  * @author jmargaris
  */
-function DwtTreeBridge() {
+DwtTreeBridge = function() {
 	DwtCompositeBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/zimbra/DwtTreeItemBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/zimbra/DwtTreeItemBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/zimbra/DwtTreeItemBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/zimbra/DwtTreeItemBridge.js Tue Jun 27 16:06:08 2006
@@ -29,7 +29,7 @@
  * 
  * @author jmargaris
  */
-function DwtTreeItemBridge() {
+DwtTreeItemBridge = function() {
 	DwtCompositeBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/bridges/zimbra/DwtVerticalLayoutPanelBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/zimbra/DwtVerticalLayoutPanelBridge.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/zimbra/DwtVerticalLayoutPanelBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/zimbra/DwtVerticalLayoutPanelBridge.js Tue Jun 27 16:06:08 2006
@@ -29,7 +29,7 @@
  * 
  * @author jmargaris
  */
-function DwtVerticalLayoutPanelBridge() {
+DwtVerticalLayoutPanelBridge = function() {
 	DwtCompositeBridge.call( this );
 }
 

Modified: incubator/xap/trunk/src/xap/components/zimbra/DwtHorizontalLayoutPanel.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/components/zimbra/DwtHorizontalLayoutPanel.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/components/zimbra/DwtHorizontalLayoutPanel.js (original)
+++ incubator/xap/trunk/src/xap/components/zimbra/DwtHorizontalLayoutPanel.js Tue Jun 27 16:06:08 2006
@@ -29,7 +29,7 @@
  * 
  * @author jmargaris
  */
-function DwtHorizontalLayoutPanel(parent, style, className, posStyle) {
+DwtHorizontalLayoutPanel = function(parent, style, className, posStyle) {
 	DwtTablePanel.call(this, parent, style, className, posStyle);
 }
 

Modified: incubator/xap/trunk/src/xap/components/zimbra/DwtSplitChild.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/components/zimbra/DwtSplitChild.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/components/zimbra/DwtSplitChild.js (original)
+++ incubator/xap/trunk/src/xap/components/zimbra/DwtSplitChild.js Tue Jun 27 16:06:08 2006
@@ -32,7 +32,7 @@
  * 
  * @author jmargaris
  */
-function DwtSplitChild(parent, isLeftTop) {
+DwtSplitChild = function(parent, isLeftTop) {
 	this._isLeftTop = isLeftTop;
 	DwtComposite.call(this, parent, null, DwtControl.ABSOLUTE_STYLE);	
 	this.setSize("100%","100%");

Modified: incubator/xap/trunk/src/xap/components/zimbra/DwtSplitter.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/components/zimbra/DwtSplitter.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/components/zimbra/DwtSplitter.js (original)
+++ incubator/xap/trunk/src/xap/components/zimbra/DwtSplitter.js Tue Jun 27 16:06:08 2006
@@ -40,7 +40,7 @@
  * 
  * @author jmargaris
  */
-function DwtSplitter(parent, style, className, threshold, posStyle) {
+DwtSplitter = function(parent, style, className, threshold, posStyle) {
 	
 	this._orientation = style ? style : DwtSash.HORIZONTAL_STYLE;
 	className = className ? className : "DwtSplitter";

Modified: incubator/xap/trunk/src/xap/components/zimbra/DwtTablePanel.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/components/zimbra/DwtTablePanel.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/components/zimbra/DwtTablePanel.js (original)
+++ incubator/xap/trunk/src/xap/components/zimbra/DwtTablePanel.js Tue Jun 27 16:06:08 2006
@@ -31,7 +31,7 @@
  * 
  * @author jmargaris
  */
-function DwtTablePanel(parent, style, className, posStyle) {
+DwtTablePanel = function(parent, style, className, posStyle) {
 	DwtComposite.call(this, parent, className, posStyle);
 }
 

Modified: incubator/xap/trunk/src/xap/components/zimbra/DwtVerticalLayoutPanel.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/components/zimbra/DwtVerticalLayoutPanel.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/components/zimbra/DwtVerticalLayoutPanel.js (original)
+++ incubator/xap/trunk/src/xap/components/zimbra/DwtVerticalLayoutPanel.js Tue Jun 27 16:06:08 2006
@@ -29,7 +29,7 @@
  * 
  * @author jmargaris
  */
-function DwtVerticalLayoutPanel(parent, style, className, posStyle) {
+DwtVerticalLayoutPanel = function(parent, style, className, posStyle) {
 	DwtTablePanel.call(this, parent, style, className, posStyle);
 }
 

Modified: incubator/xap/trunk/src/xap/macro/Macro.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/macro/Macro.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/macro/Macro.js (original)
+++ incubator/xap/trunk/src/xap/macro/Macro.js Tue Jun 27 16:06:08 2006
@@ -34,7 +34,7 @@
  * like java MessageFormat but these don't yet.
  * 
  */
-function Macro( macroText, container ) {
+Macro = function( macroText, container ) {
 	this._macroText = macroText;
 	this._container = container;
 }

Modified: incubator/xap/trunk/src/xap/macro/MacroNamespaceHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/macro/MacroNamespaceHandler.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/macro/MacroNamespaceHandler.js (original)
+++ incubator/xap/trunk/src/xap/macro/MacroNamespaceHandler.js Tue Jun 27 16:06:08 2006
@@ -31,7 +31,7 @@
  * <p>
  * 
  */
-function MacroNamespaceHandler(){}
+MacroNamespaceHandler = function(){}
 
 MacroNamespaceHandler.prototype = new NamespaceHandler;
 

Modified: incubator/xap/trunk/src/xap/mco/McoInvocationException.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/mco/McoInvocationException.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/mco/McoInvocationException.js (original)
+++ incubator/xap/trunk/src/xap/mco/McoInvocationException.js Tue Jun 27 16:06:08 2006
@@ -19,9 +19,16 @@
  * @author ikaplansky
  */
 
+
 //-----------------------------------------------------------------------
-// Constants.
+// Constructors.
 //-----------------------------------------------------------------------
+
+McoInvocationException = function( msgId, args, cause ) {
+    XapException.call( this, msgId, args, cause );
+}
+McoInvocationException.prototype = new XapException;
+
 McoInvocationException.CLASSNAME = "McoInvocationException";
 
 // {0} mco id
@@ -30,15 +37,6 @@
 // {0} mco id
 // {1} method name
 McoInvocationException.MCO_METHOD_NOT_FOUND = "mcoMethodNotFound";
-
-//-----------------------------------------------------------------------
-// Constructors.
-//-----------------------------------------------------------------------
-
-function McoInvocationException( msgId, args, cause ) {
-    XapException.call( this, msgId, args, cause );
-}
-McoInvocationException.prototype = new XapException;
 
 //-----------------------------------------------------------------------
 // PublicMethods.

Modified: incubator/xap/trunk/src/xap/mco/McoInvocationExceptionRes.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/mco/McoInvocationExceptionRes.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/mco/McoInvocationExceptionRes.js (original)
+++ incubator/xap/trunk/src/xap/mco/McoInvocationExceptionRes.js Tue Jun 27 16:06:08 2006
@@ -15,7 +15,7 @@
  *
  */
  
- function McoInvocationExceptionRes() {
+McoInvocationExceptionRes = function() {
 	this.messages = new Object();
 	this.messages[McoInvocationException.MCO_NOT_FOUND] = "MCO not found:{0}";
 	this.messages[McoInvocationException.MCO_METHOD_NOT_FOUND] = "MCO method not found: mco id={0}, method={1}";

Modified: incubator/xap/trunk/src/xap/mco/McoNamespaceHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/mco/McoNamespaceHandler.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/mco/McoNamespaceHandler.js (original)
+++ incubator/xap/trunk/src/xap/mco/McoNamespaceHandler.js Tue Jun 27 16:06:08 2006
@@ -24,6 +24,15 @@
  * TODO error checking in general
  */
 
+
+
+//-----------------------------------------------------------------------
+// Constructors.
+//-----------------------------------------------------------------------
+McoNamespaceHandler = function(){}
+
+McoNamespaceHandler.prototype = new NamespaceHandler;
+
 //-----------------------------------------------------------------------
 // Constants.
 //-----------------------------------------------------------------------
@@ -37,13 +46,6 @@
 // Class Variables.
 //-----------------------------------------------------------------------
 McoNamespaceHandler.s_log = LogFactory.getLog( "McoNamespaceHandler" );
-
-//-----------------------------------------------------------------------
-// Constructors.
-//-----------------------------------------------------------------------
-function McoNamespaceHandler(){}
-
-McoNamespaceHandler.prototype = new NamespaceHandler;
 
 //-----------------------------------------------------------------------
 // NamespaceHandler Implementation.

Modified: incubator/xap/trunk/src/xap/requestservice/NetServiceListener.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/requestservice/NetServiceListener.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/requestservice/NetServiceListener.js (original)
+++ incubator/xap/trunk/src/xap/requestservice/NetServiceListener.js Tue Jun 27 16:06:08 2006
@@ -29,7 +29,7 @@
 //-----------------------------------------------------------------------
 // Constructors.
 //-----------------------------------------------------------------------
-function NetServiceListener() {}
+NetServiceListener = function() {}
 
 //-----------------------------------------------------------------------
 // Public Methods.

Modified: incubator/xap/trunk/src/xap/requestservice/RequestService.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/requestservice/RequestService.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/requestservice/RequestService.js (original)
+++ incubator/xap/trunk/src/xap/requestservice/RequestService.js Tue Jun 27 16:06:08 2006
@@ -23,7 +23,7 @@
 //-----------------------------------------------------------------------
 // Constructors.
 //-----------------------------------------------------------------------
-function RequestService( clientSession ) {
+RequestService = function( clientSession ) {
 	this._clientSession = clientSession;
 }
 

Modified: incubator/xap/trunk/src/xap/session/ClientEvent.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/session/ClientEvent.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/session/ClientEvent.js (original)
+++ incubator/xap/trunk/src/xap/session/ClientEvent.js Tue Jun 27 16:06:08 2006
@@ -19,7 +19,7 @@
  * Placeholder functionality only for now. We just set/get properties
  * on this object for each event
  */
-function ClientEvent( source, session ) {
+ClientEvent = function( source, session ) {
 	this.source = source;
 	this.session = session;
 }

Modified: incubator/xap/trunk/src/xap/session/ClientSession.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/session/ClientSession.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/session/ClientSession.js (original)
+++ incubator/xap/trunk/src/xap/session/ClientSession.js Tue Jun 27 16:06:08 2006
@@ -25,14 +25,9 @@
  */
 
 //-----------------------------------------------------------------------
-// Class Variables.
-//-----------------------------------------------------------------------
-ClientSession.s_log = LogFactory.getLog( "ClientSession" );
-
-//-----------------------------------------------------------------------
 // Constructors.
 //-----------------------------------------------------------------------
-function ClientSession( webappContext ) {
+ClientSession = function( webappContext ) {
 	
 	this._namesToContainers = new Hashtable();
 	this._webappContext = webappContext;
@@ -67,6 +62,8 @@
 	//TODO handle this in a better way
 	this._createInitialDocument();
 }
+
+ClientSession.s_log = LogFactory.getLog( "ClientSession" );
 
 //-----------------------------------------------------------------------
 // Public Methods.

Modified: incubator/xap/trunk/src/xap/session/Container.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/session/Container.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/session/Container.js (original)
+++ incubator/xap/trunk/src/xap/session/Container.js Tue Jun 27 16:06:08 2006
@@ -31,7 +31,7 @@
  * notification events when objects are added and removed.
  *
  */
-function Container( clientSession ){
+Container = function( clientSession ){
 	this._clientSession = clientSession;
 	this._namesToObjects = new Hashtable();
 	this._objectsToNames = new Hashtable();

Modified: incubator/xap/trunk/src/xap/session/DeclarativeArgumentParser.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/session/DeclarativeArgumentParser.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/session/DeclarativeArgumentParser.js (original)
+++ incubator/xap/trunk/src/xap/session/DeclarativeArgumentParser.js Tue Jun 27 16:06:08 2006
@@ -26,6 +26,9 @@
 //TODO this needs a ton more testing.
 //TODO what package does this belong in?
 
+
+Xap.require("xap.util.Character");
+
 /** 
  * Creates a DeclarativeArgumentParser
  * 
@@ -73,7 +76,7 @@
  * 
  * 
  */ 
-function DeclarativeArgumentParser( session ) {
+DeclarativeArgumentParser = function( session ) {
 	this._session = session;
 }
 

Modified: incubator/xap/trunk/src/xap/session/EventHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/session/EventHandler.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/session/EventHandler.js (original)
+++ incubator/xap/trunk/src/xap/session/EventHandler.js Tue Jun 27 16:06:08 2006
@@ -31,7 +31,7 @@
 //-----------------------------------------------------------------------
 // Constructors.
 //-----------------------------------------------------------------------
-function EventHandler( session ) {
+EventHandler = function( session ) {
 	this._session = session;
 }
 

Modified: incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js (original)
+++ incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js Tue Jun 27 16:06:08 2006
@@ -71,7 +71,7 @@
  * @author jmargaris
  */
 
-function AbstractTagImpl() {
+AbstractTagImpl = function() {
 	this._element = null;
 	this._peer = null;
 	this._clientSession = null;

Modified: incubator/xap/trunk/src/xap/taghandling/PluginDocumentHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/taghandling/PluginDocumentHandler.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/taghandling/PluginDocumentHandler.js (original)
+++ incubator/xap/trunk/src/xap/taghandling/PluginDocumentHandler.js Tue Jun 27 16:06:08 2006
@@ -40,7 +40,7 @@
  *  the name the document is registered under.
  */
 
-function PluginDocumentHandler( clientSession, doc, documentName ) {
+PluginDocumentHandler = function( clientSession, doc, documentName ) {
 	// A map of XML elements to their bridge classes.
 	this._elementsToBridges = new Hashtable();
 	// Map from peer objects back to their bridge classes that drive them

Modified: incubator/xap/trunk/src/xap/taghandling/PluginRegistry.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/taghandling/PluginRegistry.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/taghandling/PluginRegistry.js (original)
+++ incubator/xap/trunk/src/xap/taghandling/PluginRegistry.js Tue Jun 27 16:06:08 2006
@@ -34,7 +34,7 @@
  * the tag appears in. TODO
  *
  */
-function PluginRegistry() {
+PluginRegistry = function() {
 	
 	this._tagToBridgeClassName = new Hashtable();
 	

Modified: incubator/xap/trunk/src/xap/taghandling/PluginRegistryImpl.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/taghandling/PluginRegistryImpl.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/taghandling/PluginRegistryImpl.js (original)
+++ incubator/xap/trunk/src/xap/taghandling/PluginRegistryImpl.js Tue Jun 27 16:06:08 2006
@@ -40,7 +40,7 @@
 
 
 
-function PluginRegistryImpl( session ){
+PluginRegistryImpl = function( session ){
 	this._pluginLifecycleObjects = new Array();
 	this._tagDefinitions = new Hashtable();
 	this._tagMappings = new Hashtable();
@@ -183,6 +183,31 @@
 					if (className==null || className.length==0){
 						//TODO report exception
 						continue;
+					}
+					try{
+						//TODO we should really use
+						////Xap.require(className);
+						//but that involves changing all the bridge classes,
+						//which I don't want to do right now as most of them are
+						//placeholder anyway so we use loadPath instead and truncate
+						//the classname from xap.bridges.zimbra.DwtButton
+						//to just DwtButton because that is what the file
+						//uses right now.
+						
+						var pathName = className.replace(/\./gm,"/");
+						pathName += ".js";
+						dojo.hostenv.loadUri(Xap._sourceRootDir + "/src/" + pathName);
+						
+						var lastPeriod = className.lastIndexOf(".");
+						if (lastPeriod>0){
+							className = className.substring(lastPeriod+1);
+						}
+					}
+					catch(exception){
+						if (this._session){
+							this._session.handleException(exception);
+						}
+						//TODO if error here then what? keep the mapping anyway?
 					}
 				}
 				//if we aren't supposed to be mapped to anything

Modified: incubator/xap/trunk/src/xap/taghandling/plugin.xml
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/taghandling/plugin.xml?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/taghandling/plugin.xml (original)
+++ incubator/xap/trunk/src/xap/taghandling/plugin.xml Tue Jun 27 16:06:08 2006
@@ -1,31 +1,31 @@
 <plugin>
 	<!-- mappings that apply to the document named "dataSources" -->
 	<tag-mappings namespace="http://www.openxal.org/xal" document="xal">
-		<mapping class="DwtCompositeBridge" name="panel"/>
-		<mapping class="DwtLabelBridge" name="label"/>
-		<mapping class="DwtButtonBridge" name="button"/>
-		<mapping class="DwtTabViewBridge" name="tabPane"/>
-		<mapping class="DwtTabBridge" name="tab"/>
-		<mapping class="DwtSplitterBridge" name="splitPane"/>
-		<mapping class="DwtSplitChildBridge" name="left"/>
-		<mapping class="DwtSplitChildBridge" name="right"/>
-		<mapping class="DwtSplitChildBridge" name="top"/>
-		<mapping class="DwtSplitChildBridge" name="bottom"/>
-		<mapping class="DwtTreeBridge" name="tree"/>
-		<mapping class="DwtTreeItemBridge" name="treeItem"/>
-		<mapping class="DwtTextFieldBridge" name="textField"/>
-		<mapping class="DwtVerticalLayoutPanelBridge" name="verticalLayoutPanel"/>
-		<mapping class="DwtHorizontalLayoutPanelBridge" name="horizontalLayoutPanel"/>
+		<mapping class="xap.bridges.zimbra.DwtCompositeBridge" name="panel"/>
+		<mapping class="xap.bridges.zimbra.DwtLabelBridge" name="label"/>
+		<mapping class="xap.bridges.zimbra.DwtButtonBridge" name="button"/>
+		<mapping class="xap.bridges.zimbra.DwtTabViewBridge" name="tabPane"/>
+		<mapping class="xap.bridges.zimbra.DwtTabBridge" name="tab"/>
+		<mapping class="xap.bridges.zimbra.DwtSplitterBridge" name="splitPane"/>
+		<mapping class="xap.bridges.zimbra.DwtSplitChildBridge" name="left"/>
+		<mapping class="xap.bridges.zimbra.DwtSplitChildBridge" name="right"/>
+		<mapping class="xap.bridges.zimbra.DwtSplitChildBridge" name="top"/>
+		<mapping class="xap.bridges.zimbra.DwtSplitChildBridge" name="bottom"/>
+		<mapping class="xap.bridges.zimbra.DwtTreeBridge" name="tree"/>
+		<mapping class="xap.bridges.zimbra.DwtTreeItemBridge" name="treeItem"/>
+		<mapping class="xap.bridges.zimbra.DwtTextFieldBridge" name="textField"/>
+		<mapping class="xap.bridges.zimbra.DwtVerticalLayoutPanelBridge" name="verticalLayoutPanel"/>
+		<mapping class="xap.bridges.zimbra.DwtHorizontalLayoutPanelBridge" name="horizontalLayoutPanel"/>
 		
-		<mapping class="TextViewBridge" name="textView"/>
+		<mapping class="xap.bridges.basic.TextViewBridge" name="textView"/>
 	</tag-mappings>
 	
 	<tag-mappings namespace="http://www.google.com" document="xal">	
-		<mapping class="GoogleMapBridge" name="gMap"/>
-		<mapping class="GoogleInfoWindowBridge" name="infoWindow"/>
-		<mapping class="GoogleMarkerBridge" name="marker"/>
-		<mapping class="GoogleMarkersBridge" name="markers"/>
-		<mapping class="GoogleIconsBridge" name="icons"/>
-		<mapping class="GoogleIconBridge" name="icon"/>
+		<mapping class="xap.bridges.google.GoogleMapBridge" name="gMap"/>
+		<mapping class="xap.bridges.google.GoogleInfoWindowBridge" name="infoWindow"/>
+		<mapping class="xap.bridges.google.GoogleMarkerBridge" name="marker"/>
+		<mapping class="xap.bridges.google.GoogleMarkersBridge" name="markers"/>
+		<mapping class="xap.bridges.google.GoogleIconsBridge" name="icons"/>
+		<mapping class="xap.bridges.google.GoogleIconBridge" name="icon"/>
 	</tag-mappings>
 </plugin>

Modified: incubator/xap/trunk/src/xap/util/BaseException.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/util/BaseException.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/util/BaseException.js (original)
+++ incubator/xap/trunk/src/xap/util/BaseException.js Tue Jun 27 16:06:08 2006
@@ -30,7 +30,7 @@
  * @param message The message
  * @param cause The cause of the message, typically another exception
  */
-function BaseException( message, cause, location ) {
+BaseException = function( message, cause, location ) {
 	this._message = message;
 	this._cause = cause;
 	this._location = location;

Modified: incubator/xap/trunk/src/xap/util/Character.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/util/Character.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/util/Character.js (original)
+++ incubator/xap/trunk/src/xap/util/Character.js Tue Jun 27 16:06:08 2006
@@ -22,7 +22,9 @@
  * @author ikaplansky
  */
 
-Xap.declarePackage("xap.util");
+Xap.provide("xap.util.Character");
+
+
 /**
  * There is no need to ever construct a Character object
  * at this time, just use the static methods.
@@ -32,15 +34,13 @@
  * 
  * @constructor
  */
+ 
 xap.util.Character = function(){}
 
-
-
-
-
 /** @private */
 xap.util.Character._reLetter = /^[a-zA-Z]$/;
 
+
 /** @private */
 xap.util.Character._reDigit = /^\d/;
 
@@ -75,4 +75,4 @@
 
 xap.util.Character.isWhiteSpace = function ( str ) {
 	return xap.util.Character._reWhitespace.test( str );
-}
\ No newline at end of file
+}

Modified: incubator/xap/trunk/src/xap/util/Hashtable.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/util/Hashtable.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/util/Hashtable.js (original)
+++ incubator/xap/trunk/src/xap/util/Hashtable.js Tue Jun 27 16:06:08 2006
@@ -34,7 +34,7 @@
  * mappings, not just strings to objects. Unique keys should
  * always map properly, regardless of their toString() implementations.
  */
-function Hashtable(){
+Hashtable  =function(){
     this._hashtable = new Object();
     this._size = 0;
 }

Modified: incubator/xap/trunk/src/xap/util/HttpUtils.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/util/HttpUtils.js?rev=417619&r1=417618&r2=417619&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/util/HttpUtils.js (original)
+++ incubator/xap/trunk/src/xap/util/HttpUtils.js Tue Jun 27 16:06:08 2006
@@ -31,9 +31,11 @@
  * @author ikaplansky
  */
 
+HttpUtils = function(){}
+
 HttpUtils.s_log = LogFactory.getLog( "HttpUtils" ); 
 
-function HttpUtils(){}
+
 
 HttpUtils.createHttpRequest = function() {
 	var request;