delb-xml / delb-py

A library that provides an ergonomic model for XML encoded text documents (e.g. with TEI-XML).
https://delb.readthedocs.io
GNU Affero General Public License v3.0
16 stars 0 forks source link

Preferring document loaders #9

Closed funkyfuture closed 3 weeks ago

funkyfuture commented 4 years ago

here i raised the concern that document loaders may employ indistinguishable notations for sources. @03b8 pointed out that one would hence need to control a preference of loaders.

here are some thoughts:

a) it is currently possible for application developers to manipulate the delb.plugins.plugin_manager.plugins.loaders object which is a list. that should be mentioned in the docs. this will be included in the 0.2 release.

b) the plugin manager could be enhanced with methods to de-/activate and reorder registered plugins. since both is possible with a), i'd implement that when someone can show that explicit methods for it would be preferable.

c) also, an additional argument preferred_loaders could be added to Document in order to specify the behaviour not in the application wide scope, but just for one concrete call on Document. as with b), i'd rather go for this when someone needs it.