Home » saxonb9-1-0-5source » net.sf.saxon » [javadoc | source]
net.sf.saxon
public class: Controller [javadoc | source]
java.lang.Object
   javax.xml.transform.Transformer
      net.sf.saxon.Controller

Direct Known Subclasses:
    IdentityTransformer

The Controller is Saxon's implementation of the JAXP Transformer class, and represents an executing instance of a transformation or query. Multiple concurrent executions of the same transformation or query will use different Controller instances. This class is therefore not thread-safe.

The Controller is serially reusable, as required by JAXP: when one transformation or query is finished, it can be used to run another. However, there is no advantage in doing this rather than allocating a new Controller each time.

The Controller can also be used when running Java applications that use neither XSLT nor XQuery. A dummy Controller is created when running free-standing XPath expressions.

The Controller holds those parts of the dynamic context that do not vary during the course of a transformation or query, or that do not change once their value has been computed. This also includes those parts of the static context that are required at run-time.

Wherever possible XSLT applications should use the JAXP Transformer class directly, rather than relying on Saxon-specific methods in the Controller. However, some features are currently available only through this class. This applies especially to new features specific to XSLT 2.0, since the JAXP interface still supports only XSLT 1.0. Such methods may be superseded in the future by JAXP methods.

Many methods on the Controller are designed for internal use and should not be considered stable. From release 8.4 onwards, those methods that are considered sufficiently stable to constitute path of the Saxon public API are labelled with the JavaDoc tag "since": the value indicates the release at which the method was added to the public API.

Constructor:
 public Controller(Configuration config) 
    Create a Controller and initialise variables. Note: XSLT applications should create the Controller by using the JAXP newTransformer() method, or in S9API by using XsltExecutable.load()
    Parameters:
    config - The Configuration used by this Controller
 public Controller(Configuration config,
    Executable executable) 
    Create a Controller and initialise variables.
    Parameters:
    config - The Configuration used by this Controller
    executable - The executable used by this Controller
