This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 873 - XML validation of javascript decrement variable by 1 using --
Summary: XML validation of javascript decrement variable by 1 using --
Alias: None
Product: Validator
Classification: Unclassified
Component: Parser (show other bugs)
Version: 0.7.0
Hardware: Other other
: P2 trivial
Target Milestone: ---
Assignee: Terje Bless
QA Contact: qa-dev tracking
Depends on:
Reported: 2004-09-07 12:03 UTC by michal.szalai
Modified: 2004-09-07 12:24 UTC (History)
0 users

See Also:


Description michal.szalai 2004-09-07 12:03:09 UTC
Hi. I wanted to use on my page:

<script type="text/javascript">
    var index = 10;

From SGML parser I got this error on line where index-- is:
invalid comment declaration: found character ";" outside comment but inside 
comment declaration

Of course I can use index=index-1; or index-=1; but I like to use index--;
Comment 1 Bj 2004-09-07 12:24:53 UTC
You cannot do that, comments in XML documents must not include "--". Please 
also see you cannot use <!-- ... --> in 
<script> elements in XHTML documents at all, user agents must ignore the 
content of <!-- ... --> so your scripts won't work when the document is 
processed as XML.