xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tmil...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/compiler DocumentCall.java
Date Tue, 16 Apr 2002 19:36:26 GMT
tmiller     02/04/16 12:36:26

  Modified:    java/src/org/apache/xalan/xsltc/compiler Tag:
                        jaxp-ri-1_2_0-fcs-branch DocumentCall.java
  Log:
  Santiago: fixed type check error when 2nd arg (base-uri) is node instead
  of node-set.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.12.4.1  +10 -2     xml-xalan/java/src/org/apache/xalan/xsltc/compiler/DocumentCall.java
  
  Index: DocumentCall.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/DocumentCall.java,v
  retrieving revision 1.12
  retrieving revision 1.12.4.1
  diff -u -r1.12 -r1.12.4.1
  --- DocumentCall.java	1 Feb 2002 20:07:08 -0000	1.12
  +++ DocumentCall.java	16 Apr 2002 19:36:26 -0000	1.12.4.1
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: DocumentCall.java,v 1.12 2002/02/01 20:07:08 tmiller Exp $
  + * @(#)$Id: DocumentCall.java,v 1.12.4.1 2002/04/16 19:36:26 tmiller Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -120,7 +120,15 @@
   	// Parse the second argument - the document URI base
   	if (ac == 2) {
   	    _base = argument(1);
  -	    if (!_base.typeCheck(stable).identicalTo(Type.NodeSet)) {
  +	    final Type baseType = _base.typeCheck(stable);
  +	    
  +	    if (baseType.identicalTo(Type.Node)) {
  +		_base = new CastExpr(_base, Type.NodeSet);
  +	    }
  +	    else if (baseType.identicalTo(Type.NodeSet)) {
  +		// falls through
  +	    }
  +	    else {
   		ErrorMsg msg = new ErrorMsg(ErrorMsg.DOCUMENT_ARG_ERR, this);
   		throw new TypeCheckError(msg);
   	    }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message