public abstract class AttributeCreator extends SimpleNodeConstructor implements ValidatingInstruction
selectOp
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_COST, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
Constructor and Description |
---|
AttributeCreator() |
Modifier and Type | Method and Description |
---|---|
int |
computeSpecialProperties()
Get the static properties of this expression (other than its type).
|
ItemType |
getItemType()
Get the static type of this expression
|
int |
getOptions()
Get the options to be used on the attribute event
|
SimpleType |
getSchemaType()
Return the required schema type of the attribute
|
int |
getValidationAction()
Get the validation action requested
|
boolean |
isInstruction()
Ask whether this expression is an instruction.
|
void |
processValue(java.lang.CharSequence value,
XPathContext context)
Process the value of the node, to create the new node.
|
void |
setInstruction(boolean inst)
Say whether this attribute creator originates as an XSLT instruction
|
void |
setNoSpecialChars()
Indicate that the attribute value contains no special characters that
might need escaping
|
void |
setOptions(int options)
Set the options to be used on the attribute event
|
void |
setRejectDuplicates()
Indicate that two attributes with the same name are not acceptable.
|
void |
setSchemaType(SimpleType type)
Set the required schema type of the attribute
|
void |
setValidationAction(int action)
Set the validation action required
|
protected void |
validateOrphanAttribute(Orphan orphan,
XPathContext context)
Validate a newly-constructed parentless attribute using the type and validation attributes.
|
allowExtractingCommonSubexpressions, alwaysCreatesNewNodes, checkContent, computeCardinality, evaluateItem, evaluateNodeName, getSelect, getStreamerName, isLocal, iterate, localTypeCheck, mayCreateNewNodes, operands, optimize, processLeavingTail, setSelect, typeCheck
assembleParams, assembleTunnelParams, dynamicError, evaluateAsString, getConstructType, getExpressionName, getImplementationMethod, getInstructionNameCode, getNetCost, getSourceLocator, isXSLT, process, someOperandCreatesNewNodes
addToPathMap, adoptChildExpression, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeHashCode, computeStaticProperties, copy, dynamicError, effectiveBooleanValue, equals, evaluatePendingUpdates, explain, export, getCardinality, 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, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isLiftable, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, prepareForStreaming, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toString, typeCheckChildren, typeError, unordered, verifyParentPointers
public void setInstruction(boolean inst)
inst
- true if this is an xsl:attribute instructionpublic boolean isInstruction()
isInstruction
in class Instruction
public void setSchemaType(SimpleType type)
type
- the required schema type, if validation against a specific type is required,
or null if no validation is requiredpublic SimpleType getSchemaType()
getSchemaType
in interface ValidatingInstruction
public void setValidationAction(int action)
action
- the validation action required, for example strict or laxpublic int getValidationAction()
getValidationAction
in interface ValidatingInstruction
public void setOptions(int options)
options
- Options to be used. The only option currently defined is
ReceiverOptions.REJECT_DUPLICATES
, which controls whether or not it is an error
to create two attributes with the same name for the same element. (This is an error in XQuery
but not in XSLT).public void setRejectDuplicates()
public void setNoSpecialChars()
public int getOptions()
public int computeSpecialProperties()
computeSpecialProperties
in class SimpleNodeConstructor
public ItemType getItemType()
getItemType
in class Instruction
public void processValue(java.lang.CharSequence value, XPathContext context) throws XPathException
processValue
in class SimpleNodeConstructor
value
- the string value of the new nodecontext
- the dynamic evaluation contextXPathException
- if a dynamic error occursprotected void validateOrphanAttribute(Orphan orphan, XPathContext context) throws XPathException
orphan
- the new attribute nodecontext
- the dynamic evaluation contextXPathException
- if validation failsCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.