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()
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.
|
NodeName |
getAttributeName() |
int |
getAttributeNameCode()
Get the name pool name code of the attribute to be constructed
|
int |
getCardinality()
Determine the static cardinality of the expression.
|
ExpressionCompiler |
getExpressionCompiler()
Return the compiler of the FixedAttribute expression
|
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
|
void |
setSelect(Expression select)
Set the expression defining the value of the attribute.
|
computeSpecialProperties, getItemType, getOptions, getSchemaType, getValidationAction, processValue, setNoSpecialChars, setOptions, setRejectDuplicates, setSchemaType, setValidationAction, validateOrphanAttribute
checkContent, computeCardinality, createsNewNodes, getSelect, getStreamingAdjunct, iterate, operands, optimize, processLeavingTail, promoteChildren, typeCheck
assembleParams, assembleTunnelParams, dynamicError, evaluateAsString, getConstructType, getExpressionName, getImplementationMethod, getInstructionName, getNetCost, getSourceLocator, isXSLT, main, process, toStreamingPattern
addToPathMap, adoptChildExpression, checkedOperands, checkForUpdatingSubexpressions, clearStreamabilityData, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, getConfiguration, getCost, getDependencies, getEvaluationMethod, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLocation, getObjectName, getPackageData, getParentExpression, getPosture, getPostureAndSweepIfKnown, getProperties, getProperty, getRetainedStaticContext, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStreamability, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, makeStreamingAdjunct, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, optimizeForType, promote, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setFiltered, setFlattened, setLocation, setParentExpression, setPostureAndSweep, setRetainedStaticContext, setRetainedStaticContextLocally, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toString, typeCheckChildren, typeError, unordered
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 NodeName getAttributeName()
public void setSelect(Expression select)
setSelect
in class SimpleNodeConstructor
select
- The expression defining the content of the attributepublic 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 getAttributeNameCode()
public int getCardinality()
Expression
getCardinality
in class Expression
public Expression copy()
copy
in class Expression
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 ExpressionCompiler getExpressionCompiler()
getExpressionCompiler
in class Expression
public void export(ExpressionPresenter out)
export
in class Expression
out
- the expression presenter used to display the structureCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.