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, saveLocation, setBody, setChildExpression, setDeclaredVisibility, setDeclaringComponent, setLineNumber, setPackageData, setRetainedStaticContext, setSystemIdpublic 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 Actorpublic 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 Actorpublic void allocateAllBindingSlots(StylesheetPackage pack)
ActorallocateAllBindingSlots in class Actorpack - the containing packagepublic int getComponentKind()
ActorStandardNames.XSL_FUNCTIONgetComponentKind in class Actorpublic 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 InstructionInfopublic StructuredQName getObjectName()
getObjectName in interface InstructionInfopublic void export(ExpressionPresenter out, boolean reusable, java.util.Map<Component,java.lang.Integer> componentIdMap) throws XPathException
out - the expression presenter used to display the structureXPathExceptionpublic void export(ExpressionPresenter presenter) throws XPathException
Actorexport in class Actorpresenter - the expression presenter used to generate the XML representation of the structureXPathExceptionCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.