java.io.Serializable
, javax.xml.transform.SourceLocator
, LocationProvider
, SaxonLocator
, Container
, InstructionInfo
, org.xml.sax.Locator
public class KeyDefinition extends Procedure implements java.io.Serializable
Constructor | Description |
---|---|
KeyDefinition(PatternFinder match,
Expression use,
java.lang.String collationName,
StringCollator collation) |
Constructor to create a key definition
|
Modifier and Type | Method | Description |
---|---|---|
StringCollator |
getCollation() |
Get the collation.
|
java.lang.String |
getCollationName() |
Get the collation name for this key definition.
|
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 |
isStrictComparison() |
Get whether strict comparison is needed.
|
void |
setBackwardsCompatible(boolean bc) |
Set backwards compatibility mode.
|
void |
setBody(Expression body) |
Set the body of the key (the use expression).
|
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 |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBody, getColumnNumber, getColumnNumber, getContainerGranularity, getExecutable, getHostLanguage, getLineNumber, getLineNumber, getLocationProvider, getProperties, getProperty, getPublicId, getStackFrameMap, getSystemId, getSystemId, setExecutable, setHostLanguage, setLineNumber, setSystemId
public KeyDefinition(PatternFinder 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. Note that a KeyDefinition constructed by the XSLT or XQuery parser will
always use an Expression here; however, a KeyDefinition constructed at run-time by a compiled stylesheet
or XQuery might use a simple ExpressionEvaluator that lacks all the compile-time information associated
with an ExpressioncollationName
- the name of the collation being usedcollation
- the actual collation. This must be one that supports generation of collation keys.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 Procedure
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 PatternFinder getMatch()
public void setBody(Expression body)
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 Location
.getConstructType
in interface InstructionInfo
public StructuredQName getObjectName()
getObjectName
in interface InstructionInfo