com.caucho.xsl
Class JavaScriptStylesheet

java.lang.Object
  |
  +--com.caucho.xsl.AbstractStylesheet
        |
        +--com.caucho.xsl.StylesheetImpl
              |
              +--com.caucho.xsl.JavaScriptStylesheet
All Implemented Interfaces:
CauchoStylesheet, Stylesheet

public class JavaScriptStylesheet
extends StylesheetImpl

Implementation class for JavaScript stylesheets. It is made public only because generated JavaScript classes need to access these routines.


Inner classes inherited from class com.caucho.xsl.AbstractStylesheet
AbstractStylesheet.Depend
 
Field Summary
protected  Expr[] _xsl_exprs
           
protected  XslNumberFormat[] _xsl_formats
           
protected  NamespaceContext[] _xsl_ns
           
protected  Sort[][] _xsl_sorts
           
protected static java.lang.String CLOSURE
           
 
Fields inherited from class com.caucho.xsl.StylesheetImpl
defaultDisableEscaping, templates, text
 
Fields inherited from class com.caucho.xsl.AbstractStylesheet
errorPage
 
Fields inherited from interface com.caucho.xsl.CauchoStylesheet
CACHE_DEPENDS, DEPENDS, GLOBAL_PARAM
 
Constructor Summary
JavaScriptStylesheet()
           
 
Method Summary
protected  void _xsl_init(XslWriter out, Node context, Env env)
           
 java.util.Iterator _xsl_sort(Node node, Env env, int patternIndex, int sortIndex)
           
 void anyNumberJs(XslWriter out, Node node, Env env, int countIndex, int fromIndex, int format)
           
 void applyImports(XslWriter out, Node node, Env env, java.lang.String mode, int min, int max, int argIndex)
           
protected  void applyNode(XslWriter out, Node node, Env env, java.lang.String mode, int min, int max)
           
 void applyTemplates(Call call, int length)
           
 void callTemplate(XslWriter out, Node node, Env env, java.lang.String name, int argIndex)
           
 java.lang.Object clone()
          Clone the stylesheet.
 void copyOf(XslWriter out, Node node, Env env, int index)
           
 java.lang.Object evalExpr(Node node, Env env, int index)
           
 void exprNumberJs(XslWriter out, Node node, Env env, int exprIndex, int format)
           
 OutputFormat getOutputFormat()
          Returns the values specified in the xsl:output directives.
 Pattern getPattern(int index)
           
 java.util.ArrayList getScope(int index)
           
 java.lang.Object getValue(int index)
           
 void init(XslWriter out)
           
 boolean isModified()
          Returns last modification time
 void multiNumberJs(XslWriter out, Node node, Env env, int countIndex, int fromIndex, int format)
           
 void popElement(XslWriter out, java.lang.String name, int index)
           
 void popScope(Env env, int count)
           
 void printExpr(XslWriter out, Node node, Env env, int index)
           
 void pushAttribute(XslWriter out, java.lang.String name, int index)
           
 void pushElement(XslWriter out, java.lang.String name, int index)
           
 java.util.Iterator select(Node node, Env env, int index)
           
 void setOutputFormat(OutputFormat output)
           
 void setParamVariable(XslWriter out, Node node, Env env, java.lang.String name, java.lang.Object newValue)
           
 void setVariable(XslWriter out, Node node, Env env, java.lang.String name, java.lang.Object value)
           
 void singleNumberJs(XslWriter out, Node node, Env env, int countIndex, int fromIndex, int format)
           
 java.lang.String stringExpr(Node node, Env env, int index)
           
 boolean test(Node node, Env env, int index)
           
 void writeText(XslWriter out, int start, int length)
           
 
Methods inherited from class com.caucho.xsl.StylesheetImpl
addFunction, anyNumber, applyNode, applyNodeDefault, copy, exprNumber, getNodeValue, getPath, getProperty, getTemplate, init, multiNumber, printValue, setProperty, setSpaces, singleNumber, transform, xslSort
 
Methods inherited from class com.caucho.xsl.AbstractStylesheet
addCacheDepend, addDepend, addDepend, getCacheDepends, getDepends, newNodeTransformer, newSAXTransformer, newStreamTransformer, newStringTransformer
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLOSURE

protected static java.lang.String CLOSURE

_xsl_exprs

protected Expr[] _xsl_exprs

_xsl_sorts

protected Sort[][] _xsl_sorts

_xsl_ns

protected NamespaceContext[] _xsl_ns

_xsl_formats

protected XslNumberFormat[] _xsl_formats
Constructor Detail

