XHTML 2.0: Scope of xml:base? Inconsistent type attribute and more

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello dear HTML editors, dear mailing list members,


first of all: I give this review to try to make an already exceptionally good 
thing even slightly better.
I already like XHTML 2.0 very much today. It's editors have done a great job. 
Thank you, dear editors.


Short version:

1. Think about making the type attribute inherited perhaps maybe... (just an 
idea, probably a bad one)

2. Please state more clearly that the scope of xml:base is all URI attributes, 
not just href. The example given could be misleading.

3. What about solving the inconsistency of the type attribute by splitting it 
into two: srctype and hreftype, thus again allowing for specifying both?
Useful example:
<a href="doc.dvi" src="/gfx/dvi" srctype="image/svg,image/png;q=0.5" 
hreftype="application/x-dvi">DVI</a>

4. When using a graphic in the src attribute, where should the text readable 
on the graphic go - in the title attribute or in the element content?
Example:
The document as <a href="doc.dvi" src="/gfx/dvi" title="DVI" />
or
The document as <a href="doc.dvi" src="/gfx/dvi">DVI</a>

5. Since a stylesheet is a somewhat integral part of a document, like an 
image, is it really a good idea to use a href attribute to refer to it?
Basically, one could say, all src-URIs need to be loaded as part of the 
document, all href-URIs are referred documents not needed. The stylesheet is 
an ugly exception from that rule. Then again, there are alternate stylesheets 
to consider, not speaking of the stylesheet PI ...

6. The usage of the xml:lang attribute as shown in Chapter 12.1.3 violates its 
original definition given in the XML recommendation. Additionally it is 
ambiguous, not clearly defined and causes problems for voice / speech. 
Therefor I demand a seperate attribute to denote the language of URI targets, 
called hreflang.


Summary of changes I suggest:
* rename the type attribute from the embedding attribute collection to 
srcttype
* add a hreftype attribute to the hypertext attribute collection
* add a hreflang attribute to the hypertext attribute collection
* more clearly state that the xml:base attribute affects all URIs, not just 
hrefs
* A stylesheet might better be referred to with <link src=""/> instead of 
<link href=""/> since it is somehow part of the document, like graphics, and 
not a linked resource for user purposes as with <a href=""/> or <link 
rel="next chapter" href=""/>.
* When talking about linked stylesheets, also talk about <?xml-stylesheet ... 
?>
* change the content model of link to (PCDATA | Inline)*
* An example to refer to the same document in a different language (Chapter 
12.1.3) should look like this:
<head>
<title>The manual in English</title>
<link rel="alternate" hreflang="de" 
href="http://example.com/manual/german"><span xml:lang="de">Das Handbuch auf 
Deutsch</span><span xml:lang="en">The manual in German</span></link>
<link rel="alternate" hreflang="fr" 
href="http://example.com/manual/french"><span xml:lang="fr">La documentation 
en Fran&ccedil;ais</span><span xml:lang="en">The manual in 
French</span></link>
<!-- ... -->
</head>
If not, at least keep in mind that the value of the xml:lang attribute also 
affects the language interpretation of the title attribute, which is 
important in speech browsers.




Long version:


1. Is the type attribute inherited, like xml:base, so in the example given 
below the type attribute would need to be specified only once with the nl 
element instead of with every child of nl?

<nl xmlns="http://www.w3.org/2002/06/xhtml2" xml:lang="en" class="left 
navigationbar" xml:base="/gfx/buttons">
<label src="toc" 
type="image/svg,image/png;q=0.9,image/jpeg;q=0.8">Contents</label>
<li href="/" rel="Start" src="home" 
type="image/svg,image/png;q=0.9,image/jpeg;q=0.8">Home</li>
<li href="/toc" rel="Contents" src="contents" 
type="image/svg,image/png;q=0.9,image/jpeg;q=0.8">Long table of contents</li>
<li href="/chapter" rel="ch01" src="ch01" 
type="image/svg,image/png;q=0.9,image/jpeg;q=0.8">Dudley Demented</li>
<li href="/chapter" rel="ch02" src="ch02" 
type="image/svg,image/png;q=0.9,image/jpeg;q=0.8">A Peck of Owls</li>
<!-- ... -->
<li href="/copyright" rel="Copyright" src="copyright" 
type="image/svg,image/png;q=0.9,image/jpeg;q=0.8">Copyright</li>
</nl>
(Thanks to J.K.Rowling for her great book Harry Potter and the Order of the 
Phoenix, where I borrowed the chapter titles from)


2. What is the scope of xml:base? Will it only set the base for the href 
attribute or the base for all attributes of type URI?
Currently, reading the description of xml:base and from it's nature I'd say 
yes.
So in the above example, all images are searched in /gfx/buttons/...
But to make sure that implementors don't skip this important part, I suggest 
to add some non-href URI attributes to the example describing the xml:base 
attribute. Add some cite and src attributes in the example.
(Having different bases, e.g. one for src and one for href, would be nice, 
too... ;-)

