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:


<excerpt><smaller>Surely the only reason for using a computed comment
constructor is that you want to compute the content?</smaller> 


<smaller>And anyway, you can always write:</smaller> 


<smaller>comment {""}</smaller> 


<smaller>Michael Kay</smaller> 


<smaller>> -----Original Message-----</smaller> 

<smaller>> From: Sarah Wilkin
[<color><param>0000,0000,EEEE</param>mailto:swilkin@apple.com</color>] </smaller>

<smaller>> Sent: 02 October 2003 18:31</smaller> 

<smaller>> To: public-qt-comments@w3.org</smaller> 

<smaller>> Subject: ComputedXmlComment (3.7.3.6) shouldn't require
content</smaller> 

<smaller>> </smaller>

<smaller>> </smaller>

<smaller>> </smaller>

<smaller>> It seems at odds that an inline comment does not require </smaller>

<smaller>> content: XmlComment ::= "<<!--" Char* "-->"</smaller> 

<smaller>> </smaller>

<smaller>> and yet a constructed one does:</smaller> 

<smaller>> ComputedXmlComment ::= "comment" "{" Expr "}"</smaller> 

<smaller>> </smaller>

<smaller>> It would make more sense as:</smaller> 

<smaller>> ComputedXmlComment ::= "comment" "{" Expr? "}"</smaller> 

<smaller>></smaller> 

</excerpt>