JavaScriptStylesheet

public JavaScriptStylesheet()
Method Detail

clone

public java.lang.Object clone()
Description copied from class: AbstractStylesheet
Clone the stylesheet. Used to create transformer.
Overrides:
clone in class AbstractStylesheet

isModified

public boolean isModified()
Returns last modification time
Overrides:
isModified in class AbstractStylesheet

init

public void init(XslWriter out)
          throws java.lang.Exception

_xsl_init

protected void _xsl_init(XslWriter out,
                         Node context,
                         Env env)
                  throws java.lang.Exception
Overrides:
_xsl_init in class StylesheetImpl

getOutputFormat

public OutputFormat getOutputFormat()
Description copied from interface: Stylesheet
Returns the values specified in the xsl:output directives.
Overrides:
getOutputFormat in class StylesheetImpl

setOutputFormat

public void setOutputFormat(OutputFormat output)
Overrides:
setOutputFormat in class StylesheetImpl

applyTemplates

public void applyTemplates(Call call,
                           int length)
                    throws java.lang.Exception

applyImports

public void applyImports(XslWriter out,
                         Node node,
                         Env env,
                         java.lang.String mode,
                         int min,
                         int max,
                         int argIndex)
                  throws java.lang.Exception

callTemplate

public void callTemplate(XslWriter out,
                         Node node,
                         Env env,
                         java.lang.String name,
                         int argIndex)
                  throws java.lang.Exception

applyNode

protected void applyNode(XslWriter out,
                         Node node,
                         Env env,
                         java.lang.String mode,
                         int min,
                         int max)
                  throws java.lang.Exception
Overrides:
applyNode in class StylesheetImpl

writeText

public void writeText(XslWriter out,
                      int start,
                      int length)
               throws java.io.IOException,
                      SAXException

singleNumberJs

public void singleNumberJs(XslWriter out,
                           Node node,
                           Env env,
                           int countIndex,
                           int fromIndex,
                           int format)
                    throws java.lang.Exception

multiNumberJs

public void multiNumberJs(XslWriter out,
                          Node node,
                          Env env,
                          int countIndex,
                          int fromIndex,
                          int format)
                   throws java.lang.Exception

anyNumberJs

public void anyNumberJs(XslWriter out,
                        Node node,
                        Env env,
                        int countIndex,
                        int fromIndex,
                        int format)
                 throws java.lang.Exception

exprNumberJs

public void exprNumberJs(XslWriter out,
                         Node node,
                         Env env,
                         int exprIndex,
                         int format)
                  throws java.lang.Exception

printExpr

public void printExpr(XslWriter out,
                      Node node,
                      Env env,
                      int index)
               throws java.io.IOException,
                      SAXException

copyOf

public void copyOf(XslWriter out,
                   Node node,
                   Env env,
                   int index)
            throws java.io.IOException,
                   SAXException

stringExpr

public java.lang.String stringExpr(Node node,
                                   Env env,
                                   int index)
                            throws XPathParseException

pushElement

public void pushElement(XslWriter out,
                        java.lang.String name,
                        int index)
                 throws java.io.IOException,
                        SAXException

popElement

public void popElement(XslWriter out,
                       java.lang.String name,
                       int index)
                throws java.io.IOException,
                       SAXException

pushAttribute

public void pushAttribute(XslWriter out,
                          java.lang.String name,
                          int index)
                   throws java.io.IOException,
                          SAXException

select

public java.util.Iterator select(Node node,
                                 Env env,
                                 int index)
                          throws XPathParseException

_xsl_sort

public java.util.Iterator _xsl_sort(Node node,
                                    Env env,
                                    int patternIndex,
                                    int sortIndex)
                             throws java.lang.Exception

test

public boolean test(Node node,
                    Env env,
                    int index)
             throws XPathParseException

setParamVariable

public void setParamVariable(XslWriter out,
                             Node node,
                             Env env,
                             java.lang.String name,
                             java.lang.Object newValue)
                      throws java.lang.Exception

setVariable

public void setVariable(XslWriter out,
                        Node node,
                        Env env,
                        java.lang.String name,
                        java.lang.Object value)
                 throws java.lang.Exception

evalExpr

public java.lang.Object evalExpr(Node node,
                                 Env env,
                                 int index)
                          throws java.lang.Exception

getScope

public java.util.ArrayList getScope(int index)

getValue

public java.lang.Object getValue(int index)

getPattern

public Pattern getPattern(int index)

popScope

public void popScope(Env env,
                     int count)
              throws java.lang.Exception