getAttributeSetComposed
public ArrayList getAttributeSetComposed(QName name)
throws ArrayIndexOutOfBoundsException
Get a list "xsl:attribute-set" properties that match the qname.
name
- Qualified name of attribute set properties to get
- A vector of attribute sets matching the given name
getAvailableElements
public HashMap getAvailableElements()
Get the hashtable of available elements.
- table of available elements, keyed by qualified names, and with
values of the same qualified names.
getDecimalFormatComposed
public DecimalFormatSymbols getDecimalFormatComposed(QName name)
Given a valid element decimal-format name, return the
decimalFormatSymbols with that name.
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.
name
- Qualified name of the decimal format to find
- DecimalFormatSymbols object matching the given name or
null if name is not found.
getDefaultOutputProps
public Properties getDefaultOutputProps()
getDefaultRootRule
public final ElemTemplate getDefaultRootRule()
Get the default template for a root node.
- The default template for a root node.
getDefaultRule
public final ElemTemplate getDefaultRule()
Get the default template for elements.
- the default template for elements.
getDefaultTextRule
public final ElemTemplate getDefaultTextRule()
Get the default template for text.
- the default template for text.
getExtensionHandlerClass
public String getExtensionHandlerClass()
getExtensionNamespacesManager
public ExtensionNamespacesManager getExtensionNamespacesManager()
Only instantiate an ExtensionNamespacesManager if one is called for
(i.e., if the stylesheet contains extension functions and/or elements).
getExtensions
public Vector getExtensions()
Get the vector of extension namespaces. Used to provide
the extensions table access to a list of extension
namespaces encountered during composition of a stylesheet.
getGlobalImport
public StylesheetComposed getGlobalImport(int i)
Get a stylesheet from the global import list.
TODO: JKESS PROPOSES SPECIAL-CASE FOR NO IMPORT LIST, TO MATCH COUNT.
i
- Index of stylesheet to get from global import list
- The stylesheet at the given index
getGlobalImportCount
public int getGlobalImportCount()
Get the total number of imports in the global import list.
- 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.
getImportNumber
public int getImportNumber(StylesheetComposed sheet)
Given a stylesheet, return the number of the stylesheet
in the global import list.
sheet
- The stylesheet which will be located in the
global import list.
- The index into the global import list of the given stylesheet,
or -1 if it is not found (which should never happen).
getIncremental
public boolean getIncremental()
getKeysComposed
public Vector getKeysComposed()
Get the composed "xsl:key" properties.
- A vector of the composed "xsl:key" properties.
getNamespaceAliasComposed
public NamespaceAlias getNamespaceAliasComposed(String uri)
Get the "xsl:namespace-alias" property.
Return the NamespaceAlias for a given namespace uri.
uri
- non-null reference to namespace that is to be aliased.
- NamespaceAlias that matches uri, or null if no match.
getOptimizer
public boolean getOptimizer()
getOutputComposed
public OutputProperties getOutputComposed()
Get the combined "xsl:output" property with the properties
combined from the included stylesheets. If a xsl:output
is not declared in this stylesheet or an included stylesheet,
look in the imports.
Please note that this returns a reference to the OutputProperties
object, not a cloned object, like getOutputProperties does.
- non-null reference to composed output properties object.
getOutputProperties
public Properties getOutputProperties()
Get the static properties for xsl:output. The object returned will
be a clone of the internal values, and thus it can be mutated
without mutating the Templates object, and then handed in to
the process method.
For XSLT, Attribute Value Templates attribute values will
be returned unexpanded (since there is no context at this point).
- A Properties object, not null.
getSource_location
public boolean getSource_location()
getStartRule
public final ElemTemplate getStartRule()
Get the default template for a root node.
- The default template for a root node.
getTemplateComposed
public ElemTemplate getTemplateComposed(QName qname)
Get an "xsl:template" property. This looks in the imports as
well as this stylesheet.
qname
- non-null reference to qualified name of template.
- reference to named template, or null if not found.
getTemplateComposed
public ElemTemplate getTemplateComposed(XPathContext xctxt,
int targetNode,
QName mode,
boolean quietConflictWarnings,
DTM dtm)
throws TransformerException
Get an "xsl:template" property by node match. This looks in the imports as
well as this stylesheet.
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.
- reference to ElemTemplate that is the best match for targetNode, or
null if no match could be made.
getTemplateComposed
public ElemTemplate getTemplateComposed(XPathContext xctxt,
int targetNode,
QName mode,
int maxImportLevel,
int endImportLevel,
boolean quietConflictWarnings,
DTM dtm)
throws TransformerException
Get an "xsl:template" property by node match. This looks in the imports as
well as this stylesheet.
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 importsquietConflictWarnings
- true if conflict warnings should not be reported.
- reference to ElemTemplate that is the best match for targetNode, or
null if no match could be made.
getTemplateListComposed
public final TemplateList getTemplateListComposed()
Accessor method to retrieve the TemplateList
associated with
this StylesheetRoot.
- The composed
TemplateList
.
getVariableOrParamComposed
public ElemVariable getVariableOrParamComposed(QName qname)
Get an "xsl:variable" property.
qname
- Qualified name of variable or param
- The ElemVariable with the given qualified name
getVariablesAndParamsComposed
public Vector getVariablesAndParamsComposed()
Get all global "xsl:variable" properties in scope for this stylesheet.
- Vector of all variables and params in scope
getWhiteSpaceInfo
public WhiteSpaceInfo getWhiteSpaceInfo(XPathContext support,
int targetElement,
DTM dtm)
throws TransformerException
Get information about whether or not an element should strip whitespace.
support
- The XPath runtime state.targetElement
- Element to check
- WhiteSpaceInfo for the given element
isOutputMethodSet
public boolean isOutputMethodSet()
Find out if an output method has been set by the user.
- Value indicating whether an output method has been set by the user
isRoot
public boolean isRoot()
Tell if this is the root of the stylesheet tree.
- isRoot in interface Stylesheet
- True since this is the root of the stylesheet tree.
isSecureProcessing
public boolean isSecureProcessing()
Return the state of the secure processing feature.
newTransformer
public Transformer newTransformer()
Create a new transformation context for this Templates object.
- A Transformer instance, never null.
recompose
public void recompose()
throws TransformerException
Recompose the values of all "composed" properties, meaning
properties that need to be combined or calculated from
the combination of imported and included stylesheets. This
method determines the proper import precedence of all imported
stylesheets. It then iterates through all of the elements and
properties in the proper order and triggers the individual recompose
methods.
setExtensionHandlerClass
public 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).
setIncremental
public void setIncremental(boolean b)
setOptimizer
public void setOptimizer(boolean b)
setSecureProcessing
public void setSecureProcessing(boolean flag)
Set the state of the secure processing feature.
setSource_location
public void setSource_location(boolean b)
setTemplateListComposed
public final void setTemplateListComposed(TemplateList templateList)
Mutator method to set the 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.
templateList
- The new TemplateList
for this StylesheetRoot.
shouldCheckWhitespace
public boolean shouldCheckWhitespace()
Check to see if the caller should bother with check for
whitespace nodes.
- Whether the caller should bother with check for
whitespace nodes.
shouldStripWhiteSpace
public boolean shouldStripWhiteSpace(XPathContext support,
int targetElement)
throws TransformerException
Get information about whether or not an element should strip whitespace.
support
- The XPath runtime state.targetElement
- Element to check
- true if the whitespace should be stripped.