- From: Florent Georges <fgeorges@fgeorges.org>
- Date: Thu, 3 Oct 2013 14:28:16 +0100
- To: Michael Kay <mike@saxonica.com>
- Cc: Christian Grün <christian.gruen@gmail.com>, John Lumley <john@saxonica.com>, EXPath ML <public-expath@w3.org>
On 3 October 2013 12:20, Michael Kay wrote: > The usual convention in F&O is that "data arguments" allow an empty > sequence What I usually do in that case (in my own code) is to write a function accepting exactly one (required) item, and use the '/' or '!' operator before if it can be empty: let $val as item()? := f() return $val ! g(.) But this is more a cosmetic question I would say (meaning: different people have different taste, and there is no "more valid" taste), and consistency is the key here (across all functions in the same module). Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/
Received on Thursday, 3 October 2013 13:29:07 UTC