Skip to content

Comments

Improve/fix handling of XML Catalogs#8489

Merged
matthiasblaesing merged 4 commits intoapache:masterfrom
matthiasblaesing:xmlresolver
Jun 1, 2025
Merged

Improve/fix handling of XML Catalogs#8489
matthiasblaesing merged 4 commits intoapache:masterfrom
matthiasblaesing:xmlresolver

Conversation

@matthiasblaesing
Copy link
Contributor

NetBeans allows users to validate XML files against their grammars. XML Catalogs allow users to supply their own grammars and enable faster access to the DTD and schema files. NetBeans has to options:

  • Users can register their DTDs and XSDs in the "User Catalog"
  • Users can register XML catalog files (OASIS XML catalog, XCatalog, XMLCatalog)

There are multiple problems here:

  1. The registered XML catalog file entries were not saved and thus only usable in a single session
  2. The default format for XML catalog files is the OASIS XML catalog format, but this was listed as second option only
  3. Registering a catalog did not give feedback, whether the catalog seemed to be correct

With this change the problems are solved:

After a restart registered catalog is still present (see the "Resolver at ..." entry):

grafik

The first entry of the provider list is now the OASIS Catalog Resolver:

grafik

If the catalog does not yield entries, this is shown:

Bildschirmfoto vom 2025-05-05 18-33-56

Closes: #8464

@matthiasblaesing matthiasblaesing added ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) XML labels May 5, 2025
@matthiasblaesing matthiasblaesing added this to the NB27 milestone May 5, 2025
Copy link
Contributor

@lkishalmi lkishalmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, looks good.

However while being here, the files in impl could use a bit more facelift, removing pre Java 1.2 collections and add a few use of generics.

@matthiasblaesing
Copy link
Contributor Author

Thanks for review. Will merge.

@matthiasblaesing matthiasblaesing merged commit 1947efd into apache:master Jun 1, 2025
31 checks passed
@matthiasblaesing matthiasblaesing deleted the xmlresolver branch June 1, 2025 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) XML

Projects

None yet

Development

Successfully merging this pull request may close these issues.

validation via xml catalog fails

2 participants