W3C home > Mailing lists > Public > www-style@w3.org > August 2002

Re: WAI: Threat or Menace?

From: Stuart Ballard <sballard@netreach.com>
Date: Wed, 21 Aug 2002 11:04:24 -0400
Message-ID: <3D63ABF8.8000704@netreach.com>
To: Kynn Bartlett <kynn@idyllmtn.com>
CC: Svgdeveloper@aol.com, tbray@textuality.com, www-style@w3.org, www-tag@w3.org

Kynn Bartlett wrote:
> 2.  Another idea might be to require that XML documents be sent
>     with an appropriate style sheet if the XML is intended for
>     display to users (and not merely computer-to-computer
>     communication).
> 3.  Here's yet another idea -- develop some sort of meta-language
>     which can be used to assign meaning to particular elements in
>     arbitrary XML, thereby telling the user agent what the language
>     means.

Seems to me that by combining these two ideas, the problem can be solved 
*today* (at least if you're willing to disregard all but the very newest 
browsers - in the near-ish future, at least, if you aren't).

My thought is that the best way to "assign meaning to particular 
elements in arbitrary XML" is to use XSLT to transform those elements to 
another language which already carries such meaning. Such as (gasp) XHTML!

In other words, send generic XML by all means, and put as much 
(domain-specific and therefore unknowable to the browser) semantic 
content in it as possible. But accompany it with an XSLT stylesheet that 
transforms it into XHTML using XHTML's slightly lower-level semantics.

For example, your XSLT could transform this:

   <album name="Ray Of Light">
     <song name="Ray Of Light" released="true">
       <release date="2001-xx-xx" />

Into this:

<h1 class="singer">Madonna</h1>
<h2 class="album">Ray of Light</h2>
<h3 class="song">Ray of Light</h3>
<p class="released-on">Released on <span class="date">xx Xxxxx 
<h4 class="subhead">Lyrics</h4>
<blockquote class="verse">...</blockquote>
<blockquote class="chorus">...</blockquote>

(along with the <html><head>... stuff of course).

Now the higher-level semantics "this is a singer" are not lost, and a 
smart client (eg an MP3 player?) can read the original XML directly. But 
a "dumb" client like a web browser still gets access to the lower-level 
semantics "this is a headline, this is a lower-level headline, this is a 
longish quoted section of something". Further, the XHTML can include its 
own CSS stylesheet to indicate a suggested rendition for traditional 
graphical browsers, without compromising the capability of 
accessibility-browsers to ignore the stylesheet and render headings in a 
way that's useful for that specific device. If the author is 
particularly interested in certain accessibility markets, CSS 
stylesheets for aural and/or braille representation can also be 
included, but these aren't necessary because the aural or braille 
browser has default stylesheets for XHTML that will do the job (contrast 
to the "require all arbitrary XML to be sent with a CSS stylesheet" 
position, where all arbitrary XML must include stylesheets for *all* 
media if it is to be accessible).

In the future, it's possible that XML vocabularies with higher levels of 
well-understood semantics will become widely distributed, so that you 
can say "this is a credit card number, this is a date, this is a name" 
etc. When that happens, the same trick can be used - use XSLT to 
transform from the domain-specific semantics to the lower-level 
publically-understood semantics. And for legacy browsers, XSLT can also 
further translate these down to the still-lower level of semantics 
implicit in XHTML.


Stuart Ballard, Programmer
NetReach - Internet Solutions
(215) 283-2300, ext. 126
Received on Wednesday, 21 August 2002 11:04:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:03 UTC