Christian Montoya wrote:
On 12/3/05, Lachlan Hunt <[EMAIL PROTECTED]> wrote:
Be aware that an XML 1.0 parser that was not built for XML 1.1 as well,
will fail with a well-formedness error if version="1.1" is encountered
in the declaration. For XML 1.0, the XML declaration is optional.
Wait, so you are saying that I could serve application/xhtml+xml to
modern browsers without the xml declaration? What about declaring the
stylesheets in xml declarations at the top of the document? I thought
that was required.
There is a difference between the XML declaration and other processing
instructions, although they do look similar as they begin with <? and
end with ?>, but their similarities end there.
For XHTML, the xml-stylesheet PI you're referring to:
<?xml-stylesheet href="foo.css" type="text/css" ... ?>
is only useful for a generic XML user agent that is not aware of the
XHTML NS, and thus doesn't recognise the style element or a link element
that refers to a stylesheet. In which case, the UA won't even have a
default UA stylesheet for it and your styles designed for (X)HTML with
such a stylesheet in mind, may not look any good under such conditions
anyway.
Such a UA probably wouldn't recognise the ID attribute as being of type
ID (unless it read the DTD), in which case the example [1] given in
Appendix C is quite useless. It might have a better chance if xml:id
were used instead, but would still require an xml:id implementation.
[1] http://www.w3.org/TR/xhtml1/#C_14
--
Lachlan Hunt
http://lachy.id.au/
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************