|Version 10 (modified by Carsten Klein <carsten.klein@…>, 4 years ago)|
Pluggable Directives Libraries (#395)
- provide for a framework for introducing additional directives into the system, even from different namespace
- existing directives must not be overridden, nor replaced, alternate versions have to be placed in a different namespace
- 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
- process all directives in document order dependent rather than by an order that is defined in-source
- this allows for adding new directives to existing directive namespaces without the user having to figure out a proper execution priority
- 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
- NOTE: this might break existing templates which rely on the previous ordering imposed by genshi
Current Development State
- still in early design/prototyping phase
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.