[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

XQuery Style Conventions

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


xquery style
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: http://xquery.com/mailman/listinfo/talk [mailto:http://xquery.com/mailman/listinfo/talk] On Behalf
> Of Raffaele Sena
> Sent: Thursday, October 20, 2005 4:01 PM
> To: 'McBeath, Darin W (ELS-AMS)'; http://xquery.com/mailman/listinfo/talk
> Subject: RE:  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: http://xquery.com/mailman/listinfo/talk [mailto:http://xquery.com/mailman/listinfo/talk] On Behalf
> Of
> McBeath, Darin W (ELS-AMS)
> Sent: Thursday, October 20, 2005 12:30 PM
> To: http://xquery.com/mailman/listinfo/talk
> Subject:  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.
> 
> http://xquery.com/mailman/listinfo/talk
> !DSPAM:4357e231151712068116242!
> 
> 
> 
> _______________________________________________
> http://xquery.com/mailman/listinfo/talk
> http://xquery.com/mailman/listinfo/talk



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.