public final class FixedAttribute extends AttributeCreator
selectOp
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
Constructor and Description |
---|
FixedAttribute(NodeName nodeName,
int validationAction,
SimpleType schemaType)
Construct an Attribute instruction
|
Modifier and Type | Method and Description |
---|---|
void |
checkPermittedContents(SchemaType parentType,
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(RebindingMap rebindings)
Copy an expression.
|
NodeInfo |
evaluateItem(XPathContext context)
Evaluate as an expression.
|
NodeName |
evaluateNodeName(XPathContext context)
Run-time method to compute the name of the node being constructed.
|
void |
export(ExpressionPresenter out)
Diagnostic print of expression structure.
|
int |
getAttributeFingerprint()
Get the name pool name code of the attribute to be constructed
|
NodeName |
getAttributeName() |
int |
getCardinality()
Determine the static cardinality of the expression.
|
java.lang.String |
getExpressionName()
Get a name identifying the kind of expression, in terms meaningful to a user.
|
int |
getInstructionNameCode()
Get the name of this instruction (return 'xsl:attribute')
|
void |
localTypeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Method to perform type-checking specific to the kind of instruction
|
java.lang.String |
toShortString()
Produce a short string identifying the expression for use in error messages
|
computeSpecialProperties, getItemType, getOptions, getSchemaType, getValidationAction, isInstruction, processValue, setInstruction, setNoSpecialChars, setOptions, setRejectDuplicates, setSchemaType, setValidationAction, validateOrphanAttribute
allowExtractingCommonSubexpressions, alwaysCreatesNewNodes, checkContent, computeCardinality, getSelect, getStreamerName, isLocal, iterate, mayCreateNewNodes, operands, optimize, processLeavingTail, setSelect, typeCheck
assembleParams, assembleTunnelParams, dynamicError, evaluateAsString, getConstructType, getImplementationMethod, getInstructionName, getNetCost, getSourceLocator, isXSLT, process, someOperandCreatesNewNodes
addToPathMap, adoptChildExpression, checkedOperands, checkForUpdatingSubexpressions, computeDependencies, computeHashCode, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, getConfiguration, getCost, getDependencies, getEvaluationMethod, getExtraProperty, getIntegerBounds, getInterpretedExpression, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, hasCompatibleStaticContext, hashCode, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isLiftable, isMultiThreaded, isSameExpression, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toString, typeCheckChildren, typeError, unordered, verifyParentPointers, verifyParentPointers
public FixedAttribute(NodeName nodeName, int validationAction, SimpleType schemaType)
nodeName
- Represents the attribute namevalidationAction
- the validation required, for example strict or laxschemaType
- the schema type against which validation is required, null if not applicable
of the instruction - zero if the attribute was not presentpublic int getInstructionNameCode()
getInstructionNameCode
in class Instruction
public java.lang.String getExpressionName()
getExpressionName
in class Instruction
public NodeName getAttributeName()
public void localTypeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
SimpleNodeConstructor
localTypeCheck
in class SimpleNodeConstructor
visitor
- an expression visitorcontextItemType
- the static type of the context itemXPathException
- if a type error is detectedpublic int getAttributeFingerprint()
public int getCardinality()
Expression
getCardinality
in class Expression
public Expression copy(RebindingMap rebindings)
copy
in class Expression
rebindings
- public NodeName evaluateNodeName(XPathContext context)
SimpleNodeConstructor
evaluateNodeName
in class SimpleNodeConstructor
context
- the XPath dynamic evaluation contextpublic void checkPermittedContents(SchemaType parentType, boolean whole) throws XPathException
checkPermittedContents
in class Expression
parentType
- the "given complex type": the method is checking that the nodes returned by this
expression are acceptable members of the content model of this typewhole
- 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 NodeInfo evaluateItem(XPathContext context) throws XPathException
SimpleNodeConstructor
evaluateItem
in class SimpleNodeConstructor
context
- The context in which the expression is to be evaluatedXPathException
- if any dynamic error occurs evaluating the
expressionpublic void export(ExpressionPresenter out) throws XPathException
export
in interface ExportAgent
export
in class Expression
out
- the expression presenter used to display the structureXPathException
- if the export fails, for example if an expression is found that won't work
in the target environment.public java.lang.String toShortString()
toShortString
in class Expression
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.