Re: proper use of validation icons

"Sean" <sean@mediamice.net> writes:
> XML and XHTML derive from the same Mummy:- SGML (Standard Generalised Markup Language
> ), with HTML(HyperText Markup Language) being the big sister to XML (eXtensible Markup
> Language)and XHTML (eXtensible HyperText Markup Language) being the toddler of the
> family but growing at a rate.

Uh, no.  HTML is an application of SGML, and XHTML 1.1 transitional is
an application of XML with the same (or nearly the same) semantics as
HTML 4.0.

> Basically all are Markup languages (Meta Languages) and the difference
> is that XHTML conforms to what big sister XML tells it to.

Pretty close.

> HTML <img src=”mypic.png” alt=”lookatmypic”><br>

If you had used the correct quotes (either " or '), this would have been
a well-formed HTML fragment which conformed to the HTML 4.0 DTD.

> XHTML <img src=”mypic.png” alt=”lookatmypic” /><br />

If you had used the correct quotes (either " or '), this would have been
a well-formed XML document fragment which conformed to the XHTML 1.1 DTD
or schema, assuming that the rest of the fragment was also well-formed
and also conformed to the XHTML 1.1 DTD or schema.

> XML <image>
> <name>lookatmypic</name>
> <image>mypic.png</image>
> <url>http://www.mypics/ target=_blank</url>
> </image>

This is a well-formed XML document fragment which does not conform to
any DTD or schema I'm acquainted with.

It is neither syntactically nor semantically significant to the above
XHTML fragment, nor is it particularly well designed (the content of the
name element is not a name, and the url element apparently contains
denormalized data).  A semantically equivalent XML fragment using only
element and text nodes would look like this:

<img>
  <src>mypic.png</src>
  <alt>lookatmypic</alt>
</img>
<br/>

I don't really see the point, though, since XHTML is valid XML.  When
designing an SGML DTD or an XML DTD or schema, there is always a choice
between expressing information as either attributes or text content
wrapped in child elements; the designers of HTML and XHTML chose to use
attributes for everything that wasn't intended to end up as text on the
page (the only exception being the alt attribute to img elements).

> So using application/XHTML+XML is like teaching a marathon runner to
> Jog.

No, it is telling the recipient that the object is an XML document which
conforms to the XHTML DTD and / or schema.

DES
-- 
Dag-Erling Smørgrav - des@des.no

Received on Tuesday, 30 June 2009 13:52:07 UTC