net.sf.saxon.instruct
public final class Attribute extends SimpleNodeConstructor
Constructor Summary | |
---|---|
Attribute(Expression attributeName, Expression namespace, NamespaceResolver nsContext, int validationAction, SimpleType schemaType, int annotation, boolean allowNameAsQName)
Construct an Attribute instruction |
Method Summary | |
---|---|
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. |
int | computeSpecialProperties()
Get the static properties of this expression (other than its type). |
void | display(int level, NamePool pool, PrintStream out)
Display this instruction as an expression, for diagnostics |
protected int | evaluateNameCode(XPathContext context) |
int | getCardinality() |
int | getInstructionNameCode()
Get the name of this instruction |
ItemType | getItemType(TypeHierarchy th) |
Iterator | iterateSubExpressions()
Get the subexpressions of this expression |
void | localTypeCheck(StaticContext env, ItemType contextItemType) |
TailCall | processLeavingTail(XPathContext context)
Process this instruction |
protected void | promoteInst(PromotionOffer offer)
Offer promotion for subexpressions. |
void | setRejectDuplicates()
Indicate that two attributes with the same name are not acceptable.
|
Expression | simplify(StaticContext env) |
Parameters: attributeName An expression to calculate the attribute name namespace An expression to calculate the attribute namespace nsContext a NamespaceContext object containing the static namespace context of the
stylesheet instruction validationAction e.g. validation=strict, lax, strip, preserve schemaType Type against which the attribute must be validated. This must not be a namespace-sensitive
type; it is the caller's responsibility to check this. annotation Integer code identifying the type named in the type
attribute allowNameAsQName
Returns: a set of flags indicating static properties of this expression
Returns: an iterator over the subexpressions
Parameters: context the dynamic context of the transformation
Returns: a TailCall to be executed by the caller, always null for this instruction
Parameters: offer details of the offer, for example the offer to move expressions that don't depend on the context to an outer level in the containing expression
Throws: XPathException if any error is detected