Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Brief question regarding using Nux and XSL Transform Pooling

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Alex Bleasdale <rhodlite78 AT yahoo.co.uk>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] Brief question regarding using Nux and XSL Transform Pooling
  • Date: Fri, 26 Mar 2010 17:16:32 +0000 (GMT)

Hi,

I've got a brief question that I was hoping I could run by this forum. I
wanted to take a look at Nux and take advantage of the XSLTransformPool it
offers.

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/

I eventually managed to find a jar elsewhere
(http://ftp.freepark.org/pub/freebsd/ports/i386/packages-7.2-release/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/NodeFactory;Ljavax/xml/transform/TransformerFactory;)V
at
nux.xom.pool.XSLTransformFactory.newTransform(XSLTransformFactory.java:220)
at
nux.xom.pool.XSLTransformFactory.createTransform(XSLTransformFactory.java:163)
at
nux.xom.pool.XSLTransformFactory.createTransform(XSLTransformFactory.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








Archive powered by MHonArc 2.6.24.

Top of Page