> The extension mechanism does not support extensions returning a
> NodeList
Actually, I thought it did! I thought we had an adapter for this. Am I
mistaken?
-scott
Gary L Peskin
<garyp@firste To: [EMAIL PROTECTED]
ch.com> cc: (bcc: Scott Boag/CAM/Lotus)
Subject: Re: DTMNodeList to NodeList
error in JAVA Extension usage.
07/30/01
01:11 PM
Please
respond to
xalan-dev
Bart --
The proxy mechanism is built into the design of the DTM components. It
is something that you get automatically. You don't need to do anything.
The extension mechanism does not support extensions returning a
NodeList, as you have already discovered. You should just return the
underlying DTMIterator with the getDTMIterator() call. For example, if
you've declared
DTMNodeList retval;
Just return
retval.getDTMIterator();
This should work fine.
Gary
"Bart W.Jenkins" wrote:
>
> Gary,
> First, thanks for being so patient...we are investing heavily in XML /
XSL
> and making sure we know this technology thoroughly is critical. And I
agree
> with you...the first form is easier.
>
> All right...more questions!
>
> Prior to the Xalan versions that use DTM (specifically version 1_2_1),
> regardless whether my JAVA code returned a nodelist or a nodeset, I could
> then use the Xpath form we have been discussing:
>
> $var/node1/node2/...
>
> in my XSL, but when I try this with Xalan 1_2_2_D7, (one that uses DTM),
I
> get the following error:
>
> XSLT Error (javax.xml.transform.TransformerException): Can not convert
> #UNKNOWN (org.apache.xml.dtm.ref.DTMNodeList) to a NodeList!
>
> In the docs for version 1_2_2_D7, in the description for DTM, it states:
> "For the convenience of user-written extensions, a proxy mechanism
presents
> the contents of the DTM as a read-only subset of the DOM"
>
> How do I make use of this proxy? My error above suggests that this
> conversion is not happening for me automatically. Any pointers? Or,
should
> I drop back to v 1_2_1?
>
> Bart Jenkins, CTO
> Globeflow SA
> Cardenal Marcelo Spinola 2, D1, Planta 6
> 28016 Madrid, Spain
> telephone: +34 667 65 10 75
> mailto:[EMAIL PROTECTED]