[Xquery] Comment constructors

Neither form of comment constructor gives any indication of what is to
happen if (after atomization/casting) the string contains the sequence "--"
or ends in "-" neither of which are allowed in an XML comment.

3.7.2 Other Direct Constructors
3.7.3.6 Computed Comment Constructors


<!-- abc -- xyz -->

comment { "-123-"}

Both appear to be legal Xquery, but neither can directly result in an
XML comment and the first can not result in an XPath/Xquery data model
comment node:
http://www.w3.org/TR/xpath-datamodel/#CommentNode
somewhat strangely only bans "--" but allows a trailing "-".

By contrast, the xslt2 draft says,

http://www.w3.org/TR/xslt20/#creating-comments

[ERR XT0950] It is a recoverable dynamic error if the result of
evaluating the content of the xsl:comment contains the string -- or ends
with -. The optional recovery action is to insert a space after any
occurrence of - that is followed by another - or that ends the comment.


David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Received on Monday, 19 January 2004 09:05:48 UTC