W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2002

RE: Tidy adding returns inside xml elements

From: Charles Reitzel <creitzel@rcn.com>
Date: Fri, 12 Jul 2002 12:17:33 -0400
Message-Id: <4.3.2.7.2.20020712120734.02a08110@pop.rcn.com>
To: "Howard, Kipp (LNG-CL)" <Kipp.Howard@lexisnexis.com>
Cc: "'html-tidy@w3.org'" <html-tidy@w3.org>

What Howard said.  Yes, Rick is right about some HTML tags having required 
end tags (e.g. <SCRIPT></SCRIPT>).  But, as you suggest, I did the change 
only for generic XML output.

Also, there are really two changes: 1) eliminate extra vertical whitespace 
and 2) canonicalize empty tags.  I think 1) is a keeper (and would like to 
do the same for (X)HTML).  I'm not as confident about 2).  Still, because 
they are equivalent, I would still prefer to go with a consensus and/or 
conservative decision than to add an yet-another-option on a fairly minor 
point.

How about a compromise?:
<foo>
     <bar />
     <bar></bar>
</foo>

This way there is no tag elimination, but no gratuitous newline between the 
begin and end tags for empty elements.

take it easy,
Charlie

At 05:58 AM 7/12/2002 -0700, Howard, Kipp (LNG-CL) wrote:

>Parsons, Rick [mailto:rick.parsons@eds.com] wrote:
> > The drawback is recent browser handling of certain XHTML
> > elements. One we have discussed before is <script src="..." />
> > in the <head> section. This should be equivalent to <script
> > src="..."></script> but many browsers don't handle it correctly.
>
>Good point.
>
> > An option would be fine (and probably useful) but I think the
> > default should be to not to convert.
>
>Since there are already two options (output-xhtml and output-xml) for
>defining the output, I would think that if you using  output-xhtml, you
>should not convert empty elements, with both start and end tags (i.e.,
><empty></empty) to an empty element with a single tag (i.e., <element />).
>If you are using output-xml, then doing the conversion makes sense, IMO.
>
>I hope that made some sense.
>
>--
>Kipp E. Howard - Sr. Software Engineer @ LexisNexis CourtLink
>kipp.howard@courtlink.com
>(425) 372-1837 or (800) 774-7317 ext 1837
Received on Friday, 12 July 2002 12:12:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:52 GMT