java.io.Serializable
, javax.xml.transform.Source
, javax.xml.transform.SourceLocator
, LocationProvider
, SaxonLocator
, PullEvent
, Container
, FingerprintedNode
, Item<NodeInfo>
, MutableNodeInfo
, NamespaceResolver
, NodeInfo
, ValueRepresentation<NodeInfo>
, InstructionInfo
, SiblingCountingNode
, org.xml.sax.Locator
AbsentExtensionElement
, ExtensionInstruction
, LiteralResultElement
, SQLColumn
, XSLAnalyzeString
, XSLApplyImports
, XSLApplyTemplates
, XSLAttributeSet
, XSLCallTemplate
, XSLCharacterMap
, XSLChoose
, XSLCopy
, XSLCopyOf
, XSLDecimalFormat
, XSLDocument
, XSLElement
, XSLFallback
, XSLForEach
, XSLForEachGroup
, XSLFunction
, XSLGeneralIncorporate
, XSLGeneralVariable
, XSLIf
, XSLImportSchema
, XSLKey
, XSLLeafNodeConstructor
, XSLMatchingSubstring
, XSLMessage
, XSLNamespaceAlias
, XSLNextMatch
, XSLNumber
, XSLOtherwise
, XSLOutput
, XSLOutputCharacter
, XSLPerformSort
, XSLPreserveSpace
, XSLResultDocument
, XSLSequence
, XSLSortOrMergeKey
, XSLStylesheet
, XSLTemplate
, XSLWhen
public abstract class StyleElement extends ElementImpl implements org.xml.sax.Locator, Container, InstructionInfo
Note: this class implements Locator. The element retains information about its own location in the stylesheet, which is useful when an XSLT static error is found.
Modifier and Type | Field | Description |
---|---|---|
static int |
ACTION_COMPILE |
|
static int |
ACTION_FIXUP |
|
static int |
ACTION_OPTIMIZE |
|
static int |
ACTION_PROCESS_ATTRIBUTES |
|
static int |
ACTION_TYPECHECK |
|
static int |
ACTION_VALIDATE |
|
protected int |
actionsCompleted |
|
protected java.lang.String |
defaultCollationName |
|
protected java.lang.String |
defaultXPathNamespace |
|
protected java.lang.String[] |
extensionNamespaces |
|
static int |
REPORT_ALWAYS |
|
static int |
REPORT_IF_INSTANTIATED |
|
static int |
REPORT_UNLESS_FALLBACK_AVAILABLE |
|
static int |
REPORT_UNLESS_FORWARDS_COMPATIBLE |
|
protected int |
reportingCircumstances |
|
protected ExpressionContext |
staticContext |
|
protected XPathException |
validationError |
|
protected DecimalValue |
version |
|
protected static java.lang.String[] |
YES_NO |
NODE_LETTER
ALL_NAMESPACES, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES
Constructor | Description |
---|---|
StyleElement() |
Constructor
|
Modifier and Type | Method | Description |
---|---|---|
protected int |
allocateLocationId(java.lang.String systemId,
int lineNumber) |
Allocate a location identifier
|
void |
allocatePatternSlots(int slots) |
Allocate space for range variables within predicates in the match pattern.
|
void |
allocateSlots(Expression exp) |
Allocate slots in the local stack frame to range variables used in an XPath expression
|
XSLVariableDeclaration |
bindLocalVariable(StructuredQName qName) |
Bind a variable reference used in this element to the compiled form of the XSLVariable element in which it is
declared, considering only local variables and params
|
XSLVariableDeclaration |
bindVariable(StructuredQName qName) |
Bind a variable used in this element to the compiled form of the XSLVariable element in which it is
declared
|
protected void |
checkAttributeValue(java.lang.String name,
java.lang.String value,
boolean avt,
java.lang.String[] allowed) |
Check the value of an attribute, as supplied statically
|
void |
checkEmpty() |
Convenience method to check that the stylesheet element is empty
|
protected void |
checkSortComesFirst(boolean sortRequired) |
Check that among the children of this element, any xsl:sort elements precede any other elements
|
void |
checkTopLevel(java.lang.String errorCode) |
Convenience method to check that the stylesheet element is at the top level
|
protected void |
checkUnknownAttribute(NodeName nc) |
Check whether an unknown attribute is permitted.
|
Expression |
compile(Executable exec,
Declaration decl) |
Compile the instruction on the stylesheet tree into an executable instruction
for use at run-time.
|
void |
compileDeclaration(Executable exec,
Declaration decl) |
Compile a declaration in the stylesheet tree
for use at run-time.
|
protected void |
compileError(java.lang.String message) |
Report a static error in the stylesheet
|
void |
compileError(java.lang.String message,
java.lang.String errorCode) |
Compile time error, specifying an error code
|
void |
compileError(java.lang.String message,
StructuredQName errorCode) |
Compile time error, specifying an error code
|
protected void |
compileError(XPathException error) |
Report an error with diagnostic information
|
Expression |
compileSequenceConstructor(Executable exec,
Declaration decl,
SequenceIterator iter,
boolean includeParams) |
Compile the children of this instruction on the stylesheet tree, adding the
subordinate instructions to the parent instruction on the execution tree.
|
protected void |
compileWarning(java.lang.String message,
java.lang.String errorCode) |
|
protected void |
compileWarning(java.lang.String message,
StructuredQName errorCode) |
|
protected boolean |
definesExcludedNamespace(java.lang.String uri) |
Check whether this node excludes a particular namespace from the result.
|
protected boolean |
definesExtensionElement(java.lang.String uri) |
Check whether a particular extension element namespace is defined on this node.
|
protected Expression |
fallbackProcessing(Executable exec,
Declaration decl,
StyleElement instruction) |
Perform fallback processing.
|
void |
fixupReferences() |
Fix up references from XPath expressions.
|
boolean |
forwardsCompatibleModeIsEnabled() |
Determine whether forwards-compatible mode is enabled for this element
|
protected AttributeSet[] |
getAttributeSets(java.lang.String use,
java.util.List<Declaration> list) |
Get the list of attribute-sets associated with this element.
|
java.lang.String |
getAttributeValue(java.lang.String clarkName) |
Get an attribute value given the Clark name of the attribute (that is,
the name in {uri}local format).
|
int |
getColumnNumber(long locationId) |
Get the column number within the document, entity, or module containing a particular location
|
protected ItemType |
getCommonChildItemType() |
Get the most general type of item returned by the children of this instruction
|
int |
getConstructType() |
Get the type of construct.
|
int |
getContainerGranularity() |
Get the granularity of the container.
|
SlotManager |
getContainingSlotManager() |
Get the SlotManager for the containing Procedure definition
|
XSLStylesheet |
getContainingStylesheet() |
Get the containing XSLStylesheet element
|
protected java.lang.String |
getDefaultCollationName() |
Get the default collation for this stylesheet element.
|
protected java.lang.String |
getDefaultXPathNamespace() |
Get the default XPath namespace for elements and types
|
DecimalValue |
getEffectiveVersion() |
Get the numeric value of the version number appearing as an attribute on this element,
or inherited from its ancestors
|
Executable |
getExecutable() |
Get the Executable (representing a complete stylesheet or query) of which this Container forms part
|
int |
getHostLanguage() |
Get the host language (XSLT, XQuery, XPath) used to implement the code in this container
|
protected StyleElement |
getLastChildInstruction() |
Find the last child instruction of this instruction.
|
int |
getLineNumber(long locationId) |
Get the line number within the document, entity or module containing a particular location
|
LocationProvider |
getLocationProvider() |
Get the LocationProvider allowing location identifiers to be resolved.
|
NamespaceResolver |
getNamespaceResolver() |
Get the namespace context of the instruction.
|
StructuredQName |
getObjectName() |
Get a name identifying the object of the expression, for example a function name, template name,
variable name, key name, element name, etc.
|
PreparedStylesheet |
getPreparedStylesheet() |
Get the PreparedStylesheet object.
|
PrincipalStylesheetModule |
getPrincipalStylesheetModule() |
Get the principal stylesheet module
|
DecimalValue |
getProcessorVersion() |
Determine what version of the XSLT the configured processor supports
|
java.util.Iterator<java.lang.String> |
getProperties() |
Get an iterator over all the properties available.
|
java.lang.Object |
getProperty(java.lang.String name) |
Get the value of a particular property of the instruction.
|
protected ItemType |
getReturnedItemType() |
Determine the type of item returned by this instruction (only relevant if
it is an instruction).
|
SchemaType |
getSchemaType(java.lang.String typeAtt) |
Get the Schema type definition for a type named in the stylesheet (in a
"type" attribute).
|
StaticContext |
getStaticContext() |
Get the static context for expressions on this element
|
java.lang.String |
getSystemId(long locationId) |
Get the URI of the document, entity, or module containing a particular location
|
SimpleType |
getTypeAnnotation(SchemaType schemaType) |
Get the type annotation to use for a given schema type
|
protected WithParam[] |
getWithParamInstructions(Executable exec,
Declaration decl,
boolean tunnel,
Expression caller) |
Get the list of xsl:with-param elements for a calling element (apply-templates,
call-template, apply-imports, next-match).
|
protected void |
index(Declaration decl,
PrincipalStylesheetModule top) |
Method supplied by declaration elements to add themselves to a stylesheet-level index
|
boolean |
isActionCompleted(int action) |
Ask if an action on this StyleElement has been completed
|
boolean |
isDeclaration() |
Ask whether this node is a declaration, that is, a permitted child of xsl:stylesheet
(including xsl:include and xsl:import).
|
boolean |
isExcludedNamespace(java.lang.String uri) |
Check whether a namespace uri defines an namespace excluded from the result.
|
protected boolean |
isExplaining() |
Determine whether saxon:explain has been set to "yes"
|
boolean |
isExtensionNamespace(java.lang.String uri) |
Check whether a namespace uri defines an extension element.
|
boolean |
isInstruction() |
Ask whether this node is an instruction.
|
protected boolean |
isPermittedChild(StyleElement child) |
Check whether a given child is permitted for this element.
|
protected void |
issueWarning(java.lang.String message,
javax.xml.transform.SourceLocator locator) |
Report a warning to the error listener
|
protected void |
issueWarning(javax.xml.transform.TransformerException error) |
Report a warning to the error listener
|
boolean |
isTopLevel() |
Test whether this is a top-level element
|
boolean |
isXslt30Processor() |
Ask whether the configured XSLT processor supports XSLT 3.0
|
protected Expression |
makeAttributeValueTemplate(java.lang.String expression) |
Make an attribute value template in the context of this stylesheet element
|
Expression |
makeExpression(java.lang.String expression) |
Compile an XPath expression in the context of this stylesheet element
|
ExpressionVisitor |
makeExpressionVisitor() |
Make an expression visitor
|
SavedNamespaceContext |
makeNamespaceContext() |
Make a NamespaceContext object representing the list of in-scope namespaces.
|
Pattern |
makePattern(java.lang.String pattern) |
Make a pattern in the context of this stylesheet element
|
StructuredQName |
makeQName(java.lang.String lexicalQName) |
Make a structured QName, using this Element as the context for namespace resolution, and
registering the code in the namepool.
|
SequenceType |
makeSequenceType(java.lang.String sequenceType) |
Process an attribute whose value is a SequenceType
|
SortKeyDefinition[] |
makeSortKeys(Declaration decl) |
Construct sort keys for a SortedIterator
|
protected static Expression |
makeTraceInstruction(StyleElement source,
Expression child) |
Create a trace instruction to wrap a real instruction
|
protected boolean |
markTailCalls() |
Mark tail-recursive calls on templates and functions.
|
protected boolean |
mayContainFallback() |
Determine whether this type of element is allowed to contain an xsl:fallback
instruction.
|
protected boolean |
mayContainParam(java.lang.String attName) |
Determine whether this type of element is allowed to contain an xsl:param element
|
protected boolean |
mayContainSequenceConstructor() |
Determine whether this type of element is allowed to contain a sequence constructor
|
void |
postValidate() |
Hook to allow additional validation of a parent element immediately after its
children have been validated.
|
protected abstract void |
prepareAttributes() |
Set the attribute list for the element.
|
protected void |
processAllAttributes() |
Process the attributes of this element and all its children
|
protected void |
processAttributes() |
Process the attribute list for the element.
|
protected void |
processDefaultCollationAttribute() |
Process the [xsl:]default-xpath-namespace attribute if there is one
|
protected void |
processDefaultXPathNamespaceAttribute(java.lang.String ns) |
Process the [xsl:]xpath-default-namespace attribute if there is one
|
protected void |
processExcludedNamespaces(java.lang.String ns) |
Process the [xsl:]exclude-result-prefixes attribute if there is one
|
protected void |
processExtensionElementAttribute(java.lang.String ns) |
Process the [xsl:]extension-element-prefixes attribute if there is one
|
void |
processStandardAttributes(java.lang.String namespace) |
Process the standard attributes such as [xsl:]default-collation
|
protected void |
processVersionAttribute(java.lang.String ns) |
Process the [xsl:]version attribute if there is one
|
void |
reportAbsence(java.lang.String attribute) |
Convenience method to report the absence of a mandatory attribute
|
protected boolean |
seesAvuncularVariables() |
Ask whether variables declared in an "uncle" element are visible.
|
void |
setActionCompleted(int action) |
Say that an action on this StyleElement has been completed
|
void |
setObjectName(StructuredQName qName) |
Set the object name, for example the name of a function, variable, or template declared on this element
|
void |
setValidationError(javax.xml.transform.TransformerException reason,
int circumstances) |
Set a validation error.
|
void |
substituteFor(StyleElement temp) |
Make this node a substitute for a temporary one previously added to the tree.
|
Expression |
typeCheck(java.lang.String name,
Expression exp) |
Type-check an expression.
|
Pattern |
typeCheck(java.lang.String name,
Pattern pattern) |
Type-check a pattern.
|
protected void |
undeclaredNamespaceError(java.lang.String prefix,
java.lang.String errorCode) |
|
void |
validate(Declaration decl) |
Check that the stylesheet element is valid.
|
protected void |
validateChildren(Declaration decl) |
Validate the children of this node, recursively.
|
void |
validateSubtree(Declaration decl) |
Recursive walk through the stylesheet to validate all nodes
|
boolean |
xPath10ModeIsEnabled() |
Determine whether 1.0-compatible mode is enabled for this element
|
addAttribute, addNamespace, copy, delete, fixupInsertedNamespaces, generateId, getAttributeList, getAttributeValue, getAttributeValue, getBaseURI, getColumnNumber, getDeclaredNamespaces, getDocumentRoot, getLineNumber, getNameCode, getNamespaceList, getNodeKind, getPrefixForURI, getRoot, getSchemaType, getSystemId, getTypeAnnotation, getURIForPrefix, gsetAttributeCollection, initialise, isId, isNilled, iteratePrefixes, removeAttribute, removeTypeAnnotation, rename, replaceStringValue, setAttributeList, setLocation, setNameCode, setNamespaceDeclarations, setNamespaceList, setSystemId, setTypeAnnotation
getLineNumber, getSystemId
atomize, compareOrder, equals, getConfiguration, getDisplayName, getDocumentNumber, getFingerprint, getLocalPart, getNamePool, getNextInDocument, getNextSibling, getParent, getPhysicalRoot, getPrefix, getPreviousInDocument, getPreviousSibling, getPublicId, getRawParent, getSiblingPosition, getTypedValue, getURI, insertSiblings, isDeleted, isIdref, isSameNodeInfo, iterateAxis, iterateAxis, newBuilder, replace, setRawParent, setSiblingPosition
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChild, compact, enumerateChildren, getFirstChild, getLastChild, getNthChild, getNumberOfChildren, getRawSequenceNumber, getSequenceNumber, getStringValue, getStringValueCS, hasChildNodes, insertChildren, insertChildrenAt, removeChild, replaceChildrenAt, setChildren, setRawSequenceNumber
protected java.lang.String[] extensionNamespaces
protected DecimalValue version
protected ExpressionContext staticContext
protected XPathException validationError
protected int reportingCircumstances
protected java.lang.String defaultXPathNamespace
protected java.lang.String defaultCollationName
public static final int REPORT_ALWAYS
public static final int REPORT_UNLESS_FORWARDS_COMPATIBLE
public static final int REPORT_IF_INSTANTIATED
public static final int REPORT_UNLESS_FALLBACK_AVAILABLE
protected int actionsCompleted
public static final int ACTION_VALIDATE
public static final int ACTION_COMPILE
public static final int ACTION_TYPECHECK
public static final int ACTION_OPTIMIZE
public static final int ACTION_FIXUP
public static final int ACTION_PROCESS_ATTRIBUTES
protected static final java.lang.String[] YES_NO
public Executable getExecutable()
Container
getExecutable
in interface Container
public LocationProvider getLocationProvider()
getLocationProvider
in interface Container
public StaticContext getStaticContext()
public int getContainerGranularity()
getContainerGranularity
in interface Container
public ExpressionVisitor makeExpressionVisitor()
protected boolean isExplaining()
public void substituteFor(StyleElement temp)
temp
- the element which this one is substituting forpublic void setValidationError(javax.xml.transform.TransformerException reason, int circumstances)
reason
- the details of the errorcircumstances
- a code identifying the circumstances under which the error is to be reportedpublic boolean isInstruction()
public boolean isDeclaration()
protected ItemType getReturnedItemType()
protected ItemType getCommonChildItemType()
protected boolean markTailCalls()
protected boolean mayContainSequenceConstructor()
protected boolean mayContainFallback()
protected boolean mayContainParam(java.lang.String attName)
attName
- if null, the method tests whether an xsl:param child is allowed.
If non-null, it tests whether an xsl:param child with the given attribute name is allowedpublic XSLStylesheet getContainingStylesheet()
public final StructuredQName makeQName(java.lang.String lexicalQName) throws XPathException, NamespaceException
lexicalQName
- The lexical QName as written, in the form "[prefix:]localname". The name must have
already been validated as a syntactically-correct QName. Leading and trailing whitespace
will be trimmedXPathException
- if the qname is not a lexically-valid QName, or if the name
is in a reserved namespace.NamespaceException
- if the prefix of the qname has not been declaredpublic SavedNamespaceContext makeNamespaceContext()
public NamespaceResolver getNamespaceResolver()
protected void processAllAttributes() throws XPathException
XPathException
- in the event of a static error being detectedpublic void processStandardAttributes(java.lang.String namespace) throws XPathException
namespace
- either "" to find the attributes in the null namespace,
or NamespaceConstant.XSLT to find them in the XSLT namespaceXPathException
- if any of the standard attributes is incorrectpublic java.lang.String getAttributeValue(java.lang.String clarkName)
clarkName
- the name of the attribute in {uri}local formatprotected final void processAttributes() throws XPathException
XPathException
- if a static error is detectedprotected void checkUnknownAttribute(NodeName nc) throws XPathException
nc
- The name code of the attribute nameXPathException
- (and reports the error) if this is an attribute
that is not permitted on the containing elementprotected abstract void prepareAttributes() throws XPathException
XPathException
- if a static error is detectedprotected StyleElement getLastChildInstruction()
public Expression makeExpression(java.lang.String expression) throws XPathException
expression
- the source text of the XPath expressionXPathException
- if a static error is detected in the XPath expressionpublic Pattern makePattern(java.lang.String pattern) throws XPathException
pattern
- the source text of the patternXPathException
- if a static error is detected in the patternprotected Expression makeAttributeValueTemplate(java.lang.String expression) throws XPathException
expression
- the source text of the attribute value templateXPathException
- if a static error is detected in the AVTprotected void checkAttributeValue(java.lang.String name, java.lang.String value, boolean avt, java.lang.String[] allowed) throws XPathException
name
- the name of the attributevalue
- the value of the attributeavt
- set to true if the value is permitted to be an attribute value templateallowed
- list of permitted values, which must be in alphabetical orderXPathException
- if the value given for the attribute is not a permitted valuepublic SequenceType makeSequenceType(java.lang.String sequenceType) throws XPathException
sequenceType
- the source text of the attributeXPathException
- if the syntax is invalid or for example if it refers to a type
that is not in the static contextprotected void processExtensionElementAttribute(java.lang.String ns) throws XPathException
ns
- the namespace URI of the attribute - either the XSLT namespace or "" for the null namespaceXPathException
- if the value of the attribute is invalidprotected void processExcludedNamespaces(java.lang.String ns) throws XPathException
ns
- the namespace URI of the attribute required, either the XSLT namespace or ""XPathException
- if the value of the attribute is invalidprotected void processVersionAttribute(java.lang.String ns) throws XPathException
ns
- the namespace URI of the attribute required, either the XSLT namespace or ""XPathException
- if the value of the attribute is invalidpublic DecimalValue getEffectiveVersion()
public boolean forwardsCompatibleModeIsEnabled()
public boolean xPath10ModeIsEnabled()
public DecimalValue getProcessorVersion()
public boolean isXslt30Processor()
protected void processDefaultCollationAttribute() throws XPathException
XPathException
- if the value is not a valid URI, or not a recognized collation URIprotected java.lang.String getDefaultCollationName()
protected boolean definesExtensionElement(java.lang.String uri)
uri
- the namespace URI being testedpublic boolean isExtensionNamespace(java.lang.String uri)
uri
- the namespace URI being testedprotected boolean definesExcludedNamespace(java.lang.String uri)
uri
- the namespace URI being testedpublic boolean isExcludedNamespace(java.lang.String uri)
uri
- the namespace URI being testedprotected void processDefaultXPathNamespaceAttribute(java.lang.String ns)
ns
- the namespace URI of the attribute required (the default namespace or the XSLT namespace.)protected java.lang.String getDefaultXPathNamespace()
NamespaceConstant.NULL
for the non-namespacepublic SchemaType getSchemaType(java.lang.String typeAtt) throws XPathException
typeAtt
- the value of the type attributeXPathException
- if the type is not declared in an
imported schema, or is not a built-in typepublic SimpleType getTypeAnnotation(SchemaType schemaType)
schemaType
- the schema typepublic void validate(Declaration decl) throws XPathException
decl
- the declaration to be validatedXPathException
- if any error is found during validationpublic void postValidate() throws XPathException
XPathException
- if any error is found during post-traversal validationprotected void index(Declaration decl, PrincipalStylesheetModule top) throws XPathException
decl
- the Declaration being indexed. (This corresponds to the StyleElement object
except in cases where one module is imported several times with different precedence.)top
- the outermost XSLStylesheet elementXPathException
- if any error is encounteredpublic Expression typeCheck(java.lang.String name, Expression exp) throws XPathException
name
- the name of the attribute containing the expression to be checked (used for diagnostics)exp
- the expression to be checkedXPathException
- if type-checking fails statically, that is, if it can be determined that the
supplied value for the expression cannot possibly be of the required typepublic void allocateSlots(Expression exp)
exp
- the XPath expression for which slots are to be allocatedpublic void allocatePatternSlots(int slots)
slots
- the number of slots requiredpublic Pattern typeCheck(java.lang.String name, Pattern pattern) throws XPathException
name
- the name of the attribute holding the pattern, for example "match": used in
diagnosticspattern
- the compiled patternXPathException
- if the pattern fails optimistic static type-checkingpublic void fixupReferences() throws XPathException
XPathException
- if any references cannot be fixed up.public SlotManager getContainingSlotManager()
public void validateSubtree(Declaration decl) throws XPathException
decl
- the declaration to be validatedXPathException
- if validation failsprotected void validateChildren(Declaration decl) throws XPathException
decl
- the declaration whose children are to be validatedXPathException
- if validation failsprotected boolean isPermittedChild(StyleElement child)
child
- the child that may or may not be permittedpublic PreparedStylesheet getPreparedStylesheet()
public PrincipalStylesheetModule getPrincipalStylesheetModule()
protected void checkSortComesFirst(boolean sortRequired) throws XPathException
sortRequired
- true if there must be at least one xsl:sort elementXPathException
- if invalidpublic void checkTopLevel(java.lang.String errorCode) throws XPathException
errorCode
- the error to throw if it is not at the top level; defaults to XTSE0010
if the value is nullXPathException
- if not at top levelpublic void checkEmpty() throws XPathException
XPathException
- if it is not emptypublic void reportAbsence(java.lang.String attribute) throws XPathException
attribute
- the name of the attribute whose absence is to be reportedXPathException
- if the attribute is missingpublic Expression compile(Executable exec, Declaration decl) throws XPathException
exec
- the Executabledecl
- the containing top-level declaration, for example xsl:function or xsl:templateXPathException
- if validation failspublic void compileDeclaration(Executable exec, Declaration decl) throws XPathException
exec
- the Executabledecl
- the containing top-level declaration, for example xsl:function or xsl:templateXPathException
- if compilation failspublic Expression compileSequenceConstructor(Executable exec, Declaration decl, SequenceIterator iter, boolean includeParams) throws XPathException
exec
- the Executabledecl
- the Declaration of the containing top-level stylesheet elementiter
- Iterator over the children. This is used in the case where there are children
that are not part of the sequence constructor, for example the xsl:sort children of xsl:for-each;
the iterator can be positioned past such elements.includeParams
- true if xsl:param elements are to be treated as child instructions (true
for templates but not for functions) @return an Expression tree representing the children of this instructionXPathException
- if compilation failsprotected static Expression makeTraceInstruction(StyleElement source, Expression child)
source
- the parent elementchild
- the compiled expression tree for the instruction to be tracedprotected Expression fallbackProcessing(Executable exec, Declaration decl, StyleElement instruction) throws XPathException
exec
- the Executabledecl
- the Declaration of the top-level element containing the extension instructioninstruction
- The unknown extension instructionXPathException
- if any error occursprotected int allocateLocationId(java.lang.String systemId, int lineNumber)
systemId
- identifies the module containing the instructionlineNumber
- the line number of the instructionLocationProvider
public SortKeyDefinition[] makeSortKeys(Declaration decl) throws XPathException
decl
- the declaration containing the sort keysXPathException
- if any error is detectedprotected AttributeSet[] getAttributeSets(java.lang.String use, java.util.List<Declaration> list) throws XPathException
use
- the original value of the [xsl:]use-attribute-sets attributelist
- an empty list to hold the list of XSLAttributeSet elements in the stylesheet tree.
Or null, if these are not required.XPathException
- if any error is detectedprotected WithParam[] getWithParamInstructions(Executable exec, Declaration decl, boolean tunnel, Expression caller) throws XPathException
exec
- the Executabledecl
- the containing stylesheet declarationtunnel
- true if the tunnel="yes" parameters are wanted, false to getcaller
- the calling instruction (for example xsl:apply-templates), used
only for its location information @return an array of WithParam objects for either the ordinary parameters
or the tunnel parametersXPathException
- if any error is detectedprotected void compileError(XPathException error) throws XPathException
error
- contains information about the errorXPathException
- always, after reporting the error to the ErrorListenerprotected void compileError(java.lang.String message) throws XPathException
message
- the error messageXPathException
- always, after reporting the error to the ErrorListenerpublic void compileError(java.lang.String message, StructuredQName errorCode) throws XPathException
message
- the error messageerrorCode
- the error code. May be null if not known or not definedXPathException
- always, after reporting the error to the ErrorListenerpublic void compileError(java.lang.String message, java.lang.String errorCode) throws XPathException
message
- the error messageerrorCode
- the error code. May be null if not known or not definedXPathException
- always, after reporting the error to the ErrorListenerprotected void undeclaredNamespaceError(java.lang.String prefix, java.lang.String errorCode) throws XPathException
XPathException
protected void compileWarning(java.lang.String message, StructuredQName errorCode) throws XPathException
XPathException
protected void compileWarning(java.lang.String message, java.lang.String errorCode) throws XPathException
XPathException
protected void issueWarning(javax.xml.transform.TransformerException error)
error
- an exception containing the warning textprotected void issueWarning(java.lang.String message, javax.xml.transform.SourceLocator locator)
message
- the warning message textlocator
- the location of the problem in the source stylesheetpublic boolean isTopLevel()
public XSLVariableDeclaration bindVariable(StructuredQName qName)
qName
- The name of the variablepublic XSLVariableDeclaration bindLocalVariable(StructuredQName qName)
qName
- The name of the variableprotected boolean seesAvuncularVariables()
public int getConstructType()
Location
. This method is part of the InstructionInfo
interfacegetConstructType
in interface InstructionInfo
public StructuredQName getObjectName()
getObjectName
in interface InstructionInfo
public void setObjectName(StructuredQName qName)
qName
- the object name as a QNamepublic java.lang.Object getProperty(java.lang.String name)
InstructionInfo
interface for run-time tracing and debugging. The properties
available include all the attributes of the source instruction (named by the attribute name):
these are all provided as string values.getProperty
in interface InstructionInfo
name
- The name of the required propertypublic java.util.Iterator<java.lang.String> getProperties()
getProperties
in interface InstructionInfo
public java.lang.String getSystemId(long locationId)
LocationProvider
getSystemId
in interface LocationProvider
locationId
- identifier of the location in question (as passed down the Receiver pipeline)public int getLineNumber(long locationId)
LocationProvider
getLineNumber
in interface LocationProvider
locationId
- identifier of the location in question (as passed down the Receiver pipeline)public int getColumnNumber(long locationId)
LocationProvider
getColumnNumber
in interface LocationProvider
locationId
- identifier of the location in question (as passed down the Receiver pipeline)public int getHostLanguage()
getHostLanguage
in interface Container
Configuration.XSLT
or Configuration.XQUERY
public boolean isActionCompleted(int action)
action
- for example ACTION_VALIDATEpublic void setActionCompleted(int action)
action
- for example ACTION_VALIDATE