Re: ComputedXmlComment (3.7.3.6) shouldn't require content

By that argument it doesn't make sense to have content optional for any 
of the computed constructors. For example, why not write: element a 
{""} instead of allowing element a {}?

Another reason for using computed comment constructors (or any 
constructor for that matter) is to avoid escaping the < or using a 
CDATA section when the XQuery happens to itself be embedded in an XML 
document. For example, if I create (or want to match) an empty comment, 
I (used to) have to write &lt;!----> which is entirely unreadable. I 
realize that it's not a big issue to write comment {""}, but it simply 
adds inconsistency to the language/parser which seems unnecessary.

On Oct 2, 2003, at 11:04 AM, Kay, Michael wrote:

> Surely the only reason for using a computed comment constructor is 
> that you want to compute the content?
>
> And anyway, you can always write:
>
> comment {""}
>
> Michael Kay
>
> > -----Original Message-----
> > From: Sarah Wilkin [mailto:swilkin@apple.com]
> > Sent: 02 October 2003 18:31
> > To: public-qt-comments@w3.org
> > Subject: ComputedXmlComment (3.7.3.6) shouldn't require content
> >
> >
> >
> > It seems at odds that an inline comment does not require
> > content: XmlComment ::= "<!--" Char* "-->"
> >
> > and yet a constructed one does:
> > ComputedXmlComment ::= "comment" "{" Expr "}"
> >
> > It would make more sense as:
> > ComputedXmlComment ::= "comment" "{" Expr? "}"
> >

Received on Thursday, 2 October 2003 14:15:32 UTC