public class StylesheetRoot extends StylesheetComposed implements java.io.Serializable, javax.xml.transform.Templates
STYLESHEET_EXT
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Constructor and Description |
---|
StylesheetRoot(javax.xml.transform.ErrorListener errorListener)
Uses an XSL stylesheet document.
|
StylesheetRoot(XSLTSchema schema,
javax.xml.transform.ErrorListener listener)
Creates a StylesheetRoot and retains a pointer to the schema used to create this
StylesheetRoot.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canStripWhiteSpace()
Get information about whether or not whitespace can be stripped.
|
java.util.ArrayList |
getAttributeSetComposed(QName name)
Get a list "xsl:attribute-set" properties that match the qname.
|
java.util.HashMap |
getAvailableElements()
Get the hashtable of available elements.
|
java.text.DecimalFormatSymbols |
getDecimalFormatComposed(QName name)
Given a valid element decimal-format name, return the
decimalFormatSymbols with that name.
|
java.util.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.
|
java.lang.String |
getExtensionHandlerClass() |
ExtensionNamespacesManager |
getExtensionNamespacesManager()
Only instantiate an ExtensionNamespacesManager if one is called for
(i.e., if the stylesheet contains extension functions and/or elements).
|
java.util.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() |
java.util.Vector |
getKeysComposed()
Get the composed "xsl:key" properties.
|
NamespaceAlias |
getNamespaceAliasComposed(java.lang.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.
|
java.util.Properties |
getOutputProperties()
Get the static properties for xsl:output.
|
boolean |
getSource_location() |
ElemTemplate |
getStartRule()
Get the default template for a root node.
|
ElemTemplate |
getTemplateComposed(QName qname)
Get an "xsl:template" property.
|
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.
|
TemplateList |
getTemplateListComposed()
Accessor method to retrieve the
TemplateList associated with
this StylesheetRoot. |
ElemVariable |
getVariableOrParamComposed(QName qname)
Get an "xsl:variable" property.
|
java.util.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.
|
javax.xml.transform.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.
|
java.lang.String |
setExtensionHandlerClass(java.lang.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.
|
getEndImportCountComposed, getImportComposed, getImportCountComposed, getIncludeComposed, getIncludeCountComposed, isAggregatedType, recompose, recomposeTemplates
containsExcludeResultPrefix, containsExtensionElementURI, getAttributeSet, getAttributeSetCount, getCompatibleMode, getDecimalFormat, getDecimalFormat, getDecimalFormatCount, getExcludeResultPrefix, getExcludeResultPrefixCount, getExtensionElementPrefix, getExtensionElementPrefixCount, getHref, getId, getImport, getImportCount, getInclude, getIncludeCount, getKey, getKeyCount, getNamespaceAlias, getNamespaceAliasCount, getNodeName, getNodeType, getNonXslTopLevel, getOutput, getOutputCount, getParam, getPreserveSpace, getPreserveSpaceCount, getStripSpace, getStripSpaceCount, getStylesheet, getStylesheetComposed, getStylesheetParent, getStylesheetRoot, getTemplate, getTemplateCount, getVariable, getVariableOrParam, getVariableOrParam, getVariableOrParamCount, getVersion, getXmlnsXsl, getXSLToken, replaceTemplate, setAttributeSet, setDecimalFormat, setExcludeResultPrefixes, setExtensionElementPrefixes, setHref, setId, setImport, setInclude, setKey, setLocaterInfo, setNamespaceAlias, setNonXslTopLevel, setOutput, setParam, setPreserveSpaces, setStripSpaces, setStylesheetParent, setStylesheetRoot, setTemplate, setVariable, setVersion, setXmlnsXsl
appendChild, appendChild, callVisitors, canAcceptVariables, compareTo, compose, endCompose, error, error, execute, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getBaseIdentifier, getChildNodes, getColumnNumber, getDeclaredPrefixes, getDOMBackPointer, getEndColumnNumber, getEndLineNumber, getFirstChild, getFirstChildElem, getLastChild, getLastChildElem, getLength, getLineNumber, getLocalName, getNamespaceForPrefix, getNamespaceForPrefix, getNextSibling, getNextSiblingElem, getOwnerDocument, getOwnerXSLTemplate, getParentElem, getParentNode, getParentNodeElem, getPreviousSibling, getPreviousSiblingElem, getPublicId, getSystemId, getTagName, getUid, getXmlSpace, handlesNullPrefixes, hasChildNodes, hasTextLitOnly, hasVariableDecl, insertBefore, isCompiledTemplate, item, recompose, removeChild, replaceChild, replaceChild, resolvePrefixTables, runtimeInit, setDOMBackPointer, setEndLocaterInfo, setParentElem, setPrefixes, setPrefixes, setUid, setXmlSpace, shouldStripWhiteSpace
adoptNode, appendData, cloneNode, compareDocumentPosition, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, getActualEncoding, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getBaseURI, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getFeature, getImplementation, getInputEncoding, getNamespaceURI, getNodeValue, getOwnerElement, getPrefix, getSchemaTypeInfo, getSpecified, getStrictErrorChecking, getTextContent, getUserData, getWholeText, getXmlEncoding, getXmlStandalone, getXmlVersion, hasAttribute, hasAttributeNS, hasAttributes, importNode, insertData, isDefaultNamespace, isEqualNode, isId, isSameNode, isSupported, isWhitespaceInElementContent, lookupNamespaceURI, lookupPrefix, normalize, normalizeDocument, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, renameNode, replaceData, replaceWholeText, setActualEncoding, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setDocumentURI, setIdAttribute, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setInputEncoding, setNodeValue, setPrefix, setStrictErrorChecking, setTextContent, setUserData, setValue, setXmlEncoding, setXmlStandalone, setXmlVersion, splitText, substringData
public StylesheetRoot(javax.xml.transform.ErrorListener errorListener) throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
- if the baseIdentifier can not be resolved to a URL.public StylesheetRoot(XSLTSchema schema, javax.xml.transform.ErrorListener listener) throws javax.xml.transform.TransformerConfigurationException
schema
- The schema used to create this stylesheetjavax.xml.transform.TransformerConfigurationException
- if the baseIdentifier can not be resolved to a URL.public boolean isRoot()
isRoot
in class Stylesheet
public void setSecureProcessing(boolean flag)
public boolean isSecureProcessing()
public java.util.HashMap getAvailableElements()
public ExtensionNamespacesManager getExtensionNamespacesManager()
public java.util.Vector getExtensions()
public javax.xml.transform.Transformer newTransformer()
newTransformer
in interface javax.xml.transform.Templates
public java.util.Properties getDefaultOutputProps()
public java.util.Properties getOutputProperties()
For XSLT, Attribute Value Templates attribute values will be returned unexpanded (since there is no context at this point).
getOutputProperties
in interface javax.xml.transform.Templates
public void recompose() throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public StylesheetComposed getGlobalImport(int i)
i
- Index of stylesheet to get from global import listpublic int getGlobalImportCount()
public int getImportNumber(StylesheetComposed sheet)
sheet
- The stylesheet which will be located in the
global import list.public OutputProperties getOutputComposed()
public boolean isOutputMethodSet()
public java.util.ArrayList getAttributeSetComposed(QName name) throws java.lang.ArrayIndexOutOfBoundsException
name
- Qualified name of attribute set properties to getjava.lang.ArrayIndexOutOfBoundsException
public java.text.DecimalFormatSymbols getDecimalFormatComposed(QName 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 findpublic java.util.Vector getKeysComposed()
public NamespaceAlias getNamespaceAliasComposed(java.lang.String uri)
uri
- non-null reference to namespace that is to be aliased.public final TemplateList getTemplateListComposed()
TemplateList
associated with
this StylesheetRoot.TemplateList
.public final void setTemplateListComposed(TemplateList templateList)
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.public ElemTemplate getTemplateComposed(XPathContext xctxt, int targetNode, QName mode, boolean quietConflictWarnings, DTM dtm) throws javax.xml.transform.TransformerException
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.javax.xml.transform.TransformerException
public ElemTemplate getTemplateComposed(XPathContext xctxt, int targetNode, QName mode, int maxImportLevel, int endImportLevel, boolean quietConflictWarnings, DTM dtm) throws javax.xml.transform.TransformerException
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.javax.xml.transform.TransformerException
public ElemTemplate getTemplateComposed(QName qname)
qname
- non-null reference to qualified name of template.public ElemVariable getVariableOrParamComposed(QName qname)
qname
- Qualified name of variable or parampublic java.util.Vector getVariablesAndParamsComposed()
public boolean shouldCheckWhitespace()
public WhiteSpaceInfo getWhiteSpaceInfo(XPathContext support, int targetElement, DTM dtm) throws javax.xml.transform.TransformerException
support
- The XPath runtime state.targetElement
- Element to checkjavax.xml.transform.TransformerException
public boolean shouldStripWhiteSpace(XPathContext support, int targetElement) throws javax.xml.transform.TransformerException
support
- The XPath runtime state.targetElement
- Element to checkjavax.xml.transform.TransformerException
public boolean canStripWhiteSpace()
canStripWhiteSpace
in interface WhitespaceStrippingElementMatcher
canStripWhiteSpace
in class ElemTemplateElement
public final ElemTemplate getDefaultTextRule()
public final ElemTemplate getDefaultRule()
public final ElemTemplate getDefaultRootRule()
public final ElemTemplate getStartRule()
public java.lang.String setExtensionHandlerClass(java.lang.String handlerClassName)
public java.lang.String getExtensionHandlerClass()
public boolean getOptimizer()
public void setOptimizer(boolean b)
b
- Optimization flagpublic boolean getIncremental()
public boolean getSource_location()
public void setIncremental(boolean b)
b
- Incremental flagpublic void setSource_location(boolean b)
b
- Source location flagCopyright © 2023 Apache XML Project. All Rights Reserved.