W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2005

RE: Optional indicator in direct element and attribute constructors.

From: Mike Carey <mcarey@bea.com>
Date: Fri, 13 May 2005 07:32:04 -0700
Message-ID: <32D5845A745BFB429CBDBADA57CD41AF0F9B955C@ussjex01.amer.bea.com>
To: "David Carlisle" <davidc@nag.co.uk>, "Daniel Engovatov" <dengovatov@bea.com>
Cc: <public-qt-comments@w3.org>

So do this for every element- or attribute-constructing line of a query
that constructs a new multi-hundred-line XML fragment (e.g., a message
transformation) and you'll undertand the paragraph.  XML is all about
flexibility and optionality - missing info - variations from instance to
instance - yet by default XQuery's direct constructors produce exactly
the opposite.  Hence the proposal...  It absolutely does not extend the
power of XQuery - only the chances that users won't throw up and go
running for cover elsewhere...  :-)

Cheers,
Mike Carey 

-----Original Message-----
From: public-qt-comments-request@w3.org
[mailto:public-qt-comments-request@w3.org] On Behalf Of David Carlisle
Sent: Friday, May 13, 2005 6:44 AM
To: Daniel Engovatov
Cc: public-qt-comments@w3.org
Subject: Re: Optional indicator in direct element and attribute
constructors.



  Producing this result using computed constructors, conditional
  statements and custom functions turns out to be quite inelegant,
  cumbersome and hard to maintain.

don't you just need to replace
<b>...</b>
by

let $x := <b>...</b>
return
if ($x/node()) then $x else ()

David (non WG reply)


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
Received on Friday, 13 May 2005 14:32:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:38 GMT