OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: A different comment syntax question

[ Lists Home | Date Index | Thread Index ]
  • From: Chris Maden <crism@oreilly.com>
  • To: xml-dev@ic.ac.uk
  • Date: Fri, 17 Jul 1998 12:16:42 -0400 (EDT)

[Rob Cameron]
> Although the XML specification makes clear that "--" is not allowed
> in comments, there is another case that is less clear.  Can the body
> of a comment end in a single hyphen, that is, is a comment like
> "<--A+, A or A--->" legal?  There is no explicit mention of this in
> the text of the specification, but a careful read of the grammar
> does not allow it.

Correct.  The production reflects the SGML reality that -- ends a
comment.  In SGML terms:

'<!'         starts the comment declaration in your example.
'--'         starts the comment.
'A+, A or A' is the content of the comment.
'--'         ends the comment.
'-'          is an error.
'>'          could be considered to end the comment declaration, but
             we're now in error-recovery mode, and outside the scope
             of the specification.

<!--A+, A or A- --> is a legal comment.

-Chris
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS