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.
I found out by trial and error that the "Prefer Public" checkbox on a Sun catalog impl such as www/www/dtds/catalog must be checked for the catalog to be useful for checking typical XML files with a public ID and a remote system ID. If off, you get errors such as this: Using JAXP parser at file:/space/nb/dev-mar-06/lib/ext/xerces.jar. Checking nb_all/core/ui/src/org/netbeans/core/ui/resources/layer.xml... errno: 101, error: Network is unreachable for fd: 22 [14] http://www.netbeans.org/dtds/filesystem-1_0.dtd XML validation finished. 1. The name on the checkbox is not very descriptive. Prefer public what? to what? 2. The documentation (e.g. that appears when you click the Help button) does not appear to mention it at all. 3. Under what circumstances would you want this box not to be checked? The documentation should probably describe use cases briefly.
John you can get inspirated by: The prefer setting determines whether or not public identifiers specified in the catalog are to be used in favor of system identifiers supplied in the document. Suppose you have an entity in your document for which both a public identifier and a system identifier has been specified, and the catalog only contains a mapping for the public identifier (e.g., a matching public catalog entry). If the current value of prefer is "public", the URI supplied in the matching public catalog entry will be used. If it is "system", the system identifier in the document will be used. (If the catalog contained a matching system catalog entry giving a mapping for the system identifier, that mapping would have been used, the public identifier would never have been considered, and the setting of override would have been irrelevant.)
so if preferred public is unchecked then the resolver automatically prefers system ids? also, if the catalog contains a system ID then it is used no matter what the prefer setting is?
documented to the best of my understanding in mountcatalog.html in orion_fcs. any additions/clarifications/better use cases are welcome. for now i'm closing the bug.
It would ommit following sentence: "If the catalog contains mappings for both the public identifier and the system identifier, the IDE ignores this setting and always uses the system identifier." It is too long and I'm not sure if the statement is right. It is better to point to standard if necessary.
I think it should stay. I think it's right because it's almost word-for-word what is contained in the spec. Do you have any reason to believe that it's not right? Also, if the user doesn't know this information and sets the Prefer public setting for a catalog that contains both public and system ids, they won't know why the public isn't being used. I'm not worried about it being too long. If anything, I don't think the description gives enough information (no real use cases). Jesse, you reported this. Any comments?
I guess I'm half lost, but the documentation should (1) refer to the official spec, (2) give summaries corresponding to common use cases. A very common use case for XML is that the document contains a public ID as well as a remote system ID (some http: URL). You will frequently have a local catalog that maps either public IDs or standardized remote system IDs to local copies of the entities (such as DTDs). The docs should at least explain how to work with this case (I guess you want to turn on Prefer Public).
described the use case Jesse mentioned and removed the confusing text. closing bug again.
VERIFIED
Resolved for 3.4.x or earlier, no new info since then -> closing.