| 
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectnet.sf.saxon.expr.Expression
net.sf.saxon.instruct.Instruction
net.sf.saxon.instruct.SimpleNodeConstructor
net.sf.saxon.instruct.ComputedAttribute
public final class ComputedAttribute
An instruction derived from an xsl:attribute element in stylesheet, or from an attribute constructor in XQuery, in cases where the attribute name is not known statically
| Field Summary | 
|---|
| Fields inherited from class net.sf.saxon.expr.Expression | 
|---|
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD | 
| Constructor Summary | |
|---|---|
ComputedAttribute(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,
        PrintStream out,
        Configuration config)
Display this instruction as an expression, for diagnostics  | 
 int | 
evaluateNameCode(XPathContext context)
Determine the name to be used for the attribute, as an integer name code  | 
 int | 
getCardinality()
Determine the static cardinality of the expression.  | 
 int | 
getInstructionNameCode()
Get the name of this instruction  | 
 ItemType | 
getItemType(TypeHierarchy th)
Get the item type of the items returned by evaluating this instruction  | 
 Expression | 
getNameExpression()
 | 
 Expression | 
getNamespaceExpression()
 | 
 NamespaceResolver | 
getNamespaceResolver()
 | 
 Iterator | 
iterateSubExpressions()
Get the subexpressions of this expression  | 
 void | 
localTypeCheck(StaticContext env,
               ItemType contextItemType)
Method to perform type-checking specific to the kind of instruction  | 
 TailCall | 
processLeavingTail(XPathContext context)
Process this instruction  | 
 boolean | 
replaceSubExpression(Expression original,
                     Expression replacement)
Replace one subexpression by a replacement subexpression  | 
 void | 
setRejectDuplicates()
Indicate that two attributes with the same name are not acceptable.  | 
 Expression | 
simplify(StaticContext env)
Simplify an expression.  | 
| Methods inherited from class net.sf.saxon.instruct.SimpleNodeConstructor | 
|---|
computeCardinality, createsNewNodes, evaluateItem, expandChildren, getSelect, iterate, optimize, setSelect, typeCheck | 
| Methods inherited from class net.sf.saxon.instruct.Instruction | 
|---|
appendItem, evaluateAsString, getImplementationMethod, getInstructionInfo, getSourceLocator, isXSLT, process, promote | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface javax.xml.transform.SourceLocator | 
|---|
getColumnNumber, getLineNumber, getPublicId, getSystemId | 
| Constructor Detail | 
|---|
public ComputedAttribute(Expression attributeName,
                         Expression namespace,
                         NamespaceResolver nsContext,
                         int validationAction,
                         SimpleType schemaType,
                         int annotation,
                         boolean allowNameAsQName)
attributeName - An expression to calculate the attribute namenamespace - An expression to calculate the attribute namespacensContext - a NamespaceContext object containing the static namespace context of the
 stylesheet instructionvalidationAction - e.g. validation=strict, lax, strip, preserveschemaType - 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 attributeallowNameAsQName - | Method Detail | 
|---|
public void setRejectDuplicates()
public int getInstructionNameCode()
getInstructionNameCode in class Instructionpublic Expression getNameExpression()
public Expression getNamespaceExpression()
public NamespaceResolver getNamespaceResolver()
public ItemType getItemType(TypeHierarchy th)
Instruction
getItemType in class Instructionpublic int getCardinality()
Expression
getCardinality in class Expressionpublic int computeSpecialProperties()
computeSpecialProperties in class SimpleNodeConstructor
public Expression simplify(StaticContext env)
                    throws XPathException
Instruction
simplify in class SimpleNodeConstructorXPathException - if an error is discovered during expression
     rewriting
public void localTypeCheck(StaticContext env,
                           ItemType contextItemType)
                    throws XPathException
SimpleNodeConstructor
localTypeCheck in class SimpleNodeConstructorXPathExceptionpublic Iterator iterateSubExpressions()
iterateSubExpressions in class SimpleNodeConstructor
public boolean replaceSubExpression(Expression original,
                                    Expression replacement)
replaceSubExpression in interface ContainerreplaceSubExpression in class SimpleNodeConstructororiginal - the original subexpressionreplacement - the replacement subexpression
public void checkPermittedContents(SchemaType parentType,
                                   StaticContext env,
                                   boolean whole)
                            throws XPathException
checkPermittedContents in class ExpressionXPathException
public TailCall processLeavingTail(XPathContext context)
                            throws XPathException
processLeavingTail in interface TailCallReturnerprocessLeavingTail in class Instructioncontext - the dynamic context of the transformation
XPathException
public int evaluateNameCode(XPathContext context)
                     throws XPathException
evaluateNameCode in class SimpleNodeConstructorcontext - Dynamic evaluation context
XPathException
public void display(int level,
                    PrintStream out,
                    Configuration config)
display in class SimpleNodeConstructorlevel - indentation level for this expressionout - Output destination
  | 
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||