I'm still stuck on this one. Some further details I accidentally omitted are that $sitemap is passed in as a parameter. Its an instance of the java class $SiteMap. Also the #UNKNOWN (java.util.ArrayList) refers to a Java ArrayList instance that is constructed in the first template and passed as the second argument to addController; I omitted it in stripping this example down. The question concerns the last two arguments, $content and $template, which are instantiated in the second template. The question is, how do I return them from of the second template so that they remain XMLFile instances. The value-of statements converts them to #NODESET which is not what I want.

At 5:03 PM -0500 3/6/02, Brad Cox wrote:
Please pardon the newbie questions. Still rather new to this.

This cut down example intends to compute instances of XMLFile in the second template to be returned to the first template. However this shows they being returned as #NODESETs, not java instances. How do I get a plain old java-style return value from a xslt template?

Exception:javax.xml.transform.TransformerException: java.lang.NoSuchMethodException: For extension function, could not find method edu.virtualschool.jile.ctlr.SiteMap.addController([ExpressionContext,] #UNKNOWN (java.util.ArrayList), #NODESET, #NODESET).

<xsl:template match="ile:page">
        <xsl:variable name="content" select="ile:content"/>
        <xsl:variable name="template" select="ile:template"/>
        <xsl:variable name="this" select="java:addController(
                $sitemap,
                $content,
                $template
        )"/>
        <xsl:apply-templates select="ile:page"/>
</xsl:template>

<xsl:template match="ile:content|ile:template">
        <xsl:variable name="xsl" select="ile:xsl"/>
        <xsl:variable name="xml" select="ile:xml"/>
        <xsl:value-of select="java:edu.virtualschool.jile.ctlr.XMLFile.new(
                string($xsl),
                string($xml)
)"/>
</xsl:template>

PS: ile is my project's namespace.
--
Brad Cox, PhD; [EMAIL PROTECTED] 703 361 4751
o For industrial age goods there were checks and credit cards.
   For everything else there is http://virtualschool.edu/mybank
o Java Interactive Learning Environment http://virtualschool.edu/jile
o Java Web Application Architecture: http://virtualschool.edu/jwaa

-- Brad Cox, PhD; [EMAIL PROTECTED] 703 361 4751 o For industrial age goods there were checks and credit cards. For everything else there is http://virtualschool.edu/mybank o Java Interactive Learning Environment http://virtualschool.edu/jile o Java Web Application Architecture: http://virtualschool.edu/jwaa




Reply via email to