Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

XML Comments

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
When we type in a comment like
<!-- XYZ ABC --->
the parser parses for "-->" and considers the end of a comment. It has to be so because comment ending with "-- >" is not a valid statement.
Now if that is the case Y does the rules for comment, say that "--" cannot appear as a part of the comment where as ">" is valid in it?
Thx.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by shan java:
Hello,
if that is the case Y does the rules for comment, say that "--" cannot appear as a part of the comment where as ">" is valid in it?
Thx.


Hi Shan if i understand the quest correctly, u are asking why "--" is not valid inside comments.
the answer is that this is not compatible with SGML. plz refer URL=http://www.w3.org/TR/2000/REC-xml-20001006#dt-compat]This page[/URL]
and 2.5 for more info.
hope i could answer ur question.
sridhar
-----------------------------------------------
aspirant for xml cert 141.
[ January 02, 2003: Message edited by: Sridhar Kilambi ]
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do agree that XML SPECS does not agree for .. and XML has to follow SGML, and .....
But logically when we think, Y should'nt we have "--" in comment as the parser written can distinctly identify the "-->" pattern.
Thx.
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic