[xquery-talk] why must one have something inside {} ?

David Lee dlee at calldei.com
Sat Dec 3 15:15:43 PST 2011


No they would be errors, but I dont see why its more problematic than


  element {()} {()}

  text {()}

  attribute {()} {()}

which would be what they would equate to.

making {} == {()}  doesnt cause a problem in itself in these cases IMHO.





----------------------------------------
David A. Lee
dlee at calldei.com
http://www.xmlsh.org

-----Original Message-----
From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On Behalf
Of Michael Sokolov
Sent: Saturday, December 03, 2011 5:53 PM
To: David Lee
Cc: talk at x-query.com
Subject: Re: [xquery-talk] why must one have something inside {} ?


How about

  element {} {}

  text {}

  attribute {} {}

should those be no-ops too?

I don't think so, because

element {} {"not empty"}

would be problematic

On 12/3/2011 2:41 PM, David Lee wrote:
> Yes exactly !
> Function bodies should be able to be empty too ... its so simple !
>
> declare function notimplementedyet() {};
>
>
>
> ----------------------------------------
> David A. Lee
> dlee at calldei.com
> http://www.xmlsh.org
>
>
> -----Original Message-----
> From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On 
> Behalf Of Michael Dyck
> Sent: Saturday, December 03, 2011 2:28 PM
> To: talk at x-query.com
> Subject: Re: [xquery-talk] why must one have something inside {} ?
>
>
> David Lee wrote:
>> I am asking why in *XQuery*  the expression {} is not equivalent to 
>> {()}
> It might simply be that no-one suggested it.
>
>> Is there a case in *XQuery* where this would be problematic ?
> I don't think so.
>
> Probably the least-impact way for the spec to accomplish this would be 
> to alter the syntax of EnclosedExpr, from
>       EnclosedExpr ::= "{" Expr "}"
> to
>       EnclosedExpr ::= "{" Expr? "}"
> and then say that, if the Expr is omitted, the EnclosedExpr yields the 
> empty sequence. Note that, in addition to element and attribute 
> content, this would also take effect when an EnclosedExpr is used as a 
> function body, which may or may not be something you'd like as well.
>
> -Michael
>
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk
>
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk

_______________________________________________
talk at x-query.com
http://x-query.com/mailman/listinfo/talk



More information about the talk mailing list