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,
Christophe
Le 2017-02-17 14:54, Elliotte Rusty Harold elharo(_at_)ibiblio(_dot_)org a
écrit :
Baseline:
* Java 7
* Bundled version of Xalan
* java.xml.transformers.Transformer
* DOM
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.)
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--