/* transform it to HTML and output the result */ echo($processor->transformToXml($returnDom)); }?>

Javascript Helper FunctionsDue to the different implementations of XSLT, the Ajax engine is the most complex part of the application. Several helper functions have been defined, which are as follows. Each function chooses the browser-dependent method to complete the task.

* createDomFromUri(uri, freeThreaded) – loads and returns an instance of a DOMDocument from a specified location on the Internet. n.b: only documents from the same domain can be loaded

freeThreaded - (Internet Explorer Only) If set to true a FreeThreadedDomDocument is returned. * getDom(freeThreaded) – returns an instance of DOMDocument object.

freeThreaded - (Internet Explorer Only) If set to true a FreeThreadedDomDocument is returned. * getXMLHTTP() - returns an instance of an XMLHTTPRequest object. Returns false if it is unavailable. * loadXmlFromString(sXml) - loads an XML DOMDocument object from a valid string representation of XML.

sXML - the string representation of the XML to be parsed * loadXslStylesheet(uri) – loads an XSLT stylesheet returning an XSLTProcessor object

uri – the location of the XSLT stylesheet * parseXmlDom(oXmlDom) – returns true if the Xml document is valid and well formed and false if not