cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Kay" <mh...@iclway.co.uk>
Subject RE: [C2][SAXON] NodeIterator/NodeList in SAXON extensions.
Date Sat, 10 Mar 2001 17:20:55 GMT
I'm hoping to put together a patch release next week if I can.

Mike

> -----Original Message-----
> From: Davanum Srinivas [mailto:dims@yahoo.com]
> Sent: 16 February 2001 01:03
> To: mhkay@iclway.co.uk
> Cc: cocoon-dev@xml.apache.org
> Subject: RE: [C2][SAXON] NodeIterator/NodeList in SAXON extensions.
> 
> 
> Mike,
> Eagerly awaiting the patch release. We might bug you a bit 
> more before it.
> 
> Thanks,
> dims
> 
> --- Michael Kay <mhkay@iclway.co.uk> wrote:
> > Thanks for identifying this one. I'm afraid my testing of 
> extension function
> > mappings is one of the weaker areas in the test suite.
> > 
> > I'll refine the fix slightly so the code reads:
> > 
> >             } else if (arg instanceof NodeSetValue &&
> >                              pclass==org.w3c.dom.NodeList.class) {
> >                 if (arg instanceof org.w3c.dom.NodeList.class) {
> >                     params[j++] = arg;
> >                 } else {
> >                     params[j++] = new
> > NodeSetExtent(((NodeSetValue)arg).enumerate());
> >                 }
> > 
> > This avoids copying the node-set if it is already a 
> NodeSetExtent (or if I
> > ever change NodeSetIntent to implement NodeList...)
> > 
> > Sounds as if it would be a good idea to try and get a patch 
> release out next
> > week.
> > 
> > Mike Kay
> > 
> > > -----Original Message-----
> > > From: Davanum Srinivas [mailto:dims@yahoo.com]
> > > Sent: 13 February 2001 15:49
> > > To: mhkay@iclway.co.uk
> > > Cc: cocoon-dev@xml.apache.org
> > > Subject: RE: [C2][SAXON] NodeIterator/NodeList in SAXON 
> extensions.
> > >
> > >
> > > Mike,
> > >
> > > Here's a diff for com\icl\saxon\expr\FunctionProxy.java which
> > > allows a NodeList to be used as a
> > > parameter in extension functions. What should we do next?
> > >
> > > Thanks,
> > > dims
> > >
> > > D:\saxon\src\com\icl\saxon\expr>diff FunctionProxy.java
> > > FunctionProxy.new.java
> > > ==============================================================
> > > ======================
> > > 465c465,466
> > > <                 params[j++] = arg;
> > > ---
> > > >                 //params[j++] = arg;
> > > >                 params[j++] = new
> > > NodeSetExtent(((NodeSetValue)arg).enumerate());
> > > ==============================================================
> > > ======================
> > >
> > >
> > > --- Davanum Srinivas <dims@yahoo.com> wrote:
> > > > Mike,
> > > >
> > > > Included is an stripped-down extension sample which works
> > > with Xalan and fails with SAXON. If we
> > > > could resolve this Cocoon would be able to use SAXON as a
> > > replacement for Xalan... Can you
> > > > please
> > > > help? If we could get SAXON to call either entry point
> > > named getParameterSource then we are all
> > > > set.
> > > >
> > > > Thanks,
> > > > dims
> > > >
> > > > PS1: Please look into run.bat for running SAXON and
> > > run2.bat for running under Xalan.
> > > > PS2: Here's the stacktrace
> > > >
> > > > D:\junk\tryext>java TraxExamples date.xml date.xsl
> > > > >>>> isFactory called:
> > > > Error at xsl:value-of on line 25 of 
> file:/D:/junk/tryext/date.xsl:
> > > >   Argument is of wrong type: argument type mismatch
> > > > EXCEPTION: javax.xml.transform.TransformerException:
> > > Argument is of wrong type
> > > > ; SystemID: file:/D:/junk/tryext/date.xsl; Line#: 25; 
> Column#: -1
> > > > javax.xml.transform.TransformerException: Argument is 
> of wrong type
> > > >         at
> > > com.icl.saxon.style.StyleElement.styleError(StyleElement.java:784)
> > > >         at
> > > com.icl.saxon.style.StyleElement.processChildren(StyleElement.
> > > java:613)
> > > >         at com.icl.saxon.style.XSLIf.process(XSLIf.java:77)
> > > >         at
> > > com.icl.saxon.style.StyleElement.processChildren(StyleElement.
> > > java:611)
> > > >         at
> > > com.icl.saxon.style.XSLForEach.process(XSLForEach.java:93)
> > > >         at
> > > com.icl.saxon.style.StyleElement.processChildren(StyleElement.
> > > java:611)
> > > >         at
> > > com.icl.saxon.style.LiteralResultElement.process(LiteralResult
> > > Element.java:288)
> > > >         at
> > > com.icl.saxon.style.StyleElement.processChildren(StyleElement.
> > > java:611)
> > > >         at
> > > com.icl.saxon.style.XSLTemplate.realExpand(XSLTemplate.java:195)
> > > >         at
> > > com.icl.saxon.style.XSLTemplate.expand(XSLTemplate.java:187)
> > > >         at
> > > 
> com.icl.saxon.style.TemplateExpander.start(TemplateExpander.java:35)
> > > >         at com.icl.saxon.Controller.visit(Controller.java:214)
> > > >         at
> > > com.icl.saxon.Controller.applyTemplates(Controller.java:259)
> > > >         at com.icl.saxon.Controller.run(Controller.java:176)
> > > >         at
> > > com.icl.saxon.Controller.transformDocument(Controller.java:883)
> > > >         at 
> com.icl.saxon.Controller.transform(Controller.java:818)
> > > >         at TraxExamples.exampleSimple1(TraxExamples.java:238)
> > > >         at TraxExamples.main(TraxExamples.java:68)
> > > > ---------
> > > > java.lang.IllegalArgumentException: argument type mismatch
> > > >         at java.lang.reflect.Method.invoke(Native Method)
> > > >         at
> > > com.icl.saxon.expr.FunctionProxy.evaluate(FunctionProxy.java:361)
> > > >         at
> > > 
> com.icl.saxon.expr.Expression.evaluateAsString(Expression.java:116)
> > > >         at
> > > 
> com.icl.saxon.expr.Expression.outputStringValue(Expression.java:127)
> > > >         at
> > > com.icl.saxon.style.XSLValueOf.process(XSLValueOf.java:93)
> > > >         at
> > > com.icl.saxon.style.StyleElement.processChildren(StyleElement.
> > > java:611)
> > > >         at com.icl.saxon.style.XSLIf.process(XSLIf.java:77)
> > > >         at
> > > com.icl.saxon.style.StyleElement.processChildren(StyleElement.
> > > java:611)
> > > >         at
> > > com.icl.saxon.style.XSLForEach.process(XSLForEach.java:93)
> > > >         at
> > > com.icl.saxon.style.StyleElement.processChildren(StyleElement.
> > > java:611)
> > > >         at
> > > com.icl.saxon.style.LiteralResultElement.process(LiteralResult
> > > Element.java:288)
> > > >         at
> > > com.icl.saxon.style.StyleElement.processChildren(StyleElement.
> > > java:611)
> > > >         at
> > > com.icl.saxon.style.XSLTemplate.realExpand(XSLTemplate.java:195)
> > > >         at
> > > com.icl.saxon.style.XSLTemplate.expand(XSLTemplate.java:187)
> > > >         at
> > > 
> com.icl.saxon.style.TemplateExpander.start(TemplateExpander.java:35)
> > > >         at com.icl.saxon.Controller.visit(Controller.java:214)
> > > >         at
> > > com.icl.saxon.Controller.applyTemplates(Controller.java:259)
> > > >         at com.icl.saxon.Controller.run(Controller.java:176)
> > > >         at
> > > com.icl.saxon.Controller.transformDocument(Controller.java:883)
> > > >         at 
> com.icl.saxon.Controller.transform(Controller.java:818)
> > > >         at TraxExamples.exampleSimple1(TraxExamples.java:238)
> > > >         at TraxExamples.main(TraxExamples.java:68)
> > > >
> > > >
> > > > --- Michael Kay <mhkay@iclway.co.uk> wrote:
> > > > > A question about using a DOM NodeIterator to represent an
> > > XSLT node-set:
> > > > > what is getRoot() supposed to return?
> > > > >
> > > > > Mike Kay
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Davanum Srinivas [mailto:dims@yahoo.com]
> > > > > > Sent: 08 February 2001 17:54
> > > > > > To: mhkay@iclway.co.uk
> > > > > > Subject: [C2][SAXON] NodeIterator in SAXON extensions.
> > > > > >
> > > > > >
> > > > > > Mike,
> > > > > >
> > > > > > Am an semi-active developer of Apache's Cocoon2 Project. We
> > > > > > currently use Xerces1.2.3 and
> > > > > > Xalan2.0.0. We want to be able to plugin SAXON instead of
> > > > > > Xalan. We have standardized on TRaX so
> > > > > > it should not be too big a problem. But one major problem is
> > > > > > that we have some extensions which
> > > > > > can accept NodeIterator's (see code snippet below). I went
> > > > > > through the sources for Saxon6.2 and
> > > > > > did not find any support for NodeIterator. Is this planned?
> > > > > > Any suggestions are welcome.
> > > > > >
> > > > > > Thanks,
> > > > > > dims
> > > > > >
> > > > > > public class XSLTFactoryLoader implements Loggable {
> > > > > >     ...
> > > > > >     ...
> > > > > >     public String getClassSource(String className, String
> > > > > > prefix, String pattern, NodeIterator
> > > > > > conf)
> > > > > >     throws ClassNotFoundException, InstantiationException,
> > > > > > IllegalAccessException, Exception {
> > > > > >     ...
> > > > > >     }
> > 
> === message truncated ===
> 
> 
> =====
> 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/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message