net.sf.saxon.expr.instruct
Class AttributeCreator

java.lang.Object
  extended by net.sf.saxon.expr.Expression
      extended by net.sf.saxon.expr.instruct.Instruction
          extended by net.sf.saxon.expr.instruct.SimpleNodeConstructor
              extended by net.sf.saxon.expr.instruct.AttributeCreator
All Implemented Interfaces:
Serializable, SourceLocator, LocationProvider, SaxonLocator, EvaluableItem, TailCallReturner, SequenceIterable, InstructionInfo, Locator
Direct Known Subclasses:
ComputedAttribute, FixedAttribute

public abstract class AttributeCreator
extends SimpleNodeConstructor

Abstract class for fixed and computed attribute constructor expressions

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.expr.instruct.SimpleNodeConstructor
select
 
Fields inherited from class net.sf.saxon.expr.Expression
EVALUATE_METHOD, EVENT_FEED_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, PUSH_SELECTION, staticProperties, WATCH_METHOD
 
Constructor Summary
AttributeCreator()
           
 
Method Summary
 int getAnnotation()
          Get the type annotation fingerprint to be used on the attribute event
 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 setAnnotation(int type)
          Set the type annotation fingerprint to be used on the attribute event
 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
 
Methods inherited from class net.sf.saxon.expr.instruct.SimpleNodeConstructor
checkContent, computeCardinality, computeSpecialProperties, createsNewNodes, evaluateItem, evaluateNameCode, getContentExpression, iterate, iterateSubExpressions, localTypeCheck, optimize, processLeavingTail, promoteInst, replaceSubExpression, setSelect, simplify, typeCheck
 
Methods inherited from class net.sf.saxon.expr.instruct.Instruction
assembleParams, assembleTunnelParams, dynamicError, evaluateAsString, getConstructType, getExpressionName, getImplementationMethod, getInstructionName, getInstructionNameCode, getItemType, getIteratorFromProcessMethod, getSourceLocator, isXSLT, process, promote
 
Methods inherited from class net.sf.saxon.expr.Expression
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, copy, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, explain, getCardinality, getColumnNumber, getColumnNumber, getContainer, getDependencies, getEvaluationMethod, getExecutable, getHostLanguage, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, iterateSameFocusSubExpressions, markTailFunctionCalls, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, toString, typeError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.xml.transform.SourceLocator
getColumnNumber, getLineNumber, getPublicId, getSystemId
 

Constructor Detail

AttributeCreator

public AttributeCreator()
Method Detail

setSchemaType

public void setSchemaType(SimpleType type)
Set the required schema type of the attribute

Parameters:
type - the required schema type, if validation against a specific type is required

getSchemaType

public SimpleType getSchemaType()
Return the required schema type of the attribute

Returns:
if validation against a schema type was requested, return the schema type (always a simple type). Otherwise, if validation against a specific type was not requested, return null

setValidationAction

public void setValidationAction(int action)
Set the validation action required

Parameters:
action - the validation action required, for example strict or lax

getValidationAction

public int getValidationAction()
Get the validation action requested

Returns:
the validation action, for example strict or lax

setOptions

public void setOptions(int options)
Set the options to be used on the attribute event

Parameters:
options -

setRejectDuplicates

public void setRejectDuplicates()
Indicate that two attributes with the same name are not acceptable. (This option is set in XQuery, but not in XSLT)


setNoSpecialChars

public void setNoSpecialChars()
Indicate that the attribute value contains no special characters that might need escaping


getOptions

public int getOptions()
Get the options to be used on the attribute event

Returns:
the option flags to be used

setAnnotation

public void setAnnotation(int type)
Set the type annotation fingerprint to be used on the attribute event

Parameters:
type - the fingerprint of the type annotation to be used

getAnnotation

public int getAnnotation()
Get the type annotation fingerprint to be used on the attribute event

Returns:
the fingerprint of the type annotation to be used

processValue

public final void processValue(CharSequence value,
                               XPathContext context)
                        throws XPathException
Process the value of the node, to create the new node.

Specified by:
processValue in class SimpleNodeConstructor
Parameters:
value - the string value of the new node
context - the dynamic evaluation context
Throws:
XPathException


Copyright (c) 2004-2010 Saxonica Limited. All rights reserved.