public class QNameParser extends Object
Constructor and Description |
---|
QNameParser(NamespaceResolver resolver) |
Modifier and Type | Method and Description |
---|---|
StructuredQName |
parse(CharSequence lexicalName)
Make a structured QName from a lexical QName, using a supplied NamespaceResolver to
resolve the prefix.
|
void |
setAcceptEQName(boolean acceptEQName) |
void |
setDefaultNamespace(String defaultNamespace) |
void |
setErrorOnBadSyntax(String code) |
void |
setErrorOnUnresolvedPrefix(String code) |
void |
setNamespaceResolver(NamespaceResolver resolver) |
public QNameParser(NamespaceResolver resolver)
public void setNamespaceResolver(NamespaceResolver resolver)
public void setAcceptEQName(boolean acceptEQName)
public void setDefaultNamespace(String defaultNamespace)
public void setErrorOnBadSyntax(String code)
public void setErrorOnUnresolvedPrefix(String code)
public StructuredQName parse(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-2014 Saxonica Limited. All rights reserved.