Re: xml:* attributes

On Sat, Aug 18, 2012 at 11:27 AM, John Cowan <cowan@mercury.ccil.org> wrote:

> Why angle brackets?

Why not? You have got to choose something. One advantage of angle
brackets is that they occur infrequently in normal English text.

> Why does a slash mean one thing at the beginning of a tag and something
> completely different at the end?

Actually I think that syntax is quite intuitive.  They "/" indicates
the closing of the element.

> Why are quotes required around attribute values in all cases?

For simplicity and robustness, so that it is not required to remember
in which cases it is required in.

> Why are both single and double quotes allowed, with zero difference
> in meaning?

So that you don't need to use escaping in the case an attribute value
contains only one of ' and ".

> Why are both empty-tags and start-tags followed by end-tags allowed,

Because it is useless and painful to repeat the element name for empty elements.

> with zero difference in meaning?

Why should there be a difference in meaning? That's a feature.

> Why the funky escape sequences instead of \<, \>, etc.?

The named character reference syntax is not the greatest.

> Why the funky comment start and end markers instead of /* and */, or
> // and newline, or # and newline, or whatever?  Why is -- not allowed
> in comments?

The comment syntax is probably the worst syntax (although we haven't
voted it in yet).

> For all of these questions, the only answer is "For backward compatibility
> with XML, HTML, or SGML."  And they cover just about every piece of
> markup in the language.

I don't see XML, HTML and SGML as equivalent here.  I think our
potential audience is very likely to be familiar with HTML. So I think
it's OK provided the funkier aspects of our syntax are similar to
HTML.

James

Received on Saturday, 18 August 2012 05:46:53 UTC