I generally try to avoid even the appearance of evil... so using variables
for output parameters is clearly out. I humbly ask forgiveness for even
suggesting it. 

What if we were to support both syntax? Could do some unnecessary parsing if
addParameter is used, but hopefully this would not be too bad.

Art

-----Original Message-----
From: Shane Curcuru [mailto:shane_curcuru@;yahoo.com] 
Sent: Tuesday, October 22, 2002 3:43 PM
To: [EMAIL PROTECTED]
Subject: RE: SQL Extension enhancement/replacement


OK, I'm far from an expert in this area, but I'd like to echo John Gs
comment: 
> Modifying parameters, especially behind the scenes, is a little more 
> that a "minor infraction" it violates one of the basic tenants of XSL 
> variable handling.

Side effects are evil in the XSLT world.  Even though your stated example
seemed completely straightforward, leaving the functionality like that is
just begging someone to write a stylesheet that executes out-of-order and
then complains endlessly when it breaks - or worse, produces inconsistent
results.  

Simplify, and don't make any assumptions about the order that things are
executed in.

Thanks for the nifty-looking submissions!

- Shane

(Shane strongly prefers this:)
<xsl:variable name="groupid" select="25" />
<xsl:variable name="I_result" select="0" />
<xsl:variable name="I_server" select="" />
<xsl:variable name="table" select="sql:query($products, ?[integer=I_result]
= CALL testproc ?[integer=groupud], ?[varchar=I_server OUT])" />

(Shane does not prefer this:)
<xsl:value-of select="sql:addParameterWithType("25", "long") />
<xsl:value-of select="sql:addParameterWithType("0", "long") /> <xsl:value-of
select="sql:addParameterWithType("", "string") /> <xsl:variable name="table"
select="sql:query($products, ? = CALL testproc ?, ? OUT])" />


=====
- Shane

<eof .sig="'When I use a word,' Humpty Dumpty said, 
in a very scornful tone, 'it means just what I 
choose it to mean - neither more nor less'"
"Oohayu oyod?!"=gis. />

__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

Reply via email to