[xquery-talk] XQuery Style Conventions

Michael Rys mrys at microsoft.com
Thu Oct 20 19:35:31 PDT 2005


Note that your long-xml example is subject to the boundary whitespace setting in the XQuery prolog.

Also, I personally prefer

<div>{
  $content-generated-elsewere 
}</div>

over

<div>
  { $content-generated-elsewere }
</div>

for two reasons:

1. It does not generate different results regarding whitespaces
2. I can more easily edit (copy/paste) the XQuery expression...

Best regards
Michael

> -----Original Message-----
> From: talk-bounces at xquery.com [mailto:talk-bounces at xquery.com] On Behalf
> Of Raffaele Sena
> Sent: Thursday, October 20, 2005 4:01 PM
> To: 'McBeath, Darin W (ELS-AMS)'; talk at xquery.com
> Subject: RE: [xquery-talk] XQuery Style Conventions
> 
> One thing I didn't see mentioned in the document, and that I always have
> mixed feelings with, is assigning XML to a variable.
> If the XML snippet is short and it fits on a line it's fine. If it is
> reasonably complex where do you indent ?
> 
> For example:
> 
> let $short-xml := <result><status>{ $some-status }</status></result>
> 
> let $long-xml :=
>   <html>
>      <body>
>        <h1>document title</h1>
>        <div>
>           { $content-generated-elsewere }
>        </div>
>      </body>
>   </html>
> 
> -- Raffaele
> ________________________________________
> From: talk-bounces at xquery.com [mailto:talk-bounces at xquery.com] On Behalf
> Of
> McBeath, Darin W (ELS-AMS)
> Sent: Thursday, October 20, 2005 12:30 PM
> To: talk at xquery.com
> Subject: [xquery-talk] XQuery Style Conventions
> 
> The developers at xqDoc.org would like your feedback on our draft version
> of
> "XQuery Style Conventions".  These conventions have been developed based
> on
> our experiences with the XQuery language (and various XQuery engines)
> during
> the past 3 years.  We would like to incorporate input from other XQuery
> pioneers to make the document more robust and complete.
> 
> 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
> 
> 
> We look forward to your feedback.
> 
> darin at xqdoc.org
> !DSPAM:4357e231151712068116242!
> 
> 
> 
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk



More information about the talk mailing list