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.
Background: When you work with J2EE applications, you usually have to work with several XML configuration files (for the frameworks that you work with). If you work inside a firewall, you need to register and use a local copy of the DTD or XSD in order to get validation and code completion of the XML file. It is important to understand that practically all developers who work on a real J2EE application rely on some kind of technology that involves a config file: web services, portlets, use JSF, Struts, Tiles... It is currently *very* cumbersome to create and register such files, and the naming conventions are obscure. Here is what you have to do: 1) Mount a new (dummy) directory in the file systems explorer 2) Create an XML catalog file 3) Manually edit the file to match the name of the document with the location of the file on disk. (You have to understand the role of the name of the document) 4) Unmount the dummy directory 5) Switch to the runtime tab and mount the catalog file there. It would be much easier to do this if I simply added a catalog file and edited it (through a UI, which can create entries based on parsing the DTDs and XSD files. There is no reason why the creation and registration cannot happen in one place. And it's not obvious that the runtime tab is a good place for this since it's more something that the text editor uses. (I originally looked for this functionality under the Options tab). Suggested UI: First of all, I don't think it's a good idea to use the term "XML Entity Catalog" in the primary user interface, this does not help novice users such as myself. I think most users expect to find this functionality in the same place where they configure other editor options, so the Options tab would be the obvious location. If you plan to introduce another obvious location for configuring the editor, that should do too. You may wish to implement the functionality using XML Entity Catalogs in the background, but there is no reason to expose this term to users. All the user wants to do is to ensure that the IDE knows that a particular file is available locally, so the UI should just be based on browsing for the file. If that's not possible, it should at least be possible to create those catalog files from the XML Catalogs node in the Runtime interface, but that's already a stretch. If that case, the catalogs should have UI to add new catalog entries.
Implemented. The process now is very straightforward: Invoke "Add Local DTD or XML Schema" action on User Catalog node and add map DTD or XML schema to a local file. Changes made in UI : 1. XML Entity Catalog renamed to DTD and XML Schema Catalogs 2. [read-only] suffix added (to catalog name) to all IDE predefined catalogs to emphasize that catalogs cannot be changed by user. 3. User Catalog [read-write] (empty by default) added for XML resources specified by user 4. "Add Local DTD or XML Schema" action added to User Catalog node 5. New dialog implemented for simple DTD/XML schema registration (opens on Add Local DTD or XML Schema" action (see attached picture) 6. Edit action implemented on User Catalog entry to enable open and edit DTD or XML schema registerred in User Catalog 7. Delete action implemented on User Catalog entry. 8. changed catalog entry property names : Public ID -> Public/System ID System ID -> URI
Created attachment 22476 [details] Add Local DTD or XML Schema dialog
Created attachment 22477 [details] Browse DTD or XML schema dialog
Created attachment 22478 [details] XML Catalogs in Runtime TAB
Fix VERIFIED, it is now easy and straightforward to add XML catalogs to applications. This has been implemented for some time, this verification was done with NB 6.0 build 200703291800 using ide-hula-070329_16.zip