Package gnu.xquery.util
Class NodeUtils
- java.lang.Object
-
- gnu.xquery.util.NodeUtils
-
public class NodeUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static SymbolcollectionResolverSymbolSymbol used to bind a collection resolver.
-
Constructor Summary
Constructors Constructor Description NodeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanavailableCached(Object uri, Object base)Check if an XML document is available, caching the result.static ObjectbaseUri(Object arg)static Objectcollection(Object uri, Object base)static voiddata$X(Object arg, CallContext ctx)static ObjectdocCached(Object uri, Object base)Parse an XML document, caching the result.static ObjectdocumentUri(Object arg)static StringgetLang(KNode node)static ObjectgetSavedCollection(Object uri)Default resolver for fn:collection.static ObjectgetSavedCollection(Object uri, Environment env)Default resolver for fn:collection.static voidid$X(Object arg1, Object arg2, CallContext ctx)static Objectidref(Object arg1, Object arg2)static voidinScopePrefixes$X(Object node, CallContext ctx)static booleanlang(Object testlang, Object node)static StringlocalName(Object node)static Stringname(Object node)static ObjectnamespaceURI(Object node)static Objectnilled(Object arg)static ObjectnodeName(Object node)static voidprefixesFromNodetype(XName name, Consumer out)static Objectroot(Object arg)Return the root node of the argument.static KDocumentrootDocument(Object arg)Return root node, coerced to a document node.static voidsetSavedCollection(Object uri, Object value)Add a uri-to-value binding that setSavedCollection can later return.static voidsetSavedCollection(Object uri, Object value, Environment env)Add a uri-to-value binding that setSavedCollection can later return.
-
-
-
Field Detail
-
collectionResolverSymbol
public static final Symbol collectionResolverSymbol
Symbol used to bind a collection resolver.
-
-
Method Detail
-
inScopePrefixes$X
public static void inScopePrefixes$X(Object node, CallContext ctx)
-
data$X
public static void data$X(Object arg, CallContext ctx)
-
rootDocument
public static KDocument rootDocument(Object arg)
Return root node, coerced to a document node. Used to implement '/'-rooted path expressions.
-
id$X
public static void id$X(Object arg1, Object arg2, CallContext ctx)
-
setSavedCollection
public static void setSavedCollection(Object uri, Object value, Environment env)
Add a uri-to-value binding that setSavedCollection can later return.
-
setSavedCollection
public static void setSavedCollection(Object uri, Object value)
Add a uri-to-value binding that setSavedCollection can later return.
-
getSavedCollection
public static Object getSavedCollection(Object uri, Environment env)
Default resolver for fn:collection. Return nodes previously bound using setSavedCollection.
-
getSavedCollection
public static Object getSavedCollection(Object uri)
Default resolver for fn:collection. Return nodes previously bound using setSavedCollection.
-
collection
public static Object collection(Object uri, Object base) throws Throwable
- Throws:
Throwable
-
docCached
public static Object docCached(Object uri, Object base) throws Throwable
Parse an XML document, caching the result. Only positive results are cached; failures are not.) This implements the standard XQueryfn:docfunction.- Throws:
Throwable
-
availableCached
public static boolean availableCached(Object uri, Object base) throws Throwable
Check if an XML document is available, caching the result. Only positive results are cached; failures are not. Thus it is possible for a false result to be followed by a true result, but not vice versa. This implements the standard XQueryfn:doc-availablefunction.- Throws:
Throwable
-
-