com.gargoylesoftware.htmlunit.activex.javascript.msxml
Class XSLProcessor

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.activex.javascript.msxml.MSXMLScriptable
              extended by com.gargoylesoftware.htmlunit.activex.javascript.msxml.XSLProcessor
All Implemented Interfaces:
Serializable, Cloneable, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class XSLProcessor
extends MSXMLScriptable

A JavaScript object for MSXML's (ActiveX) XSLProcessor.
Used for transformations with compiled style sheets.

Version:
$Revision: 9017 $
Author:
Ahmed Ashour, Frank Danek
See Also:
MSDN documentation, Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
XSLProcessor()
          Creates an instance.
 
Method Summary
 void addParameter(String baseName, Object parameter, Object namespaceURI)
          Adds parameters into an XSL Transformations (XSLT) style sheet.
 XMLDOMNode getInput()
          Returns which XML input tree to transform.
 Object getOutput()
          Gets a custom output to write the result of the transformation.
 void importStylesheet(XMLDOMNode style)
          Imports the specified stylesheet into this XSLTProcessor for transformations.
 void setInput(XMLDOMNode input)
          Specifies which XML input tree to transform.
 void setOutput(Object output)
          Sets the object to which to write the output of the transformation.
 void transform()
          Starts the transformation process or resumes a previously failed transformation.
 
Methods inherited from class com.gargoylesoftware.htmlunit.activex.javascript.msxml.MSXMLScriptable
getClassName, getEnvironment, getPrototype, makeScriptableFor, setEnvironment, setParentScope
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, setCaseSensitive, setDomNode, setDomNode, setHtmlElement
 
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setPrototype, size
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSLProcessor

public XSLProcessor()
Creates an instance. JavaScript objects must have a default constructor.

Method Detail

setInput

public void setInput(XMLDOMNode input)
Specifies which XML input tree to transform.

Parameters:
input - the input tree

getInput

public XMLDOMNode getInput()
Returns which XML input tree to transform.

Returns:
which XML input tree to transform

setOutput

public void setOutput(Object output)
Sets the object to which to write the output of the transformation.

Parameters:
output - the object to which to write the output of the transformation

getOutput

public Object getOutput()
Gets a custom output to write the result of the transformation.

Returns:
the output of the transformation

addParameter

public void addParameter(String baseName,
                         Object parameter,
                         Object namespaceURI)
Adds parameters into an XSL Transformations (XSLT) style sheet.

Parameters:
baseName - the name that will be used inside the style sheet to identify the parameter context
parameter - the parameter value To remove a parameter previously added to the processor, provide a value of Empty or Null instead.
namespaceURI - an optional namespace

transform

public void transform()
Starts the transformation process or resumes a previously failed transformation.


importStylesheet

public void importStylesheet(XMLDOMNode style)
Imports the specified stylesheet into this XSLTProcessor for transformations. The specified node may be either a document node or an element node. If it is a document node, then the document can contain either a XSLT stylesheet or a LRE stylesheet. If it is an element node, it must be the xsl:stylesheet (or xsl:transform) element of an XSLT stylesheet.

Parameters:
style - the root-node of an XSLT stylesheet (may be a document node or an element node)


Copyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.