Re: [xsl] xmllint and paragraph line width

Subject: Re: [xsl] xmllint and paragraph line width
From: "Dave Pawson dave.pawson@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 19 Mar 2018 21:12:06 -0000
Yes it does Peter?

--format option?


On 19 March 2018 at 18:04, peter@xxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> On 2018-03-19 15:39, Jeffrey Walton noloader@xxxxxxxxx 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
Docbook FAQ.

Current Thread