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

RE: Infinite Loop when param empty

Subject: RE: Infinite Loop when param empty
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 23 Jul 2004 16:09:40 +0100
RE:  Infinite Loop when param empty
> I would NEVER want a parameter to be the result of the 
> prinicpal source
> document if the user did not supply the parameter.  I would 
> ALWAYS want the
> parameter to default to an EMPTY node set if none was supplied.

then use select="/.." in 1.0, or select="()" in 2.0.
> 
> ..and actually I think all node tests would fail even if a 
> valid xml source
> was supplied to the above parameter.  Example:
> 
> <xsl:apply-templates select="$ENTRY_TEMPLATE"/>  (would fail??).
> 

No, the select expression is ignored if the parameter value is supplied.
(Well, at any rate, the *value* of the select expression is ignored).

XSLT 2.0 might give you a type error (because the default value is a string,
not a node-set), but 1.0 shouldn't.

Michael Kay

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.