public class QNameParser
extends java.lang.Object
Constructor and Description |
---|
QNameParser(NamespaceResolver resolver) |
Modifier and Type | Method and Description |
---|---|
StructuredQName |
parse(java.lang.CharSequence lexicalName)
Make a structured QName from a lexical QName, using a supplied NamespaceResolver to
resolve the prefix.
|
void |
setAcceptEQName(boolean acceptEQName) |
void |
setDefaultNamespace(java.lang.String defaultNamespace) |
void |
setErrorOnBadSyntax(java.lang.String code) |
void |
setErrorOnUnresolvedPrefix(java.lang.String code) |
void |
setNamespaceResolver(NamespaceResolver resolver) |
void |
setUnescaper(XQueryParser.Unescaper unescaper) |
public QNameParser(NamespaceResolver resolver)
public void setNamespaceResolver(NamespaceResolver resolver)
public void setAcceptEQName(boolean acceptEQName)
public void setUnescaper(XQueryParser.Unescaper unescaper)
public void setDefaultNamespace(java.lang.String defaultNamespace)
public void setErrorOnBadSyntax(java.lang.String code)
public void setErrorOnUnresolvedPrefix(java.lang.String code)
public StructuredQName parse(java.lang.CharSequence lexicalName) throws XPathException
lexicalName
- the QName as a lexical name (prefix:local)XPathException
- if the namespace prefix is not in scope or if the value is lexically
invalid. Error code FONS0004 is set if the namespace prefix has not been declared; error
code FOCA0002 is set if the name is lexically invalid. These may need to be
changed on return depending on the caller's requirements.Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.