RE: Empty element tags

What if I am not writing HTML.   It seems odd that an uXML parser would complain if I wrote <br></br>
but not <foo></foo>

Wouldn't it be simpler to simply let users hang themselves as if they were writing HTML ?


-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
dlee@marklogic.com
Phone: +1 650-287-2531
Cell:  +1 812-630-7622
www.marklogic.com<http://www.marklogic.com/>

This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation.

From: Gabrielle Serra [mailto:gabrielle.serra@wasi.fr]
Sent: Friday, August 17, 2012 1:22 PM
To: John Cowan
Cc: James Clark; public-microxml@w3.org
Subject: Re: Empty element tags


On Fri, Aug 17, 2012 at 6:47 PM, John Cowan <cowan@mercury.ccil.org<mailto:cowan@mercury.ccil.org>> wrote:
Gabrielle Serra scripsit:

> I have a question about compatibility to our goal #8 MicroXML shall be able
> to straightforwardly represent HTML
>
>  <!ELEMENT BR <http://www.w3.org/TR/html401/struct/text.html#edef-BR> - O
> EMPTY -- forced line break -->
>
> means <br> is an empty element without a closing tag ? or means <br/> is
> allowed ?
Both <br> and <br/> work to force a line break; indeed, loose slashes are
always ignored in HTML5 start tags.  Unfortunately, </br> *also* forces
a line break, so <br></br> will give you two line breaks.  This is why
my editor's draft has a special rule requiring any element named "br",
when empty, to be expressed with an empty-tag.  (No semantics are given
or required).

Fortunately, no other HTML element has this property.  If you write <meta
blah-blah-blah></meta>, the close-tag is just ignored.

ok, thank you for explanations.

Gabrielle

--
Don't be so humble.  You're not that great.             John Cowan
        --Golda Meir                                    cowan@ccil.org<mailto:cowan@ccil.org>



--
WASI [ Web Application & System Informations ]
Développez votre site internet en toute simplicité !

http://www.wasi.fr

Gabrielle Serra
17 rue du Château
82800 Bioule

Fr : +33 (0)6 77 47 89 34
Eu : +33 (0)9 77 216 608
En : +44 (0)7 812 433 797

Received on Friday, 17 August 2012 20:12:49 UTC