curcuru     2003/03/13 12:29:09

  Modified:    java/xpath_rwapi/grammar Tag: xslt20 etree.xsl
                        custom-xpath-grammar.xml
  Log:
  Updated XPath AST parse/construction model for future use
  Repackaged, minor updates to correct parser output for src2 directory
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.4   +82 -90    xml-xalan/java/xpath_rwapi/grammar/Attic/etree.xsl
  
  Index: etree.xsl
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/xpath_rwapi/grammar/Attic/etree.xsl,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- etree.xsl 5 Feb 2003 16:09:45 -0000       1.1.2.3
  +++ etree.xsl 13 Mar 2003 20:29:09 -0000      1.1.2.4
  @@ -1,90 +1,82 @@
  -<?xml version="1.0" encoding="utf-8"?>
  -
  -<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  -  xmlns:g="http://www.w3.org/2001/03/XPath/grammar";>
  -
  -  <xsl:import href="jjtree.xsl"/>
  -
  -  <!-- override jjtree.xsl -->
  -     <xsl:template name="javacc-options">
  -       <!-- xsl:apply-imports/ -->
  -    STATIC = false;
  -    MULTI=false;
  -    // NODE_PACKAGE="org.apache.xpath.operations";
  -    NODE_PREFIX="";
  -    NODE_FACTORY=true; 
  -    VISITOR=true;     // invokes the JJTree Visitor support
  -    NODE_SCOPE_HOOK=false;
  -    NODE_USES_PARSER=true;
  -     </xsl:template>
  -
  -     <xsl:template name="set-parser-package">
  -package org.apache.xpath.rwapi.impl.parser;
  -     </xsl:template>
  -
  -    <xsl:template name="extra-parser-code">
  -      org.apache.xml.utils.PrefixResolver m_prefixResolver;
  -      org.apache.xpath.patterns.FunctionPattern m_matchFunc = null; // short 
lived.
  -
  -
  -       /**
  -        * Node factory for customized parser
  -       */
  -      NodeFactory m_nodeFactory;
  -
  -      int m_predLevel = 0;
  -
  -      public void setPrefixResolver(org.apache.xml.utils.PrefixResolver 
resolver)
  -      {
  -        m_prefixResolver = resolver;
  -      }
  -
  -      public org.apache.xml.utils.PrefixResolver getPrefixResolver()
  -      {
  -        return m_prefixResolver;
  -      }
  -      
  -      /**
  -       * Sets the node factory
  -       */
  -      public void setNodeFactory(NodeFactory nodeFactory) {                  
  -                     m_nodeFactory = nodeFactory;
  -       }
  -     
  -       /**
  -        * Returns the node factory.
  -        * @return NodeFactory
  -        */
  -       public NodeFactory getNodeFactory() {
  -             return m_nodeFactory;
  -       }
  -      
  -       /**
  -        * The "version" property.
  -        * @serial
  -        */
  -       private double m_version;
  -     
  -       /**
  -        * Set the "version" property for XPath.
  -        *
  -        * @param v Value for the "version" property.
  -        */
  -       public void setVersion(double v)
  -       {
  -         m_version = v;
  -       }
  -     
  -       /**
  -        * Get the "version" property of XPath.
  -        *
  -        * @return The value of the "version" property.
  -        */
  -       public double getVersion()
  -       {
  -         return m_version;
  -       }
  -
  -    </xsl:template>
  -
  -</xsl:stylesheet>
  +<?xml version="1.0" encoding="utf-8"?>
  +
  +<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  +  xmlns:g="http://www.w3.org/2001/03/XPath/grammar";>
  +
  +  <xsl:import href="jjtree.xsl"/>
  +
  +  <!-- override jjtree.xsl -->
  +     <xsl:template name="javacc-options">
  +       <!-- xsl:apply-imports/ -->
  +    STATIC = false;
  +    MULTI=false;
  +    // NODE_PACKAGE="org.apache.xpath.operations";
  +    NODE_PREFIX="";
  +    NODE_FACTORY=true; 
  +    VISITOR=true;     // invokes the JJTree Visitor support
  +    NODE_SCOPE_HOOK=false;
  +    NODE_USES_PARSER=true;
  +     </xsl:template>
  +
  +    <!-- Dependency with build.xml:parser.package and parser.dir 12-Mar-03 
-sc -->
  +     <xsl:template name="set-parser-package">
  +package org.apache.xpath.impl.parser;
  +     </xsl:template>
  +
  +    <xsl:template name="extra-parser-code">
  +    // Begin generated by etree.xsl:extra-parser-code 
  +    org.apache.xpath.patterns.FunctionPattern m_matchFunc = null; // short 
lived.
  +
  +    int m_predLevel = 0;
  +
  +    /**
  +     * Node factory for customized parser.  
  +     */
  +    NodeFactory m_nodeFactory;
  +
  +    /**
  +     * Sets the node factory.  
  +     * @param nodeFactory to use.
  +     */
  +    public void setNodeFactory(NodeFactory nodeFactory) {                    
  +     m_nodeFactory = nodeFactory;
  +    }
  +
  +    /**
  +     * Returns the node factory.  
  +     * @return NodeFactory
  +     */
  +    public NodeFactory getNodeFactory() {
  +     return m_nodeFactory;
  +    }
  +
  +    /**
  +     * The "version" property as pertains to the XPath spec.
  +     * @serial
  +     */
  +    private double m_version;
  +
  +    /**
  +     * Set the "version" property for XPath.
  +     *
  +     * @param v Value for the "version" property.
  +     */
  +    public void setVersion(double v)
  +    {
  +        m_version = v;
  +    }
  +
  +    /**
  +     * Get the "version" property for XPath.
  +     *
  +     * @return The value of the "version" property.
  +     */
  +    public double getVersion()
  +    {
  +        return m_version;
  +    }
  +    // end generated by etree.xsl:extra-parser-code 
  +
  +    </xsl:template>
  +
  +</xsl:stylesheet>
  
  
  
  1.1.2.4   +1 -1      
xml-xalan/java/xpath_rwapi/grammar/Attic/custom-xpath-grammar.xml
  
  Index: custom-xpath-grammar.xml
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/grammar/Attic/custom-xpath-grammar.xml,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- custom-xpath-grammar.xml  12 Feb 2003 16:14:51 -0000      1.1.2.3
  +++ custom-xpath-grammar.xml  13 Mar 2003 20:29:09 -0000      1.1.2.4
  @@ -1562,7 +1562,7 @@
     </production>
   
     
  -  <production name="SimpleForClause" if="xpath">
  +  <production name="SimpleForClause" if="xpath" node-type="void">
       <ref name="ForVariable"/>
       <ref name="VarName"/>
       <ref name="In"/>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to