org.apache.xalan.templates
public class StylesheetRoot extends StylesheetComposed implements Serializable, Templates
UNKNOWN: general
Constructor Summary | |
---|---|
StylesheetRoot(ErrorListener errorListener)
Uses an XSL stylesheet document. | |
StylesheetRoot(XSLTSchema schema, ErrorListener listener)
Creates a StylesheetRoot and retains a pointer to the schema used to create this
StylesheetRoot. |
Method Summary | |
---|---|
boolean | canStripWhiteSpace()
Get information about whether or not whitespace can be stripped. |
ArrayList | getAttributeSetComposed(QName name)
Get a list "xsl:attribute-set" properties that match the qname. |
HashMap | getAvailableElements()
Get the hashtable of available elements.
|
DecimalFormatSymbols | getDecimalFormatComposed(QName name)
Given a valid element decimal-format name, return the
decimalFormatSymbols with that name.
|
Properties | getDefaultOutputProps() |
ElemTemplate | getDefaultRootRule()
Get the default template for a root node.
|
ElemTemplate | getDefaultRule()
Get the default template for elements.
|
ElemTemplate | getDefaultTextRule()
Get the default template for text.
|
String | getExtensionHandlerClass() |
ExtensionNamespacesManager | getExtensionNamespacesManager()
Only instantiate an ExtensionNamespacesManager if one is called for
(i.e., if the stylesheet contains extension functions and/or elements). |
Vector | getExtensions()
Get the vector of extension namespaces. |
StylesheetComposed | getGlobalImport(int i)
Get a stylesheet from the global import list.
|
int | getGlobalImportCount()
Get the total number of imports in the global import list.
|
int | getImportNumber(StylesheetComposed sheet)
Given a stylesheet, return the number of the stylesheet
in the global import list. |
boolean | getIncremental() |
Vector | getKeysComposed()
Get the composed "xsl:key" properties. |
NamespaceAlias | getNamespaceAliasComposed(String uri)
Get the "xsl:namespace-alias" property.
|
boolean | getOptimizer() |
OutputProperties | getOutputComposed()
Get the combined "xsl:output" property with the properties
combined from the included stylesheets. |
Properties | getOutputProperties()
Get the static properties for xsl:output. |
boolean | getSource_location() |
ElemTemplate | getStartRule()
Get the default template for a root node.
|
ElemTemplate | getTemplateComposed(XPathContext xctxt, int targetNode, QName mode, boolean quietConflictWarnings, DTM dtm)
Get an "xsl:template" property by node match. |
ElemTemplate | getTemplateComposed(XPathContext xctxt, int targetNode, QName mode, int maxImportLevel, int endImportLevel, boolean quietConflictWarnings, DTM dtm)
Get an "xsl:template" property by node match. |
ElemTemplate | getTemplateComposed(QName qname)
Get an "xsl:template" property. |
TemplateList | getTemplateListComposed()
Accessor method to retrieve the TemplateList associated with
this StylesheetRoot.
|
ElemVariable | getVariableOrParamComposed(QName qname)
Get an "xsl:variable" property. |
Vector | getVariablesAndParamsComposed()
Get all global "xsl:variable" properties in scope for this stylesheet. |
WhiteSpaceInfo | getWhiteSpaceInfo(XPathContext support, int targetElement, DTM dtm)
Get information about whether or not an element should strip whitespace. |
boolean | isOutputMethodSet()
Find out if an output method has been set by the user.
|
boolean | isRoot()
Tell if this is the root of the stylesheet tree.
|
boolean | isSecureProcessing()
Return the state of the secure processing feature. |
Transformer | newTransformer()
Create a new transformation context for this Templates object.
|
void | recompose()
Recompose the values of all "composed" properties, meaning
properties that need to be combined or calculated from
the combination of imported and included stylesheets. |
String | setExtensionHandlerClass(String handlerClassName)
This internal method allows the setting of the java class
to handle the extension function (if other than the default one).
|
void | setIncremental(boolean b) |
void | setOptimizer(boolean b) |
void | setSecureProcessing(boolean flag)
Set the state of the secure processing feature. |
void | setSource_location(boolean b) |
void | setTemplateListComposed(TemplateList templateList)
Mutator method to set the TemplateList associated with this
StylesheetRoot. |
boolean | shouldCheckWhitespace()
Check to see if the caller should bother with check for
whitespace nodes.
|
boolean | shouldStripWhiteSpace(XPathContext support, int targetElement)
Get information about whether or not an element should strip whitespace. |
Throws: TransformerConfigurationException if the baseIdentifier can not be resolved to a URL.
Parameters: schema The schema used to create this stylesheet
Throws: TransformerConfigurationException if the baseIdentifier can not be resolved to a URL.
Returns: true if the whitespace can be stripped.
See Also: strip in XSLT Specification
Parameters: name Qualified name of attribute set properties to get
Returns: A vector of attribute sets matching the given name
Throws: ArrayIndexOutOfBoundsException
See Also: attribute-sets in XSLT Specification
Returns: table of available elements, keyed by qualified names, and with values of the same qualified names.
It is an error to declare either the default decimal-format or a decimal-format with a given name more than once (even with different import precedence), unless it is declared every time with the same value for all attributes (taking into account any default values).
Which means, as far as I can tell, the decimal-format properties are not additive.
Parameters: name Qualified name of the decimal format to find
Returns: DecimalFormatSymbols object matching the given name or null if name is not found.
Returns: The default template for a root node.
UNKNOWN: advanced
Returns: the default template for elements.
UNKNOWN: advanced
Returns: the default template for text.
UNKNOWN: advanced
UNKNOWN: internal
Parameters: i Index of stylesheet to get from global import list
Returns: The stylesheet at the given index
Returns: The total number of imported stylesheets, including the root stylesheet, thus the number will always be 1 or greater. TODO: JKESS PROPOSES SPECIAL-CASE FOR NO IMPORT LIST, TO MATCH DESCRIPTION.
Parameters: sheet The stylesheet which will be located in the global import list.
Returns: The index into the global import list of the given stylesheet, or -1 if it is not found (which should never happen).
Returns: Incremental flag
Returns: A vector of the composed "xsl:key" properties.
See Also: key in XSLT Specification
Parameters: uri non-null reference to namespace that is to be aliased.
Returns: NamespaceAlias that matches uri, or null if no match.
Returns: Optimization flag
Returns: non-null reference to composed output properties object.
See Also: output in XSLT Specification
For XSLT, Attribute Value Templates attribute values will be returned unexpanded (since there is no context at this point).
Returns: A Properties object, not null.
Returns: source location flag
Returns: The default template for a root node.
UNKNOWN: advanced
Parameters: xctxt non-null reference to XPath runtime execution context. targetNode non-null reference of node that the template must match. mode qualified name of the node, or null. quietConflictWarnings true if conflict warnings should not be reported.
Returns: reference to ElemTemplate that is the best match for targetNode, or null if no match could be made.
Throws: TransformerException
See Also: section-Defining-Template-Rules in XSLT Specification
Parameters: xctxt non-null reference to XPath runtime execution context. targetNode non-null reference of node that the template must match. mode qualified name of the node, or null. maxImportLevel The maximum importCountComposed that we should consider or -1 if we should consider all import levels. This is used by apply-imports to access templates that have been overridden. endImportLevel The count of composed imports quietConflictWarnings true if conflict warnings should not be reported.
Returns: reference to ElemTemplate that is the best match for targetNode, or null if no match could be made.
Throws: TransformerException
See Also: section-Defining-Template-Rules in XSLT Specification
Parameters: qname non-null reference to qualified name of template.
Returns: reference to named template, or null if not found.
See Also: section-Defining-Template-Rules in XSLT Specification
TemplateList
associated with
this StylesheetRoot.
Returns: The composed TemplateList
.
Parameters: qname Qualified name of variable or param
Returns: The ElemVariable with the given qualified name
Returns: Vector of all variables and params in scope
Parameters: support The XPath runtime state. targetElement Element to check
Returns: WhiteSpaceInfo for the given element
Throws: TransformerException
See Also: strip in XSLT Specification
Returns: Value indicating whether an output method has been set by the user
UNKNOWN: internal
Returns: True since this is the root of the stylesheet tree.
Returns: A Transformer instance, never null.
Throws: TransformerException
UNKNOWN: internal
Parameters: b Incremental flag
Parameters: b Optimization flag
Parameters: b Source location flag
TemplateList
associated with this
StylesheetRoot. This method should only be used by the compiler. Normally,
the template list is built during the recompose process and should not be
altered by the user.Parameters: templateList The new TemplateList
for this StylesheetRoot.
Returns: Whether the caller should bother with check for whitespace nodes.
Parameters: support The XPath runtime state. targetElement Element to check
Returns: true if the whitespace should be stripped.
Throws: TransformerException
See Also: strip in XSLT Specification