public class DOM4JDocumentWrapper extends GenericTreeInfo implements ActiveSource
root
Constructor and Description |
---|
DOM4JDocumentWrapper(org.dom4j.Document doc,
java.lang.String baseURI,
Configuration config)
Create a Saxon wrapper for a dom4j document
|
Modifier and Type | Method and Description |
---|---|
void |
deliver(Receiver receiver,
ParseOptions options)
Implement ActiveSource by delivering the document to a supplied receiver
|
static org.dom4j.Branch |
searchForParent(org.dom4j.Branch subtree,
org.dom4j.Node node)
DOM4J does not guarantee to provide the parent of a node, but XDM requires this.
|
NodeInfo |
selectID(java.lang.String id,
boolean getParent)
Get the element with a given ID, if any
|
NodeInfo |
wrap(org.dom4j.Node node)
Wrap a node in the dom4j document.
|
getConfiguration, getDocumentNumber, getPublicId, getRootNode, getSpaceStrippingRule, getSystemId, getUnparsedEntity, getUnparsedEntityNames, getUserData, isStreamed, setConfiguration, setDocumentNumber, setRootNode, setSpaceStrippingRule, setSystemId, setUserData
public DOM4JDocumentWrapper(org.dom4j.Document doc, java.lang.String baseURI, Configuration config)
doc
- The dom4j documentbaseURI
- The base URI for all the nodes in the documentconfig
- The Saxon configurationpublic void deliver(Receiver receiver, ParseOptions options) throws XPathException
deliver
in interface ActiveSource
receiver
- the receiver to which events representing the parsed XML document will be sentoptions
- options for parsing the sourceXPathException
- if things don't work outpublic NodeInfo wrap(org.dom4j.Node node)
node
- The node to be wrapped. This must be a node in the same document
(the system does not check for this).public NodeInfo selectID(java.lang.String id, boolean getParent)
selectID
in interface TreeInfo
selectID
in class GenericTreeInfo
id
- the required ID valuegetParent
- true if the parent of the element having ID type is requiredpublic static org.dom4j.Branch searchForParent(org.dom4j.Branch subtree, org.dom4j.Node node)
subtree
- the root of a subtree to be searchednode
- a node to be sought within this subtreeCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.