Examples of StylesheetRoot


Examples of org.apache.xalan.templates.StylesheetRoot

  protected void pushGlobalVars(int contextNode) throws TransformerException
  {

    XPathContext xctxt = m_xcontext;
    VariableStack vs = xctxt.getVarStack();
    StylesheetRoot sr = getStylesheet();
    Vector vars = sr.getVariablesAndParamsComposed();
   
    int i = vars.size();
    vs.link(i);

    while (--i >= 0)
View Full Code Here

Examples of org.apache.xalan.templates.StylesheetRoot

      if (stylesheetType == StylesheetHandler.STYPE_ROOT)
      {
        try
        {
          stylesheet = new StylesheetRoot(handler.getSchema(), handler.getStylesheetProcessor().getErrorListener());
        }
        catch(TransformerConfigurationException tfe)
        {
          throw new TransformerException(tfe);
        }
View Full Code Here

Examples of org.apache.xalan.templates.StylesheetRoot

        pushGlobalVars(node);

        // ==========
        // Give the top-level templates a chance to pass information into
        // the context (this is mainly for setting up tables for extensions).
        StylesheetRoot stylesheet = this.getStylesheet();
        int n = stylesheet.getGlobalImportCount();

        for (int i = 0; i < n; i++)
        {
          StylesheetComposed imported = stylesheet.getGlobalImport(i);
          int includedCount = imported.getIncludeCountComposed();

          for (int j = -1; j < includedCount; j++)
          {
            Stylesheet included = imported.getIncludeComposed(j);
View Full Code Here

Examples of org.apache.xalan.templates.StylesheetRoot

    VariableStack varstack = getXPathContext().getVarStack();
    QName qname = new QName(namespace, name);
    XObject xobject = XObject.create(value, getXPathContext());
   
    StylesheetRoot sroot = m_stylesheetRoot;
    Vector vars = sroot.getVariablesAndParamsComposed();
    int i = vars.size();
    while (--i >= 0)
    {
      ElemVariable variable = (ElemVariable)vars.elementAt(i);
      if(variable.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE &&
View Full Code Here

Examples of org.apache.xalan.templates.StylesheetRoot

  protected void pushGlobalVars(int contextNode) throws TransformerException
  {

    XPathContext xctxt = m_xcontext;
    VariableStack vs = xctxt.getVarStack();
    StylesheetRoot sr = getStylesheet();
    Vector vars = sr.getVariablesAndParamsComposed();
   
    int i = vars.size();
    vs.link(i);

    while (--i >= 0)
View Full Code Here

Examples of org.apache.xalan.templates.StylesheetRoot

      if (stylesheetType == StylesheetHandler.STYPE_ROOT)
      {
        try
        {
          stylesheet = new StylesheetRoot(handler.getSchema(), handler.getStylesheetProcessor().getErrorListener());
        }
        catch(TransformerConfigurationException tfe)
        {
          throw new TransformerException(tfe);
        }
View Full Code Here

Examples of org.apache.xalan.templates.StylesheetRoot

    // into the .xsb file.
    // TODO: Can we just use the StylesheetRoot's list?
        Vector compiledTemplates=new Vector();

    // cache the typecast
        StylesheetRoot root=(StylesheetRoot)getStylesheetRoot();
       
    // For all templates used in this stylesheet (including
    // those from imported and included stylesheets),
    // compile to Java. (Takes advantage of the fact that
    // ComposedStylesheet processing has already gathered
    // these and reconciled conflicts.)
   
    // New TemplateList being generated
    org.apache.xalan.templates.TemplateList newTl
      = new org.apache.xalan.templates.TemplateList();
    // Iterate over contents of old TemplateList
    org.apache.xalan.templates.TemplateList.TemplateWalker tw
      =root.getTemplateListComposed().getWalker();
   
    // Scan all templates in old list, compile, insert into new
    ElemTemplate et;
    while ( null != (et = tw.next()) )
    {
      ElemTemplate ct = compileTemplate(et);
     
      // If compilation succeeds, use it; else fall back on interp
      newTl.setTemplate( (ct!=null) ? ct : et);
    }
    // Postprocess/reconcile list
    newTl.compose();
    // And make it active
    root.setTemplateListComposed(newTl);

    // TODO: Theoretically, we can now discard imports/includes
    // -- they're no longer pointing at the right ElemTemplates
    // anyway. There's discussion of doing so in any case when
    // they aren't needed for tooling support. Always do it here,
View Full Code Here

Examples of org.apache.xalan.templates.StylesheetRoot

        pushGlobalVars(node);
 
        // ==========
        // Give the top-level templates a chance to pass information into
        // the context (this is mainly for setting up tables for extensions).
        StylesheetRoot stylesheet = this.getStylesheet();
        int n = stylesheet.getGlobalImportCount();
 
        for (int i = 0; i < n; i++)
        {
          StylesheetComposed imported = stylesheet.getGlobalImport(i);
 
          int includedCount = imported.getIncludeCountComposed();
 
          for (int j = -1; j < includedCount; j++)
          {
View Full Code Here

Examples of org.apache.xalan.xslt.StylesheetRoot

    protected StylesheetRoot compileStylesheetRoot (String source) throws Exception
    {
        XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
       
        XSLTInputSource xslin = new XSLTInputSource("file:///"+source);
        StylesheetRoot root = processor.processStylesheet(xslin);

        return root;
    }
View Full Code Here

Examples of org.apache.xalan.xslt.StylesheetRoot

           
            String fn = getFileName (xslName);
           
            if (fn == null) return null;
           
            StylesheetRoot sr = compileStylesheetRoot (fn);       
           
            if (caching)
            {
                cache.put (xslName,sr);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.