[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] How to tidy/nice XML?
Hi Euis, On Dienstag, 15. Juli 2008, Euis Luhuanam wrote: > > What tools are available to tidy the XML document? > I am considering to use ''tidy''; but could not find > examples in the manual. > > I have two problems when using ''tidy -i -w 70 -xml": > First, it will screw <programlisting> . Is there any > tidy option to ignore this? > > Second, somehow ''tidy'' will joint </foreignphrase> with > the next word. What is the REGEX for splitting > from ''</foreignphrase>and'' to ''</foreignphrase>[SPACE]and''? > > I can find ''</foreignphrase>a'' with ''/<\/\w+>\w/'' but I have no > idea on how to split it!? Maybe xmlformat is something for you? It's a Perl or Ruby script, see http://www.kitebird.com/software/xmlformat/ You can use a default configuration or just write one for yourself. It can distinguish between block, inline and verbatim elements. So it will solve at least the formatting of your programlistings. As far as I know about your regex, it can not be solved with xmlformat. Hope that helps, Tom -- Thomas Schraitle
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]