com.icl.saxon.style
public abstract class StyleElement extends ElementWithAttributes implements Locator
Field Summary | |
---|---|
protected Vector | attributeSets |
protected short[] | extensionNamespaces |
protected int | reportingCircumstances |
static int | REPORT_ALWAYS |
static int | REPORT_IF_INSTANTIATED |
static int | REPORT_UNLESS_FORWARDS_COMPATIBLE |
protected StaticContext | staticContext |
protected TransformerConfigurationException | validationError |
protected String | version |
Constructor Summary | |
---|---|
StyleElement()
Constructor |
Method Summary | |
---|---|
Binding | bindVariable(int fingerprint)
Bind a variable used in this element to the XSLVariable element in which it is declared |
void | checkEmpty()
Convenience method to check that the stylesheet element is empty |
void | checkNotTopLevel()
Convenience method to check that the stylesheet element is not at the top level |
void | checkTopLevel()
Convenience method to check that the stylesheet element is at the top level |
protected void | checkUnknownAttribute(int nc)
Check whether an unknown attribute is permitted. |
void | checkWithinTemplate()
Check that the stylesheet element is within a template body |
protected void | compileError(TransformerException error)
Construct an exception with diagnostic information |
protected void | compileError(String message) |
protected boolean | definesExcludedNamespace(short uriCode)
Check whether this node excludes a particular namespace from the result.
|
protected boolean | definesExtensionElement(short uriCode)
Check whether a particular extension element namespace is defined on this node.
|
boolean | doesPostProcessing()
Determine whether this element does any processing after instantiating any children.
|
protected void | fallbackProcessing(StyleElement instruction, Context context)
Perform fallback processing |
protected void | findAttributeSets(String use)
Determine the list of attribute-sets associated with this element.
|
boolean | forwardsCompatibleModeIsEnabled()
Determine whether forwards-compatible mode is enabled for this element |
XSLStyleSheet | getContainingStyleSheet()
Get the containing XSLStyleSheet element |
int | getPrecedence()
Get the import precedence of this stylesheet element. |
PreparedStyleSheet | getPreparedStyleSheet()
Get the PreparedStyleSheet object. |
protected XSLStyleSheet | getPrincipalStyleSheet()
Get the principal XSLStyleSheet node. |
StandardNames | getStandardNames()
Get the StandardNames object |
Function | getStyleSheetFunction(int fingerprint)
Get a Function declared using a saxon:function element in the stylesheet |
Binding | getVariableBinding(int fprint)
Bind a variable used in this element to the XSLVariable element in which it is declared |
Enumeration[] | getVariableNames()
List the variables that are in scope for this stylesheet element.
|
String | getVersion()
Get the version number on this element, or inherited from its ancestors |
protected Expression | handleSortKeys(Expression select)
Modify the "select" expression to include any sort keys specified. |
boolean | isExcludedNamespace(short uriCode)
Check whether a namespace uri defines an namespace excluded from the result.
|
boolean | isExtensionNamespace(short uriCode)
Check whether a namespace uri defines an extension element. |
boolean | isInstruction()
Determine whether this node is an instruction. |
boolean | isTopLevel()
Test whether this is a top-level element |
Expression | makeAttributeValueTemplate(String expression)
Make an attribute value template in the context of this stylesheet element |
Expression | makeExpression(String expression)
Make an expression in the context of this stylesheet element |
Pattern | makePattern(String pattern)
Make a pattern in the context of this stylesheet element |
boolean | mayContainTemplateBody()
Determine whether this type of element is allowed to contain a template-body |
abstract void | prepareAttributes()
Set the attribute list for the element. |
void | preprocess()
Default preprocessing method does nothing. |
abstract void | process(Context context)
Process: called to do the real work of this stylesheet element. |
void | processAllAttributes()
Process the attributes of this element and all its children |
void | processAttributes()
Process the attribute list for the element. |
protected void | processAttributeSets(Context context)
Expand the attribute sets referenced in this element's use-attribute-sets attribute |
void | processChildren(Context context)
Process the children of this node in the stylesheet |
protected void | processExcludedNamespaces(int nc)
Process the [xsl:]exclude-result-prefixes attribute if there is one |
protected void | processExtensionElementAttribute(int nc)
Process the [xsl:]extension-element-prefixes attribute if there is one |
protected void | processVersionAttribute(int nc)
Process the [xsl:]version attribute if there is one |
void | reportAbsence(String attribute)
Convenience method to report the absence of a mandatory attribute |
protected void | setValidationError(TransformerException reason, int circumstances)
Set a validation error |
protected TransformerException | styleError(TransformerException error)
Construct an exception with diagnostic information |
protected TransformerException | styleError(String message) |
void | substituteFor(StyleElement temp)
Make this node a substitute for a temporary one previously added to the tree. |
void | validate()
Check that the element is valid. |
protected void | validateChildren() |
void | validateSubtree()
Recursive walk through the stylesheet to validate all nodes |
Parameters: fingerprint The fingerprint of the name of the variable
Returns: a Binding for the variable
Throws: XPathException if the variable has not been declared
Throws: TransformerConfigurationException if it is not empty
Throws: TransformerConfigurationException if it is at the top level
Throws: TransformerConfigurationException if not at top level
Parameters: nc The name code of the attribute name
Throws: TransformerConfigurationException if not within a template body
Parameters: uriCode the code of the namespace URI being tested
Parameters: uriCode the namespace URI code being tested
Returns: the PreparedStyleSheet to which this stylesheet element belongs
Parameters: fingerprint the fingerprint of the name of the function
Returns: the Function object represented by this saxon:function; or null if not found
Parameters: fprint The absolute name of the variable (as a namepool fingerprint)
Returns: a Binding for the variable, or null if it has not been declared
Returns: two Enumeration of Strings, the global ones [0] and the local ones [1]
Parameters: uriCode the code of the namespace URI being tested
Parameters: uriCode the namespace URI code being tested
Parameters: context The context in the source XML document, giving access to the current node, the current variables, etc.
Parameters: context The context in the source XML document, giving access to the current node, the current variables, etc.
Parameters: nc the name code of the attribute required
Parameters: nc the name code of the attribute required
Parameters: nc the name code of the attribute required
Throws: TransformerConfigurationException if the attribute is missing