Vladimir:

 Unfortunately, the type conversion that you're requesting is not supported
by XSLTC. The way an application passes parameters to a stylesheet
(transformer) is beyond the scope of the XSLT 1.0 spec. Having said that,
other extensions from Xalan classic have been implemented in XSLTC, so
future version of XSLTC *may* support passing org.apache.xpath.NodeSet
instances as parameters.

 Hope this helps.

-- Santiago

----- Original Message -----
From: "Fridman, Vladimir" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 8:39 PM
Subject: Using NodeSet as a parameter with XSLTC


> Hello all,
>
> I'm getting an error when trying to pas a NodeSet as a parameter with
> XSLTC.
>
> The error occurs only with XSLTC, this code works fine in "regular"
> Xalan.
>
> Here's my XSL:
>
> <xsl:param name="labelsOfProperties" />
> <xsl:variable name="test" select="count($labelsOfProperties)" />
>
> And this is the Java code:
>
> NodeSet nodes = new NodeSet();
> nodes.addNode(oNode1);
> nodes.addNode(oNode2);
> transofmer.setParameter("labelsOfProperties", nodes);
>
> The error I'm getting is:
> java.lang.RuntimeException: Invalid conversion from 'reference' to
> 'org.apache.xpath.NodeSet'.
>
> also, string($labelsOfProperties) returns
> "[EMAIL PROTECTED]" with XSLTC, but it returns values of
> the nodes in the NodeSet without XSLTC.
>
> I am using Xalan 2.4.1.
>
> Anybody knows why is this happening and how I can get around this
> problem?
>
> Thanks in advance,
>
> Vladimir
>
>
>

Reply via email to