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

ANSWERS to "What's wrong with XQuery" question

Dave Pawson dave.pawson at gmail.com
Wed Jul 28 12:44:04 PDT 2010


  ANSWERS to "What's wrong with XQuery" question
On 28 July 2010 10:26, Andrew Welch <http://x-query.com/mailman/listinfo/talk> wrote:

> Here's another example, say you have a function to return to the HTML

> the xquery equivalent is:
>
> declare function f:getHead() {
>  <title>some title</title>
>  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> };
>
> ...but that causes an error.... its missing a comma:
>
> declare function f:getHead() {
>  <title>some title</title>,
>  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> };
>

That's exactly it Andrew.
I find it hard/odd  to determine that I need a sequence (hence the comma).
Or more likely, when I'm generating a sequence.
The other infuriating one is when to drop in those {} pairs.


Face it, xquery is an 'odd' syntax that takes some getting used to,
more so when you step beyond simple tutorial class examples.

regards

-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk



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-2011 All Rights Reserved.