Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Brief question regarding using Nux and XSL TransformPooling

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael Kay" <mike AT saxonica.com>
  • To: "'XOM API for Processing XML with Java'" <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Brief question regarding using Nux and XSL TransformPooling
  • Date: Fri, 26 Mar 2010 17:55:13 -0000


I don't know the answer I'm afraid - haven't heard anything from Wolfgang
for a while. But the "NoSuchMethodError" tends to suggest that A is calling
B, and A was compiled with a different version of B from the one available
at run-time.

I think Nux makes some fairly low-level of Saxon interfaces, so it would be
a mistake to assume it will work with a later version of Saxon than the one
it was compiled against.


>
> First and foremost, the link to the binary (or the source)
> doesn't seem to be working for me :(
>
> http://acs.lbl.gov/software/nux/nux-download/

Me neither. This is the great benefit of publishing somewhere like
SourceForge - it's rather more likely to stay around (though nothing is
certain, of course).

I found an unzipped copy on my disk, I've zipped it up and uploaded it to

http://www.saxonica.com/download/nux.rar

I'm afraid I have no idea what state this is in, whether it's the latest
version, complete, etc: but it does include source, and if you want to try
and rebuild from it, you're welcome (as far as I'm concerned, anyway!).

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay


>
> I eventually managed to find a jar elsewhere
> (http://ftp.freepark.org/pub/freebsd/ports/i386/packages-7.2-r
> elease/java/) although none of the sources were available for
> the project. Would anyone on this list know whether they are
> likely to be made available again?
>
> >From looking at the Nux 1.6 JavaDoc api, I put a fairly
> simple transform to the test to see whether it would work, so
> I've got something like this:
>
> System.setProperty("javax.xml.transform.TransformerFactory",
> "net.sf.saxon.TransformerFactoryImpl");
>
> XSLTransform trans = XSLTransformPool.GLOBAL_POOL
> .getTransform(new File("xsl.xsl"));
> Document doc =
> BuilderPool.GLOBAL_POOL.getBuilder(false).build(
> new File("xml.xml"));
> Nodes nodes = trans.transform(doc);
> for (int i = 0; i < nodes.size(); i++) {
> System.out.println("node " + i + ": " +
> nodes.get(i).toXML());
> }
>
> Which yields something like this:
>
> Exception in thread "main" java.lang.NoSuchMethodError:
> nu.xom.xslt.XSLTransform.<init>(Lnu/xom/Document;Lnu/xom/NodeF
> actory;Ljavax/xml/transform/TransformerFactory;)V
> at
> nux.xom.pool.XSLTransformFactory.newTransform(XSLTransformFact
> ory.java:220)
> at
> nux.xom.pool.XSLTransformFactory.createTransform(XSLTransformF
> actory.java:163)
> at
> nux.xom.pool.XSLTransformFactory.createTransform(XSLTransformF
> actory.java:180)
> at
> nux.xom.pool.XSLTransformPool.getTransform(XSLTransformPool.java:170)
> at com.TestXsLTransformPool.main(TestXsLTransformPool.java:34)
>
> As I don't have access to the source, I'm not really able to
> pinpoint with any detail where things are going wrong so I
> was wondering whether anyone had used the TransformPool
> successfully in a recent project and whether they could offer
> me some pointers?
>
> I'm using the latest versions of xom and saxon although I've
> noticed that Nux hasn't been under development for a while
> (version 1.6 was released back in June 2006). I'm wondering
> whether the project was still under development and secondly,
> if it isn't - does anyone know a good way to pool
> transformers instead? Is this something that xom does now?
>
> Thanks very much in advance.
> A
>
>
>
>
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest





Archive powered by MHonArc 2.6.24.

Top of Page