xsl-list
[Top] [All Lists]

Re: [xsl] xmllint and paragraph line width

2018-03-19 16:12:12
Yes it does Peter?
http://xmlsoft.org/xmllint.html

--format option?

regards

On 19 March 2018 at 18:04, peter(_at_)silmaril(_dot_)ie
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
On 2018-03-19 15:39, Jeffrey Walton noloader(_at_)gmail(_dot_)com wrote:

Hi Everyone,

We run our book source through xmllint before making the book and
checking in sources to version control.

We would like to format the sources so paragraphs have a break at 80
or 90 chracters. The line breaks make it easier on version control
tools like Git, and make it easier to see changes and the end of a
sentence (that would otherwise require scrolling).

It looks like xmllint does not have the formatting option. I'm
guessing I am missing an obvious step, like using some other tool to
apply the line breaks.


I think so.

How do we format paragraphs to a particular width when using xmllint
in our toolchain?


I think you have answered your own question. If xmllint doesn't have an
option to break records in mixed content, then you need some other tool. Are
you tied to using xmllint and nothing else?

Emacs with psgml-mode does what you want by default, except that it indents
the mixed content for readability because it's an editor. You could turn off
the indentation, I am sure, but I've never wanted to do that; and if you
did, you could run files through it in batch mode. I suspect there are
plenty of people here who can help with that :-)

You could write some XSLT to do it, but it's harder than you think because
you will need to obey whatever other (unwritten?) business rules you apply
to mixed content.

///Peter





-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>