This namespace contains XML-related functions to make the BCD-UI library work on different browsers' XML implementation. These functions deal with the following issues:
- XML Document creation
Factory functions for creating XML documents, parsing and serialization and creating XSLT processors.
- XML Manipulation + IE API Compatibility
The Mozilla / Webkit XML classes are augmented so that they implement the IE-compatible interface. Then the users can focus on this API only.
- Namespace handling
Align the handling of XML namespaces and prefixes so that the well-known BCD-UI prefixes as well as user prefixes can be used in the JavaScript API.
Members
-
staticbcdui.core.browserCompatibility.asyncCreateXsltProcessor
-
Asynchronous creation of an XSLTProcessor object from a DOM document.
Methods
-
staticbcdui.core.browserCompatibility.appendElementWithPrefix(targetElement, name, insertBeforeTargetElement){DomElement}
core/browserCompatibility.js, line 116 -
Creates a new element whose name can contain a well-known prefix (like "wrs") and appends it to the specified target element. This function should be used rather than createElementNS, because the latter is not available on the Internet Explorer.
Name Type Description targetElement
HtmlElement The targetElement which is used for appending the new element. name
string The element name which may contain a well-known prefix. insertBeforeTargetElement
boolean Prepend instead of append element. Returns:
Type Description DomElement The new XMLElement. -
staticbcdui.core.browserCompatibility.asyncCreateXsltProcessor(args)
core/browserCompatibility.js, line 143 -
Asynchronous creation of an XSLTProcessor object from a DOM document.
Name Type Description args
object An argument map containing the following elements: Name Type Description model
DomDocument The XSLT document the XSLTProcessor instance should be callBack
function The callback function executed when the processor has been created. It takes the processor instance as argument callerDebug
string Additional (debug) information from the caller for logging -
staticbcdui.core.browserCompatibility.cleanupGeneratedXslt()
core/extendedBrowserCompatibility.js, line 481 -
Helper to support namespace-alias for Gecko
-
staticbcdui.core.browserCompatibility.cloneDocument(doc){DomDocument}
core/browserCompatibility.js, line 63 -
Name Type Description doc
DomDocument To be cloned Returns:
Type Description DomDocument A clone of the given DOM document -
staticbcdui.core.browserCompatibility.createDOMFromXmlString(serializedDoc, msg){DomDocument}
core/browserCompatibility.js, line 75 -
Parses given xml string and creates a DOMDocument out of it.
Name Type Description serializedDoc
string A serialized XML document. msg
string Optional for better error message. Returns:
Type Description DomDocument The DOMDocument parsed from the serialized document string. -
staticbcdui.core.browserCompatibility.newDOMDocument(){DomDocument}
core/browserCompatibility.js, line 54 -
Returns:
Type Description DomDocument A new DOM document -
staticbcdui.core.browserCompatibility.preXslImportByProc()
core/browserCompatibility.js, line 189 -
Prepare for implementing xsl:import by replacing bcduicp: with the application's context
-
staticbcdui.core.browserCompatibility.removeObsoleteNS(doc){String}
core/browserCompatibility.js, line 91 -
removes obsolete namespace declarations and moves used ones to the root element
Name Type Description doc
The document (doc or string) which should be cleaned Returns:
Type Description String The serialized and namespace-cleaned representation of the doc -
staticbcdui.core.browserCompatibility.resolveNamespace(){string}
core/browserCompatibility.js, line 46 -
Returns:
Type Description string URI for a given prefix