| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.instruct.Instruction net.sf.saxon.instruct.ParentNodeConstructor net.sf.saxon.instruct.ElementCreator net.sf.saxon.instruct.FixedElement
FixedElement | public class FixedElement extends ElementCreator (Code) | | 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.
|
Constructor Summary | |
public | FixedElement(int nameCode, int[] namespaceCodes, boolean inheritNamespaces, SchemaType schemaType, int validation) |
namespaceCodes | protected int[] namespaceCodes(Code) | | |
FixedElement | public FixedElement(int nameCode, int[] namespaceCodes, boolean inheritNamespaces, SchemaType schemaType, int validation)(Code) | | Create an instruction that creates a new element node
Parameters: nameCode - Represents the name of the element node Parameters: namespaceCodes - List of namespaces to be added to the element node.May be null if none are required. Parameters: inheritNamespaces - true if the children of this element are to inherit its namespaces Parameters: schemaType - Type annotation for the new element node |
checkPermittedContents | public void checkPermittedContents(SchemaType parentType, StaticContext env, boolean whole) throws XPathException(Code) | | Check that any elements and attributes constructed or returned by this expression are acceptable
in the content model of a given complex type. It's always OK to say yes, since the check will be
repeated at run-time. The process of checking element and attribute constructors against the content
model of a complex type also registers the type of content expected of those constructors, so the
static validation can continue recursively.
|
display | public void display(int level, NamePool pool, PrintStream out)(Code) | | Display this instruction as an expression, for diagnostics
|
getActiveNamespaces | public int[] getActiveNamespaces() throws XPathException(Code) | | Callback to get a list of the intrinsic namespaces that need to be generated for the element.
The result is an array of namespace codes, the codes either occupy the whole array or are
terminated by a -1 entry. A result of null is equivalent to a zero-length array.
|
getItemType | public ItemType getItemType(TypeHierarchy th)(Code) | | Get the type of the item returned by this instruction
the item type Parameters: th - |
getNameCode | public int getNameCode(XPathContext context)(Code) | | Callback from the superclass ElementCreator to get the nameCode
for the element name
Parameters: context - The evaluation context (not used) the name code for the element name |
getXSIType | public SchemaType getXSIType(StaticContext env) throws XPathException(Code) | | Determine whether the element constructor creates a fixed xsi:type attribute, and if so, return the
relevant type.
the type denoted by the constructor's xsi:type attribute if there is one.Return null if there is no xsi:type attribute, or if the value of the xsi:typeattribute is a type that is not statically known (this is allowed) throws: XPathException - if there is an xsi:type attribute and its value is not a QName. |
outputNamespaceNodes | protected void outputNamespaceNodes(XPathContext context, Receiver out) throws XPathException(Code) | | Callback from the superclass ElementCreator to output the namespace nodes
Parameters: context - The evaluation context (not used) Parameters: out - The receiver to handle the output |
Fields inherited from net.sf.saxon.instruct.ElementCreator | protected boolean inheritNamespaces(Code)(Java Doc)
|
|
|