You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Davanum Srinivas <di...@yahoo.com> on 2001/02/09 19:24:05 UTC

[C2][Xalan2J] Bug in MethodResolver.java - Using NodeList as parameter in Extension function

Scott, Xalan Team,

Right now in C2 we have extension functions with signatures as shown below:
    public String generateParameterSource (org.w3c.dom.traversal.NodeIterator.NodeList conf)
I was looking into changing them into NodeList as shown below and found a bug in 
    public String generateParameterSource (NodeList conf)

The problem is that i got a runtime error in trying to invoke the method. This was because of a
bug in MethodResolver.java. There is a comment (line 538) that says that m_rtfConversions array
and m_nodesetConversions array should contain the same elements. But they don't. 

Here's the fix:
cvs diff MethodResolver.java (in directory
D:\jakarta\xml-xalan\java\src\org\apache\xalan\extensions\)
Index: MethodResolver.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/MethodResolver.java,v
retrieving revision 1.18
diff -r1.18 MethodResolver.java
521c521
<     new ConversionInfo(org.w3c.dom.DocumentFragment.class, 1),
---
>     new ConversionInfo(org.w3c.dom.NodeList.class, 1),

Thanks,
dims

=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Re: [C2][Xalan2J] Bug in MethodResolver.java - Using NodeList as parameter in Extension function

Posted by Davanum Srinivas <di...@yahoo.com>.
Thanks Gary, I'll try it out and report back if there are problems.
-- dims

--- Gary L Peskin <ga...@firstech.com> wrote:
> Dims --
> 
> At long last, I've committed this change.  Sorry it took so long.  I'm
> fiddling with some other changes in MethodResolver but they were taking
> longer than I expected so I put this up so you could use it now.  I'll
> committ the other changes in the next few days.
> 
> Gary
> 
> Davanum Srinivas wrote:
> > 
> > Scott, Xalan Team,
> > 
> > Right now in C2 we have extension functions with signatures as shown below:
> >     public String generateParameterSource (org.w3c.dom.traversal.NodeIterator.NodeList conf)
> > I was looking into changing them into NodeList as shown below and found a bug in
> >     public String generateParameterSource (NodeList conf)
> > 
> > The problem is that i got a runtime error in trying to invoke the method. This was because of
> a
> > bug in MethodResolver.java. There is a comment (line 538) that says that m_rtfConversions
> array
> > and m_nodesetConversions array should contain the same elements. But they don't.
> > 
> > Here's the fix:
> > cvs diff MethodResolver.java (in directory
> > D:\jakarta\xml-xalan\java\src\org\apache\xalan\extensions\)
> > Index: MethodResolver.java
> > ===================================================================
> > RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/MethodResolver.java,v
> > retrieving revision 1.18
> > diff -r1.18 MethodResolver.java
> > 521c521
> > <     new ConversionInfo(org.w3c.dom.DocumentFragment.class, 1),
> > ---
> > >     new ConversionInfo(org.w3c.dom.NodeList.class, 1),
> > 
> > Thanks,
> > dims
> > 
> > =====
> > Davanum Srinivas, JNI-FAQ Manager
> > http://www.jGuru.com/faq/JNI
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail - only $35
> > a year!  http://personal.mail.yahoo.com/
> 
> -- 
> Gary L Peskin
> The Firstech Corporation
> +1.323.658.1146
> http://www.simdate.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Re: [C2][Xalan2J] Bug in MethodResolver.java - Using NodeList as parameter in Extension function

Posted by Davanum Srinivas <di...@yahoo.com>.
Thanks Gary, I'll try it out and report back if there are problems.
-- dims

