Death To The Div
russellheimlich.com
russellheimlich.com
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:question="http://www.my.unique/ns/question">
...
I love being able to use pure SVG markup in XHMTML just by having it in a separate namespace (of course, there is trouble in IE land ...) <question:required>
<question:text>
Would you recommend us to a friend?
</question:text>
<answer:choice>
<input type="radio" value="Yes">
</answer:choice>
<answer:trigger>
<input type="radio" value="No">
</answer:trigger>
<question:subquestion question:trigger="No">
Please explain why you wouldn't recommend us:
...
</question:subquestion>
</question:required>
I then used jQuery to bind events to the newly created tags to hide/display subquestions based on the response, and css to style it.I'm not of the pro-XHTML side, but it will be interesting to see what happens after HTML 5. XHTML attempted to solve, or at least provide a stop-gap to, a lot of problems that may not go away as easily as we hope.
<article> and <section> are nearly identical with no reason for both to exists (the only difference is that only <article> can have a pubdate attribute)
However, one needs to remember the reasons for the pushback that XML and XHTML got in the web developer/designer community: The SGML based HTML allows all these nice quirks through the SGML declaration and DTD. There it is defined that tags are case insensitive, BR is always empty, you don't need to close TD and P etc...
XML on the other hand has this stric notion of well-formedness where you can parse any well-formed document without a DTD or schema. This is what allows you to more easily invent your own tags and attach a style to them.
Thus, with sticking with an SGML based language, HTML made a decision to make the authoring of the core language more convenient while sacrificing some of the benefits that XML would have had. It's a design decision and it has been debated a lot already. It's just something people should keep in mind.
This would make it a lot easier to edit pages with tricky navigation divs. It would help in many other places too.
I always thought that was (on of) the point of css, with display essentially defining what a tag was.
[edit]^ beaten by the few minutes it took me to log in! Great minds et al.
https://bugzilla.mozilla.org/show_bug.cgi?id=98168
The bug was opened almost exactly 8 years ago. All other major browsers support XSLT quite nicely.
I understand that it is a dtd, but can't you create any element you want and define it's behaviour in a dtd? I'm still just getting into the research on this.
Also, as others have mentioned, having made-up tags littered throughout a site's HTML would lead to two problems:
- For people learning HTML, you'd have no idea what tags are real and which are make-believe
- It would be hard to update the HTML standard in the future without breaking a bunch of sites
Both of those are serious problems from my POV.
I'm not sure that I see the value of just being able to define whatever tags you want, though. Sounds like a recipe for disaster to me.
Wouldn't a nice view-source mechanism with syntax and, perhaps, block highlighting, suffice?
Wouldn't it also be nice to have it pretty-print the HTML and JavaScript of the page upon request?
Updating HTML standard: That's what the doctype could be for, for introducing new tags and functionality without breaking the old. Atleast that is what the doctype should be used for.