cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/sitemap XSLTFactoryLoader.java
Date Tue, 20 Feb 2001 13:50:33 GMT
dims        01/02/20 05:50:32

  Modified:    lib      Tag: xml-cocoon2 xalan-2.0.0.jar
               src/org/apache/cocoon Tag: xml-cocoon2 CodeFactory.java
               src/org/apache/cocoon/matching Tag: xml-cocoon2
                        BrowserMatcherFactory.java
                        RegexpTargetHostMatcherFactory.java
                        RegexpURIMatcherFactory.java
                        WildcardURIMatcherFactory.java
               src/org/apache/cocoon/selection Tag: xml-cocoon2
                        BrowserSelectorFactory.java
                        CodedSelectorFactory.java
               src/org/apache/cocoon/sitemap Tag: xml-cocoon2
                        XSLTFactoryLoader.java
  Log:
  Moving from NodeIterator to NodeList to be able to work with SAXON in the future.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +880 -855  xml-cocoon/lib/Attic/xalan-2.0.0.jar
  
  	<<Binary file>>
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.5   +5 -5      xml-cocoon/src/org/apache/cocoon/Attic/CodeFactory.java
  
  Index: CodeFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Attic/CodeFactory.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- CodeFactory.java	2000/12/11 16:06:26	1.1.2.4
  +++ CodeFactory.java	2001/02/20 13:50:16	1.1.2.5
  @@ -10,7 +10,7 @@
   
   import org.apache.avalon.ConfigurationException;
   
  -import org.w3c.dom.traversal.NodeIterator;
  +import org.w3c.dom.NodeList;
   
   /**
    * Interface a class has to implement that produces java source code
  @@ -22,16 +22,16 @@
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.4 $ $Date: 2000/12/11 16:06:26 $
  + * @version CVS $Revision: 1.1.2.5 $ $Date: 2001/02/20 13:50:16 $
    */
   
   public interface CodeFactory {
  -    String generateParameterSource (NodeIterator conf)
  +    String generateParameterSource (NodeList conf)
       throws ConfigurationException;
   
  -    String generateClassSource (String prefix, String test, NodeIterator conf)
  +    String generateClassSource (String prefix, String test, NodeList conf)
       throws ConfigurationException;
   
  -    String generateMethodSource (NodeIterator conf)
  +    String generateMethodSource (NodeList conf)
       throws ConfigurationException;
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.12  +8 -6      xml-cocoon/src/org/apache/cocoon/matching/Attic/BrowserMatcherFactory.java
  
  Index: BrowserMatcherFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/matching/Attic/BrowserMatcherFactory.java,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- BrowserMatcherFactory.java	2001/01/31 15:48:37	1.1.2.11
  +++ BrowserMatcherFactory.java	2001/02/20 13:50:20	1.1.2.12
  @@ -9,7 +9,7 @@
   
   import java.util.Stack;
   
  -import org.w3c.dom.traversal.NodeIterator;
  +import org.w3c.dom.NodeList;
   import org.w3c.dom.Node;
   import org.w3c.dom.NamedNodeMap;
   
  @@ -23,12 +23,12 @@
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.11 $ $Date: 2001/01/31 15:48:37 $
  + * @version CVS $Revision: 1.1.2.12 $ $Date: 2001/02/20 13:50:20 $
    */
   
   public class BrowserMatcherFactory implements org.apache.cocoon.CodeFactory {
   
  -    public String generateMethodSource (NodeIterator conf)
  +    public String generateMethodSource (NodeList conf)
       throws ConfigurationException {
           StringBuffer sb = new StringBuffer();
           Node node = null;
  @@ -36,7 +36,9 @@
           NamedNodeMap nm = null;
   
           sb.append ("/*\n");
  -        while ((node = conf.nextNode()) != null) {
  +        int count = conf.getLength();
  +        for(int k = 0; k < count;k++) {
  +            node = conf.item(k);
               sb.append("name=")
                 .append(node.getNodeName())
                 .append(" type=")
  @@ -57,12 +59,12 @@
       }
   
       public String generateClassSource (String prefix, String pattern,
  -                                       NodeIterator conf)
  +                                       NodeList conf)
       throws ConfigurationException {
           return "\n// Dummy values\nstatic String " + prefix + "_expr = \"" + pattern +
"\";\n";
       }
   
  -    public String generateParameterSource (NodeIterator conf)
  +    public String generateParameterSource (NodeList conf)
       throws ConfigurationException {
           return "String";
       }
  
  
  
  1.1.2.8   +5 -5      xml-cocoon/src/org/apache/cocoon/matching/Attic/RegexpTargetHostMatcherFactory.java
  
  Index: RegexpTargetHostMatcherFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/matching/Attic/RegexpTargetHostMatcherFactory.java,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- RegexpTargetHostMatcherFactory.java	2001/02/15 21:09:43	1.1.2.7
  +++ RegexpTargetHostMatcherFactory.java	2001/02/20 13:50:21	1.1.2.8
  @@ -15,7 +15,7 @@
   
   import org.apache.avalon.ConfigurationException;
   
  -import org.w3c.dom.traversal.NodeIterator;
  +import org.w3c.dom.NodeList;
   
   import org.apache.avalon.Loggable;
   import org.apache.log.Logger;
  @@ -27,13 +27,13 @@
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
  - * @version CVS $Revision: 1.1.2.7 $ $Date: 2001/02/15 21:09:43 $
  + * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/02/20 13:50:21 $
    */
   
   public class RegexpTargetHostMatcherFactory implements CodeFactory, Loggable {
       protected Logger log;
   
  -    public String generateParameterSource (NodeIterator conf)
  +    public String generateParameterSource (NodeList conf)
       throws ConfigurationException {
           return "RE";
       }
  @@ -45,7 +45,7 @@
       }
   
       public String generateClassSource (String prefix, String pattern,
  -                                       NodeIterator conf)
  +                                       NodeList conf)
       throws ConfigurationException {
           StringBuffer sb = new StringBuffer ();
           try {
  @@ -83,7 +83,7 @@
           }
       }
   
  -    public String generateMethodSource (NodeIterator conf)
  +    public String generateMethodSource (NodeList conf)
       throws ConfigurationException {
           StringBuffer sb = new StringBuffer ();
           sb.append("HashMap map = new HashMap ();")
  
  
  
  1.1.2.21  +5 -5      xml-cocoon/src/org/apache/cocoon/matching/Attic/RegexpURIMatcherFactory.java
  
  Index: RegexpURIMatcherFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/matching/Attic/RegexpURIMatcherFactory.java,v
  retrieving revision 1.1.2.20
  retrieving revision 1.1.2.21
  diff -u -r1.1.2.20 -r1.1.2.21
  --- RegexpURIMatcherFactory.java	2001/02/15 21:09:47	1.1.2.20
  +++ RegexpURIMatcherFactory.java	2001/02/20 13:50:22	1.1.2.21
  @@ -15,7 +15,7 @@
   
   import org.apache.avalon.ConfigurationException;
   
  -import org.w3c.dom.traversal.NodeIterator;
  +import org.w3c.dom.NodeList;
   
   import org.apache.log.Logger;
   import org.apache.avalon.Loggable;
  @@ -26,13 +26,13 @@
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.20 $ $Date: 2001/02/15 21:09:47 $
  + * @version CVS $Revision: 1.1.2.21 $ $Date: 2001/02/20 13:50:22 $
    */
   
   public class RegexpURIMatcherFactory implements CodeFactory, Loggable {
       protected Logger log;
   
  -    public String generateParameterSource (NodeIterator conf)
  +    public String generateParameterSource (NodeList conf)
       throws ConfigurationException {
           return "RE";
       }
  @@ -44,7 +44,7 @@
       }
   
       public String generateClassSource (String prefix, String pattern,
  -                                       NodeIterator conf)
  +                                       NodeList conf)
       throws ConfigurationException {
           StringBuffer sb = new StringBuffer ();
           try {
  @@ -98,7 +98,7 @@
           }
       }
   
  -    public String generateMethodSource (NodeIterator conf)
  +    public String generateMethodSource (NodeList conf)
       throws ConfigurationException {
           StringBuffer sb = new StringBuffer ();
           sb.append("HashMap map = new HashMap ();")
  
  
  
  1.1.2.29  +5 -5      xml-cocoon/src/org/apache/cocoon/matching/Attic/WildcardURIMatcherFactory.java
  
  Index: WildcardURIMatcherFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/matching/Attic/WildcardURIMatcherFactory.java,v
  retrieving revision 1.1.2.28
  retrieving revision 1.1.2.29
  diff -u -r1.1.2.28 -r1.1.2.29
  --- WildcardURIMatcherFactory.java	2001/02/15 21:09:50	1.1.2.28
  +++ WildcardURIMatcherFactory.java	2001/02/20 13:50:22	1.1.2.29
  @@ -12,7 +12,7 @@
   
   import org.apache.avalon.ConfigurationException;
   
  -import org.w3c.dom.traversal.NodeIterator;
  +import org.w3c.dom.NodeList;
   
   import org.apache.log.Logger;
   import org.apache.avalon.Loggable;
  @@ -24,7 +24,7 @@
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.28 $ $Date: 2001/02/15 21:09:50 $
  + * @version CVS $Revision: 1.1.2.29 $ $Date: 2001/02/20 13:50:22 $
    */
   
   public class WildcardURIMatcherFactory implements CodeFactory, Loggable {
  @@ -47,7 +47,7 @@
       /**
        * Generates the matcher parameter level source code
        */
  -    public String generateParameterSource (NodeIterator conf)
  +    public String generateParameterSource (NodeList conf)
       throws ConfigurationException {
           return "int []";
       }
  @@ -61,7 +61,7 @@
       /**
        * Generates the matcher method level source code
        */
  -    public String generateMethodSource (NodeIterator conf)
  +    public String generateMethodSource (NodeList conf)
       throws ConfigurationException {
                  //"String uri = ((org.apache.cocoon.environment.http.HttpRequest) objectModel.get(Constants.REQUEST_OBJECT)).getRequestURI();"
+
           return "HashMap map = new HashMap();" +
  @@ -77,7 +77,7 @@
        * Generates the matcher class level source code
        */
       public String generateClassSource (String prefix, String pattern,
  -                                       NodeIterator conf)
  +                                       NodeList conf)
       throws ConfigurationException {
           StringBuffer result = new StringBuffer();
           try {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.14  +8 -6      xml-cocoon/src/org/apache/cocoon/selection/Attic/BrowserSelectorFactory.java
  
  Index: BrowserSelectorFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/selection/Attic/BrowserSelectorFactory.java,v
  retrieving revision 1.1.2.13
  retrieving revision 1.1.2.14
  diff -u -r1.1.2.13 -r1.1.2.14
  --- BrowserSelectorFactory.java	2001/02/15 21:10:01	1.1.2.13
  +++ BrowserSelectorFactory.java	2001/02/20 13:50:26	1.1.2.14
  @@ -9,7 +9,7 @@
   
   import org.apache.avalon.ConfigurationException;
   
  -import org.w3c.dom.traversal.NodeIterator;
  +import org.w3c.dom.NodeList;
   import org.w3c.dom.traversal.TreeWalker;
   import org.w3c.dom.traversal.NodeFilter;
   import org.w3c.dom.Node;
  @@ -26,18 +26,18 @@
    * @author <a href="mailto:cziegeler@sundn.de">Carsten Ziegeler</a>
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.13 $ $Date: 2001/02/15 21:10:01 $
  + * @version CVS $Revision: 1.1.2.14 $ $Date: 2001/02/20 13:50:26 $
   */
   
   
   public class BrowserSelectorFactory implements CodeFactory {
   
  -    public String generateParameterSource (NodeIterator conf)
  +    public String generateParameterSource (NodeList conf)
       throws ConfigurationException {
           return "String []";
       }
   
  -    public String generateClassSource (String prefix, String test, NodeIterator conf)
  +    public String generateClassSource (String prefix, String test, NodeList conf)
       throws ConfigurationException {
           Node node = null;
           Node nodeattrname  = null;
  @@ -48,7 +48,9 @@
           sb.append("static String [] ")
             .append(prefix)
             .append("_expr = {");
  -        while ((node = conf.nextNode()) != null) {
  +        int count = conf.getLength();
  +        for(int k = 0; k < count;k++) {
  +            node = conf.item(k);
               if (node.getNodeName().equals("browser") &&
                   node.getNodeType() == Node.ELEMENT_NODE) {
                   nm = node.getAttributes();
  @@ -67,7 +69,7 @@
           return sb.append("};").toString();
       }
   
  -    public String generateMethodSource (NodeIterator conf)
  +    public String generateMethodSource (NodeList conf)
       throws ConfigurationException {
           StringBuffer sb = new StringBuffer();
            sb.append("if (pattern != null && objectModel.get(Constants.REQUEST_OBJECT)
!= null) {")
  
  
  
  1.1.2.8   +5 -5      xml-cocoon/src/org/apache/cocoon/selection/Attic/CodedSelectorFactory.java
  
  Index: CodedSelectorFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/selection/Attic/CodedSelectorFactory.java,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- CodedSelectorFactory.java	2001/02/14 11:39:50	1.1.2.7
  +++ CodedSelectorFactory.java	2001/02/20 13:50:27	1.1.2.8
  @@ -9,7 +9,7 @@
   
   
   import org.apache.avalon.ConfigurationException;
  -import org.w3c.dom.traversal.NodeIterator;
  +import org.w3c.dom.NodeList;
   import org.apache.cocoon.CodeFactory;
   
   
  @@ -18,20 +18,20 @@
    * embedded java code within the 'test' clause of the select.
    *
    * @author <a href="mailto:Marcus.Crafter@osa.de">Marcus Crafter</a>
  - * @version CVS $Revision: 1.1.2.7 $ $Date: 2001/02/14 11:39:50 $
  + * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/02/20 13:50:27 $
    */
   public class CodedSelectorFactory extends java.lang.Object
           implements CodeFactory {
   
   
  -    public String generateParameterSource( NodeIterator conf )
  +    public String generateParameterSource( NodeList conf )
               throws ConfigurationException {
           return "org.apache.cocoon.selection.helpers.CodedSelectorHelper";
       }
   
   
       public String generateClassSource( String prefix, String test,
  -            NodeIterator conf ) throws ConfigurationException {
  +            NodeList conf ) throws ConfigurationException {
           StringBuffer sb = new StringBuffer();
           sb.append("static org.apache.cocoon.selection.helpers.CodedSelectorHelper " )
             .append( prefix )
  @@ -45,7 +45,7 @@
       }
   
   
  -    public String generateMethodSource( NodeIterator conf )
  +    public String generateMethodSource( NodeList conf )
               throws ConfigurationException {
           StringBuffer sb = new StringBuffer();
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.10  +5 -5      xml-cocoon/src/org/apache/cocoon/sitemap/Attic/XSLTFactoryLoader.java
  
  Index: XSLTFactoryLoader.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/XSLTFactoryLoader.java,v
  retrieving revision 1.1.2.9
  retrieving revision 1.1.2.10
  diff -u -r1.1.2.9 -r1.1.2.10
  --- XSLTFactoryLoader.java	2001/02/20 12:47:46	1.1.2.9
  +++ XSLTFactoryLoader.java	2001/02/20 13:50:30	1.1.2.10
  @@ -13,7 +13,7 @@
   import org.apache.cocoon.CodeFactory;
   import org.apache.cocoon.util.ClassUtils;
   
  -import org.w3c.dom.traversal.NodeIterator;
  +import org.w3c.dom.NodeList;
   
   import org.apache.log.Logger;
   import org.apache.avalon.Loggable;
  @@ -28,7 +28,7 @@
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.9 $ $Date: 2001/02/20 12:47:46 $
  + * @version CVS $Revision: 1.1.2.10 $ $Date: 2001/02/20 13:50:30 $
    */
   
   public class XSLTFactoryLoader {
  @@ -36,7 +36,7 @@
   
       private HashMap obj = new HashMap();
   
  -    public String getClassSource(String className, String prefix, String pattern, NodeIterator
conf)
  +    public String getClassSource(String className, String prefix, String pattern, NodeList
conf)
       throws ClassNotFoundException, InstantiationException, IllegalAccessException, Exception
{
           Object factory = obj.get(className);
           if (factory == null) factory = ClassUtils.newInstance(className);
  @@ -59,7 +59,7 @@
           }
       }
   
  -    public String getParameterSource(String className, NodeIterator conf)
  +    public String getParameterSource(String className, NodeList conf)
       throws ClassNotFoundException, InstantiationException, IllegalAccessException, Exception
{
           Object factory = obj.get(className);
           if (factory == null) factory = ClassUtils.newInstance(className);
  @@ -76,7 +76,7 @@
                                + "\". Should implement the CodeFactory interface");
       }
   
  -    public String getMethodSource(String className, NodeIterator conf)
  +    public String getMethodSource(String className, NodeList conf)
       throws ClassNotFoundException, InstantiationException, IllegalAccessException, Exception
{
           Object factory = obj.get(className);
           if (factory == null) factory = ClassUtils.newInstance(className);
  
  
  

Mime
View raw message