On 5/15/02 12:53 PM, "David Alan Black" <dblack / candle.superlink.net> wrote:

> Hi --
> 
> On Thu, 16 May 2002, Rich Kilmer wrote:
> 
>>> From: Sean Russell [mailto:ser / germane-software.com]
>>> 
>>> How do you want
>>> 
>>>   <a><b>B<c>C</c>B</b><b>B</b></a>

Either

<a
  ><b
     ><c>C</c
     ></b
  ></a
>

or (ugh)

<a
  ><b
     ><c>C</c></b></a>

or any number of other variations. These don't add white space. Careful
about the whitespace rules in XML you cannot break up "<a" or "</a".

If you have a DTD and i) you define it correctly; and ii) I remember
correctly, then this:

<a>
  <b>
    <c>C</c>
  </b>
</a>

does not introduce white space unless <a> and <b> are defined to have mixed
content.

>> 
>> <a>
>> <b><c>C</c>B</b>
>> <b>B</b>
>> </a>
>> 
>> Rule:  If all there is between tags is pure white space and sub-tags use
>> CR otherwise, don't change the formatting.
>> 
>> Thoughts?
> 
> My feeling is that if you're doing pretty-printing, then you've
> already decided to mess with the whitespace (based on what you expect

Not necessarily :-)

> the processors to do).  So, at the other extreme....
> 
> <a>
>  <b>
>     <c>
>        C
>     </c>
>  </b>
>  <b>
>     B
>  </b>
> </a>
> 
> which looks weird because the element names and content are all so
> short :-)  but that kind of layout I find more helpful in the ways I
> want pretty-printing to be helpful.
> 
> 
> David