Project

Profile

Help

Feature #5755

open

Wouldn't it be nice to have an Package Resolver?

Added by Nico Kutscherauer over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Low
Assignee:
Category:
XSLT 3.0 packages
Sprint/Milestone:
-
Start date:
2022-12-06
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

The general idea:

Saxon should have a new configuration option where the user can provide a Java class implementing a specific interface. The class should work similar to the URIResolver, just for packages. It receives a package name and a requested version info like it was specified in the <xsl:use-package> and returns the javax.xml.transform.Source of the package file or null if the package is not available. Any time Saxon compiles a stylesheet containing an <xsl:use-package> declaration it asks at first the Pakage Resolver for the resource. If it returns null it uses the current logic to get it.

What is the benefit?

  • You could implement a repository based pull mechanism for XSLT packages .In my mind, it's something like Maven already does with its dependency concept. Companies could maintain internal repositories or even an "XSLT central" could be come real.
  • You could make lookups for packages based on common patterns. For instance I developed an XSLT Package Handler which works with the generic initializer option and collects all packages which can be found in the classpath. This would be much more elegant, if it would not use the very generic intializer interface and if it would have a pull mechanism.

What do you think?

Please register to edit this issue

Also available in: Atom PDF