public abstract class AttributeCreator extends SimpleNodeConstructor implements ValidatingInstruction
select
EFFECTIVE_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 |
---|
AttributeCreator() |
Modifier and Type | Method and Description |
---|---|
int |
computeSpecialProperties()
Get the static properties of this expression (other than its type).
|
ItemType |
getItemType(TypeHierarchy th)
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
|
void |
processValue(CharSequence value,
XPathContext context)
Process the value of the node, to create the new node.
|
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
|
checkContent, computeCardinality, createsNewNodes, evaluateItem, evaluateNodeName, getContentExpression, getStreamingAdjunct, iterate, iterateSubExpressionInfo, iterateSubExpressions, localTypeCheck, optimize, processLeavingTail, promoteInst, replaceSubExpression, setSelect, simplify, typeCheck
assembleParams, assembleTunnelParams, dynamicError, evaluateAsString, getConstructType, getExpressionName, getImplementationMethod, getInstructionName, getInstructionNameCode, getIteratorFromProcessMethod, getSourceLocator, isXSLT, process, promote
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, copy, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, explain, getCardinality, getColumnNumber, getColumnNumber, getContainer, getDependencies, getEvaluationMethod, getExecutable, getExpressionCompiler, 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, typeError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getColumnNumber, getLineNumber, getPublicId, getSystemId
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(TypeHierarchy th)
getItemType
in class Instruction
th
- the type hierarchy cachepublic void processValue(CharSequence value, XPathContext context) throws XPathException
processValue
in class SimpleNodeConstructor
value
- the string value of the new nodecontext
- the dynamic evaluation contextXPathException
protected void validateOrphanAttribute(Orphan orphan, XPathContext context) throws XPathException
orphan
- the new attribute nodecontext
- the dynamic evaluation contextXPathException
- if validation failsCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.