villard     2003/03/26 13:27:23

  Modified:    java/xpath_rwapi/src2/org/apache/xml Tag: xslt20 QName.java
               java/xpath_rwapi/src2/org/apache/xpath/expression Tag:
                        xslt20 Visitor.java
               java/xpath_rwapi/src2/org/apache/xpath/impl/parser Tag:
                        xslt20 xpath-grammar.jj XPathVisitor.java
                        xpath-grammar.jjt XPath.java
                        XPathTreeConstants.java SimpleNode.java
               java/xpath_rwapi/grammar Tag: xslt20 xpath-grammar.xml
                        custom-xpath-grammar.xml
               java/xpath_rwapi/src2/org/apache/xpath/impl Tag: xslt20
                        FunctionCallImpl.java NameTestImpl.java
               java/xpath_rwapi/src2/org/apache/xpath/test Tag: xslt20
                        TestSamples.java TestSamples.xml
               java/xpath_rwapi Tag: xslt20 build2.bat
  Added:       java/xpath_rwapi/src2/org/apache/xpath/expression Tag:
                        xslt20 CastableAsExpr.java
               java/xpath_rwapi/src2/org/apache/xpath/impl/parser Tag:
                        xslt20 QNameWrapper.java
               java/xpath_rwapi/src2/org/apache/xpath/impl Tag: xslt20
                        CastableAsExprImpl.java
  Removed:     java/xpath_rwapi/src2/org/apache/xpath/expression Tag:
                        xslt20 CastableExpr.java
               java/xpath_rwapi/src2/org/apache/xpath/impl/parser Tag:
                        xslt20 QName.java
               java/xpath_rwapi/src2/org/apache/xpath/impl Tag: xslt20
                        CastableExprImpl.java
  Log:
  - Implementation of castable as expression type
  - The toString method of ..xml.QName class returns qname of the form 
prefix:localname
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +2 -1      
xml-xalan/java/xpath_rwapi/src2/org/apache/xml/Attic/QName.java
  
  Index: QName.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/src2/org/apache/xml/Attic/QName.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- QName.java        13 Mar 2003 20:28:18 -0000      1.1.2.1
  +++ QName.java        26 Mar 2003 21:27:20 -0000      1.1.2.2
  @@ -127,7 +127,8 @@
           if (namespaceURI.equals(XMLConstants.DEFAULT_NS_URI)) {
               return localPart;
           } else {
  -            return "{" + namespaceURI + "}" + localPart;
  +            //return "{" + namespaceURI + "}" + localPart;
  +                     return prefix +  ":" + localPart;
           }
       }
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +5 -0      
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/expression/Attic/Visitor.java
  
  Index: Visitor.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/expression/Attic/Visitor.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- Visitor.java      25 Mar 2003 23:46:08 -0000      1.1.2.2
  +++ Visitor.java      26 Mar 2003 21:27:20 -0000      1.1.2.3
  @@ -106,5 +106,10 @@
         * Visit instance of expression
         */
        boolean visitInstanceOf(InstanceOfExpr expr);
  +     
  +     /**
  +      * Visit 'castable as' expression
  +      */
  +     boolean visitCastableAs(CastableAsExpr expr);
   
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +79 -0     
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/expression/Attic/CastableAsExpr.java
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.5   +2 -20     
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/xpath-grammar.jj
  
  Index: xpath-grammar.jj
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/xpath-grammar.jj,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- xpath-grammar.jj  26 Mar 2003 03:42:55 -0000      1.1.2.4
  +++ xpath-grammar.jj  26 Mar 2003 21:27:20 -0000      1.1.2.5
  @@ -1,4 +1,4 @@
  -/[EMAIL PROTECTED](jjtree) Generated By:JJTree: Do not edit this line. 
D:/projets/xml-xalan-xslt20/java/xpath_rwapi/src2/org/apache/xpath/impl/parser\xpath-grammar.jj
 */
  +/[EMAIL PROTECTED](jjtree) Generated By:JJTree: Do not edit this line. 
