On Thu, Jan 05, 2017 at 03:34:36PM +0100, Andrea Bolognani wrote:
Instead of encoding formatting information inside the
corresponding XSLT stylesheet, use a Python script to reformat
the text appropriately based on a few simple markers.
Splitting the task between the XSLT stylesheet and the Python
script allows us to keep both parts very simple.
It is easy enough todo the right line wrapping & indent in the
XSLT straight away avoiding this two pass system. We had this
exact same need for the template that converts security notices
from XML to plain text.
Just copy the "wrap-string" template from this file:
http://libvirt.org/git/?p=libvirt-security-notice.git;a=blob;f=templates/...
and call it anywhere you need todo wrapping from
This avoids the need to rely on magic markers being the in
intermediate text file, which could get mis-interpreted
depending on what people write in the release notes.
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://entangle-photo.org -o-
http://search.cpan.org/~danberr/ :|