Method from net.sf.saxon.Controller Summary:
addTraceListener,   addUnavailableOutputDestination,   allocateGlobalVariables,   allocateSequenceOutputter,   checkImplicitResultTree,   checkUniqueOutputDestination,   clearDocumentPool,   clearParameters,   defineGlobalParameters,   getBaseOutputURI,   getBindery,   getClassLoader,   getConfiguration,   getContextForGlobalVariables,   getCookedBaseOutputURI,   getCurrentDateTime,   getDocumentPool,   getErrorListener,   getExecutable,   getImplicitTimezone,   getInitialContextItem,   getInitialMode,   getInitialTemplate,   getKeyManager,   getMessageEmitter,   getNamePool,   getOutputProperties,   getOutputProperty,   getOutputURIResolver,   getParameter,   getPathMapForDocumentProjection,   getPrincipalResult,   getRecoveryPolicy,   getRememberedNumber,   getRuleManager,   getSchemaURIResolver,   getStandardURIResolver,   getTraceFunctionDestination,   getTraceListener,   getTreeModel,   getURIResolver,   getUnparsedTextURIResolver,   getUserData,   hasThereBeenAnExplicitResultDocument,   initializeController,   isTracing,   isUnusedOutputDestination,   iterateParameters,   makeBuilder,   makeCharacterMapExpander,   makePipelineConfiguration,   makeStripper,   newXPathContext,   pauseTracing,   preEvaluateGlobals,   prepareInputTree,   prepareNextStylesheet,   recoverableError,   registerDocument,   removeTraceListener,   removeUnavailableOutputDestination,   reportFatalError,   reset,   reuseSequenceOutputter,   setBaseOutputURI,   setClassLoader,   setCurrentDateTime,   setErrorListener,   setExecutable,   setInitialContextItem,   setInitialMode,   setInitialTemplate,   setMessageEmitter,   setOutputProperties,   setOutputProperty,   setOutputURIResolver,   setParameter,   setParameter,   setPreparedStylesheet,   setPrincipalSourceDocument,   setRecoveryPolicy,   setRememberedNumber,   setRuleManager,   setSchemaURIResolver,   setThereHasBeenAnExplicitResultDocument,   setTraceFunctionDestination,   setTreeModel,   setURIResolver,   setUnparsedTextURIResolver,   setUseDocumentProjection,   setUserData,   transform,   transformDocument,   unravel
Methods from javax.xml.transform.Transformer:
clearParameters,   getErrorListener,   getOutputProperties,   getOutputProperty,   getParameter,   getURIResolver,   reset,   setErrorListener,   setOutputProperties,   setOutputProperty,   setParameter,   setURIResolver,   transform
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from net.sf.saxon.Controller Detail:
 public  void addTraceListener(TraceListener trace) 
    Adds the specified trace listener to receive trace events from this instance. Note that although TraceListeners can be added or removed dynamically, this has no effect unless the stylesheet or query has been compiled with tracing enabled. This is achieved by calling Configuration#setTraceListener or by setting the attribute FeatureKeys#TRACE_LISTENER on the TransformerFactory. Conversely, if this property has been set in the Configuration or TransformerFactory, the TraceListener will automatically be added to every Controller that uses that Configuration.
 public  void addUnavailableOutputDestination(String uri) 
    Add a URI to the set of output destinations that cannot be written to, either because they have already been written to, or because they have been read
 public  void allocateGlobalVariables(int numberOfVariables) 
    Allocate space in the bindery for global variables.

    For internal use only.

 public SequenceOutputter allocateSequenceOutputter(int size) 
    Allocate a SequenceOutputter for a new output destination. Reuse the existing one if it is available for reuse (this is designed to ensure that the TinyTree structure is also reused, creating a forest of trees all sharing the same data structure)
 public  void checkImplicitResultTree() throws XPathException 
    Check whether an XSLT implicit result tree can be written. This is allowed only if no xsl:result-document has been written for the principal output URI
 public boolean checkUniqueOutputDestination(String uri) 
    Check that an output destination has not been used before, optionally adding this URI to the set of URIs that have been used.
 public  void clearDocumentPool() 
    Clear the document pool. This is sometimes useful when re-using the same Transformer for a sequence of transformations, but it isn't done automatically, because when the transformations use common look-up documents, the caching is beneficial.
 public  void clearParameters() 
    Reset the parameters to a null list.
 public  void defineGlobalParameters() throws XPathException 
    Register the global parameters of the transformation or query. This should be called after a sequence of calls on #setParameter . It checks that all required parameters have been supplied, and places the values of the parameters in the Bindery to make them available for use during the query or transformation.

    This method is intended for internal use only

 public String getBaseOutputURI() 
    Get the base output URI. This defaults to the system ID of the principal Result object, but a different value can be set for use where there is no principal result. The command line interface sets this to the current working directory.

    The concept of the base output URI is new in XSLT 2.0: it defines the base URI for resolving relative URIs in the href attribute of the xsl:result-document instruction. This method may be superseded by a standard JAXP method when JAXP is updated to support XSLT 2.0.

 public Bindery getBindery() 
    Get the current bindery.

    This method is intended for internal use only.

 public ClassLoader getClassLoader() 
    Get the ClassLoader supplied using the method #setClassLoader . If none has been supplied, return null.

    This method is for application use, but is experimental and subject to change.

 public Configuration getConfiguration() 
    Get the Configuration associated with this Controller. The Configuration holds settings that potentially apply globally to many different queries and transformations.
 public Item getContextForGlobalVariables() 
    Get the item used as the context for evaluating global variables. In XQuery this is the same as the initial context item; in XSLT it is the root of the tree containing the initial context node.
 public String getCookedBaseOutputURI() 
    Get the base output URI after processing. The processing consists of (a) defaulting to the current user directory if no base URI is available and if the stylesheet is trusted, and (b) applying IRI-to-URI escaping
 public DateTimeValue getCurrentDateTime() 
    Get the current date and time for this query or transformation. All calls during one transformation return the same answer.
 public DocumentPool getDocumentPool() 
    Get the document pool. This is used only for source documents, not for stylesheet modules.

    This method is intended for internal use only.

 public ErrorListener getErrorListener() 
    Get the error listener.
 public Executable getExecutable() 
    Get the Executable object.

    This method is intended for internal use only.

 public int getImplicitTimezone() 
    Get the implicit timezone for this query or transformation
 public Item getInitialContextItem() 
    Get the initial context item. This returns the item (often a document node) previously supplied to the #setInitialContextItem method, or the initial context node set implicitly using methods such as #transform .
 public String getInitialMode() 
    Get the initial mode for the transformation
 public String getInitialTemplate() 
    Get the initial template
 public KeyManager getKeyManager() 
    Get the KeyManager.

    This method is intended for internal use only.

 public Receiver getMessageEmitter() 
    Get the Emitter used for xsl:message output. This returns the emitter previously supplied to the #setMessageEmitter method, or the default message emitter otherwise.
 public NamePool getNamePool() 
    Get the name pool in use. The name pool is responsible for mapping QNames used in source documents and compiled stylesheets and queries into numeric codes. All source documents used by a given transformation or query must use the same name pool as the compiled stylesheet or query.
 public Properties getOutputProperties() 
    Get the output properties for the transformation.

    As well as the properties defined in the JAXP OutputKeys class, Saxon defines an additional set of properties in SaxonOutputKeys . These fall into two categories: Constants representing serialization properties defined in XSLT 2.0 (which are not yet supported by JAXP), and constants supporting Saxon extensions to the set of serialization properties.

 public String getOutputProperty(String name) 
    Get the value of an output property.

    As well as the properties defined in the JAXP OutputKeys class, Saxon defines an additional set of properties in SaxonOutputKeys . These fall into two categories: Constants representing serialization properties defined in XSLT 2.0 (which are not yet supported by JAXP), and constants supporting Saxon extensions to the set of serialization properties.

 public OutputURIResolver getOutputURIResolver() 
    Get the output URI resolver.
 public Object getParameter(String expandedName) 
    Get a parameter to the transformation. This returns the value of a parameter that has been previously set using the #setParameter method. The value is returned exactly as supplied, that is, before any conversion to an XPath value.
 public PathMap getPathMapForDocumentProjection() 
    Get the path map used for document projection, if any.
 public Result getPrincipalResult() 
    Get the principal result destination.

    This method is intended for internal use only. It is typically called by Saxon during the course of a transformation, to discover the result that was supplied in the transform() call.

 public int getRecoveryPolicy() 
    Get the policy for handling recoverable errors
 public int getRememberedNumber(NodeInfo node) 
    Get the number of a node if it is the last remembered one.

    This method is strictly for internal use only.

 public RuleManager getRuleManager() 
    Get the Rule Manager.

    This method is intended for internal use only.

 public SchemaURIResolver getSchemaURIResolver() 
    Get the SchemaURIResolver used for resolving references to schema documents. If none has been set on the Controller, returns the SchemaURIResolver registered with the Configuration
 public URIResolver getStandardURIResolver() 
    Get the fallback URI resolver. This is the URIResolver that Saxon uses when the user-supplied URI resolver returns null.

    This method is intended for internal use only.

 public PrintStream getTraceFunctionDestination() 
    Get the destination for output from the fn:trace() function.
 public TraceListener getTraceListener() 
    Get the TraceListener. By default, there is no TraceListener, and this method returns null. A TraceListener may be added using the method #addTraceListener . If more than one TraceListener has been added, this method will return a composite TraceListener. Because this form this takes is implementation-dependent, this method is not part of the stable Saxon public API.
 public int getTreeModel() 
    Get the tree data model to use. This affects all source documents subsequently constructed using a Builder obtained from this Controller. This includes a document built from a StreamSource or SAXSource supplied as a parameter to the #transform method.
 public URIResolver getURIResolver() 
    Get the URI resolver.

    This method changed in Saxon 8.5, to conform to the JAXP specification. If there is no user-specified URIResolver, it now returns null; previously it returned the system default URIResolver.

 public UnparsedTextURIResolver getUnparsedTextURIResolver() 
    Get the URI resolver for the unparsed-text() function. This will return the UnparsedTextURIResolver previously set using the #setUnparsedTextURIResolver method.
 public Object getUserData(Object key,
    String name) 
    Get user data associated with a key. To retrieve user data, two objects are required: an arbitrary object that may be regarded as the container of the data (originally, and typically still, a node in a tree), and a name. The name serves to distingush data objects associated with the same node by different client applications.

    This method is intended primarily for internal use, though it may also be used by advanced applications.

 public boolean hasThereBeenAnExplicitResultDocument() 
    Test whether an explicit result tree has been written using xsl:result-document
 public  void initializeController() throws XPathException 
    Initialize the controller ready for a new transformation. This method should not normally be called by users (it is done automatically when transform() is invoked). However, it is available as a low-level API especially for use with XQuery.
 public final boolean isTracing() 
    Test whether instruction execution is being traced. This will be true if (a) at least one TraceListener has been registered using the #addTraceListener method, and (b) tracing has not been temporarily paused using the #pauseTracing method.
 public boolean isUnusedOutputDestination(String uri) 
    Determine whether an output URI is available for use. This method is intended for use by applications, via an extension function.
 public Iterator iterateParameters() 
    Get an iterator over the names of global parameters that have been defined
 public Builder makeBuilder() 
    Make a builder for the selected tree model.
 public CharacterMapExpander makeCharacterMapExpander(String useMaps,
    SerializerFactory sf) throws XPathException 
    Make a CharacterMapExpander to handle the character map definitions in the serialization properties.

    This method is intended for internal use only.

 public PipelineConfiguration makePipelineConfiguration() 
    Make a PipelineConfiguration based on the properties of this Controller.

    This interface is intended primarily for internal use, although it may be necessary for applications to call it directly if they construct pull or push pipelines

 public Stripper makeStripper(Receiver b) 
    Make a Stripper configured to implement the whitespace stripping rules. In the case of XSLT the whitespace stripping rules are normally defined by xsl:strip-space and xsl:preserve-spaceConfiguration#setStripsAllWhiteSpace(boolean) .
 public XPathContextMajor newXPathContext() 
    Make an XPathContext object for expression evaluation.

    This method is intended for internal use.

 public final  void pauseTracing(boolean pause) 
    Pause or resume tracing. While tracing is paused, trace events are not sent to any of the registered TraceListeners.
 public  void preEvaluateGlobals(XPathContext context) throws XPathException 
    Pre-evaluate global variables (when debugging/tracing).

    This method is intended for internal use.

 public NodeInfo prepareInputTree(Source source) 
    Prepare an input tree for processing. This is used when either the initial input, or a Source returned by the document() function, is a NodeInfo or a DOMSource. The preparation consists of wrapping a DOM document inside a wrapper that implements the NodeInfo interface, and/or adding a space-stripping wrapper if the stylesheet strips whitespace nodes.

    This method is intended for internal use.

 public Result prepareNextStylesheet(String href,
    String baseURI,
    Result result) throws TransformerException 
    Prepare another stylesheet to handle the output of this one.

    This method is intended for internal use, to support the saxon:next-in-chain extension.

 public  void recoverableError(XPathException err) throws XPathException 
    Report a recoverable error. This is an XSLT concept: by default, such an error results in a warning message, and processing continues. In XQuery, however, there are no recoverable errors so a fatal error is reported.

    This method is intended for internal use only.

 public  void registerDocument(DocumentInfo doc,
    String systemId) 
    Add a document to the document pool.

    This method is intended for internal use only.

 public  void removeTraceListener(TraceListener trace) 
    Removes the specified trace listener so that the listener will no longer receive trace events.
 public  void removeUnavailableOutputDestination(String uri) 
    Remove a URI from the set of output destinations that cannot be written to or read from. Used to support saxon:discard-document()
 public  void reportFatalError(XPathException err) 
    Report a fatal error
 public  void reset() 
 public  void reuseSequenceOutputter(SequenceOutputter out) 
    Accept a SequenceOutputter that is now available for reuse
 public  void setBaseOutputURI(String uri) 
    Set the base output URI. This defaults to the system ID of the principal Result object, but a different value can be set for use where there is no principal result. The command line interface sets this to the current working directory.

    The concept of the base output URI is new in XSLT 2.0: it defines the base URI for resolving relative URIs in the href attribute of the xsl:result-document instruction. This method may be superseded by a standard JAXP method when JAXP is updated to support XSLT 2.0.

 public  void setClassLoader(ClassLoader loader) 
    Set a ClassLoader to be used when loading external classes. Examples of classes that are loaded include SAX parsers, localization modules for formatting numbers and dates, extension functions, external object models. In an environment such as Eclipse that uses its own ClassLoader, this ClassLoader should be nominated to ensure that any class loaded by Saxon is identical to a class of the same name loaded by the external environment.

    This method is for application use, but is experimental and subject to change.

 public  void setCurrentDateTime(DateTimeValue dateTime) throws XPathException 
    Set the current date and time for this query or transformation. This method is provided primarily for testing purposes, to allow tests to be run with a fixed date and time. The supplied date/time must include a timezone, which is used as the implicit timezone.

    Note that comparisons of date/time values currently use the implicit timezone taken from the system clock, not from the value supplied here.

 public  void setErrorListener(ErrorListener listener) 
    Set the error listener.
 public  void setExecutable(Executable exec) 
    Associate this Controller with an Executable. This method is used by the XQuery processor. The Executable object is overkill in this case - the only thing it currently holds are copies of the collation table.

    This method is intended for internal use only

 public  void setInitialContextItem(Item item) 
    Set the initial context item.

    When a transformation is invoked using the #transform method, the initial context node is set automatically. This method is useful in XQuery, to define an initial context node for evaluating global variables, and also in XSLT 2.0, when the transformation is started by invoking a named template.

    When an initial context item is set, it also becomes the context item used for evaluating global variables. The two context items can only be different when the #transform method is used to transform a document starting at a node other than the root.

    In XQuery, the two context items are always the same; in XSLT, the context node for evaluating global variables is the root of the tree containing the initial context item.

 public  void setInitialMode(String expandedModeName) 
    Set the initial mode for the transformation.

    XSLT 2.0 allows a transformation to be started in a mode other than the default mode. The transformation then starts by looking for the template rule in this mode that best matches the initial context node.

    This method may eventually be superseded by a standard JAXP method.

 public  void setInitialTemplate(String expandedName) throws XPathException 
    Set the initial named template to be used as the entry point.

    XSLT 2.0 allows a transformation to start by executing a named template, rather than by matching an initial context node in a source document. This method may eventually be superseded by a standard JAXP method once JAXP supports XSLT 2.0.

    Note that any parameters supplied using #setParameter are used as the values of global stylesheet parameters. There is no way to supply values for local parameters of the initial template.

 public  void setMessageEmitter(Receiver receiver) 
    Set the Receiver to be used for xsl:message output.

    Recent versions of the JAXP interface specify that by default the output of xsl:message is sent to the registered ErrorListener. Saxon does not yet implement this convention. Instead, the output is sent to a default message emitter, which is a slightly customised implementation of the standard Saxon Emitter interface.

    This interface can be used to change the way in which Saxon outputs xsl:message output.

    It is not necessary to use this interface in order to change the destination to which messages are written: that can be achieved by obtaining the standard message emitter and calling its Emitter#setWriter method.

    Although any Receiver can be supplied as the destination for messages, applications may find it convenient to implement a subclass of net.sf.saxon.event.SequenceWriter , in which only the abstract write() method is implemented. This will have the effect that the write() method is called to output each message as it is generated, with the Item that is passed to the write() method being the document node at the root of an XML document containing the contents of the message.

    This method is intended for use by advanced applications. The Receiver interface itself is subject to change in new Saxon releases.

    The supplied Receiver will have its open() method called once at the start of the transformation, and its close() method will be called once at the end of the transformation. Each individual call of an xsl:message instruction is wrapped by calls of startDocument() and endDocument(). If terminate="yes" is specified on the xsl:message call, the properties argument of the startDocument() call will be set to the value ReceiverOptions#TERMINATE .

 public  void setOutputProperties(Properties properties) 
    Set the output properties for the transformation. These properties will override properties set in the templates with xsl:output.

    As well as the properties defined in the JAXP OutputKeys class, Saxon defines an additional set of properties in SaxonOutputKeys . These fall into two categories: Constants representing serialization properties defined in XSLT 2.0 (which are not yet supported by JAXP), and constants supporting Saxon extensions to the set of serialization properties.

 public  void setOutputProperty(String name,
    String value) 
    Set an output property for the transformation.

    As well as the properties defined in the JAXP OutputKeys class, Saxon defines an additional set of properties in SaxonOutputKeys . These fall into two categories: Constants representing serialization properties defined in XSLT 2.0 (which are not yet supported by JAXP), and constants supporting Saxon extensions to the set of serialization properties.

 public  void setOutputURIResolver(OutputURIResolver resolver) 
    Set the URI resolver for secondary output documents.

    XSLT 2.0 introduces the xsl:result-document This method may eventually be superseded by a standard JAXP method.

 public  void setParameter(String expandedName,
    Object value) 
    Set a parameter for the transformation.

    The following table shows some of the classes that are supported by this method. (Others may also be supported, but continued support is not guaranteed.) Each entry in the table shows first the Java class of the supplied object, and then the type of the resulting XPath value.

    Java ClassXPath 2.0 type
    Stringxs:string
    Booleanxs:boolean
    Integerxs:integer
    Longxs:integer
    Doublexs:double
    Floatxs:float
    BigDecimalxs:decimal
    BigIntegerxs:integer
    Datexs:dateTime
    Array or List of any of the abovesequence of the above
    nullempty sequence

    A node may be supplied as a NodeInfo object, a sequence of nodes as an array or List of NodeInfo objects.

    In addition, any object that implements the Saxon net.sf.saxon.value.Value interface may be supplied, and will be used without conversion.

    A node belong to an external object model (such as DOM, JDOM, or XOM) may be supplied provided (a) that the external object model is registered with the Configuration, and (b) that the node is part of a document tree that has been registered in the document pool.

 public  void setParameter(StructuredQName qName,
    ValueRepresentation value) 
    Supply a parameter using Saxon-specific representations of the name and value
 public  void setPreparedStylesheet(PreparedStylesheet sheet) 
    Associate this Controller with a compiled stylesheet.

    This method is intended for internal use only.

 public  void setPrincipalSourceDocument(DocumentInfo doc) 
