This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XT Extension functions
- To: xsl-list at mulberrytech dot com
- Subject: Re: XT Extension functions
- From: Eric van der Vlist <vdv at dyomedea dot com>
- Date: Fri, 03 Mar 2000 23:26:02 +0100
- Organization: Dyomedea
- References: <86256897.00727553.00@smtpmta2.i2.com>
- Reply-To: xsl-list at mulberrytech dot com
Larry,
Larry Mason wrote:
>
> I have a question on the type of parameter my XT extension function will see in
> the following case.
>
> <xsl:template name="barchart">
> <xsl:param name="bar1_data" select="/data1"/>
> <xsl:param name="bar2_data" select="/data2"/>
> <xsl:param name="stacked">0</xsl:param>
>
> <xsl:value-of
> select="Ext:maxValue(Ext:new(),$stacked,$bar1_data,$bar2_data)"/>
>
> bar1_data and bar2_data are coming in as NodeIterator and I am handling that
> just fine.
> But what does 'stacked' come in as? I have it defined as ResultTreeFragment
> currently.
> It executes but I have no idea how to get at the value, '0' in this case. Any
> help is greatly
> appreciated.
You're right, from the XT doc (http://www.jclark.com/xml/xt.html) :
Types are mapped between XSLT and Java as follows:
XSLT type Java type
string java.lang.String
number double
boolean boolean
node-set com.jclark.xsl.om.NodeIterator
result tree fragment com.jclark.xsl.sax.ResultTreeFragment
A result tree fragment is nothing but a result tree fragment ;=)
To get the value, you'll have to parse it through sax events.
An easier way, if you can do it, would be to change your XSL to
something like :
<xsl:param name="stacked" select="'0'"/> where you should have some
influence on the type...
>
> Is there any really good documentation and examples on how this stuff works?
I am still looking for these XT specific resources and still thinking
some kind of XT users group would be welcome even if I got very few
answers the last time I have submitted the idea :=(
> TIA,
> Larry Mason
>
> (using Nov 1999 version of XT)
>
Hope this helps
Eric
--
------------------------------------------------------------------------
Eric van der Vlist Dyomedea
http://www.dyomedea.com http://www.ducotede.com
------------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list