java.io.Serializable, javax.xml.transform.SourceLocator, LocationProvider, SaxonLocator, EvaluableItem, SequenceIterable, TailCallReturner, InstructionInfo, org.xml.sax.Locatorpublic final class FixedAttribute extends AttributeCreator
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticPropertiesselect| Constructor | Description |
|---|---|
FixedAttribute(int nameCode,
int validationAction,
SimpleType schemaType,
int annotation) |
Construct an Attribute instruction
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
checkPermittedContents(SchemaType parentType,
StaticContext env,
boolean whole) |
Check that any elements and attributes constructed or returned by this expression are acceptable
in the content model of a given complex type.
|
Expression |
copy() |
Copy an expression.
|
Item |
evaluateItem(XPathContext context) |
Evaluate as an expression.
|
int |
evaluateNameCode(XPathContext context) |
Run-time method to compute the name of the node being constructed.
|
void |
explain(ExpressionPresenter out) |
Diagnostic print of expression structure.
|
int |
getAttributeNameCode() |
Get the name pool name code of the attribute to be constructed
|
int |
getCardinality() |
Determine the static cardinality of the expression.
|
int |
getInstructionNameCode() |
Get the name of this instruction (return 'xsl:attribute')
|
ItemType |
getItemType(TypeHierarchy th) |
Get the item type of the items returned by evaluating this instruction
|
void |
localTypeCheck(ExpressionVisitor visitor,
ItemType contextItemType) |
Method to perform type-checking specific to the kind of instruction
|
TailCall |
processLeavingTail(XPathContext context) |
Process this instruction
|
void |
setSelect(Expression select,
Configuration config) |
Set the expression defining the value of the attribute.
|
getAnnotation, getOptions, getSchemaType, getValidationAction, setAnnotation, setNoSpecialChars, setOptions, setRejectDuplicates, setSchemaType, setValidationActionaddToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, computeDependencies, computeStaticProperties, display, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, findParentOf, getColumnNumber, getColumnNumber, getContainer, getDependencies, getExecutable, getHostLanguage, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isUpdatingExpression, iterateEvents, markTailFunctionCalls, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, toString, typeErrorassembleParams, assembleTunnelParams, dynamicError, evaluateAsString, getConstructType, getImplementationMethod, getSourceLocator, isXSLT, process, promoteclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckContent, computeCardinality, computeSpecialProperties, createsNewNodes, expandChildren, getSelect, iterate, iterateSubExpressions, optimize, promoteInst, replaceSubExpression, simplify, typeCheckpublic FixedAttribute(int nameCode,
int validationAction,
SimpleType schemaType,
int annotation)
nameCode - Represents the attribute namevalidationAction - the validation required, for example strict or laxschemaType - the schema type against which validation is required, null if not applicableannotation - Integer code identifying the type named in the type attribute
of the instruction - zero if the attribute was not presentpublic int getInstructionNameCode()
getInstructionNameCode in class Instructionpublic void setSelect(Expression select, Configuration config) throws XPathException
setSelect in class SimpleNodeConstructorselect - The expression defining the content of the attributeconfig - The Saxon configurationXPathException - if the expression is a constant, and validation is requested, and
the constant doesn't match the required type.public int getAttributeNameCode()
public ItemType getItemType(TypeHierarchy th)
InstructiongetItemType in class Instructionth - the type hierarchy cachepublic int getCardinality()
ExpressiongetCardinality in class Expressionpublic Expression copy()
copy in class Expressionpublic void localTypeCheck(ExpressionVisitor visitor, ItemType contextItemType)
SimpleNodeConstructorlocalTypeCheck in class SimpleNodeConstructorvisitor - an expression visitorcontextItemType - the static type of the context itempublic int evaluateNameCode(XPathContext context)
SimpleNodeConstructorevaluateNameCode in class SimpleNodeConstructorcontext - the XPath dynamic evaluation contextpublic void checkPermittedContents(SchemaType parentType, StaticContext env, boolean whole) throws XPathException
checkPermittedContents in class ExpressionparentType - the "given complex type": the method is checking that the nodes returned by this
expression are acceptable members of the content model of this typeenv - the static contextwhole - if true, we want to check that the value of this expression satisfies the content model
as a whole; if false we want to check that the value of the expression is acceptable as one part
of the contentXPathException - if the value delivered by this expression cannot be part of the content model
of the given typepublic TailCall processLeavingTail(XPathContext context) throws XPathException
processLeavingTail in interface TailCallReturnerprocessLeavingTail in class Instructioncontext - the dynamic context of the transformationXPathExceptionpublic Item evaluateItem(XPathContext context) throws XPathException
SimpleNodeConstructorevaluateItem in interface EvaluableItemevaluateItem in class SimpleNodeConstructorcontext - The context in which the expression is to be evaluatedXPathException - if any dynamic error occurs evaluating the
expressionpublic void explain(ExpressionPresenter out)
explain in class Expressionout - the expression presenter used to display the structure