Package org.htmlunit.javascript.host.xml
Class XSLTProcessor
java.lang.Object
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.javascript.HtmlUnitScriptable
org.htmlunit.javascript.host.xml.XSLTProcessor
- All Implemented Interfaces:
Serializable
,Cloneable
,org.htmlunit.corejs.javascript.ConstProperties
,org.htmlunit.corejs.javascript.debug.DebuggableObject
,org.htmlunit.corejs.javascript.Scriptable
,org.htmlunit.corejs.javascript.SymbolScriptable
A JavaScript object for
XSLTProcessor
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator
-
Field Summary
FieldsFields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static DomNode
findOutputNode
(DomNode xsltDomNode) getParameter
(String namespaceURI, String localName) Gets a parameter if previously set by setParameter.private static String
getQualifiedName
(String namespaceURI, String localName) void
importStylesheet
(Node style) Imports the specified stylesheet into this XSLTProcessor for transformations.void
JavaScript constructor.void
setParameter
(String namespaceURI, String localName, Object value) Sets a parameter to be used in subsequent transformations with this nsIXSLTProcessor.private Object
transformToDocument
(Node source) Transforms the node source applying the stylesheet given by the importStylesheet() function.transformToFragment
(Node source, Object output) Transforms the node source applying the stylesheet given by the importStylesheet() function.Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromise
Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
-
Field Details
-
style_
-
parameters_
-
-
Constructor Details
-
XSLTProcessor
public XSLTProcessor()Default constructor.
-
-
Method Details
-
jsConstructor
public void jsConstructor()JavaScript constructor. -
importStylesheet
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)
-
transformToDocument
Transforms the node source applying the stylesheet given by the importStylesheet() function. The owner document of the output node owns the returned document fragment.- Parameters:
source
- the node to be transformed- Returns:
- the result of the transformation
-
transform
-
transformToFragment
Transforms the node source applying the stylesheet given by the importStylesheet() function. The owner document of the output node owns the returned document fragment.- Parameters:
source
- the node to be transformedoutput
- This document is used to generate the output- Returns:
- the result of the transformation
-
setParameter
Sets a parameter to be used in subsequent transformations with this nsIXSLTProcessor. If the parameter doesn't exist in the stylesheet the parameter will be ignored.- Parameters:
namespaceURI
- the namespaceURI of the XSLT parameterlocalName
- the local name of the XSLT parametervalue
- the new value of the XSLT parameter
-
getParameter
Gets a parameter if previously set by setParameter. Returns null otherwise.- Parameters:
namespaceURI
- the namespaceURI of the XSLT parameterlocalName
- the local name of the XSLT parameter- Returns:
- the value of the XSLT parameter
-
getQualifiedName
-
findOutputNode
-