Class Index | File Index

Classes


Class XSLTProcessor


Defined in: sarissa.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
A class that reuses the same XSLT stylesheet for multiple transforms.
Method Summary
Method Attributes Method Name and Description
 
Clear parameters (set them to default values as defined in the stylesheet itself)
 
getParameter(name, value)
Gets a parameter if previously set by setParameter.
 
Imports the given XSLT DOM and compiles it to a reusable transform Note: If the stylesheet was loaded from a URL and contains xsl:import or xsl:include elements,it will be reloaded to resolve those
 
setParameter(nsURI, name, value)
Set global XSLT parameter of the imported stylesheet.
 
Transform the given XML DOM and return the transformation result as a new DOM document
 
transformToFragment(sourceDoc, ownerDoc)
Transform the given XML DOM and return the transformation result as a new DOM fragment.
Class Detail
XSLTProcessor()
A class that reuses the same XSLT stylesheet for multiple transforms.
Method Detail
clearParameters()
Clear parameters (set them to default values as defined in the stylesheet itself)

{String} getParameter(name, value)
Gets a parameter if previously set by setParameter. Returns null otherwise
Parameters:
{String} name
The parameter base name
{String} value
The new parameter value
Returns:
{String} The parameter value if reviously set by setParameter, null otherwise

importStylesheet(xslDoc)
Imports the given XSLT DOM and compiles it to a reusable transform Note: If the stylesheet was loaded from a URL and contains xsl:import or xsl:include elements,it will be reloaded to resolve those
Parameters:
{DOMDocument} xslDoc
The XSLT DOMDocument to import

setParameter(nsURI, name, value)
Set global XSLT parameter of the imported stylesheet. This method should only be used after the importStylesheet method for the context XSLTProcessor instance.
Parameters:
{String} nsURI
The parameter namespace URI
{String} name
The parameter base name
{String} value
The new parameter value

{DOMDocument} transformToDocument(sourceDoc)
Transform the given XML DOM and return the transformation result as a new DOM document
Parameters:
{DOMDocument} sourceDoc
The XML DOMDocument to transform
Returns:
{DOMDocument} The transformation result as a DOM Document

{DOMDocument} transformToFragment(sourceDoc, ownerDoc)
Transform the given XML DOM and return the transformation result as a new DOM fragment. Note: The xsl:output method must match the nature of the owner document (XML/HTML).
Parameters:
{DOMDocument} sourceDoc
The XML DOMDocument to transform
{DOMDocument} ownerDoc
The owner of the result fragment
Returns:
{DOMDocument} The transformation result as a DOM Document

Documentation generated by JsDoc Toolkit 2.0.2 on Tue May 22 2012 13:01:30 GMT+0300 (EEST)