Bug in XMLSpy?

G

Gus Gassmann

Just put the following comment into a file (w3.xml schema)

<!--
---------------------------------------------------------------------------
-->

I was even careful enough to put spaces after the "<!--" and "-->",
but the parser in XMLSpy complains that the
third "-" after the first gap is "grammatically unexpected". That so?
 
P

Pavel Lepin

Gus Gassmann said:
Just put the following comment into a file (w3.xml schema)

<!--
---------------------------------------------------------------------------
-->

I was even careful enough to put spaces after the "<!--"
and "-->", but the parser in XMLSpy complains that the
third "-" after the first gap is "grammatically
unexpected".

And Altova is absolutely right this time. Both XML 1.0 4E
and XML 1.1 2E define comments as:

'<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'

See 2.5. This restriction is even spelled out in prose.
 
M

Martin Honnen

Gus said:
Just put the following comment into a file (w3.xml schema)

<!--
---------------------------------------------------------------------------
-->

I was even careful enough to put spaces after the "<!--" and "-->",
but the parser in XMLSpy complains that the
third "-" after the first gap is "grammatically unexpected". That so?

Check the specification <URL:http://www.w3.org/TR/REC-xml/#sec-comments>
which states "the string "--" (double-hyphen) MUST NOT occur within
comments".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top