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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top