I guess it depends on the use case of whether variables having no value is
valid or not.

I've a use case where having variables undefined is valid, so I've gone
ahead and implemented my own VariableContext for which an empty Document is
returned if there is no value available. I guess thanks to the interface,
Jaxen users can have behaviour either way.

James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Jan Dvorak" <[EMAIL PROTECTED]>
To: "James Strachan" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, December 03, 2002 4:11 PM
Subject: Re: [Jaxen] should using a variable with no value throw an
exception.


I'd prefer if it failed, rather than silently ignored what I think is a
clear
case of an error condition.

Jan

Dne ut 3. prosinec 2002 16:52 James Strachan napsal(a):
| If I were to evaluate the XPath:
|
|     $foo/bar/whatever
|
| Do folks think its correct behaviour to throw an exception if foo does not
| exist, or just to quietly ignore it and return no results? I thought the
| latter would be more appropriate but it seems that Jaxen right now
| implements the former.
|
| Thoughts?
|
| James

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET 
comprehensive development tool, built to increase your 
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxen-interest

Reply via email to