|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--net.sf.saxon.type.SchemaType
|
+--net.sf.saxon.type.SimpleType
|
+--net.sf.saxon.type.ListType
Represents a SimpleType that is a list of a given SimpleType, known as its itemType. A ListType may be a restriction of another ListType; the itemType must either be an AtomicType or a UnionType whose members are not list types.
In the non-schema-aware product this class is used to implement the built-in list types NMTOKENS, ENTITIES, IDREFS. In the schema-aware product it is also used to support user-defined list types.
| Field Summary |
| Fields inherited from class net.sf.saxon.type.SchemaType |
ALL_DERIVATIONS, DERIVE_BY_EXTENSION, DERIVE_BY_LIST, DERIVE_BY_RESTRICTION, DERIVE_BY_SUBSTITUTION, DERIVE_BY_UNION, finalProhibitions, INVALID, UNVALIDATED, VALIDATED, VALIDATING, validationPhase |
| Constructor Summary | |
ListType(NamePool pool)
Create a new ListType. |
|
| Method Summary | |
java.lang.String |
applyWhitespaceNormalization(java.lang.String value)
Apply the whitespace normalization rules for this simple type |
SimpleType |
getItemType()
Returns the simpleType of the items in this ListType. |
SequenceIterator |
getTypedValue(java.lang.CharSequence value,
NodeInfo node)
Get the typed value of a given input string. |
boolean |
isListType()
Returns true if this type is derived by list, or if it is derived by restriction from a list type, or if it is a union that contains a list as one of its members |
java.lang.Object |
map(Item item,
XPathContext context,
java.lang.Object info)
The typed value of a list-valued node is obtained by tokenizing the string value and applying a mapping function to the sequence of tokens. |
void |
setItemType(SimpleType type)
Sets the itemType for this ListType (the type of item that instances of this list type contain). |
void |
validateContent(java.lang.CharSequence value,
NamespaceResolver nsResolver)
Check whether a given input string is valid according to this SimpleType |
| Methods inherited from class net.sf.saxon.type.SimpleType |
applyWhitespaceNormalization, getBuiltInBaseType, getFacet, getFacetCollection, getFacets, getFacets, getTypedValue, getWhitespaceAction, isNamespaceSensitive, isSimpleType, isTypeDerivationOK, isUnionType, iterateMemberTypes, setFacetCollection, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ListType(NamePool pool)
| Method Detail |
public boolean isListType()
isListType in class SimpleTypepublic SimpleType getItemType()
public void setItemType(SimpleType type)
throws SchemaException
type - the SimpleType for this ListType.
SchemaExceptionpublic java.lang.String applyWhitespaceNormalization(java.lang.String value)
value - the string before whitespace normalization
public void validateContent(java.lang.CharSequence value,
NamespaceResolver nsResolver)
throws ValidationException
validateContent in class SimpleTypevalue - 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.
ValidationException - if the content is invalid
java.lang.UnsupportedOperationException - if the type is namespace-sensitive and no namespace
resolver is supplied
public SequenceIterator getTypedValue(java.lang.CharSequence value,
NodeInfo node)
throws ValidationException
getTypedValue in class SimpleTypevalue - the string whose typed value is requirednode - a node to be used for getting a namespace context if the content is namespace-sensitive
AtomicValue
ValidationException
public java.lang.Object map(Item item,
XPathContext context,
java.lang.Object info)
throws XPathException
MappingFunction
map in interface MappingFunctionitem - The item to be mapped.
If context is supplied, this must be the same as context.currentItem().context - The processing context. This is supplied only for mapping constructs that
set the context node, position, and size. Otherwise it is null.info - Arbitrary information supplied by the creator of the MappingIterator. It must be
read-only and immutable for the duration of the iteration.
XPathException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||