public class KeyDefinition extends ComponentBody
body
Constructor and Description |
---|
KeyDefinition(PatternFinder match,
Expression use,
String collationName,
StringCollator collation)
Constructor to create a key definition
|
Modifier and Type | Method and Description |
---|---|
void |
allocateAllBindingSlots(StylesheetPackage pack)
Allocate slot numbers to all the external component references in this procedure
|
StringCollator |
getCollation()
Get the collation.
|
String |
getCollationName()
Get the collation name for this key definition.
|
int |
getComponentKind()
Get the kind of component that this represents, using integer constants such as
StandardNames.XSL_FUNCTION |
int |
getConstructType()
Get the type of construct.
|
BuiltInAtomicType |
getIndexedItemType()
Get the primitive item type of the values returned by the use expression
|
PatternFinder |
getMatch()
Get the match pattern for the key definition
|
StructuredQName |
getObjectName()
Get a name identifying the object of the expression, for example a function name, template name,
variable name, key name, element name, etc.
|
Expression |
getUse()
Get the use expression for the key definition
|
boolean |
isBackwardsCompatible()
Test backwards compatibility mode
|
boolean |
isConvertUntypedToOther()
Determine whether untypedAtomic values are converted to the type of the other operand.
|
boolean |
isRangeKey()
Ask whether this key is a range key, that is, a key capable of returning
(a) the values in a selected range, and (b) the keys in order
|
boolean |
isStrictComparison()
Get whether strict comparison is needed.
|
void |
setBackwardsCompatible(boolean bc)
Set backwards compatibility mode.
|
void |
setConvertUntypedToOther(boolean convertToOther)
Indicate that untypedAtomic values should be converted to the type of the other operand,
rather than to strings.
|
void |
setIndexedItemType(BuiltInAtomicType itemType)
Set the primitive item type of the values returned by the use expression
|
void |
setLocation(String systemId,
int lineNumber)
Set the system Id and line number of the source xsl:key definition
|
void |
setRangeKey(boolean rangeKey)
Say whether this key is a range key, that is, a key capable of returning
(a) the values in a selected range, and (b) the keys in order
|
void |
setStackFrameMap(SlotManager map)
Set the map of local variables needed while evaluating the "use" expression
|
void |
setStrictComparison(boolean strict)
Set whether strict comparison is needed.
|
allocateBindingSlotsRecursive, getBody, getColumnNumber, getConfiguration, getContainerGranularity, getDeclaringComponent, getHostLanguage, getLineNumber, getLocationProvider, getPackageData, getProperties, getProperty, getPublicId, getStackFrameMap, getSystemId, makeDeclaringComponent, setBody, setHostLanguage, setLineNumber, setPackageData, setSystemId
public KeyDefinition(PatternFinder match, Expression use, String collationName, StringCollator collation)
match
- the pattern in the xsl:key match attributeuse
- the expression in the xsl:key use attribute, or the expression that results from compiling
the xsl:key contained instructions.collationName
- the name of the collation being usedcollation
- the actual collation. This must be one that supports generation of collation keys.public void setRangeKey(boolean rangeKey)
rangeKey
- true if this is a range key; false if notpublic boolean isRangeKey()
public void setIndexedItemType(BuiltInAtomicType itemType)
itemType
- the primitive type of the indexed valuespublic BuiltInAtomicType getIndexedItemType()
public void setBackwardsCompatible(boolean bc)
bc
- set to true if running in XSLT 2.0 backwards compatibility modepublic boolean isBackwardsCompatible()
public void setStrictComparison(boolean strict)
strict
- true if strict comparison is neededpublic boolean isStrictComparison()
public void setConvertUntypedToOther(boolean convertToOther)
convertToOther
- true if comparisons follow the semantics of the "=" operator rather than
the "eq" operatorpublic boolean isConvertUntypedToOther()
public void setStackFrameMap(SlotManager map)
setStackFrameMap
in class ComponentBody
public void allocateAllBindingSlots(StylesheetPackage pack)
ComponentBody
allocateAllBindingSlots
in class ComponentBody
pack
- the containing packagepublic int getComponentKind()
ComponentBody
StandardNames.XSL_FUNCTION
getComponentKind
in class ComponentBody
public void setLocation(String systemId, int lineNumber)
systemId
- the URI of the module containing the key definitionlineNumber
- the line number of the key definitionpublic PatternFinder getMatch()
public Expression getUse()
public String getCollationName()
public StringCollator getCollation()
public int getConstructType()
StandardNames
: all less than 1024)
or it will be a constant in class Location
.public StructuredQName getObjectName()
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.