xsl-list
[Top] [All Lists]

Re: [xsl] Passing NodeSet into XSLT 1.0 in Java 7 via setParameter

2017-02-17 09:05:24
The best information I can find on what values Xalan accepts is:

The setParameter() method provides a value for a parameter that overrides any 
value used in the stylesheet itself. The processor is responsible for 
converting the Java object type passed to a reasonable XSLT equivalent. This 
should work well enough for String, Integer, Double, and Boolean as well as DOM 
types like Node and NodeList. However, I wouldn’t rely on it for anything more 
complex like aFile or a  Frame.

which was written by one Elliotte Rusty Harold in 2003 (*). If you find 
anything more informative, please let us know.

Michael Kay
Saxonica

(*) https://www.ibiblio.org/xml/slides/oop2003/xmlandjava/416.html


On 17 Feb 2017, at 13:54, Elliotte Rusty Harold elharo(_at_)ibiblio(_dot_)org 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

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.)

-- 
Elliotte Rusty Harold
elharo(_at_)ibiblio(_dot_)org

--~----------------------------------------------------------------
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
--~--

<Prev in Thread] Current Thread [Next in Thread>