RE: What is the value of an undefined param

Subject: RE: What is the value of an undefined param
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Sat, 25 Mar 2000 04:01:50 +0000
Jonathan,

test="$name" will fail when $name is "" as well as false() or anything else
that evaluates to false (which an empty string does). Maybe I'm not clear
on the question?

I'm a bit worried about select="<%=name%>" though -- isn't the
well-formedness parse failing on this? Maybe you need some kind of
extension function to call out to get the Java variable? (would someone who
knows about such architectures speak up?)

That should be nice though,
Wendell

At 03:42 PM 3/24/00 -0500, you wrote:
>My idea is to put the stylesheet in a jsp file.  The jsp 
><xsl:variable name="name" select="<%=name%>"/> 
>for example will "plug-in" a java variable into the stylesheet variable.
>Now I must test to see if a java variable actually got put in there, so I
>want to test for "", which is the result of no value being passed in.  How
>do i do this?
>
> 
>
>-----Original Message-----
>From: Kay Michael [mailto:Michael.Kay@xxxxxxx]
>Sent: Thursday, March 23, 2000 4:34 AM
>To: 'xsl-list@xxxxxxxxxxxxxxxx'
>Subject: RE: What is the value of an undefined param
>
>
>> <xsl:param name="x" select="false()"/>
>> ...
>> This also makes it a bit harder for that malicious
>> passer-of-misleading-parameters.
>
>Not at all, they only have to pass in an empty string "".
>
>A harder value to forge is
><xsl:param name="x" select="/"/>,
>
>but unfortunately I can't think of a reliable test for this: xsl:if
>test="not($x/..)" will fall over if the user supplies a string value!
>
>Mike Kay
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>

======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread