Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xalan.templates
Class StylesheetRoot

    java.lang.Object
      |
      +--org.apache.xalan.utils.UnImplNode
            |
            +--org.apache.xalan.templates.ElemTemplateElement
                  |
                  +--org.apache.xalan.templates.Stylesheet
                        |
                        +--org.apache.xalan.templates.StylesheetComposed
                              |
                              +--org.apache.xalan.templates.StylesheetRoot

public class StylesheetRoot
extends StylesheetComposed
implements java.io.Serializable, Templates

This class represents the root object of the stylesheet tree.

See Also:
  Serialized Form

Fields inherited from class org.apache.xalan.templates.Stylesheet
`STYLESHEET_EXT`

Constructor Summary
`StylesheetRoot()` Uses an XSL stylesheet document.

Method Summary
`ElemTemplate` | `getDefaultRootRule()` **For advanced use only** Get the default template for a root node.
`ElemTemplate` | `getDefaultRule()` **For advanced use only** Get the default template for elements.
`ElemTemplate` | `getDefaultTextRule()` **For advanced use only** Get the default template for text.
`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.
`OutputFormat` | `getOutputComposed()` Get the combined "xsl:output" property with the properties combined from the included stylesheets.
`OutputFormat` | `getOutputFormat()` Get the properties for xsl:output.
`boolean` | `isOutputMethodSet()` **For internal use only** Find out if an output method has been set by the user.
`boolean` | `isRoot()` Tell if this is the root of the stylesheet tree.
`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.
`void` | `recomposeOutput()` Recompose the output format object from the included elements.

Methods inherited from class org.apache.xalan.templates.StylesheetComposed
`getAttributeSetComposed, getDecimalFormatComposed, getImportComposed, getImportCountComposed, getIncludeComposed, getIncludeCountComposed, getKeysComposed, getNamespaceAliasComposed, getParamComposed, getParamsComposed, getTemplateComposed, getTemplateComposed, getTemplateListComposed, getVariableComposed, getVariablesComposed, getWhiteSpaceInfo, isAggregatedType, recomposeTemplates, recomposeTemplates`

Methods inherited from class org.apache.xalan.templates.Stylesheet
`containsExcludeResultPrefix, containsExtensionElementURI, getAttributeSet, getAttributeSetCount, getDecimalFormat, getDecimalFormat, getDecimalFormatCount, getExcludeResultPrefix, getExcludeResultPrefixCount, getExtensionElementPrefix, getExtensionElementPrefixCount, getHref, getId, getImport, getImportCount, getInclude, getIncludeCount, getKey, getKeyCount, getNamespaceAlias, getNamespaceAliasCount, getNodeName, getNodeType, getNonXslTopLevel, getOutput, getParam, getParam, getParamCount, getPreserveSpace, getPreserveSpaceCount, getStripSpace, getStripSpaceCount, getStylesheet, getStylesheetComposed, getStylesheetParent, getStylesheetRoot, getTemplate, getTemplateCount, getVariable, getVariable, getVariableCount, getVersion, getXmlnsXsl, getXmlSpace, getXSLToken, replaceTemplate, setAttributeSet, setDecimalFormat, setExcludeResultPrefixes, setExtensionElementPrefixes, setHref, setId, setImport, setInclude, setKey, setLocaterInfo, setNamespaceAlias, setNonXslTopLevel, setOutput, setParam, setPreserveSpaces, setStripSpaces, setStylesheetParent, setStylesheetRoot, setTemplate, setVariable, setVersion, setXmlnsXsl, setXmlSpace`

Methods inherited from class org.apache.xalan.templates.ElemTemplateElement
`appendChild, compose, error, execute, getBaseIdentifier, getChildNodes, getColumnNumber, getDeclaredPrefixes, getDOMBackPointer, getFirstChild, getFirstChildElem, getLastChild, getLength, getLineNumber, getNamespaceForPrefix, getNamespaceForPrefix, getNextSibling, getNextSiblingElem, getOwnerDocument, getParentElem, getParentNode, getPrefixes, getPreviousSibling, getPublicId, getSystemId, getTagName, hasChildNodes, isCompiledTemplate, item, removeChild, replaceChild, resolvePrefixTables, runtimeInit, setDOMBackPointer, setPrefixes, setPrefixes`

Methods inherited from class org.apache.xalan.utils.UnImplNode
`appendData, cloneNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, error, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, getLocalName, getNamespaceURI, getNodeValue, getOwnerElement, getPrefix, getSpecified, hasAttribute, hasAttributeNS, hasAttributes, importNode, insertBefore, insertData, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceData, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setNodeValue, setPrefix, setValue, splitText, substringData, supports`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StylesheetRoot

    public StylesheetRoot()
                   throws ProcessorException

  Uses an XSL stylesheet document.
  Parameters:
    `transformer` - The XSLTProcessor implementation.
    `baseIdentifier` - The file name or URL for the XSL stylesheet.
  Throws:
    ProcessorException - if the baseIdentifier can not be resolved to a URL.

Method Detail

### isRoot

    public boolean isRoot()

  Tell if this is the root of the stylesheet tree.
  Overrides:
    isRoot in class Stylesheet

### newTransformer

    public Transformer newTransformer()

  Create a new transformation context for this Templates object.
  Specified by:
    newTransformer in interface Templates

### getOutputFormat

    public OutputFormat getOutputFormat()

  Get the 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.

  A stylesheet may contain multiple xsl:output elements and may include or import stylesheets that also contain xsl:output elements. All the xsl:output elements occurring in a stylesheet are merged into a single effective xsl:output element. For the cdata-section-elements attribute, the effective value is the union of the specified values. For other attributes, the effective value is the specified value with the highest import precedence. It is an error if there is more than one such value for an attribute. An XSLT processor may signal the error; if it does not signal the error, if should recover by using the value that occurs last in the stylesheet. The values of attributes are defaulted after the xsl:output elements have been merged; different output methods may have different default values for an attribute.

  Specified by:
    getOutputFormat in interface Templates
  Returns:
    A OutputProperties object that may be mutated.
  See Also:
    output in XSLT Specification, `org.xml.org.apache.serialize.OutputFormat`

### recompose

    public void recompose()
                   throws SAXException

  Recompose the values of all "composed" properties, meaning properties that need to be combined or calculated from the combination of imported and included stylesheets.

### getOutputComposed

    public OutputFormat 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 OutputFormat object, not a cloned object, like getOutputFormat does.
  See Also:
    output in XSLT Specification

### recomposeOutput

    public void recomposeOutput()

  Recompose the output format object from the included elements.

### isOutputMethodSet

    public boolean isOutputMethodSet()

  **For internal use only** Find out if an output method has been set by the user.

### getGlobalImport

    public StylesheetComposed getGlobalImport(int i)

  Get a stylesheet from the global import list.

### getGlobalImportCount

    public int getGlobalImportCount()

  Get the total number of imports in the global import list.
  Returns:
    The total number of imported stylesheets, including the root stylesheet, thus the number will always be 1 or greater.

### getImportNumber

    public int getImportNumber(StylesheetComposed sheet)

  Given a stylesheet, return the number of the stylesheet in the global import list.
  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).

### getDefaultTextRule

    public final ElemTemplate getDefaultTextRule()

  **For advanced use only** Get the default template for text.

### getDefaultRule

    public final ElemTemplate getDefaultRule()

  **For advanced use only** Get the default template for elements.

### getDefaultRootRule

    public final ElemTemplate getDefaultRootRule()

  **For advanced use only** Get the default template for a root node.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache XML Project. All Rights Reserved.