3. The type attribute is in fact inconsistent. And it lacks an important 
feature.
In XHTML 1.1 and earlier versions, it was possible to use:
The document as <a href="doc.pdf" type="application/x-pdf">PDF</a>, <a 
href="doc.dvi" type="application/x-dvi">DVI</a>, <a href="doc.ps" 
type="application/postscript">PostScript</a>.
I liked this. Though most user agents do not use this informations, but, alas, 
don't we all know how many of the current user agents behave regarding 
standards compliance and accessibility...

So in most cases, in XHTML 2.0, the type attribute shall describe the MIME 
Content-Type for the URI reference denoted by the src attribute and sometimes 
that denoted by the href attribute. That's really inconsistent.
What aobut this:
Use two attributes, a srctype attribute and a hreftype attribute.
Then I could write:
The document as <a href="doc.dvi" src="/gfx/dvi" 
srctype="image/svg,image/png;q=0.5" hreftype="application/x-dvi" 
title="DVI">DVI</a>.
What about this?


4. Redundant title and alternate content - what to use?
When using <a src="/gfx/dvi.png" href="doc.dvi"/>, should the title attribute 
or the element content or both carry the text displayed on the graphics file?
I suggest that the recommendation makes a clear statement about this, 
otherwise web authors for sure will debate over this ad infinitum.
Example:
The document as <a href="doc.dvi" src="/gfx/dvi" title="DVI">DVI</a>

I'd say, use the element content for the graphic's text and the title for 
additive descriptive information, e.g.:
Download the document in a format of your choice: as <a href="doc.dvi" 
src="/gfx/dvi" title="Use this link to download the document in DVI 
format">DVI</a>, <a href="doc.ps" src="/gfx/ps" title="Use this link to 
download the document in PostScript format">PostScript</a> or <a 
href="doc.pdf" src="/gfx/pdf" title="Use this link to download the document 
in PDF format">PDF</a>.

But then again, look at the <link/> element.
Currently, it would be used like this:
<link rel="Previous Chapter" href="ch01" title="Dudley Demented" />
<link rel="Next Chapter" href="ch03" title="The Advance Guard" />
According to the rule stated above, it should be changed to:
<link rel="Previous Chapter" href="ch01">Dudley Demented</link>
<link rel="Next Chapter" href="ch03">The Advance Guard</link>
Which is a change I'd really anticipate. It would allow for icons and more to 
be assigned to links, if the content model of link would be changed to 
(PCDATA|Inline)*:
<link rel="Previous Chapter" href="ch01"><span src="back.png"/>Dudley 
Demented</link>


5. Since a stylesheet is a somewhat integral part of a document, like an 
image, is it really a good idea to use a href attribute to refer to it?
Basically, one could say, all src-URIs are intended to be loaded as part of 
the document, all href-URIs are referred documents are intended to be loaded 
on the user's behalf only. The stylesheet is an ugly exception from that 
rule.
I demand using the src attribute for external style sheets, if using the link 
element at all - for XHTML, I'd prefer the stylesheet processing instruction.


6. Links to different languages (Chapter 12.1.3, xml:lang attribute)
The XML recommendation clearly defines the scope of the xml:lang attribute: 
all attributes and children of the element it occurs on unless overridden for 
a nested element by a new xml:lang attribute.
Chapter 12.1.3 violates this.
I demand a seperate hreflang attribute as used with previous versions of HTML.
Modified Example from Chapter 12.1.3, 
http://www.w3.org/TR/xhtml2/mod-link.html#sec_12.1.3.
<link title="The manual in German"
      rel="alternate"
      xml:lang="de" 
      href="http://example.com/manual/german.html"/>
The above example suggests using xml:lang="de" to denote that the link target 
is in German.
The XML recommendation clearly defines that the xml:lang attribute scopes on 
all attributes and all children of the element it occurs on. So if a user 
agent follows the XML recommendation, it will use it's German speech module 
to speak the English text of the title attribute, resulting in some aural 
nonsense.
Additionally, it will need to interpret the xml:lang attribute in a special 
way not covered by its original XML implementation to give user feedback 
about the link target's language.
I demand changing the above example to:
<head>
<title>The manual in English</title>
<link rel="alternate" hreflang="de" 
href="http://example.com/manual/german"><span xml:lang="de">Das Handbuch auf 
Deutsch</span><span xml:lang="en">The manual in German</span></link>
<!-- ... -->
</head>
and modify the spec accordingly.
Also, the existing example uses a non-existent lang attribute in it's french 
language example.
The hreflang attribute should become part of the hypertext attribute 
collection.


Greetings

Christian
- --
ITCQIS GmbH
Christian Wolfgang Hujer
Geschäftsführender Gesellschafter (Shareholding CEO)
Telefon: +49  (0)89  27 37 04 37
Telefax: +49  (0)89  27 37 04 39
E-Mail: Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/ab+/zu6h7O/MKZkRArJ0AKDZywE0jG6hunYTN3uqOZB1p96nqACgyqTl
9b3F5OwHJwHCUuaq+zZeq8k=
=Zz7s
-----END PGP SIGNATURE-----

Received on Thursday, 18 September 2003 10:26:20 UTC