com.xmlcalabash.util
Class S9apiUtils
java.lang.Object
com.xmlcalabash.util.S9apiUtils
public class S9apiUtils
- extends java.lang.Object
- Author:
- ndw
Method Summary |
static void |
dumpTree(net.sf.saxon.s9api.XdmNode tree,
java.lang.String message)
|
static java.util.HashSet<java.lang.String> |
excludeInlinePrefixes(net.sf.saxon.s9api.XdmNode node,
java.lang.String prefixList)
|
static net.sf.saxon.s9api.XdmNode |
getDocumentElement(net.sf.saxon.s9api.XdmNode doc)
|
static boolean |
isDocument(net.sf.saxon.s9api.XdmNode doc)
|
static boolean |
isDocumentContent(net.sf.saxon.s9api.XdmSequenceIterator iter)
|
static net.sf.saxon.s9api.XdmNode |
removeNamespaces(net.sf.saxon.s9api.Processor proc,
net.sf.saxon.s9api.XdmNode node,
java.util.HashSet<java.lang.String> excludeNS,
boolean preserveUsed)
|
static net.sf.saxon.s9api.XdmNode |
removeNamespaces(XProcRuntime runtime,
net.sf.saxon.s9api.XdmNode node,
java.util.HashSet<java.lang.String> excludeNS,
boolean preserveUsed)
|
static void |
serialize(XProcRuntime xproc,
java.util.Vector<net.sf.saxon.s9api.XdmNode> nodes,
net.sf.saxon.s9api.Serializer serializer)
|
static void |
serialize(XProcRuntime xproc,
net.sf.saxon.s9api.XdmNode node,
net.sf.saxon.s9api.Serializer serializer)
|
static void |
writeXdmValue(net.sf.saxon.s9api.Processor proc,
java.util.Vector<net.sf.saxon.s9api.XdmValue> values,
net.sf.saxon.s9api.Destination destination,
java.net.URI baseURI)
|
static void |
writeXdmValue(XProcRuntime runtime,
java.util.Vector<net.sf.saxon.s9api.XdmValue> values,
net.sf.saxon.s9api.Destination destination,
java.net.URI baseURI)
Write an XdmValue to a given destination. |
static void |
writeXdmValue(XProcRuntime runtime,
net.sf.saxon.s9api.XdmItem node,
net.sf.saxon.s9api.Destination destination,
java.net.URI baseURI)
|
static org.xml.sax.InputSource |
xdmToInputSource(XProcRuntime runtime,
net.sf.saxon.s9api.XdmNode node)
|
static boolean |
xpathEqual(net.sf.saxon.s9api.Processor proc,
net.sf.saxon.s9api.XdmItem a,
net.sf.saxon.s9api.XdmItem b)
|
static boolean |
xpathSyntaxError(net.sf.saxon.s9api.SaxonApiException sae)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
S9apiUtils
public S9apiUtils()
writeXdmValue
public static void writeXdmValue(XProcRuntime runtime,
java.util.Vector<net.sf.saxon.s9api.XdmValue> values,
net.sf.saxon.s9api.Destination destination,
java.net.URI baseURI)
throws net.sf.saxon.s9api.SaxonApiException
- Write an XdmValue to a given destination. The sequence represented by the XdmValue is "normalized"
as defined in the serialization specification (this is equivalent to constructing a document node
in XSLT or XQuery with this sequence as the content expression), and the resulting document is
then copied to the destination. If the destination is a serializer this has the effect of serializing
the sequence as described in the W3C specifications.
- Parameters:
values
- the value to be writtendestination
- the destination to which the value is to be written
- Throws:
net.sf.saxon.s9api.SaxonApiException
writeXdmValue
public static void writeXdmValue(net.sf.saxon.s9api.Processor proc,
java.util.Vector<net.sf.saxon.s9api.XdmValue> values,
net.sf.saxon.s9api.Destination destination,
java.net.URI baseURI)
throws net.sf.saxon.s9api.SaxonApiException
- Throws:
net.sf.saxon.s9api.SaxonApiException
writeXdmValue
public static void writeXdmValue(XProcRuntime runtime,
net.sf.saxon.s9api.XdmItem node,
net.sf.saxon.s9api.Destination destination,
java.net.URI baseURI)
throws net.sf.saxon.s9api.SaxonApiException
- Throws:
net.sf.saxon.s9api.SaxonApiException
getDocumentElement
public static net.sf.saxon.s9api.XdmNode getDocumentElement(net.sf.saxon.s9api.XdmNode doc)
serialize
public static void serialize(XProcRuntime xproc,
net.sf.saxon.s9api.XdmNode node,
net.sf.saxon.s9api.Serializer serializer)
throws net.sf.saxon.s9api.SaxonApiException
- Throws:
net.sf.saxon.s9api.SaxonApiException
serialize
public static void serialize(XProcRuntime xproc,
java.util.Vector<net.sf.saxon.s9api.XdmNode> nodes,
net.sf.saxon.s9api.Serializer serializer)
throws net.sf.saxon.s9api.SaxonApiException
- Throws:
net.sf.saxon.s9api.SaxonApiException
xpathEqual
public static boolean xpathEqual(net.sf.saxon.s9api.Processor proc,
net.sf.saxon.s9api.XdmItem a,
net.sf.saxon.s9api.XdmItem b)
xdmToInputSource
public static org.xml.sax.InputSource xdmToInputSource(XProcRuntime runtime,
net.sf.saxon.s9api.XdmNode node)
throws net.sf.saxon.s9api.SaxonApiException
- Throws:
net.sf.saxon.s9api.SaxonApiException
excludeInlinePrefixes
public static java.util.HashSet<java.lang.String> excludeInlinePrefixes(net.sf.saxon.s9api.XdmNode node,
java.lang.String prefixList)
removeNamespaces
public static net.sf.saxon.s9api.XdmNode removeNamespaces(XProcRuntime runtime,
net.sf.saxon.s9api.XdmNode node,
java.util.HashSet<java.lang.String> excludeNS,
boolean preserveUsed)
removeNamespaces
public static net.sf.saxon.s9api.XdmNode removeNamespaces(net.sf.saxon.s9api.Processor proc,
net.sf.saxon.s9api.XdmNode node,
java.util.HashSet<java.lang.String> excludeNS,
boolean preserveUsed)
dumpTree
public static void dumpTree(net.sf.saxon.s9api.XdmNode tree,
java.lang.String message)
xpathSyntaxError
public static boolean xpathSyntaxError(net.sf.saxon.s9api.SaxonApiException sae)
isDocument
public static boolean isDocument(net.sf.saxon.s9api.XdmNode doc)
isDocumentContent
public static boolean isDocumentContent(net.sf.saxon.s9api.XdmSequenceIterator iter)