java.lang.Object
org.htmlunit.corejs.javascript.SlotMapOwner<org.htmlunit.corejs.javascript.Scriptable>
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.Scriptable>,org.htmlunit.corejs.javascript.debug.DebuggableObject,org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable,org.htmlunit.corejs.javascript.SymbolScriptable
JavaScript host object for
XSLTProcessor.- Author:
- Ahmed Ashour, Ronald Brill, MatrixNeoKozak (matrixneo2026@tutamail.com)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.ScriptableObject.DescriptorInfo, org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator, org.htmlunit.corejs.javascript.ScriptableObject.LambdaGetterFunction, org.htmlunit.corejs.javascript.ScriptableObject.LambdaSetterFunction -
Field Summary
Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from class org.htmlunit.corejs.javascript.SlotMapOwner
isSealedFields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetParameter(String namespaceURI, String localName) Returns a parameter previously set bysetParameter(java.lang.String, java.lang.String, java.lang.Object), ornullif not set.voidimportStylesheet(Node style) Imports the specified stylesheet into thisXSLTProcessorfor transformations.voidCreates an instance of this object.voidsetParameter(String namespaceURI, String localName, Object value) Sets a parameter to be used in subsequent transformations with thisXSLTProcessor.transformToDocument(Node source) Transforms the given source node by applying the stylesheet imported viaimportStylesheet(org.htmlunit.javascript.host.dom.Node).transformToFragment(Node source, Object output) Transforms the given source node by applying the imported stylesheet and appends the result as children of the given output document fragment.Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getWindow, getWindow, getWindowOrWorkerGlobalScope, getWithPreemption, has, hasInstance, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setupPromise, setupRejectedPromiseMethods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkNotSealed, checkPropertyChangeForSlot, checkPropertyChangeForSlot, checkPropertyDefinition, checkPropertyDefinition, checkSlotRemoval, defineBuiltinProperty, defineBuiltinProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, get, get, getAllIds, getAncestor, getArrayPrototype, getClassPrototype, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getThis, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, hasProperty, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGenericDescriptor, isGetterOrSetter, isGetterOrSetter, isTrue, preventExtensions, put, put, putConst, putConstProperty, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, redefineProperty, sameValue, sealObject, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, sizeMethods inherited from class org.htmlunit.corejs.javascript.SlotMapOwner
associateValue, checkNotSealed, copyAssociatedValue, createSlotMap, defineProperty, defineProperty, get, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getIds, has, has, isSealed, readMaps, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, writeMapsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.htmlunit.corejs.javascript.Scriptable
get, getIds, has, hasMethods inherited from interface org.htmlunit.corejs.javascript.SymbolScriptable
get, has
-
Constructor Details
-
XSLTProcessor
public XSLTProcessor()
-
-
Method Details
-
jsConstructor
public void jsConstructor()Creates an instance of this object. -
importStylesheet
Imports the specified stylesheet into thisXSLTProcessorfor 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 an XSLT stylesheet or an LRE stylesheet. If it is an element node, it must be thexsl:stylesheet(orxsl: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 given source node by applying the stylesheet imported viaimportStylesheet(org.htmlunit.javascript.host.dom.Node). The owner document of the output node owns the returned document.- Parameters:
source- the node to be transformed- Returns:
- the transformation result as an
XMLDocument
-
transformToFragment
Transforms the given source node by applying the imported stylesheet and appends the result as children of the given output document fragment.- Parameters:
source- the node to be transformedoutput- theDocumentwhose owner document is used to generate the output- Returns:
- the transformation result as a
DocumentFragment
-
setParameter
Sets a parameter to be used in subsequent transformations with thisXSLTProcessor. If the parameter does not exist in the stylesheet it will be ignored.- Parameters:
namespaceURI- the namespace URI of the XSLT parameterlocalName- the local name of the XSLT parametervalue- the new value of the XSLT parameter
-
getParameter
Returns a parameter previously set bysetParameter(java.lang.String, java.lang.String, java.lang.Object), ornullif not set.- Parameters:
namespaceURI- the namespace URI of the XSLT parameterlocalName- the local name of the XSLT parameter- Returns:
- the value of the XSLT parameter, or
nullif not found
-