  | |  | set a Node Parameter in the Transformer class | set a Node Parameter in the Transformer class 2007-05-28 - By Henry Zongaro
Hi, Stanislas.
Giraudet de Boudemange <stanislas.giraudet-de-boudemange@(protected)> wrote on 2007-05-28 06:57:27 AM: > I have a problem with the setParameter method in the Transformer class > of xalan. > I want to pass a Node parameter (a DOM element), but this node is always
> transform in > a String with the toString() method of the node.
Looking at your output, it looks to me like you are using XSLTC. This is a known limitation with XSLTC. See Jira issue XALANJ-1552 [1] for example.
Would using Xalan-J Interpretive be an option for you? That processor does have support for supplying a DOM Node as a parameter value, but note that you will have to change the line in your source that creates the DOMSource for the input document to the following:
DOMSource source=new DOMSource( docSource);
That's because of another bug in how the interpretive processor treats a node argument to DOMSource that is not the root of a DOM tree.
I hope that helps.
Thanks,
Henry [1] http://issues.apache.org/jira/browse/XALANJ-1552 ------------------------------------------------------------------ Henry Zongaro XSLT Processors Development IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044 mailto:zongaro@(protected)
<br><font size=2 face="sans-serif">Hi, Stanislas.</font> <br> <br><tt><font size=2>Giraudet de Boudemange <stanislas.giraudet-de -boudemange@(protected)> wrote on 2007-05-28 06:57:27 AM:<br> > I have a problem with the setParameter method in the Transformer class <br> > of xalan.<br> > I want to pass a Node parameter (a DOM element), but this node is always <br> > transform in<br> > a String with the toString() method of the node.<br> </font></tt> <br><font size=2 face="sans-serif">Looking at your output, it looks to me like you are using XSLTC. This is a known limitation with XSLTC. See Jira issue XALANJ-1552 [1] for example.</font> <br> <br><font size=2 face="sans-serif">Would using Xalan-J Interpretive be an option for you? That processor does have support for supplying a DOM Node as a parameter value, but note that you will have to change the line in your source that creates the DOMSource for the input document to the following:</font> <br> <br><font size=2 face="sans-serif">   ;DOMSource source=new DOMSource( docSource);</font> <br> <br><font size=2 face="sans-serif">That's because of another bug in how the interpretive processor treats a node argument to DOMSource that is not the root of a DOM tree.</font> <br> <br><font size=2 face="sans-serif">I hope that helps.</font> <br><font size=2 face="sans-serif"><br> Thanks,<br> <br> Henry</font> <br><font size=2 face="sans-serif">[1] http://issues.apache.org/jira/browse /XALANJ-1552<br> ------------------------------------------------------------------<br> Henry Zongaro XSLT Processors Development<br> IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044<br> mailto:zongaro@(protected)</font> <br> <br>
|
|
 |