Package gnu.xquery.util
Class QNameUtils
java.lang.Object
gnu.xquery.util.QNameUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
localNameFromQName
(Object name) static String
lookupPrefix
(String prefix, NamespaceBinding constructorNamespaces, NamespaceBinding prologNamespaces) Search for a uri matching the given prefix.static Symbol
This implements thefn:QName
standard function.static Object
namespaceURIForPrefix
(Object prefix, Object element) static Object
namespaceURIFromQName
(Object name) static Object
prefixFromQName
(Object name) static String
resolvePrefix
(String prefix, NamespaceBinding constructorNamespaces, NamespaceBinding prologNamespaces) Search for a uri matching the given prefix.static Object
resolveQName
(Object qname, NamespaceBinding constructorNamespaces, NamespaceBinding prologNamespaces) Method called from compiled code to "cast" to a QName.static Object
resolveQNameUsingElement
(Object qname, KElement node) static Object
resolveURI
(Object relative, Object base) static boolean
validNCName
(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:QName
standard function. -
localNameFromQName
-
prefixFromQName
-
namespaceURIFromQName
-
namespaceURIForPrefix
-
resolveURI
- Throws:
URISyntaxException
-