[xquery-talk] XQuery Style Conventions
Liam Quin
liam at w3.org
Sat Oct 22 22:07:19 PDT 2005
On Thu, Oct 20, 2005 at 08:30:22PM +0100, McBeath, Darin W (ELS-AMS) wrote:
> The developers at xqDoc.org would like your feedback on our draft version of
> "XQuery Style Conventions".
>
> When the document is finalized, we plan on making this document freely
> available on the xqDoc web site. In the interim, the draft version of the
> "XQuery Style Conventions" can be found here:
> http://xqdoc.org/xquery-style.doc
I read this in OpenOffice (Microsoft hasn't released Office on
Linux yet) but the occasional grey box suggests to me that the
indenting didn't translate properly.
Once you have a proper validating XHTML version :-) (or even
PDF) in its final resting place, I can add a link to it from
www.w3.org/XML/Query/ if you like.
On:
if (e)
then y()
else z()
vs:
if (e) then
y()
else
z()
I think it's partly what you're used to, and partly how you
interpret the XQuery scoping rules. I tend to use
if (e)
then
y()
else
z()
especially if e is complex (e.g. spans several lines) so that
the "then" isn't lost; similarly
for $i in e
let $j := e2,
$k := e3
where
something or other
probably involving
$j and $k
return
something else
but I also think all that really matters is
(1) clear indication of nesting using space,
(2) being consistent
(3) using 8-character tab stops as God intended.
OK, kidding on the last one :-)
Liam
--
Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
http://www.holoweb.net/~liam/
http://fromoldbooks.org/
More information about the talk
mailing list