public final class XmlString
extends java.lang.Object
In a general case, text (PCDATA/attributes) that appear in XML schema cannot be correctly interpreted unless you also have in-scope namespace binding (a case in point is QName.) Therefore, it's convenient to handle the lexical representation and the in-scope namespace binding in a pair.
Modifier and Type | Field and Description |
---|---|
org.relaxng.datatype.ValidationContext |
context
Used to resole in-scope namespace bindings.
|
private static org.relaxng.datatype.ValidationContext |
NULL_CONTEXT |
java.lang.String |
value
Textual value.
|
Constructor and Description |
---|
XmlString(java.lang.String value)
Creates a new
XmlString with empty in-scope namespace bindings. |
XmlString(java.lang.String value,
org.relaxng.datatype.ValidationContext context)
Creates a new
XmlString from a lexical representation and in-scope namespaces. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
resolvePrefix(java.lang.String prefix)
Resolves a namespace prefix to the corresponding namespace URI.
|
java.lang.String |
toString() |
public final java.lang.String value
public final org.relaxng.datatype.ValidationContext context
private static final org.relaxng.datatype.ValidationContext NULL_CONTEXT
public XmlString(java.lang.String value, org.relaxng.datatype.ValidationContext context)
XmlString
from a lexical representation and in-scope namespaces.public XmlString(java.lang.String value)
XmlString
with empty in-scope namespace bindings.public final java.lang.String resolvePrefix(java.lang.String prefix)
value
(such as when value
represents a QName type.)
If the prefix is "" (empty string), the method returns the default namespace URI.
If the prefix is "xml", then the method returns "http://www.w3.org/XML/1998/namespace", as defined in the XML Namespaces Recommendation.
public java.lang.String toString()
toString
in class java.lang.Object