xsl-list
[Top] [All Lists]

Re: [xsl] XSLT2 test for null

2011-03-03 03:53:16
Hi David,

You can define this behavior yourself by selecting a default value, i.e.:

<xsl:param name="routeValues" as="node()" select="$default/routeValues"/>

Or like so:

<xsl:param name="routeValues" as="node()" >
<default />
</xsl:param>

If you don't specify a default value, the empty sequence is returned, if the as-attribute allows that.

Kind regards,
Abel Braaksma


On 3-3-2011 10:44, Merrilees, David wrote:
Hi

In XSLT2, how should I test for null, or empty parameters? For example, if I have<xsl:param 
name="routeValues" as="node()?" />  how should I test whether a value has been 
passed, or whether it's empty?

Thanks

This is a confidential email. Tesco may monitor and record all emails. The 
views expressed in this email are those of the sender and not Tesco.

Tesco Stores Limited
Company Number: 519500
Registered in England
Registered Office: Tesco House, Delamare Road, Cheshunt, Hertfordshire EN8 9SL
VAT Registration Number: GB 220 4302 31

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>