Package gnu.xquery.util
Class QNameUtils
java.lang.Object
gnu.xquery.util.QNameUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectlocalNameFromQName(Object name) static StringlookupPrefix(String prefix, NamespaceBinding constructorNamespaces, NamespaceBinding prologNamespaces) Search for a uri matching the given prefix.static SymbolThis implements thefn:QNamestandard function.static ObjectnamespaceURIForPrefix(Object prefix, Object element) static ObjectnamespaceURIFromQName(Object name) static ObjectprefixFromQName(Object name) static StringresolvePrefix(String prefix, NamespaceBinding constructorNamespaces, NamespaceBinding prologNamespaces) Search for a uri matching the given prefix.static ObjectresolveQName(Object qname, NamespaceBinding constructorNamespaces, NamespaceBinding prologNamespaces) Method called from compiled code to "cast" to a QName.static ObjectresolveQNameUsingElement(Object qname, KElement node) static ObjectresolveURI(Object relative, Object base) static booleanvalidNCName(String name)
-
Constructor Details
-
QNameUtils
public QNameUtils()
-
-
Method Details
-
resolveQNameUsingElement
-
resolveQName
public static Object resolveQName(Object qname, NamespaceBinding constructorNamespaces, NamespaceBinding prologNamespaces) Method called from compiled code to "cast" to a QName.- Parameters:
qname- The value to cast to QName.constructorNamespaces- Namespace bindings from namespace attributes in direct element constructors.prologNamespaces- Namespac bindings from query prolog, as well as builtin namespace prefixes.
-
lookupPrefix
public static String lookupPrefix(String prefix, NamespaceBinding constructorNamespaces, NamespaceBinding prologNamespaces) Search for a uri matching the given prefix.- Returns:
- uri or null if there is no binding for prefix.
-
resolvePrefix
public static String resolvePrefix(String prefix, NamespaceBinding constructorNamespaces, NamespaceBinding prologNamespaces) Search for a uri matching the given prefix. Throw exception if there is no binding and the prefix is non-empty. -
validNCName
-
makeQName
This implements thefn:QNamestandard function. -
localNameFromQName
-
prefixFromQName
-
namespaceURIFromQName
-
namespaceURIForPrefix
-
resolveURI
- Throws:
URISyntaxException
-