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.
[dev-50] I tried to create an Auto Update *.xml update description which used entity includes like this: -----------%<---------- whatever.xml <?xml version='1.0'?> <!ENTITY all-updates SYSTEM "40_1.1.entities"> &all-updates; -----------%<---------- -----------%<---------- 40_1.1.entities <module_updates ...> etc. -----------%<---------- (I believe this is correct syntax??) When trying (in devel build #51) to check the web for updates, I got: URL : http://www.netbeans.org/updates/40_1.1_12344321.xml org.xml.sax.SAXParseException: Document root element is missing. at com.sun.xml.parser.Parser.fatal(Parser.java:2817) at com.sun.xml.parser.Parser.fatal(Parser.java:2805) at com.sun.xml.parser.Parser.parseInternal(Parser.java:493) at com.sun.xml.parser.Parser.parse(Parser.java:284) at com.sun.xml.parser.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:95) at org.openide.loaders.XMLDataObject.parse(XMLDataObject.java:474) at org.openide.loaders.XMLDataObject.parse(XMLDataObject.java:433) at org.netbeans.modules.autoupdate.Updates.parseDocument(Updates.java:157) at org.netbeans.modules.autoupdate.Updates.access$0(Updates.java:151) at org.netbeans.modules.autoupdate.Updates$1.run(Updates.java:114) at org.openide.util.Task.run(Task.java:124) at org.openide.util.RequestProcessor$ProcessorThread.run(RequestProcessor.java:562) Shouldn't use of entity includes be supported? Perhaps you need to use a validating parser to have them be replaced with the proper text?
It may be that you can use entity includes, but not for the document root element. Thus, the *.entities would include <module>....</module>, while the *.xml would be <?xml?>, <!ENTITY>, then <module_description>, then $all-updates;, then </module_description>. Please try that also.
1. <!ENTITY all_modules..> tag must be used only within DTD or <!DOCTYPE...> tag. 2. &all_modules cannot be used at the top level. So, you can include autoupdate dtd, and use: <module_updates>&all_modules</module_updates> However, there is one problem more: AU use DOM parsing and generated DOM-tree has different structure then if I use the same XML, but without entity include - all nodes in *.entities file are shifted one level down in DOM-tree. e.g. method document.getDocumentElement().getChildNodes() doesn't return <module_group>... method document.getElementsByName( "license" ) doesn't find <license> tag. I talked about this problem with Petr Kuzel and in his opinion it's problem of SUN's parser.
Resolved for 3.3.x or earlier, no new info since then -> closing.
A mistakenly closed RESOLVED LATER/REMIND issue. Reopening.
*** This issue has been marked as a duplicate of 33097 ***
verified duplicate