
Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
On 24 Jul, 11:51, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> Which is considered preferable when generating XML or HTML:
> space /> or no-space /> for an abbreviated tag ending?
> e.g. <img src="picture.png" alt="landscape"/>
> or
> <img src="picture.png" alt="landscape" />
Hi,
I think space ensures compatability with more browsers.
"Include a space before the trailing / and > of empty elements,
e.g. <br />, <hr /> and <img src="karen.jpg" alt="Karen" />.
Also, use the minimized tag syntax for empty elements, e.g. <br />,
as the alternative syntax <br></br> allowed by XML gives uncertain
results in many existing user agents."
from http://www.w3.org/TR/xhtml1/#guidelines
Regards,
Tov Are Jacobsen
Daniel Pitts - 24 Jul 2007 14:50 GMT
On Jul 24, 3:03 am, "tov...@gmail.com" <tov...@gmail.com> wrote:
> On 24 Jul, 11:51, Roedy Green <see_webs...@mindprod.com.invalid>
> wrote:
[quoted text clipped - 20 lines]
>
> Tov Are Jacobsen
I'm almost certain thats outdated. I think the only major browser that
didn't support <br/> was something like Netscape 3 :-) Also, I still
automatically write <br /> I do tend to like the space myself, kind
of separates the tag name from the fact that its an empty element.
Both are important to know, but not necessarily at the same instance.
Although, in reality, XML "best practices" is somewhat unnecessary to
worry about, as long as its valid XML, anybody can use a tool to
reformat the document however they want.
Lew - 24 Jul 2007 23:45 GMT
> Although, in reality, XML "best practices" is somewhat unnecessary to
> worry about, as long as its valid XML, anybody can use a tool to
> reformat the document however they want.
Possibly into canonical form.
<http://www.w3.org/TR/xml-c14n>

Signature
Lew
Roedy Green - 25 Jul 2007 08:05 GMT
>Possibly into canonical form.
><http://www.w3.org/TR/xml-c14n>
they expand <br /> to <br></br>

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Lew - 25 Jul 2007 15:07 GMT
>> Possibly into canonical form.
>> <http://www.w3.org/TR/xml-c14n>
>
> they expand <br /> to <br></br>
Indeed they do.

Signature
Lew