Package net.sf.saxon.type
Class AlphaCode
java.lang.Object
net.sf.saxon.type.AlphaCode
An AlphaCode is a compact, context-independent string representation of a SequenceType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringfromItemType(ItemType type) static StringfromLexicalSequenceType(XPathContext context, String input) static StringfromSequenceType(SequenceType type) static StringfromXdmMap(MapItem map) static ItemTypetoItemType(String input, Configuration config) Convert an AlphaCode to an ItemType.static SequenceTypetoSequenceType(String input, Configuration config) Convert an AlphaCode to a SequenceTypestatic MapItemParse an AlphaCode into an XDM map
-
Constructor Details
-
AlphaCode
public AlphaCode()
-
-
Method Details
-
toXdmMap
Parse an AlphaCode into an XDM map- Parameters:
input- the input alphacode- Returns:
- the resulting map
- Throws:
IllegalArgumentException- if the input is not a valid AlphaCode
-
fromXdmMap
-
toSequenceType
Convert an AlphaCode to a SequenceType- Parameters:
input- the input alphacodeconfig- the Saxon Configuration (which must contain any user-defined types that are referenced in the Alphacode)- Returns:
- the corresponding SequenceType
- Throws:
IllegalArgumentException- if the input is not a valid AlphaCode
-
toItemType
Convert an AlphaCode to an ItemType. The occurrence indicator of the alphacode may be omitted, or may be "1": any other value is treated as an error.- Parameters:
input- the input alphacodeconfig- the Saxon Configuration (which must contain any user-defined types that are referenced in the Alphacode)- Returns:
- the corresponding SequenceType
- Throws:
IllegalArgumentException- if the input is not a valid AlphaCode
-
fromItemType
-
fromSequenceType
-
fromLexicalSequenceType
public static String fromLexicalSequenceType(XPathContext context, String input) throws XPathException - Throws:
XPathException
-