|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: A different comment syntax question
Thanks to Chris Maden for setting me straight. I have been reading the XML specification without a detailed knowledge of SGML. Although you can do this to an extent, this seems to be one of the small exceptions. (The big exception of course is the issue of parameter-entity references in the external document subset. An area for further work.) Chris Maden <crism@o...> writes: > > [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. > xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








