- From: Sarah Wilkin <swilkin@apple.com>
- Date: Thu, 2 Oct 2003 11:15:51 -0700
- To: "Kay, Michael" <Michael.Kay@softwareag.com>
- Cc: public-qt-comments@w3.org
- Message-Id: <74659959-F504-11D7-B75D-000A278462D6@apple.com>
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 <!----> 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? "}"
> >
Attachments
- text/enriched attachment: stored
Received on Thursday, 2 October 2003 14:15:32 UTC