--- Gary L Peskin <ga...@firstech.com> wrote:
> Dims --
> 
> At long last, I've committed this change.  Sorry it took so long.  I'm
> fiddling with some other changes in MethodResolver but they were taking
> longer than I expected so I put this up so you could use it now.  I'll
> committ the other changes in the next few days.
> 
> Gary
> 
> Davanum Srinivas wrote:
> > 
> > Scott, Xalan Team,
> > 
> > Right now in C2 we have extension functions with signatures as shown below:
> >     public String generateParameterSource (org.w3c.dom.traversal.NodeIterator.NodeList conf)
> > I was looking into changing them into NodeList as shown below and found a bug in
> >     public String generateParameterSource (NodeList conf)
> > 
> > The problem is that i got a runtime error in trying to invoke the method. This was because of
> a
> > bug in MethodResolver.java. There is a comment (line 538) that says that m_rtfConversions
> array
> > and m_nodesetConversions array should contain the same elements. But they don't.
> > 
> > Here's the fix:
> > cvs diff MethodResolver.java (in directory
> > D:\jakarta\xml-xalan\java\src\org\apache\xalan\extensions\)
> > Index: MethodResolver.java
> > ===================================================================
> > RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/MethodResolver.java,v
> > retrieving revision 1.18
> > diff -r1.18 MethodResolver.java
> > 521c521
> > <     new ConversionInfo(org.w3c.dom.DocumentFragment.class, 1),
> > ---
> > >     new ConversionInfo(org.w3c.dom.NodeList.class, 1),
> > 
> > Thanks,
> > dims
> > 
> > =====
> > Davanum Srinivas, JNI-FAQ Manager
> > http://www.jGuru.com/faq/JNI
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail - only $35
> > a year!  http://personal.mail.yahoo.com/
> 
> -- 
> Gary L Peskin
> The Firstech Corporation
> +1.323.658.1146
> http://www.simdate.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Re: [C2][Xalan2J] Bug in MethodResolver.java - Using NodeList as parameter in Extension function

Posted by Gary L Peskin <ga...@firstech.com>.
Dims --

At long last, I've committed this change.  Sorry it took so long.  I'm
fiddling with some other changes in MethodResolver but they were taking
longer than I expected so I put this up so you could use it now.  I'll
committ the other changes in the next few days.

Gary

Davanum Srinivas wrote:
> 
> Scott, Xalan Team,
> 
> Right now in C2 we have extension functions with signatures as shown below:
>     public String generateParameterSource (org.w3c.dom.traversal.NodeIterator.NodeList conf)
> I was looking into changing them into NodeList as shown below and found a bug in
>     public String generateParameterSource (NodeList conf)
> 
> The problem is that i got a runtime error in trying to invoke the method. This was because of a
> bug in MethodResolver.java. There is a comment (line 538) that says that m_rtfConversions array
> and m_nodesetConversions array should contain the same elements. But they don't.
> 
> Here's the fix:
> cvs diff MethodResolver.java (in directory
> D:\jakarta\xml-xalan\java\src\org\apache\xalan\extensions\)
> Index: MethodResolver.java
> ===================================================================
> RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/MethodResolver.java,v
> retrieving revision 1.18
> diff -r1.18 MethodResolver.java
> 521c521
> <     new ConversionInfo(org.w3c.dom.DocumentFragment.class, 1),
> ---
> >     new ConversionInfo(org.w3c.dom.NodeList.class, 1),
> 
> Thanks,
> dims
> 
> =====
> Davanum Srinivas, JNI-FAQ Manager
> http://www.jGuru.com/faq/JNI
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/

-- 
Gary L Peskin
The Firstech Corporation
+1.323.658.1146
http://www.simdate.com

Re: [C2][Xalan2J] Bug in MethodResolver.java - Using NodeList as parameter in Extension function

Posted by Gary L Peskin <ga...@firstech.com>.
Dims --

At long last, I've committed this change.  Sorry it took so long.  I'm
fiddling with some other changes in MethodResolver but they were taking
longer than I expected so I put this up so you could use it now.  I'll
committ the other changes in the next few days.

Gary

Davanum Srinivas wrote:
> 
> Scott, Xalan Team,
> 
> Right now in C2 we have extension functions with signatures as shown below:
>     public String generateParameterSource (org.w3c.dom.traversal.NodeIterator.NodeList conf)
> I was looking into changing them into NodeList as shown below and found a bug in
>     public String generateParameterSource (NodeList conf)
> 
> The problem is that i got a runtime error in trying to invoke the method. This was because of a
> bug in MethodResolver.java. There is a comment (line 538) that says that m_rtfConversions array
> and m_nodesetConversions array should contain the same elements. But they don't.
> 
> Here's the fix:
> cvs diff MethodResolver.java (in directory
> D:\jakarta\xml-xalan\java\src\org\apache\xalan\extensions\)
> Index: MethodResolver.java
> ===================================================================
> RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/MethodResolver.java,v
> retrieving revision 1.18
> diff -r1.18 MethodResolver.java
> 521c521
> <     new ConversionInfo(org.w3c.dom.DocumentFragment.class, 1),
> ---
> >     new ConversionInfo(org.w3c.dom.NodeList.class, 1),
> 
> Thanks,
> dims
> 
> =====
> Davanum Srinivas, JNI-FAQ Manager
> http://www.jGuru.com/faq/JNI
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/

-- 
Gary L Peskin
The Firstech Corporation
+1.323.658.1146
http://www.simdate.com