com.lotus.xsl
Class XSLProcessor.Stylesheet

java.lang.Object
  |
  +--com.lotus.xsl.XSLProcessor.Stylesheet

public class XSLProcessor.Stylesheet
extends java.lang.Object

This class represents the base stylesheet or an "import" stylesheet. "include" stylesheets are combined with the including stylesheet.


Field Summary
 java.lang.String m_baseIdent
          The base URL of the XSL document.
 com.lotus.xsl.Document m_document
          The root XSL stylesheet.
 java.util.Vector m_imports
          A vector of the -imported- XSL Stylesheets.
 com.lotus.xsl.Element m_stylesheet
          The element that starts the stylesheet.
 boolean m_tablesAreInvalid
          Tells if the stylesheet tables need to be rebuilt.
 
Constructor Summary
XSLProcessor.Stylesheet(com.lotus.xsl.Document doc)
          Constructor for a Stylesheet needs a Document.
XSLProcessor.Stylesheet(com.lotus.xsl.Document doc, java.lang.String baseIdentifier)
          Constructor for a Stylesheet needs a Document.
XSLProcessor.Stylesheet(com.lotus.xsl.Document doc, java.lang.String baseIdentifier, boolean buildTables)
          Constructor for a Stylesheet needs a Document.
 
Method Summary
 com.lotus.xsl.Element findNamedTemplate(java.lang.String name)
          Locate a macro via the "name" attribute.
 com.lotus.xsl.Element findTemplate(com.lotus.xsl.Document sourceTree, com.lotus.xsl.Node targetNode)
          Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft.
 com.lotus.xsl.Element findTemplate(com.lotus.xsl.Document sourceTree, com.lotus.xsl.Node targetNode, java.lang.String mode, boolean useImports, XSLProcessor.Stylesheet[] foundStylesheet)
          Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft.
 java.lang.Object getTopLevelVariable(java.lang.String name)
          Given the name of a constant, return a string value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_document

public com.lotus.xsl.Document m_document
The root XSL stylesheet.

m_stylesheet

public com.lotus.xsl.Element m_stylesheet
The element that starts the stylesheet. (In case the stylesheet is embedded in another XML document.

m_imports

public java.util.Vector m_imports
A vector of the -imported- XSL Stylesheets.

m_baseIdent

public java.lang.String m_baseIdent
The base URL of the XSL document.

m_tablesAreInvalid

public boolean m_tablesAreInvalid
Tells if the stylesheet tables need to be rebuilt.
Constructor Detail

XSLProcessor.Stylesheet

public XSLProcessor.Stylesheet(com.lotus.xsl.Document doc,
                               java.lang.String baseIdentifier)
                        throws XSLProcessorException,
                               java.net.MalformedURLException,
                               java.io.FileNotFoundException,
                               java.io.IOException,
                               com.lotus.xsl.SAXException
Constructor for a Stylesheet needs a Document.
Throws:
XSLProcessorException - thrown if the active ProblemListener and XMLParserLiaison decide the error condition is severe enough to halt processing.

XSLProcessor.Stylesheet

public XSLProcessor.Stylesheet(com.lotus.xsl.Document doc,
                               java.lang.String baseIdentifier,
                               boolean buildTables)
                        throws XSLProcessorException,
                               java.net.MalformedURLException,
                               java.io.FileNotFoundException,
                               java.io.IOException,
                               com.lotus.xsl.SAXException
Constructor for a Stylesheet needs a Document.
Throws:
XSLProcessorException - thrown if the active ProblemListener and XMLParserLiaison decide the error condition is severe enough to halt processing.

XSLProcessor.Stylesheet

public XSLProcessor.Stylesheet(com.lotus.xsl.Document doc)
                        throws XSLProcessorException,
                               java.net.MalformedURLException,
                               java.io.FileNotFoundException,
                               java.io.IOException,
                               com.lotus.xsl.SAXException
Constructor for a Stylesheet needs a Document.
Throws:
XSLProcessorException - thrown if the active ProblemListener and XMLParserLiaison decide the error condition is severe enough to halt processing.
Method Detail

findNamedTemplate

public com.lotus.xsl.Element findNamedTemplate(java.lang.String name)
                                        throws XSLProcessorException
Locate a macro via the "name" attribute.
Throws:
XSLProcessorException - thrown if the active ProblemListener and XMLParserLiaison decide the error condition is severe enough to halt processing.

getTopLevelVariable

public java.lang.Object getTopLevelVariable(java.lang.String name)
                                     throws XSLProcessorException
Given the name of a constant, return a string value.
Throws:
XSLProcessorException - thrown if the active ProblemListener and XMLParserLiaison decide the error condition is severe enough to halt processing.

findTemplate

public com.lotus.xsl.Element findTemplate(com.lotus.xsl.Document sourceTree,
                                          com.lotus.xsl.Node targetNode)
                                   throws XSLProcessorException,
                                          java.net.MalformedURLException,
                                          java.io.FileNotFoundException,
                                          java.io.IOException
Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft.
Parameters:
stylesheetTree - Where the XSL rules are to be found.
sourceTree - Where the targetElem is to be found.
targetElem - The element that needs a rule.
Returns:
Rule that best matches targetElem.
Throws:
XSLProcessorException - thrown if the active ProblemListener and XMLParserLiaison decide the error condition is severe enough to halt processing.

findTemplate

public com.lotus.xsl.Element findTemplate(com.lotus.xsl.Document sourceTree,
                                          com.lotus.xsl.Node targetNode,
                                          java.lang.String mode,
                                          boolean useImports,
                                          XSLProcessor.Stylesheet[] foundStylesheet)
                                   throws XSLProcessorException,
                                          java.net.MalformedURLException,
                                          java.io.FileNotFoundException,
                                          java.io.IOException
Given a target element, find the template that best matches in the given XSL document, according to the rules specified in the xsl draft.
Parameters:
stylesheetTree - Where the XSL rules are to be found.
sourceTree - Where the targetElem is to be found.
targetElem - The element that needs a rule.
mode - A string indicating the display mode.
useImports - means that this is an xsl:apply-imports commend.
foundStylesheet - If non-null, the Stylesheet that the found template belongs to will be returned in the foundStylesheet[0].
Returns:
Rule that best matches targetElem.
Throws:
XSLProcessorException - thrown if the active ProblemListener and XMLParserLiaison decide the error condition is severe enough to halt processing.