On Thu, Jan 05, 2017 at 02:54:28PM +0000, Daniel P. Berrange wrote:
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/...
Uh, so *THIS* is the thing we were looking for. What a discussion we
could've saved.
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/ :|
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list