- From: Mike Carey <mcarey@bea.com>
- Date: Fri, 13 May 2005 11:11:14 -0700
- To: "Michael Rys" <mrys@microsoft.com>, "Michael Kay" <mhk@mhk.me.uk>, "David Carlisle" <davidc@nag.co.uk>, "Daniel Engovatov" <dengovatov@bea.com>
- Cc: <public-qt-comments@w3.org>
:-) Glad to have the support! Open to new syntax - that's ours for now, but there are other differences that we'll have to face in XQuery 1.0 eventually, so it won't be a killer if we don't get our syntactic wish. (But we think it's cute and intuitive this way... :-)) Fine to add it to the computed constructors as well, absolutely - I think both need it eventually. Cheers, Mike -----Original Message----- From: Michael Rys [mailto:mrys@microsoft.com] Sent: Friday, May 13, 2005 8:49 AM To: Michael Kay; Mike Carey; David Carlisle; Daniel Engovatov Cc: public-qt-comments@w3.org Subject: RE: Optional indicator in direct element and attribute constructors. My experience with the FOR XML construction syntax which maps relational data to XML is that a large amount of people (but not all) want NULL values (the equivalent value to ()) mapped to absent properties. So having a syntactic short-form in XQuery for such construction seems like a more user-friendly approach. However, I am somewhat disturbed by the proposed syntactic approach. Would it be better, if we add it first to the computed constructors? Best regards Michael > -----Original Message----- > From: public-qt-comments-request@w3.org > [mailto:public-qt-comments-request@w3.org] On Behalf Of Michael Kay > Sent: Friday, May 13, 2005 8:34 AM > To: 'Mike Carey'; 'David Carlisle'; 'Daniel Engovatov' > Cc: public-qt-comments@w3.org > Subject: RE: Optional indicator in direct element and > attribute constructors. > > > > 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. > > If you need to do the same thing repeatedly, put it in a > function. Or in this case, add a second step to the > processing pipeline that strips out all empty elements and attributes. > > We can't invent custom syntax for everything that anyone ever > wants to do. > > Michael Kay > > > > > > > -----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 18:11:26 UTC