Re: XSLT-accessed query params and testing existance

2004-07-08 Thread Kjetil Kjernsmo
On onsdag 7. juli 2004, 18:41, Michael A Nachbaur wrote: But then, I need to test whether a parameter exists... In XSP that's straightforward, thanks to the many good taglibs, but I haven't found anything on checking the parameters in XSLT, is it doable? Well, the most common method I

Re: XSLT-accessed query params and testing existance

2004-07-08 Thread Michael A Nachbaur
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On July 8, 2004 03:53 am, Kjetil Kjernsmo wrote: On onsdag 7. juli 2004, 18:41, Michael A Nachbaur wrote: But then, I need to test whether a parameter exists... In XSP that's straightforward, thanks to the many good taglibs, but I haven't

Re: XSLT-accessed query params and testing existance

2004-07-08 Thread Kjetil Kjernsmo
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

Re: XSLT-accessed query params and testing existance

2004-07-08 Thread Tod Harter
There is of course an entirely different approach which is possible... Have your XSP capture the required input parameters and construct some output XML containing the data you need. Then you have some added flexibility by doing it with perl. I've found that generally thats the better overall

Re: XSLT-accessed query params and testing existance

2004-07-08 Thread Michael A Nachbaur
-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:

Re: XSLT-accessed query params and testing existance

2004-07-08 Thread S . Woodside
On Jul 8, 2004, at 6:53 AM, Kjetil Kjernsmo wrote: xsl:param name=foo select=''/ Is that line really necessary? Yes, but you can simplify it to xsl:param name=foo/ it will automatically default to '' (empty string) if nothing is passed in. You need it in order to define the param inside the

Re: XSLT-accessed query params and testing existance

2004-07-08 Thread Kjetil Kjernsmo
On torsdag 8. juli 2004, 19:38, Michael A Nachbaur wrote: 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

Re: XSLT-accessed query params and testing existance

2004-07-07 Thread Michael A Nachbaur
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On July 7, 2004 07:56 am, Kjetil Kjernsmo wrote: But this is of little use, because I'd like to have a single template replacing all the possible parameters, so instead of $title, I should use the @name (i.e. the name attribute of the val:insert

Re: XSLT-accessed query params and testing existance

2004-07-07 Thread S . Woodside
xsl:choose xsl:when test=$url_parameter != '' !-- it was set -- /xsl:when xsl:otherwise !-- it was not set -- /xsl:otherwise /xsl:choose simon On Jul 7, 2004, at 10:56 AM, Kjetil Kjernsmo wrote: But then, I need to test whether a parameter exists... In XSP that's straightforward,