Deprecated! From - Saxon 8.7, replaced by #setInitialContextItem(Item)

    Set the initial context node (used for evaluating global variables). When a transformation is invoked using the #transform method, the initial context node is set automatically. This method is useful in XQuery, to define an initial context node for evaluating global variables, and also in XSLT 2.0, when the transformation is started by invoking a named template.
 public  void setRecoveryPolicy(int policy) 
    Set the policy for handling recoverable errrors
 public  void setRememberedNumber(NodeInfo node,
    int number) 
    Set the last remembered node, for node numbering purposes.

    This method is strictly for internal use only.

 public  void setRuleManager(RuleManager r) 
    Set the RuleManager, used to manage template rules for each mode.

    This method is intended for internal use only.

 public  void setSchemaURIResolver(SchemaURIResolver resolver) 
    Set the SchemaURIResolver used for resolving references to schema documents. Defaults to the SchemaURIResolver registered with the Configuration
 public  void setThereHasBeenAnExplicitResultDocument() 
    Set that an explicit result tree has been written using xsl:result-document
 public  void setTraceFunctionDestination(PrintStream stream) 
    Set the destination for output from the fn:trace() function. By default, the destination is System.err. If a TraceListener is in use, this is ignored, and the trace() output is sent to the TraceListener.
 public  void setTreeModel(int model) 
    Set the tree data model to use. This affects all source documents subsequently constructed using a Builder obtained from this Controller. This includes a document built from a StreamSource or SAXSource supplied as a parameter to the #transform method.
 public  void setURIResolver(URIResolver resolver) 
    Set an object that will be used to resolve URIs used in document(), etc.
 public  void setUnparsedTextURIResolver(UnparsedTextURIResolver resolver) 
    Set an UnparsedTextURIResolver to be used to resolve URIs passed to the XSLT unparsed-text() function.
 public  void setUseDocumentProjection(PathMap pathMap) 
    Indicate whether document projection should be used, and supply the PathMap used to control it. Note: this is available only under Saxon-SA.
 public  void setUserData(Object key,
    String name,
    Object data) 
    Set user data associated with a key. To store user data, two objects are required: an arbitrary object that may be regarded as the container of the data (originally, and typically still, a node in a tree), and a name. The name serves to distingush data objects associated with the same node by different client applications.

    This method is intended primarily for internal use, though it may also be used by advanced applications.

 public  void transform(Source source,
    Result result) throws TransformerException 
    Perform a transformation from a Source document to a Result document.
 public  void transformDocument(NodeInfo startNode,
    Result result) throws TransformerException 
    Transform a source XML document supplied as a tree.

    This method is intended for internal use. External applications should use the #transform method, which is part of the JAXP interface. Note that NodeInfo implements the JAXP Source interface, so it may be supplied directly to the transform() method.

 public static NodeInfo unravel(Source source,
    Configuration config) 
Deprecated! since - 9.0: use Configuration#unravel

    Get a NodeInfo corresponding to a DOM Node, either by wrapping or unwrapping the DOM Node.

    This method is intended for internal use.