OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Discard leading/trailing whitespace in <title>elements?





On 3/30/05 0:18, "Sean Wheller" <sean@enbaya.co.za> wrote:

> On Tuesday 29 March 2005 21:10, Paul DuBois wrote:
>> My "validating editor" is vi. :-)
>> 
>> It's easy for me to produce <title>xxx</title> rather than
>> <title>
>>  xxx
>> </title>.  (A simple change to one of my xmlformat rules.)  I was just
>> curious whether this could be done in XSLT without a lot of messing around.
>> Seems the answer is no.
> 
> But there is a good point worth exploring in all of this. Why do people try to
> format XML in blocks such as
> <para>
>  Some text here.
> </para>
> 
> Seems unnecessary to me.
> 1. It add whitespace that is not required.
> 2. IMHO, It makes reading the XML and content harder.

Opinions vary.

> 3. It is hard to keep the formatting of the XML indent consistant.

I use an XML formatter specifically for putting files in a given
format.  Yes, some of you will tell me I shouldn't do that.  I know.

Consider the case of XMl files stored in a version control system
that might be edited by different people who use different editors,
each with its own formatting conventions.

Trying to read the diffs generated when edits are committed is completely
impossible under these circumstances.  Formatting the files to a standard
format before commit reduces the size of the diffs and makes them a lot
easier to read to see what edits were made.

As for whether to add or not add whitespace ... like I said, opinions vary
as to style.

> 
> Why not just use <para>Some text here.</para>?




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]