This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 195033 - the javascript is correct but editor show an error
Summary: the javascript is correct but editor show an error
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Marek Fukala
URL:
Keywords: UI
Depends on:
Blocks:
 
Reported: 2011-02-03 15:43 UTC by vladimircs
Modified: 2011-02-11 21:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
html where appear an UI error (3.43 KB, text/html)
2011-02-09 15:34 UTC, vladimircs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vladimircs 2011-02-03 15:43:34 UTC
the javascript is correct but editor show an error
in html edit view  when I put this code line
  <script src="scripts/mySc.js" type="text/javascript" ></script>
show the error:
Error: Attribute "xml:space" not allowed
Comment 1 Marek Fukala 2011-02-09 12:46:23 UTC
what kind of file are you putting the link into? Is it an xhtml or html file? what doctype? Can you attach here a sample file?
Comment 2 vladimircs 2011-02-09 14:57:53 UTC
the file is a phtml is a file like a xhtml; the purpose of the name  is for my framework php
Comment 3 Marek Fukala 2011-02-09 15:09:02 UTC
fine, please attach the file or just a chopped version which I can use to reproduce.
Comment 4 vladimircs 2011-02-09 15:34:09 UTC
Created attachment 105795 [details]
html where appear an UI error
Comment 5 vladimircs 2011-02-09 15:36:02 UTC
the problem also appear in html files; in php files works correctly.
I attached an html file
the error shows at line 8
Comment 6 Marek Fukala 2011-02-11 11:02:49 UTC
Reproducible on the attached sampe. Thanks

It does work in php likely due to the missing doctype. A fallback doctype is used then, by default HTML5.
Comment 7 Marek Fukala 2011-02-11 16:04:04 UTC
It looks like the xerces parser implies such attribute for some tags during parsing when the loading of external entities is enabled. However the schemas for xhtml1.0 transational doesn't allow it. The same issue happens in the web validator.nu.
Comment 8 Marek Fukala 2011-02-11 21:42:21 UTC
I've resolved the issue by disabling the loading of external entities by the parser. I'm a bit hesitant about this change since one may possibly validate the page with the external entities loaded. I may possibly make some configuration UI for the validator in next release so one could change the default behavior. If this step was a problem and needed to be rolled back then the issue would have to be resolved on the validator side. Specifically there are some changes made by Henri Sivonen to the RNC schemas regarding the default xml:space attribute. It seems to be that the involved script.rnc file (besides others) contains a bug since the script tag doesn't allow the xml:space attribute. The declaration line has been commented out but without replacement. The xml:space attribute is defined in the Common.attribs attributes set, but the script or style tags doesn't use it.

web-main#0027db980fe9