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.
If I attempt to use the validate xml from the files view on a project.xml file I get the error message: XML validation started. Checking file:/C:/cwebster/userdirs/j2eecdp/JavaApplication1/nbproject/project.xml... cvc-elt.1: Cannot find the declaration of element 'project'. [2] XML validation finished.
To validate project.xml in IDE you have to do these steps first: 0. Make sure your IDE's proxy settings are correct if you are behind firewall, e.g. in the Setup Wizard. 1. Open the Runtime tab. 2. Right-click XML Entity Catalogs and select Mount Catalog. 3. Use "OASIS Catalog Resolver". Enter for the URL: http://www.netbeans.org/dtds/catalog.xml I'm changing this issue to enhancement to mount this catalog by default in next version.
BTW validating a j2seproject project.xml is almost useless; there is very little in it. By contrast, a freeform project.xml has a lot of complex content; you can already (in 4.0) see validation errors automatically just by editing and saving it.
One of the reasons for filing this issue is to be able to help with a potential merge conflict in J2EE or generally netbeans projects.
OK, that's one of the only cases I can think of where you would care about validation for j2seproject's. Currently the most plausible merge conflict is two developers both adding subprojects in parallel. Then the <references> section will need merging. Note that any merge conflict in nbproject/build-impl.xml can be "resolved" by deleting that file and closing and reopening the project, since it is not primary data and is kept in VCS only for reasons of offline buildability.
See also issue #42686.
Might not get to for E, still TBD.
Have working patch.
Issue #22848 covered the necessary xml/catalog SPI. Oddly, it was never properly documented in the xml/catalog Javadoc, which I will fix (not that that Javadoc is even published currently).
JJ - possible addition to release notes and/or usersguide: in 4.1 it will be possible to validate any project.xml or private.xml (for any kind of project) just by right-clicking the XML file (in explorer or editor) and choosing Validate XML, in the usual way. This is in addition to 4.0's freeform project.xml validation but with the following differences: - works for any kind of project/private.xml, not just freeform project.xml (generally: for any $uri matching http://www.netbeans.org/ns/**, validates against $uri.xsd if that has been published) - works equally well on unsaved XML files - is *not* automatic upon saving the file; must be invoked explicitly - requires a web connection to www.netbeans.org (no offline operation) - the new catalog appears automatically under XML Entity Catalogs, no need to add http://www.netbeans.org/dtds/catalog.xml explicitly as was previously recommended
committed * Up-To-Date 1.18 ide/golden/deps.txt committed * Up-To-Date 1.622 nbbuild/build.xml committed * Up-To-Date 1.8 projects/projectui/build.xml committed * Up-To-Date 1.13 projects/projectui/nbproject/project.xml committed * Up-To-Date 1.52 projects/projectui/src/org/netbeans/modules/project/ui/Bundle.properties added * Up-To-Date 1.1 projects/projectui/src/org/netbeans/modules/project/ui/ProjectXMLCatalogReader.java added * Up-To-Date 1.1 projects/projectui/src/org/netbeans/modules/project/ui/ProjectXMLCatalogReaderBeanInfo.java committed * Up-To-Date 1.45 projects/projectui/src/org/netbeans/modules/project/ui/resources/layer.xml
It's impossible now to use project APIs without inluding all the needed XML modules. The xml/catalog needs xml/core, xml/core requires libs/xerces, etc.... So I need all this, even if I want to implement a simple project like described in the povray tutorial.
This was fixed as intended. If you want to open an RFE in xml/something to have a lighter-weight catalog API suitable for non-IDE applications, go ahead.
OK, sorry for reopening this issue. There should be an update in the NetBeans Architecture Answers for this module (Interfaces table).
Good point: Checking in projects/projectui/arch.xml; /cvs/projects/projectui/arch.xml,v <-- arch.xml new revision: 1.9; previous revision: 1.8 done