|
|||||||
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.ParentNodeConstructor
net.sf.saxon.instruct.ElementCreator
net.sf.saxon.instruct.FixedElement
public class FixedElement
An instruction that creates an element node whose name is known statically. Used for literal results elements in XSLT, for direct element constructors in XQuery, and for xsl:element in cases where the name and namespace are known statically.
Field Summary |
---|
Fields inherited from class net.sf.saxon.expr.Expression |
---|
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD |
Constructor Summary | |
---|---|
FixedElement(int nameCode,
int[] namespaceCodes,
boolean inheritNamespaces,
SchemaType schemaType,
int validation)
Create an instruction that creates a new element node |
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. |
void |
display(int level,
PrintStream out,
Configuration config)
Display this instruction as an expression, for diagnostics |
int[] |
getActiveNamespaces()
Callback to get a list of the intrinsic namespaces that need to be generated for the element. |
InstructionInfo |
getInstructionInfo()
Get InstructionInfo for this expression |
ItemType |
getItemType(TypeHierarchy th)
Get the type of the item returned by this instruction |
int |
getNameCode(XPathContext context)
Callback from the superclass ElementCreator to get the nameCode for the element name |
String |
getNewBaseURI(XPathContext context)
Get the base URI for the element being constructed |
Expression |
simplify(StaticContext env)
Simplify an expression. |
Methods inherited from class net.sf.saxon.instruct.ElementCreator |
---|
computeSpecialProperties, evaluateItem, getImplementationMethod, isInheritNamespaces, isValidating, processLeavingTail, setValidationMode, suppressValidation |
Methods inherited from class net.sf.saxon.instruct.ParentNodeConstructor |
---|
computeCardinality, createsNewNodes, getBaseURI, getCardinality, getContentExpression, getSchemaType, getValidationMode, isLazyConstruction, isNamespaceSensitive, iterateSubExpressions, optimize, replaceSubExpression, setBaseURI, setContentExpression, setLazyConstruction, setSchemaType, typeCheck |
Methods inherited from class net.sf.saxon.instruct.Instruction |
---|
appendItem, evaluateAsString, getInstructionNameCode, getSourceLocator, isXSLT, iterate, 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 FixedElement(int nameCode, int[] namespaceCodes, boolean inheritNamespaces, SchemaType schemaType, int validation)
nameCode
- Represents the name of the element nodenamespaceCodes
- List of namespaces to be added to the element node.
May be null if none are required.inheritNamespaces
- true if the children of this element are to inherit its namespacesschemaType
- Type annotation for the new element nodeMethod Detail |
---|
public InstructionInfo getInstructionInfo()
Expression
getInstructionInfo
in interface InstructionInfoProvider
getInstructionInfo
in class Instruction
public Expression simplify(StaticContext env) throws XPathException
simplify
in class ParentNodeConstructor
XPathException
- if an error is discovered during expression rewritingpublic ItemType getItemType(TypeHierarchy th)
getItemType
in class ElementCreator
th
- The type hierarchy cache
public int getNameCode(XPathContext context)
getNameCode
in class ElementCreator
context
- The evaluation context (not used)
public String getNewBaseURI(XPathContext context)
ElementCreator
getNewBaseURI
in class ElementCreator
public void checkPermittedContents(SchemaType parentType, StaticContext env, boolean whole) throws XPathException
checkPermittedContents
in class Expression
XPathException
public int[] getActiveNamespaces()
getActiveNamespaces
in class ElementCreator
public void display(int level, PrintStream out, Configuration config)
display
in class Expression
level
- indentation level for this expressionout
- Output destination
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |