public class KeyDefinition extends Actor implements ContextOriginator
Constructor and Description |
---|
KeyDefinition(SymbolicName symbolicName,
Pattern match,
Expression use,
java.lang.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 component
|
void |
export(ExpressionPresenter presenter)
Export expression structure.
|
void |
export(ExpressionPresenter out,
boolean reusable,
java.util.Map<Component,java.lang.Integer> componentIdMap)
Diagnostic print of expression structure.
|
StringCollator |
getCollation()
Get the collation.
|
java.lang.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
|
Pattern |
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.
|
SymbolicName |
getSymbolicName()
Get the symbolic name of the component
|
Expression |
getUse()
Get the use expression for the key definition
|
boolean |
isBackwardsCompatible()
Test backwards compatibility mode
|
boolean |
isComposite()
Ask whether this is a composite key
|
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()
Ask whether strict comparison is needed.
|
void |
setBackwardsCompatible(boolean bc)
Set backwards compatibility mode.
|
void |
setComposite(boolean composite)
Say whether this is a composite key.
|
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(java.lang.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, getDeclaredVisibility, getDeclaringComponent, getLineNumber, getLocation, getPackageData, getProperties, getProperty, getPublicId, getRetainedStaticContext, getStackFrameMap, getSystemId, isExportable, makeDeclaringComponent, obtainDeclaringComponent, saveLocation, setBody, setChildExpression, setDeclaredVisibility, setDeclaringComponent, setLineNumber, setPackageData, setRetainedStaticContext, setSystemId
public KeyDefinition(SymbolicName symbolicName, Pattern match, Expression use, java.lang.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 SymbolicName getSymbolicName()
getSymbolicName
in class Actor
public void setRangeKey(boolean rangeKey)
rangeKey
- true if this is a range key; false if notpublic boolean isRangeKey()
public void setComposite(boolean composite)
composite
- true if this is a composite keypublic boolean isComposite()
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 Actor
public void allocateAllBindingSlots(StylesheetPackage pack)
Actor
allocateAllBindingSlots
in class Actor
pack
- the containing packagepublic int getComponentKind()
Actor
StandardNames.XSL_FUNCTION
getComponentKind
in class Actor
public void setLocation(java.lang.String systemId, int lineNumber)
systemId
- the URI of the module containing the key definitionlineNumber
- the line number of the key definitionpublic Pattern getMatch()
public Expression getUse()
public java.lang.String getCollationName()
public StringCollator getCollation()
public int getConstructType()
StandardNames
: all less than 1024)
or it will be a constant in class LocationKind
.getConstructType
in interface InstructionInfo
public StructuredQName getObjectName()
getObjectName
in interface InstructionInfo
public void export(ExpressionPresenter out, boolean reusable, java.util.Map<Component,java.lang.Integer> componentIdMap) throws XPathException
out
- the expression presenter used to display the structureXPathException
public void export(ExpressionPresenter presenter) throws XPathException
Actor
export
in class Actor
presenter
- the expression presenter used to generate the XML representation of the structureXPathException
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.