[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Empty String param

Subject: Re: Empty String param
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 02 Apr 2008 16:52:21 +0200
Re:  Empty String param
At 2008-04-02 15:21 +0100, Kerry, Richard wrote:
<xsl:template name="insert">
<xsl:param name="default" />
<!-- various stuff using $default-->
</xsl:template>

And eventually I do
<xsl:call-template name="insert">
<xsl:with-param name="default" select="$named-nodes[1]/@default" />
</xsl:call-template>
...
I have tried adding as="xs:string" to the xsl:with-param and also to the
xsl:param as I'd have thought that even though it may be the case that
the processor would reject an empty node-set or sequence if I was
passing one it should surely expect a string to be allowed to be empty.

Have you tried: select="string($named-nodes[1]/@default)"


That will guarantee that what you send is a string.

I hope this helps.

. . . . . . . . . . Ken

--
Upcoming:  UBL Apr.22,24; genericode code lists Apr.23; Rome,Italy
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.