public interface SimpleType extends SchemaType
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION, DERIVE_BY_SUBSTITUTION
COMPONENT_FUNCTION_TYPE, FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING
Modifier and Type | Method and Description |
---|---|
SchemaType |
getBuiltInBaseType()
Get the built-in type from which this type is derived by restriction
|
AtomicSequence |
getTypedValue(java.lang.CharSequence value,
NamespaceResolver resolver,
ConversionRules rules)
Get the typed value corresponding to a given string value, assuming it is
valid against this type
|
int |
getWhitespaceAction()
Determine how values of this simple type are whitespace-normalized.
|
boolean |
isAtomicType()
Test whether this Simple Type is an atomic type
|
boolean |
isBuiltInType()
Determine whether this is a built-in type or a user-defined type
|
boolean |
isExternalType()
Return true if this is an external object type, that is, a Saxon-defined type for external
Java or .NET objects
|
boolean |
isListType()
Test whether this Simple Type is a list type
|
boolean |
isNamespaceSensitive()
Test whether this type is namespace sensitive, that is, if a namespace context is needed
to translate between the lexical space and the value space.
|
boolean |
isUnionType()
Test whether this Simple Type is a union type
|
java.lang.CharSequence |
postprocess(java.lang.CharSequence input)
Reverse any pre-lexical facets, other than whitespace.
|
java.lang.CharSequence |
preprocess(java.lang.CharSequence input)
Apply any pre-lexical facets, other than whitespace.
|
ValidationFailure |
validateContent(java.lang.CharSequence value,
NamespaceResolver nsResolver,
ConversionRules rules)
Check whether a given input string is valid according to this SimpleType
|
allowsDerivation, analyzeContentExpression, atomize, checkTypeDerivationIsOK, getBaseType, getBlock, getDerivationMethod, getDescription, getDisplayName, getEQName, getFinalProhibitions, getFingerprint, getName, getStructuredQName, getSystemId, getTargetNamespace, isAnonymousType, isComplexType, isIdRefType, isIdType, isSameType, isSimpleType
getComponentAsFunction, getRedefinitionLevel, getValidationStatus
boolean isAtomicType()
isAtomicType
in interface SchemaType
boolean isListType()
boolean isUnionType()
boolean isExternalType()
boolean isBuiltInType()
SchemaType getBuiltInBaseType()
AtomicSequence getTypedValue(java.lang.CharSequence value, NamespaceResolver resolver, ConversionRules rules) throws ValidationException
value
- the string valueresolver
- a namespace resolver used to resolve any namespace prefixes appearing
in the content of values. Can supply null, in which case any namespace-sensitive content
will be rejected.rules
- the conversion rules from the configurationAtomicValue
,
The next() method on the iterator throws no checked exceptions, although it is not actually
declared as an UnfailingIterator.ValidationException
- if the supplied value is not in the lexical space of the data typeValidationFailure validateContent(java.lang.CharSequence value, NamespaceResolver nsResolver, ConversionRules rules)
value
- the input string to be checkednsResolver
- a namespace resolver used to resolve namespace prefixes if the type
is namespace sensitive. The value supplied may be null; in this case any namespace-sensitive
content will throw an UnsupportedOperationException.rules
- the conversion rules from the configurationjava.lang.UnsupportedOperationException
- if the type is namespace-sensitive and no namespace
resolver is suppliedboolean isNamespaceSensitive()
int getWhitespaceAction()
Whitespace.PRESERVE
, Whitespace.COLLAPSE
,
Whitespace.REPLACE
.java.lang.CharSequence preprocess(java.lang.CharSequence input) throws ValidationException
input
- the value to be preprocessedValidationException
- if preprocessing detects that the value is invalidjava.lang.CharSequence postprocess(java.lang.CharSequence input) throws ValidationException
input
- the value to be postprocessed: this is the "ordinary" result of converting
the value to a stringValidationException
- if postprocessing detects that the value is invalidCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.