well, there's a very good reason they're not all the same. the name of a tag cannot have an attribute assigned to it, so named attributes must be separate from the tag in xml/html.
so these would be legal: <lj-user username="foo"> <lj-user>foo</lj-user> and were avoided only because they're annoying to type. (these, on the other hand, are not legal: <lj-user="foo"> <lj-cut="bar">)
the other commonly-suggested option, overloading the "lj" tag to have multiple meanings, like this: <lj user="foo"> <lj cut="bar"> is very confusing and contrary to how tags works anywhere else.
I’m not sure I follow your question, so I’ll just restate what I said in different words and hope it was what you were asking. :)
The difference is pretty subtle and I don’t think everyone agrees on it, but basically you have two places you can stick data into a tag: an attribute (<tag attr=“attribute”>) or the content of the tag (<tag>content</tag>). So no matter what we either have to type two words (“tag attr” in the first case) or one word twice (the second).
In both cases the tag name itself is what defines the tag, and (in theory) if you stripped all the attributes out of a tag it would still carry its essence. (For example, if you stripped the “href” off of HTML “a” tags, you’d still have all of your <a>links highlighted</a>; they just wouldn’t go anywhere.) This is why standardizing on a hyphen-free tag set won’t work: what does an “lj” tag represent? A user, a poll, a cut, ...
(The other criteria I’ve seen is that if you stripped off all tags and attributes from a document, the remaining content should still be sorta readable; again, in the HTML case, you can still read the essay even if all of the helpful <a href=“nolongerhere”>links</a> are removed.)
So everywhere else I think the plan is to name tags like “lj-cut”, “lj-poll”, etc. Unfortunately, the tagname “lj” was used back before anyone thought things through, so it’s now tied to be a journal link, which almost works: when I talk about <lj user=“evan”> I refer to “the livejournal identified by ‘evan’”, and the same with communities. Really, following my criteria above, the username should really be in the content of the tag, too, but it’s a little too late now. If I were to design it again, it’d probably something like: <lj-link type=“user” site=“livejournal.com”>solri</lj-link> and have the “type” and “site” default to those values so you normally won’t have to type them. But that’s still a pain to type... *shrug*
no subject
Date: 2003-05-21 02:50 pm (UTC)no subject
Date: 2003-05-22 04:58 am (UTC)no subject
Date: 2003-05-21 03:51 pm (UTC)no subject
Date: 2003-05-21 03:56 pm (UTC)be nice if they'd standardize the tags with "-" or no "-", wouldn't it?
no subject
Date: 2003-05-21 06:36 pm (UTC)the name of a tag cannot have an attribute assigned to it, so named attributes must be separate from the tag in xml/html.
so these would be legal:
<lj-user username="foo">
<lj-user>foo</lj-user>
and were avoided only because they're annoying to type.
(these, on the other hand, are not legal:
<lj-user="foo">
<lj-cut="bar">)
the other commonly-suggested option, overloading the "lj" tag to have multiple meanings, like this:
<lj user="foo"> <lj cut="bar">
is very confusing and contrary to how tags works anywhere else.
no subject
Date: 2003-06-03 06:47 am (UTC)(I'm not correcting the original post, as it would make the comments meaningless)
no subject
Date: 2003-06-03 10:21 am (UTC)The difference is pretty subtle and I don’t think everyone agrees on it, but basically you have two places you can stick data into a tag: an attribute (<tag attr=“attribute”>) or the content of the tag (<tag>content</tag>). So no matter what we either have to type two words (“tag attr” in the first case) or one word twice (the second).
In both cases the tag name itself is what defines the tag, and (in theory) if you stripped all the attributes out of a tag it would still carry its essence. (For example, if you stripped the “href” off of HTML “a” tags, you’d still have all of your <a>links highlighted</a>; they just wouldn’t go anywhere.) This is why standardizing on a hyphen-free tag set won’t work: what does an “lj” tag represent? A user, a poll, a cut, ...
(The other criteria I’ve seen is that if you stripped off all tags and attributes from a document, the remaining content should still be sorta readable; again, in the HTML case, you can still read the essay even if all of the helpful <a href=“nolongerhere”>links</a> are removed.)
So everywhere else I think the plan is to name tags like “lj-cut”, “lj-poll”, etc. Unfortunately, the tagname “lj” was used back before anyone thought things through, so it’s now tied to be a journal link, which almost works: when I talk about <lj user=“evan”> I refer to “the livejournal identified by ‘evan’”, and the same with communities. Really, following my criteria above, the username should really be in the content of the tag, too, but it’s a little too late now. If I were to design it again, it’d probably something like:
<lj-link type=“user” site=“livejournal.com”>solri</lj-link>
and have the “type” and “site” default to those values so you normally won’t have to type them.
But that’s still a pain to type... *shrug*
no subject
Date: 2003-06-03 10:39 am (UTC)