Class Stylesheet

java.lang.Object
org.apache.xalan.xsltc.compiler.SyntaxTreeNode
org.apache.xalan.xsltc.compiler.Stylesheet
All Implemented Interfaces:
org.apache.bcel.generic.InstructionConstants, Constants

public final class Stylesheet extends SyntaxTreeNode
  • Field Details

    • _importedFrom

      public Stylesheet _importedFrom
      Reference to the stylesheet from which this stylesheet was imported (if any).
    • _includedFrom

      public Stylesheet _includedFrom
      Reference to the stylesheet from which this stylesheet was included (if any).
    • UNKNOWN_OUTPUT

      public static final int UNKNOWN_OUTPUT
      See Also:
    • XML_OUTPUT

      public static final int XML_OUTPUT
      See Also:
    • HTML_OUTPUT

      public static final int HTML_OUTPUT
      See Also:
    • TEXT_OUTPUT

      public static final int TEXT_OUTPUT
      See Also:
  • Constructor Details

    • Stylesheet

      public Stylesheet()
  • Method Details

    • getOutputMethod

      public int getOutputMethod()
      Return the output method
    • getTemplateInlining

      public boolean getTemplateInlining()
    • setTemplateInlining

      public void setTemplateInlining(boolean flag)
    • isSimplified

      public boolean isSimplified()
    • setSimplified

      public void setSimplified()
    • setHasIdCall

      public void setHasIdCall(boolean flag)
    • setOutputProperty

      public void setOutputProperty(String key, String value)
    • setOutputProperties

      public void setOutputProperties(Properties props)
    • getOutputProperties

      public Properties getOutputProperties()
    • getLastOutputElement

      public org.apache.xalan.xsltc.compiler.Output getLastOutputElement()
    • setMultiDocument

      public void setMultiDocument(boolean flag)
    • isMultiDocument

      public boolean isMultiDocument()
    • setCallsNodeset

      public void setCallsNodeset(boolean flag)
    • callsNodeset

      public boolean callsNodeset()
    • numberFormattingUsed

      public void numberFormattingUsed()
    • setImportPrecedence

      public void setImportPrecedence(int precedence)
    • getImportPrecedence

      public int getImportPrecedence()
    • getMinimumDescendantPrecedence

      public int getMinimumDescendantPrecedence()
      Get the minimum of the precedence of this stylesheet, any stylesheet imported by this stylesheet and any include/import descendant of this stylesheet.
    • checkForLoop

      public boolean checkForLoop(String systemId)
    • setParser

      public void setParser(Parser parser)
    • setParentStylesheet

      public void setParentStylesheet(Stylesheet parent)
    • getParentStylesheet

      public Stylesheet getParentStylesheet()
    • setImportingStylesheet

      public void setImportingStylesheet(Stylesheet parent)
    • setIncludingStylesheet

      public void setIncludingStylesheet(Stylesheet parent)
    • addIncludedStylesheet

      public void addIncludedStylesheet(Stylesheet child)
    • setSystemId

      public void setSystemId(String systemId)
    • getSystemId

      public String getSystemId()
    • setSourceLoader

      public void setSourceLoader(SourceLoader loader)
    • getSourceLoader

      public SourceLoader getSourceLoader()
    • hasGlobals

      public boolean hasGlobals()
      Returns true if this stylesheet has global vars or params.
    • hasLocalParams

      public boolean hasLocalParams()
      Returns true if at least one template in the stylesheet has params defined. Uses the variable _hasLocalParams to cache the result.
    • isExtension

      public boolean isExtension(String uri)
    • declareExtensionPrefixes

      public void declareExtensionPrefixes(Parser parser)
    • parseContents

      public void parseContents(Parser parser)
      Parse the version and uri fields of the stylesheet and add an entry to the symbol table mapping the name __stylesheet_ to an instance of this class.
      Overrides:
      parseContents in class SyntaxTreeNode
      Parameters:
      parser - reference to the XSLT parser
    • parseOwnChildren

      public final void parseOwnChildren(Parser parser)
      Parse all direct children of the <xsl:stylesheet/> element.
    • processModes

      public void processModes()
    • getMode

      public org.apache.xalan.xsltc.compiler.Mode getMode(org.apache.xalan.xsltc.compiler.QName modeName)
    • typeCheck

      public Type typeCheck(org.apache.xalan.xsltc.compiler.SymbolTable stable) throws TypeCheckError
      Type check all the children of this node.
      Specified by:
      typeCheck in class SyntaxTreeNode
      Parameters:
      stable - The compiler/parser's symbol table
      Throws:
      TypeCheckError
    • translate

      public void translate(ClassGenerator classGen, MethodGenerator methodGen)
      Translate the stylesheet into JVM bytecodes.
      Specified by:
      translate in class SyntaxTreeNode
      Parameters:
      classGen - BCEL Java class generator
      methodGen - BCEL Java method generator
    • translate

      public void translate()
      Translate the stylesheet into JVM bytecodes.
    • addParam

      public int addParam(org.apache.xalan.xsltc.compiler.Param param)
    • addVariable

      public int addVariable(org.apache.xalan.xsltc.compiler.Variable global)
    • display

      public void display(int indent)
      Description copied from class: SyntaxTreeNode
      Displays the contents of this syntax tree node (to stdout). This method is intended for debugging _only_, and should be overridden by all syntax tree node implementations.
      Overrides:
      display in class SyntaxTreeNode
      Parameters:
      indent - Indentation level for syntax tree levels.
    • getNamespace

      public String getNamespace(String prefix)
    • getClassName

      public String getClassName()
    • getTemplates

      public Vector getTemplates()
    • getAllValidTemplates

      public Vector getAllValidTemplates()