java.io.Serializable, javax.xml.transform.SourceLocator, LocationProvider, SaxonLocator, EvaluableItem, SequenceIterable, TailCallReturner, InstructionInfo, org.xml.sax.LocatorComputedElement, Copy, FixedElementpublic abstract class ElementCreator extends ParentNodeConstructor
| Modifier and Type | Field | Description |
|---|---|---|
protected boolean |
inheritNamespaces |
The inheritNamespaces flag indicates that the namespace nodes on the element created by this instruction
are to be inherited (copied) on the children of this element.
|
protected boolean |
preservingTypes |
Flag set to true if validation=preserve and no schema type supplied for validation
|
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticPropertiescontent| Constructor | Description |
|---|---|
ElementCreator() |
Construct an ElementCreator.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
checkContentSequence(StaticContext env) |
Check statically whether the content of the element creates attributes or namespaces
after creating any child nodes
|
int |
computeSpecialProperties() |
Get the static properties of this expression (other than its type).
|
Item |
evaluateItem(XPathContext context) |
Evaluate the constructor, returning the constructed element node.
|
int[] |
getActiveNamespaces() |
Callback to get a list of the intrinsic namespaces that need to be generated for the element.
|
int |
getImplementationMethod() |
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
ItemType |
getItemType(TypeHierarchy th) |
Get the item type of the value returned by this instruction
|
abstract int |
getNameCode(XPathContext context) |
Determine (at run-time) the name code of the element being constructed
|
abstract java.lang.String |
getNewBaseURI(XPathContext context) |
Get the base URI for the element being constructed
|
boolean |
isInheritNamespaces() |
Determine whether the inherit namespaces flag is set
|
boolean |
isPreservingTypes() |
Determine whether this elementCreator performs validation or strips type annotations
|
EventIterator |
iterateEvents(XPathContext context) |
Deliver the result of the expression as a sequence of events.
|
protected abstract void |
outputNamespaceNodes(XPathContext context,
Receiver receiver) |
Callback to output namespace nodes for the new element.
|
TailCall |
processLeavingTail(XPathContext context) |
Evaluate the instruction to produce a new element node.
|
void |
setValidationMode(int mode) |
Set the validation mode for the new element
|
void |
suppressValidation(int validationMode) |
Suppress validation on contained element constructors, on the grounds that the parent element
is already performing validation.
|
adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, copy, display, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, explain, findParentOf, getColumnNumber, getColumnNumber, getContainer, getDependencies, getExecutable, getHostLanguage, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isUpdatingExpression, markTailFunctionCalls, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, toString, typeErrorassembleParams, assembleTunnelParams, dynamicError, evaluateAsString, getConstructType, getInstructionNameCode, getSourceLocator, isXSLT, iterate, process, promoteclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddToPathMap, computeCardinality, createsNewNodes, getBaseURI, getCardinality, getContentExpression, getSchemaType, getValidationMode, isLazyConstruction, isNamespaceSensitive, iterateSubExpressions, optimize, promoteInst, replaceSubExpression, setBaseURI, setContentExpression, setLazyConstruction, setSchemaType, simplify, typeCheckprotected boolean inheritNamespaces
protected boolean preservingTypes
public ElementCreator()
public ItemType getItemType(TypeHierarchy th)
getItemType in class Instructionth - the type hierarchy cachepublic boolean isPreservingTypes()
public boolean isInheritNamespaces()
public int computeSpecialProperties()
computeSpecialProperties in class Instructionpublic void setValidationMode(int mode)
setValidationMode in class ParentNodeConstructormode - the validation mode, for example Validation.STRICTpublic void suppressValidation(int validationMode)
suppressValidation in class ExpressionvalidationMode - the kind of validation being performed on the parent expressionprotected void checkContentSequence(StaticContext env) throws XPathException
checkContentSequence in class ParentNodeConstructorenv - the static contextXPathExceptionpublic abstract int getNameCode(XPathContext context) throws XPathException
context - the XPath dynamic evaluation contextXPathException - if a failure occurspublic abstract java.lang.String getNewBaseURI(XPathContext context)
context - the XPath dynamic evaluation contextprotected abstract void outputNamespaceNodes(XPathContext context, Receiver receiver) throws XPathException
context - The execution contextreceiver - the Receiver where the namespace nodes are to be writtenXPathExceptionpublic int[] getActiveNamespaces()
throws XPathException
XPathExceptionpublic int getImplementationMethod()
getImplementationMethod in class InstructionExpression.ITERATE_METHOD or Expression.EVALUATE_METHOD or
Expression.PROCESS_METHODpublic EventIterator iterateEvents(XPathContext context) throws XPathException
ExpressionThe events (of class PullEvent) are either complete
items, or one of startElement, endElement, startDocument, or endDocument, known
as semi-nodes. The stream of events may also include a nested EventIterator.
If a start-end pair exists in the sequence, then the events between
this pair represent the content of the document or element. The content sequence will
have been processed to the extent that any attribute and namespace nodes in the
content sequence will have been merged into the startElement event. Namespace fixup
will have been performed: that is, unique prefixes will have been allocated to element
and attribute nodes, and all namespaces will be declared by means of a namespace node
in the startElement event or in an outer startElement forming part of the sequence.
However, duplicate namespaces may appear in the sequence.
The content of an element or document may include adjacent or zero-length text nodes, atomic values, and nodes represented as nodes rather than broken down into events.
iterateEvents in class Expressioncontext - The dynamic evaluation contextXPathException - if a dynamic error occurs during expression evaluationpublic TailCall processLeavingTail(XPathContext context) throws XPathException
processLeavingTail in interface TailCallReturnerprocessLeavingTail in class Instructioncontext - XPath dynamic evaluation contextXPathExceptionpublic Item evaluateItem(XPathContext context) throws XPathException
evaluateItem in interface EvaluableItemevaluateItem in class Instructioncontext - The context in which the expression is to be evaluatedXPathException - if any dynamic error occurs evaluating the
expression