OverviewSingleDeprecated

jsx3.xml

class Processor

Object
->jsx3.lang.Object
  ->jsx3.xml.Processor

class Processor
extends jsx3.lang.Object
Deprecated. Use jsx3.xml.Template instead.
Wrapper of the native browser XSLT processor.

See Also:

jsx3.xml.Template

Constructor Summary
void
init(objXML : jsx3.xml.Entity, objXSL : jsx3.xml.Document, objParams : Object<String, String>)
The instance initializer.
Method Summary
Object
Returns an error object (a plain JavaScript object) with two properties that the developer can query for: code – an integer error code, 0 for no error.
boolean
Returns true if the last operation on this XML entity caused an error.
jsx3.xml.Processor
setParams(objParams : Object<String, String>)
Sets reference to Params that should be passed to the processor.
Object
Sets the XML that should be transformed.
jsx3.xml.Processor
Sets reference to XSL that should be transformed.
String
transform(bObject : boolean)
Performs an XSLT merge.
jsx3.xml.Document
Performs an XSLT merge.
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf, toString
Constructor Detail

init

void init(objXML : jsx3.xml.Entity, objXSL : jsx3.xml.Document, objParams : Object<String, String>)
The instance initializer.

Parameters:

objXMLthe source document to transform
objXSLa valid XSL Stylesheet (version 1.0 of "http://www.w3.org/1999/XSL/Transform")
objParamsJavaScript associative array of name/value pairs. If this parameter if provided the transformation will use a paramaterized stylesheet to perform the transformation.
Method Detail

getError

Object getError()
Returns an error object (a plain JavaScript object) with two properties that the developer can query for:

Returns:

 

hasError

boolean hasError()
Returns true if the last operation on this XML entity caused an error.

Returns:

 

setParams

jsx3.xml.Processor setParams(objParams : Object<String, String>)
Sets reference to Params that should be passed to the processor.

Parameters:

objParamsJavaScript object array of name/value pairs. If this parameter is not empty, the transformation will use a paramaterized stylesheet to perform the transformation.

Returns:

reference to self  

setXML

Object setXML(objXML : jsx3.xml.Entity)
Sets the XML that should be transformed.

Parameters:

objXML

Returns:

this object.  

setXSL

jsx3.xml.Processor setXSL(objXSL : jsx3.xml.Document)
Sets reference to XSL that should be transformed.

Parameters:

objXSLinstance containing a valid XSL Stylesheet (version 1.0 of "http://www.w3.org/1999/XSL/Transform")

Returns:

reference to self  

transform

String transform(bObject : boolean)
Performs an XSLT merge. If an error occurs while performing the transform, this method sets the error property of this processor and returns null.

Parameters:

bObjectif true, a jsx3.xml.Document instance is returned (not the string)

Returns:

the result of the transformation  

transformToObject

jsx3.xml.Document transformToObject()
Performs an XSLT merge. If an error occurs while performing the transform, this method sets the error property of this processor and returns null.

Returns:

if a valid result tree is formed as a result of the transformation