Somebody else, more knowledgeable with XSLTC than me, should comment
on your patch.

However after looking at your patch, I don't understand why would we
do a cast to NodeSet for ReferenceType nodes, but not for the other
types?

And another thing, really a style issue, why not writing the code
like:

        if(_type == Type.Reference) {
           _param = new CastExpr(_param, Type.NodeSet);
           _type = Type.NodeSet;
        }
        else if ((_type != Type.NodeSet) && (_type != Type.Node))
            throw new TypeCheckError(this);


Regards,
-- 
Ovidiu Predescu <[EMAIL PROTECTED]>
http://orion.nsr.hp.com/ (inside HP's firewall only)
http://sourceforge.net/users/ovidiu/ (my SourceForge page)
http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff)


On Thu, 28 Jun 2001 17:57:09 -0700, John Howard <[EMAIL PROTECTED]> wrote:

> On Thursday, June 28, 2001 5:34 PM, Ovidiu Predescu
> [mailto:[EMAIL PROTECTED]] wrote:
> > 
> > [snip]
> > 
> > Generating unidiff patches gives a little bit more of context to your
> > changes and is less strict with regard to changes in the original file
> > since you're generated your patch.
> > 
> 
> Thanks for the feedback, is this more helpful?
> 
> cvs -q diff NameBase.java (in directory
> C:\local\xml-xalan\java\src\org\apache\xalan\xsltc\compiler\)
> Index: NameBase.java
> ===================================================================
> RCS file:
> /home/cvspublic/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NameBase.
> java,v
> retrieving revision 1.3
> diff -u -r1.3 NameBase.java
> --- NameBase.java     2001/06/17 12:23:30     1.3
> +++ NameBase.java     2001/06/29 00:48:12
> @@ -107,6 +107,11 @@
>           throw new TypeCheckError(this);
>       }
>  
> +     if(_type == Type.Reference) {
> +            _param = new CastExpr(_param, Type.NodeSet);
> +            _type = Type.NodeSet;
> +        }
> +
>       if ((_type != Type.NodeSet) && (_type != Type.Node))
>           throw new TypeCheckError(this);
> 

Reply via email to