The dojoe Object
dojo.mixin(dojoe, {
// summary:
// Top level functions of dojoe. Through the processDocument and
// processNode functions dojo.E enables developers to process
// XML Documents and Nodes but also to exted dojo.E by registering
// their own NodeProcessors with registerNodeProcessor.
// Finally, this file also provides helper classes to process
// Xml Script from strings and http requests.
registerNodeProcessor: function(/*String*/tagName, /*function*/processor){
// summary:
// Associates a tag name with a processor function.
// tagName:
// Name of the tag to register.
// processor:
// Function responsible for handling nodes matching tagName.
},
processDocument: function(/*XML Doc*/doc, /*?HTML node?*/refNode) {
// summary:
// Takes an XML document and process it. All the children of the
// root element will be handed sequentially to the appropriate
// processor based on the element name.
// doc:
// Native XML document to be processed.
// refNode:
// AnHTML node that the processor can use as reference for
// output placement while processing. For example, the processor
// can replace this node with some output, or create a sibiling
// of this node.
},
processString: function(/*String*/xmlStr, /*?HTML node?*/refNode){
// summary:
// Helper class to the dojoe.processDocument function. Takes an
// XML string converts it to a native document and processes it
// by calling processDocument.
// xmlStr:
// A string representing the well formed XML to be processed.
// refNode:
// AnHTML node that the processor can use as reference for
// output placement while processing. For example, the processor
// can replace this node with some output, or create a sibiling
// of this node.
},
processRequest: function(/*dojo._xhrArgs*/args, /*?HTML node?*/refNode){
// summary:
// Helper class to the dojoe.processDocument function. Takes an
// Http request for an XML resource, converts it to a native
// document and processes it by calling processDocument.
// args:
// An dojo._xhrArgs object containing the arguments for the http
// request.
// refNode:
// AnHTML node that the processor can use as reference for
// output placement while processing. For example, the processor
// can replace this node with some output, or create a sibiling
// of this node.
},
processNode: function(/*XML Node*/node, /*?HTML node?*/refNode){
// summary:
// Takes an XML node and process it. The function will try
// to find and appropriate processor based on the element
// name and delegate the processing. The processor can in turn
// delegate back the process of children node to this function.
// doc:
// Native XML document to be processed.
// refNode:
// AnHTML node that the processor can use as reference for
// output placement while processing. For example, the processor
// can replace this node with some output, or create a sibiling
// of this node.
}
});
|