[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Passing NodeSet into XSLT 1.0 in Java 7 via setPa

Subject: Re: Passing NodeSet into XSLT 1.0 in Java 7 via setParameter
From: "cmarchand@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 17 Feb 2017 14:35:20 -0000
Re:  Passing NodeSet into XSLT 1.0 in Java 7 via  setPa
JAXP API do not let you send anything else than simple types, i.e. String, numbers, etc...
To do this, you have to choose another API, and Saxon is for sure the right one.
Manipulating the DOM isn't a good idea : compared to XSL, it requires a lot of code, so it is very expensive.

In my opinion, the only way to do this correctly is to use Saxon API, which is not quite simple, but allows you to do anythng the XSL specification defines.
If you want to manipulate the tree, have a look to XOM, which is a tree API much more comfortable than DOM, and much more efficient.

Best regards,

Le 2017-02-17 14:54, Elliotte Rusty Harold elharo@xxxxxxxxxxx a C)critB :

* Java 7
* Bundled version of Xalan
* java.xml.transformers.Transformer

I want to create and pass a set of elements from Java into the model
where the stylesheet can add them to my output.

Is this possible? In particular, is there a type I can use from Java
such as NodeIterator that this particular processor will recognize as
a node-set and assign to a variable inside the stylesheet?

Or should I simply do all the manipulation in DOM? (I'm trying to keep
my dependencies to a minimum so I don't want to pull in Saxon, etc.)

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.