net.sf.saxon.instruct

Class AttributeCreator

public abstract class AttributeCreator extends SimpleNodeConstructor

Abstract class for fixed and computed attribute constructor expressions
Method Summary
intgetAnnotation()
Get the type annotation fingerprint to be used on the attribute event
intgetOptions()
Get the options to be used on the attribute event
SimpleTypegetSchemaType()
Return the required schema type of the attribute
intgetValidationAction()
Get the validation action requested
protected voidprocessValue(CharSequence value, XPathContext context)
Process the value of the node, to create the new node.
voidsetAnnotation(int type)
Set the type annotation fingerprint to be used on the attribute event
voidsetNoSpecialChars()
Indicate that the attribute value contains no special characters that might need escaping
voidsetOptions(int options)
Set the options to be used on the attribute event
voidsetRejectDuplicates()
Indicate that two attributes with the same name are not acceptable.
voidsetSchemaType(SimpleType type)
Set the required schema type of the attribute
voidsetValidationAction(int action)
Set the validation action required

Method Detail

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

getOptions

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

Returns: the option flags to be used

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

getValidationAction

public int getValidationAction()
Get the validation action requested

Returns: the validation action, for example strict or lax

processValue

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

Parameters: value the string value of the new node context the dynamic evaluation context

Throws: XPathException

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

setNoSpecialChars

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

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)

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

setValidationAction

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

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