public final class FixedAttribute extends AttributeCreator
selectEFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, INHERITED_CONTEXT, INSPECTION_CONTEXT, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, NAVIGATION_CONTEXT, NODE_VALUE_CONTEXT, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, W3C_CONSUMING, W3C_FREE_RANGING, W3C_GROUP_CONSUMING, W3C_MOTIONLESS, 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,
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.
|
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 |
explain(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,
ExpressionVisitor.ContextItemType contextItemType)
Method to perform type-checking specific to the kind of instruction
|
void |
setSelect(Expression select,
Configuration config)
Set the expression defining the value of the attribute.
|
computeSpecialProperties, getItemType, getOptions, getSchemaType, getValidationAction, processValue, setNoSpecialChars, setOptions, setRejectDuplicates, setSchemaType, setValidationAction, validateOrphanAttributecheckContent, computeCardinality, createsNewNodes, getContentExpression, getStreamingAdjunct, iterate, iterateSubExpressionInfo, iterateSubExpressions, optimize, processLeavingTail, promoteInst, replaceSubExpression, simplify, typeCheckassembleParams, assembleTunnelParams, dynamicError, evaluateAsString, getConstructType, getExpressionName, getImplementationMethod, getInstructionName, getIteratorFromProcessMethod, getSourceLocator, isXSLT, process, promoteaddToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, getColumnNumber, getColumnNumber, getContainer, getDependencies, getEvaluationMethod, getExecutable, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getStreamability, getSystemId, getSystemId, hasVariableBinding, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, markTailFunctionCalls, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, toPattern, toStreamingPattern, toString, typeErrorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetColumnNumber, getLineNumber, getPublicId, getSystemIdpublic 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 Instructionpublic NodeName getAttributeName()
public void setSelect(Expression select, Configuration config)
setSelect in class SimpleNodeConstructorselect - The expression defining the content of the attributeconfig - The Saxon configurationpublic void localTypeCheck(ExpressionVisitor visitor, ExpressionVisitor.ContextItemType contextItemType) throws XPathException
SimpleNodeConstructorlocalTypeCheck in class SimpleNodeConstructorvisitor - an expression visitorcontextItemType - the static type of the context itemXPathException - if a type error is detectedpublic int getAttributeNameCode()
public int getCardinality()
ExpressiongetCardinality in class Expressionpublic Expression copy()
copy in class Expressionpublic NodeName evaluateNodeName(XPathContext context)
SimpleNodeConstructorevaluateNodeName 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 NodeInfo evaluateItem(XPathContext context) throws XPathException
SimpleNodeConstructorevaluateItem in class SimpleNodeConstructorcontext - The context in which the expression is to be evaluatedXPathException - if any dynamic error occurs evaluating the
expressionpublic ExpressionCompiler getExpressionCompiler()
getExpressionCompiler in class Expressionpublic void explain(ExpressionPresenter out)
explain in class Expressionout - the expression presenter used to display the structureCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.