C:/data/projects/xml-xalan-xslt20/java/xpath_rwapi/src2/org/apache/xpath/impl/parser\xpath-grammar.jj
 */
   /[EMAIL PROTECTED]/options {
   
          
  @@ -1880,25 +1880,7 @@
   {/[EMAIL PROTECTED](jjtree) #CastableExpr(> 1) */
     try {
   /[EMAIL PROTECTED]/
  -  ComparisonExpr() (<Castable>/[EMAIL PROTECTED](jjtree) #Castable( true) */
  -                              {
  -                                SimpleNode jjtn001 = 
(SimpleNode)SimpleNode.jjtCreate(this, JJTCASTABLE);
  -                                boolean jjtc001 = true;
  -                                jjtree.openNodeScope(jjtn001);
  -                              }
  -                              try {
  -/[EMAIL PROTECTED]//[EMAIL PROTECTED](jjtree)*/
  -                              {
  -                                jjtree.closeNodeScope(jjtn001,  true);
  -                                jjtc001 = false;
  -                              }
  -/[EMAIL PROTECTED]/{jjtn001.processToken(token);}/[EMAIL PROTECTED](jjtree)*/
  -                              } finally {
  -                                if (jjtc001) {
  -                                  jjtree.closeNodeScope(jjtn001,  true);
  -                                }
  -                              }
  -/[EMAIL PROTECTED]/ SingleType())?/[EMAIL PROTECTED](jjtree)*/
  +  ComparisonExpr() (<Castable> SingleType())?/[EMAIL PROTECTED](jjtree)*/
     } catch (Throwable jjte000) {
       if (jjtc000) {
         jjtree.clearNodeScope(jjtn000);
  
  
  
  1.1.2.4   +1 -1      
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/XPathVisitor.java
  
  Index: XPathVisitor.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/XPathVisitor.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- XPathVisitor.java 26 Mar 2003 03:42:55 -0000      1.1.2.3
  +++ XPathVisitor.java 26 Mar 2003 21:27:21 -0000      1.1.2.4
  @@ -1,4 +1,4 @@
  -/* Generated By:JJTree: Do not edit this line. 
D:/projets/xml-xalan-xslt20/java/xpath_rwapi/src2/org/apache/xpath/impl/parser\XPathVisitor.java
 */
  +/* Generated By:JJTree: Do not edit this line. 
C:/data/projects/xml-xalan-xslt20/java/xpath_rwapi/src2/org/apache/xpath/impl/parser\XPathVisitor.java
 */
   
   package org.apache.xpath.impl.parser;
   
  
  
  
  1.1.2.5   +1 -1      
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/xpath-grammar.jjt
  
  Index: xpath-grammar.jjt
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/xpath-grammar.jjt,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- xpath-grammar.jjt 26 Mar 2003 03:42:55 -0000      1.1.2.4
  +++ xpath-grammar.jjt 26 Mar 2003 21:27:21 -0000      1.1.2.5
  @@ -1145,7 +1145,7 @@
   void CastableExpr() #CastableExpr(> 1) :
   {}
   {
  -  ComparisonExpr() (<Castable>{jjtThis.processToken(token);} #Castable(true) 
SingleType())?
  +  ComparisonExpr() (<Castable> SingleType())?
   }
   
   void ComparisonExpr() #ComparisonExpr(> 1) :
  
  
  
  1.1.2.5   +0 -12     
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/XPath.java
  
  Index: XPath.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/XPath.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- XPath.java        26 Mar 2003 03:42:55 -0000      1.1.2.4
  +++ XPath.java        26 Mar 2003 21:27:21 -0000      1.1.2.5
  @@ -1163,18 +1163,6 @@
         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
         case Castable:
           jj_consume_token(Castable);
  -                                SimpleNode jjtn001 = 
(SimpleNode)SimpleNode.jjtCreate(this, JJTCASTABLE);
  -                                boolean jjtc001 = true;
  -                                jjtree.openNodeScope(jjtn001);
  -        try {
  -                                jjtree.closeNodeScope(jjtn001,  true);
  -                                jjtc001 = false;
  -                               jjtn001.processToken(token);
  -        } finally {
  -                                if (jjtc001) {
  -                                  jjtree.closeNodeScope(jjtn001,  true);
  -                                }
  -        }
           SingleType();
           break;
         default:
  
  
  
  1.1.2.5   +72 -74    
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/XPathTreeConstants.java
  
  Index: XPathTreeConstants.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/XPathTreeConstants.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- XPathTreeConstants.java   26 Mar 2003 03:42:55 -0000      1.1.2.4
  +++ XPathTreeConstants.java   26 Mar 2003 21:27:21 -0000      1.1.2.5
  @@ -1,4 +1,4 @@
  -/* Generated By:JJTree: Do not edit this line. 
D:/projets/xml-xalan-xslt20/java/xpath_rwapi/src2/org/apache/xpath/impl/parser\XPathTreeConstants.java
 */
  +/* Generated By:JJTree: Do not edit this line. 
C:/data/projects/xml-xalan-xslt20/java/xpath_rwapi/src2/org/apache/xpath/impl/parser\XPathTreeConstants.java
 */
   
   package org.apache.xpath.impl.parser;
   
  @@ -34,78 +34,77 @@
     public int JJTIFEXPR = 27;
     public int JJTINSTANCEOFEXPR = 28;
     public int JJTCASTABLEEXPR = 29;
  -  public int JJTCASTABLE = 30;
  -  public int JJTCOMPARISONEXPR = 31;
  -  public int JJTRANGEEXPR = 32;
  -  public int JJTADDITIVEEXPR = 33;
  -  public int JJTMULTIPLICATIVEEXPR = 34;
  -  public int JJTUNARYEXPR = 35;
  -  public int JJTMINUS = 36;
  -  public int JJTPLUS = 37;
  -  public int JJTUNIONEXPR = 38;
  -  public int JJTINTERSECTEXCEPTEXPR = 39;
  -  public int JJTPATHEXPR = 40;
  -  public int JJTSTEPEXPR = 41;
  -  public int JJTVALIDATEEXPR = 42;
  -  public int JJTVALIDATELBRACE = 43;
  -  public int JJTVALIDATECONTEXT = 44;
  -  public int JJTSLASH = 45;
  -  public int JJTLBRACEEXPRENCLOSURE = 46;
  -  public int JJTRBRACE = 47;
  -  public int JJTCASTEXPR = 48;
  -  public int JJTTREATEXPR = 49;
  -  public int JJTAXISDESCENDANT = 50;
  -  public int JJTAXISSELF = 51;
  -  public int JJTAXISDESCENDANTORSELF = 52;
  -  public int JJTAXISFOLLOWINGSIBLING = 53;
  -  public int JJTAXISFOLLOWING = 54;
  -  public int JJTAXISNAMESPACE = 55;
  -  public int JJTAXISPARENT = 56;
  -  public int JJTAXISANCESTOR = 57;
  -  public int JJTAXISPRECEDINGSIBLING = 58;
  -  public int JJTAXISPRECEDING = 59;
  -  public int JJTAXISANCESTORORSELF = 60;
  -  public int JJTNODETEST = 61;
  -  public int JJTNAMETEST = 62;
  -  public int JJTQNAME = 63;
  -  public int JJTSTAR = 64;
  -  public int JJTNCNAMECOLONSTAR = 65;
  -  public int JJTSTARCOLONNCNAME = 66;
  -  public int JJTPROCESSINGINSTRUCTIONTEST = 67;
  -  public int JJTCOMMENTTEST = 68;
  -  public int JJTTEXTTEST = 69;
  -  public int JJTANYKINDTEST = 70;
  -  public int JJTDOT = 71;
  -  public int JJTDOTDOT = 72;
  -  public int JJTPREDICATES = 73;
  -  public int JJTINTEGERLITERAL = 74;
  -  public int JJTDECIMALLITERAL = 75;
  -  public int JJTDOUBLELITERAL = 76;
  -  public int JJTFUNCTIONCALL = 77;
  -  public int JJTSCHEMACONTEXT = 78;
  -  public int JJTINCONTEXT = 79;
  -  public int JJTSCHEMAGLOBALCONTEXT = 80;
  -  public int JJTTYPEQNAME = 81;
  -  public int JJTSCHEMACONTEXTSTEP = 82;
  -  public int JJTSINGLETYPE = 83;
  -  public int JJTQMARK = 84;
  -  public int JJTSEQUENCETYPE = 85;
  -  public int JJTEMPTY = 86;
  -  public int JJTELEMENTTYPE = 87;
  -  public int JJTATTRIBUTETYPE = 88;
  -  public int JJTNODE = 89;
  -  public int JJTPROCESSINGINSTRUCTION = 90;
  -  public int JJTCOMMENT = 91;
  -  public int JJTTEXT = 92;
  -  public int JJTDOCUMENT = 93;
  -  public int JJTITEM = 94;
  -  public int JJTUNTYPED = 95;
  -  public int JJTATOMICVALUE = 96;
  -  public int JJTELEMORATTRTYPE = 97;
  -  public int JJTSCHEMATYPE = 98;
  -  public int JJTOFTYPE = 99;
  -  public int JJTATOMICTYPE = 100;
  -  public int JJTMULTIPLY = 101;
  +  public int JJTCOMPARISONEXPR = 30;
  +  public int JJTRANGEEXPR = 31;
  +  public int JJTADDITIVEEXPR = 32;
  +  public int JJTMULTIPLICATIVEEXPR = 33;
  +  public int JJTUNARYEXPR = 34;
  +  public int JJTMINUS = 35;
  +  public int JJTPLUS = 36;
  +  public int JJTUNIONEXPR = 37;
  +  public int JJTINTERSECTEXCEPTEXPR = 38;
  +  public int JJTPATHEXPR = 39;
  +  public int JJTSTEPEXPR = 40;
  +  public int JJTVALIDATEEXPR = 41;
  +  public int JJTVALIDATELBRACE = 42;
  +  public int JJTVALIDATECONTEXT = 43;
  +  public int JJTSLASH = 44;
  +  public int JJTLBRACEEXPRENCLOSURE = 45;
  +  public int JJTRBRACE = 46;
  +  public int JJTCASTEXPR = 47;
  +  public int JJTTREATEXPR = 48;
  +  public int JJTAXISDESCENDANT = 49;
  +  public int JJTAXISSELF = 50;
  +  public int JJTAXISDESCENDANTORSELF = 51;
  +  public int JJTAXISFOLLOWINGSIBLING = 52;
  +  public int JJTAXISFOLLOWING = 53;
  +  public int JJTAXISNAMESPACE = 54;
  +  public int JJTAXISPARENT = 55;
  +  public int JJTAXISANCESTOR = 56;
  +  public int JJTAXISPRECEDINGSIBLING = 57;
  +  public int JJTAXISPRECEDING = 58;
  +  public int JJTAXISANCESTORORSELF = 59;
  +  public int JJTNODETEST = 60;
  +  public int JJTNAMETEST = 61;
  +  public int JJTQNAME = 62;
  +  public int JJTSTAR = 63;
  +  public int JJTNCNAMECOLONSTAR = 64;
  +  public int JJTSTARCOLONNCNAME = 65;
  +  public int JJTPROCESSINGINSTRUCTIONTEST = 66;
  +  public int JJTCOMMENTTEST = 67;
  +  public int JJTTEXTTEST = 68;
  +  public int JJTANYKINDTEST = 69;
  +  public int JJTDOT = 70;
  +  public int JJTDOTDOT = 71;
  +  public int JJTPREDICATES = 72;
  +  public int JJTINTEGERLITERAL = 73;
  +  public int JJTDECIMALLITERAL = 74;
  +  public int JJTDOUBLELITERAL = 75;
  +  public int JJTFUNCTIONCALL = 76;
  +  public int JJTSCHEMACONTEXT = 77;
  +  public int JJTINCONTEXT = 78;
  +  public int JJTSCHEMAGLOBALCONTEXT = 79;
  +  public int JJTTYPEQNAME = 80;
  +  public int JJTSCHEMACONTEXTSTEP = 81;
  +  public int JJTSINGLETYPE = 82;
  +  public int JJTQMARK = 83;
  +  public int JJTSEQUENCETYPE = 84;
  +  public int JJTEMPTY = 85;
  +  public int JJTELEMENTTYPE = 86;
  +  public int JJTATTRIBUTETYPE = 87;
  +  public int JJTNODE = 88;
  +  public int JJTPROCESSINGINSTRUCTION = 89;
  +  public int JJTCOMMENT = 90;
  +  public int JJTTEXT = 91;
  +  public int JJTDOCUMENT = 92;
  +  public int JJTITEM = 93;
  +  public int JJTUNTYPED = 94;
  +  public int JJTATOMICVALUE = 95;
  +  public int JJTELEMORATTRTYPE = 96;
  +  public int JJTSCHEMATYPE = 97;
  +  public int JJTOFTYPE = 98;
  +  public int JJTATOMICTYPE = 99;
  +  public int JJTMULTIPLY = 100;
   
   
     public String[] jjtNodeName = {
  @@ -139,7 +138,6 @@
       "IfExpr",
       "InstanceofExpr",
       "CastableExpr",
  -    "Castable",
       "ComparisonExpr",
       "RangeExpr",
       "AdditiveExpr",
  
  
  
  1.1.2.5   +4 -4      
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/SimpleNode.java
  
  Index: SimpleNode.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/SimpleNode.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- SimpleNode.java   26 Mar 2003 03:42:55 -0000      1.1.2.4
  +++ SimpleNode.java   26 Mar 2003 21:27:21 -0000      1.1.2.5
  @@ -2,7 +2,7 @@
   package org.apache.xpath.impl.parser;
   
   import org.apache.xpath.impl.CastOrTreatAsExprImpl;
  -import org.apache.xpath.impl.CastableExprImpl;
  +import org.apache.xpath.impl.CastableAsExprImpl;
   import org.apache.xpath.impl.ConditionalExprImpl;
   import org.apache.xpath.impl.ForAndQuantifiedExprImpl;
   import org.apache.xpath.impl.FunctionCallImpl;
  @@ -120,11 +120,11 @@
   
              
               case XPathTreeConstants.JJTCASTABLEEXPR:
  -                newNode = (CastableExprImpl) nodeFactory.createNode(id);
  +                newNode = (CastableAsExprImpl) nodeFactory.createNode(id);
   
                   if (newNode == null)
                   {
  -                    newNode = new CastableExprImpl(id);
  +                    newNode = new CastableAsExprImpl(id);
                   }
   
                   break;
  @@ -245,7 +245,7 @@
               case XPathTreeConstants.JJTSTAR:
               case XPathTreeConstants.JJTNCNAMECOLONSTAR:
               case XPathTreeConstants.JJTSTARCOLONNCNAME:
  -                newNode = new QName(id);
  +                newNode = new QNameWrapper(id);
   
                   break;
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +137 -0    
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/parser/Attic/QNameWrapper.java
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.8   +2 -2      
xml-xalan/java/xpath_rwapi/grammar/Attic/xpath-grammar.xml
  
  Index: xpath-grammar.xml
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/grammar/Attic/xpath-grammar.xml,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- xpath-grammar.xml 26 Mar 2003 03:42:56 -0000      1.1.2.7
  +++ xpath-grammar.xml 26 Mar 2003 21:27:21 -0000      1.1.2.8
  @@ -1576,7 +1576,7 @@
                <level>
         <postfix name="CastableExpr" if="xquery xpath" prefix-seq-type="?" 
condition="> 1">
             <sequence>
  -            <ref name="Castable"/>
  +            <ref name="Castable" node-type="void"/>
               <ref name="SingleType"/>
             </sequence>
         </postfix>       
  @@ -2196,7 +2196,7 @@
     <production name="SequenceType" if="xquery core xpath">
          <choice>
         <sequence>
  -        <ref name="ItemType"/>
  +        <ref name="ItemType" />
           <ref name="OccurrenceIndicator"/>
         </sequence>
         <ref name="Empty"/>
  
  
  
  1.1.2.5   +10 -10    
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.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- custom-xpath-grammar.xml  13 Mar 2003 20:29:09 -0000      1.1.2.4
  +++ custom-xpath-grammar.xml  26 Mar 2003 21:27:21 -0000      1.1.2.5
  @@ -1385,20 +1385,20 @@
                <level>
                        <prefix name="IfExpr" if="xpath core xquery" 
condition="&gt; 1">
                                <sequence>
  -                                     <ref name="IfLpar"/>
  +                                     <ref name="IfLpar" node-type="void"/>
                                        <ref name="Expr"/>
  -                                     <ref name="Rpar"/>
  +                                     <ref name="Rpar" node-type="void"/>
             
  -                                     <ref name="Then"/>
  +                                     <ref name="Then" node-type="void"/>
                                        <ref name="Expr"/>
  -                                     <ref name="Else"/>
  +                                     <ref name="Else" node-type="void"/>
                                </sequence>
                        </prefix>  
                </level>
                <level>
         <postfix name="InstanceofExpr" if="xquery xpath" prefix-seq-type="?" 
condition="&gt; 1">
                                  <sequence>
  -                                       <ref name="Instanceof"/>
  +                                       <ref name="Instanceof" 
node-type="void"/>
                                          <ref name="SequenceType"/>
                                  </sequence>
         </postfix>       
  @@ -1406,7 +1406,7 @@
                <level>
         <postfix name="CastableExpr" if="xquery xpath" prefix-seq-type="?" 
condition="&gt; 1">
             <sequence>
  -            <ref name="Castable"/>
  +            <ref name="Castable" node-type="void"/>
               <ref name="SingleType"/>
             </sequence>
         </postfix>       
  @@ -1631,7 +1631,7 @@
        
        <production name="CastExpr" if="xpath core xquery">
              <sequence>
  -               <ref name="CastAs"/>
  +               <ref name="CastAs" node-type="void"/>
                  <ref name="SingleType"/>
                </sequence>
                <ref name="ParenthesizedExpr"/>
  @@ -1642,7 +1642,7 @@
        
        <production name="TreatExpr" if="xpath core xquery">
                <sequence>
  -                     <ref name="TreatAs" if="xpath xquery"/>
  +                     <ref name="TreatAs" if="xpath xquery" node-type="void"/>
                        <ref name="SequenceType"/>
                </sequence>
                <ref name="ParenthesizedExpr"/>    
  @@ -1995,7 +1995,7 @@
                </choice>
     </production>
        
  -  <production name="ItemType" if="xquery core xpath">
  +  <production name="ItemType" if="xquery core xpath" node-type="void">
       <choice break="true">
         <sequence>
           <choice>
  @@ -2052,7 +2052,7 @@
       <ref name="QName"/>
     </production>
   
  -  <production name="OccurrenceIndicator" if="xquery core xpath">
  +  <production name="OccurrenceIndicator" if="xquery core xpath" 
node-type="void">
       <optional>
         <choice>
           <ref name="Star" if="xpath xquery core" show="no"/>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +3 -8      
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/Attic/FunctionCallImpl.java
  
  Index: FunctionCallImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/Attic/FunctionCallImpl.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- FunctionCallImpl.java     13 Mar 2003 20:28:14 -0000      1.1.2.1
  +++ FunctionCallImpl.java     26 Mar 2003 21:27:22 -0000      1.1.2.2
  @@ -64,12 +64,10 @@
   import org.apache.xpath.impl.parser.XPathTreeConstants;
   
   /**
  - *
  + * Default implementation of function call expression type.
    */
   public class FunctionCallImpl extends OperatorImpl implements FunctionCall {
   
  -     //String m_localPart;
  -     //String m_prefix;
        /**
         * Name of the function
         */
  @@ -111,11 +109,8 @@
         */
        final public void jjtAddChild(Node n, int i) {
                
  -             if (n.getId() == XPathTreeConstants.JJTQNAMELPAR) {
  -                             //m_localPart = ((QName) n).getLocalPart();
  -                             //m_prefix = ((QName) n).getPrefix();
  -                             m_qname = ((org.apache.xpath.impl.parser.QName) 
n).getQName();
  -                             
  +             if (n.getId() == XPathTreeConstants.JJTQNAMELPAR) {             
                
  +                             m_qname = 
((org.apache.xpath.impl.parser.QNameWrapper) n).getQName();                     
      
                        } else {
                                // parameter
                                // -1 because of QNAMELPAR 
  
  
  
  1.1.2.2   +1 -1      
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/Attic/NameTestImpl.java
  
  Index: NameTestImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/Attic/NameTestImpl.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- NameTestImpl.java 13 Mar 2003 20:28:14 -0000      1.1.2.1
  +++ NameTestImpl.java 26 Mar 2003 21:27:22 -0000      1.1.2.2
  @@ -159,7 +159,7 @@
       public void jjtAddChild(Node n, int i)
       {
           // don't add n in the tree
  -        m_qname = ((org.apache.xpath.impl.parser.QName) n).getQName();
  +        m_qname = ((org.apache.xpath.impl.parser.QNameWrapper) n).getQName();
       }
   
       /**
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +163 -0    
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/impl/Attic/CastableAsExprImpl.java
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.4   +25 -22    
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/test/Attic/TestSamples.java
  
  Index: TestSamples.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/test/Attic/TestSamples.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- TestSamples.java  25 Mar 2003 23:46:10 -0000      1.1.2.3
  +++ TestSamples.java  26 Mar 2003 21:27:22 -0000      1.1.2.4
  @@ -55,10 +55,15 @@
    */
   package org.apache.xpath.test;
   
  +import java.io.StringReader;
  +
  +import javax.xml.parsers.DocumentBuilder;
  +import javax.xml.parsers.DocumentBuilderFactory;
  +
   import org.apache.xpath.XPathFactory;
  +import org.apache.xpath.expression.CastableAsExpr;
   import org.apache.xpath.expression.ConditionalExpr;
   import org.apache.xpath.expression.Expr;
  -import org.apache.xpath.expression.ExprContext;
   import org.apache.xpath.expression.ExpressionFactory;
   import org.apache.xpath.expression.ForAndQuantifiedExpr;
   import org.apache.xpath.expression.InstanceOfExpr;
  @@ -75,19 +80,12 @@
   import org.apache.xpath.impl.parser.XPath;
   import org.apache.xpath.impl.parser.XPathTreeConstants;
   import org.apache.xpath.objects.XObject;
  -
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   import org.w3c.dom.Node;
   import org.w3c.dom.NodeList;
  -
   import org.xml.sax.InputSource;
   
  -import java.io.StringReader;
  -
  -import javax.xml.parsers.DocumentBuilder;
  -import javax.xml.parsers.DocumentBuilderFactory;
  -
   
   /**
    * Simple unit test for various samples; adhoc.
  @@ -217,11 +215,16 @@
                       {
                           return false;
                       }
  -                    
  -                                     public boolean 
visitInstanceOf(InstanceOfExpr expr)
  -                                                                             
{
  -                                                                             
        return false;
  -                                                                             
}
  +
  +                    public boolean visitInstanceOf(InstanceOfExpr expr)
  +                    {
  +                        return false;
  +                    }
  +
  +                    public boolean visitCastableAs(CastableAsExpr expr)
  +                    {
  +                        return false;
  +                    }
                   });
   
               // Simple Evaluation check
  @@ -326,19 +329,19 @@
                           System.err.print(
                               "Bad external or internal representation: ");
                           System.err.println(ab + "  !=  " + xpathString);
  -                        
  -                                             tree.dump("|");
   
  -                                                                             
                        // Produce the raw tree
  -                                                                             
                        System.err.println("Raw tree is");
  +                        tree.dump("|");
  +
  +                        // Produce the raw tree
  +                        System.err.println("Raw tree is");
   
  -                                                                             
                        SimpleNode.PRODUCE_RAW_TREE = true;
  +                        SimpleNode.PRODUCE_RAW_TREE = true;
   
  -                                                                             
                        parser = new XPath(new StringReader(xpathString));
  -                                                                             
                        tree = parser.XPath2();
  -                                                                             
                        tree.dump("|");
  +                        parser = new XPath(new StringReader(xpathString));
  +                        tree = parser.XPath2();
  +                        tree.dump("|");
   
  -                                                                             
                        SimpleNode.PRODUCE_RAW_TREE = false;
  +                        SimpleNode.PRODUCE_RAW_TREE = false;
                           testOK = false;
                       }
                   }
  
  
  
  1.1.2.5   +25 -2     
xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/test/Attic/TestSamples.xml
  
  Index: TestSamples.xml
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/xpath_rwapi/src2/org/apache/xpath/test/Attic/TestSamples.xml,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- TestSamples.xml   26 Mar 2003 03:42:55 -0000      1.1.2.4
  +++ TestSamples.xml   26 Mar 2003 21:27:22 -0000      1.1.2.5
  @@ -302,7 +302,7 @@
                </ast>
        </expr>
        
  -     <expr value="attribute::*">
  +     <expr value="attribute::*" normalized-round-trip="@*"> <!-- the 
abbreviate notation is used for tests -->
                <ast>
                        <node name="ExprSequence">
                                <node name="PathExpr">
  @@ -894,8 +894,31 @@
                </ast>
        </expr>
        
  -     <!-- Castable expr -->
  +     <!-- Castable as expr -->
        
  +     <expr value="5 castable as xs:integer">
  +             <ast>
  +                     <node name="ExprSequence">
  +                             <node name="CastableExpr">
  +                                     <node name="IntegerLiteral"/>
  +                                     <node name="SingleType"/>
  +                             </node>
  +                     </node>
  +             </ast>
  +     </expr>
  +     
  +     <!-- Constructor functions -->
  +     
  +     <expr value="xs:date('2000-01-01')">
  +             <ast>
  +                     <node name="ExprSequence">
  +                             <node name="FunctionCall">
  +                                     <node name="StringLiteral"/>
  +                             </node>
  +                     </node>
  +             </ast>
  +     </expr>
  +
        <!-- For expr -->
        
        <expr value="for $a in a return b">
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +5 -1      xml-xalan/java/xpath_rwapi/Attic/build2.bat
  
  Index: build2.bat
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/xpath_rwapi/Attic/build2.bat,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- build2.bat        26 Mar 2003 03:42:56 -0000      1.1.2.2
  +++ build2.bat        26 Mar 2003 21:27:23 -0000      1.1.2.3
  @@ -39,13 +39,16 @@
   if "%_PARSER_JAR%" == "" set _PARSER_JAR=%_ANT_HOME%\bin\xercesImpl.jar
   set _XML-APIS_JAR=%XML-APIS_JAR%
   if "%_XML-APIS_JAR%" == "" set _XML-APIS_JAR=%_ANT_HOME%\bin\xml-apis.jar
  +set _XALAN_JAR=%XALAN_JAR%
  +if "%_XALAN_JAR%" == "" set _XALAN_JAR=%_ANT_HOME%\build\xalan.jar
  +
   
   rem Attempt to automatically add system classes to _CLASSPATH
   rem Use _underscore prefix to not conflict with user's settings
   set _CLASSPATH=%CLASSPATH%
   if exist "%JAVA_HOME%\lib\tools.jar" set 
_CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar
   if exist "%JAVA_HOME%\lib\classes.zip" set 
_CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\classes.zip
  -set 
_CLASSPATH=%_ANT_JAR%;%_XML-APIS_JAR%;%_PARSER_JAR%;../build/xalan.jar;%_CLASSPATH%
  +set 
_CLASSPATH=%_ANT_JAR%;%_XML-APIS_JAR%;%_PARSER_JAR%;%_XALAN_JAR%;%_CLASSPATH%
   
   @echo on
   "%_JAVACMD%" -mx64m %JAVA_OPTS% -Dant.home="%_ANT_HOME%" -classpath 
"%_CLASSPATH%" org.apache.tools.ant.Main -f build2.xml %1 %2 %3 %4 %5 %6 %7 %8 
%9
  @@ -60,5 +63,6 @@
   set _ANT_HOME=
   set _ANT_JAR=
   set _PARSER_JAR=
  +set _XALAN_JAR=
   set _XML-APIS_JAR=
   
  
  
  

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

Reply via email to