-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On July 8, 2004 09:01 am, Kjetil Kjernsmo wrote:
> On torsdag 8. juli 2004, 16:59, Michael A Nachbaur wrote:
> > > Is that line really necessary....?
> >
> > Not really.  It mainly can be used to supply a default, non-empty,
> > value.  So, if you say:
> >
> > <xsl:param name="foo" select="'NULL'"/>
> >
> > and then later say
> >
> > <xsl:if test="$foo = 'NULL'>
> >   # No value was supplied
> > </xsl:if>
> >
> > that'd do the trick in determining if simply an empty string was
> > supplied.
>
> Ah, that's a good idea!
>
> <snip>
>
> The two above templates aren't a very nice display of Laziness, as you
> can see... And I need a dozen of those unless I'm able to rewrite it,
> so that's the other, original question... The variable name is
> available to the template in //val:[EMAIL PROTECTED], but the problem is
> making that a variable name... It itches terribly...

Well, you can either use the magic of Copy & Paste, or you can do some fancy 
footwork with EXSLT.

I don't think Copy&Paste needs any explanation.  With EXSLT 
(http://www.exslt.org) you could probably use the eval() function to create 
an XPath expression and evaluate it, to perform your test.

At this point however, I think it might be worth taking a step back and trying 
to determine what you're getting done, and perhaps refactor what you're 
doing, instead of trying to force the XSL params functionality into place.  
Perl-space would be a good spot to look for that.

- -- 
Michael A. Nachbaur <[EMAIL PROTECTED]>
http://nachbaur.com/pgpkey.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA7YaPvow0fXaFDZQRAtcUAJwO+pAokXjPC6nHg0Q0W+bsYeFoDQCcCKTh
KL/gj0LZ0KzRTDRg9hDfCKw=
=zfth
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to