|Version 11 (modified by Carsten Klein <carsten.klein@…>, 5 years ago) (diff)|
Pluggable Directives Libraries (#395)
- provide for a framework for introducing additional directives into the system, even from different namespace
- TODO existing directives may be overridden, i.e. alternate versions will simply replace existing directives from a different library
- might require some configuration by the user for choosing the correct implementation, if multiple such replacements are available
- zero configuration effort by the user
- detection of available directives libraries is via the [genshi.libraries.directives] entry point
- available directives libraries in the system will be automatically loaded by the system
- api for programmatically adding new directives libraries (similar to the current concept of pluggable DirectiveFactory's)
- extended text based templates, see WorkInProgress/PluggableDirectivesLibraries/TextTemplates
- execution order of directives must be redefined so that directives defined by third party libraries will be executed in the correct order, and if a given directive does not impose any restrictions on its execution order, then it will be executed in document order
- this allows for adding new directives to existing directive namespaces
- this seems more natural since we are not dealing with operators here and as it is also found in common programming languages where the in-source order of statements is the normally the same order that they are executed in
Current Development State
- currently in early alpha phase (existing test cases do not break and performance is similar to standard genshi)
More information will be made available as soon as the initial prototype is working.
Feel free to add your wishes for this feature. Please do not remove existing wishes from other users, extend upon them.
- see #296 for a py:element directive
- see #321 for a py:comment directive
- see #104 for a proposal on CDATA output (which could be made a directive)
- working branch to develop this in a joint effort on g.e.o. directly
Example Directives Library
This example serves as a skeleton for ongoing development. It also serves as the initial documentation for the new feature.