XML News from Thursday, May 5, 2005

The W3C Device Independence Working Group has posted the last call working draft of Content Selection for Device Independence (DISelect) 1.0. According to the abstract, "This document specifies a syntax and processing model for general purpose content selection or filtering. Selection involves conditional processing of various parts of an XML information set according to the results of the evaluation of expressions. Using this mechanism some parts of the information set can be selected for further processing and others can be suppressed. The specification of the parts of the infoset affected and the expressions that govern processing is by means of XML-friendly syntax. This includes elements, attributes and XPath expressions. This document specifies how these components work together to provide general purpose selection."

That sounds unobjectionable, but what the working group is really proposing is XML markup that can be added to a page to indicate which devices certain content is appropriate for. For example, this sel:if element says that the image should only be displayed if the user's device supports color or has a window size wider than 500 pixels.

<div sel:expr="dc:cssmq-width('px') &gt; 500" 
    & dc:cssmq-color() > 0" >
  <object src="picture.png"/>
</div>

This feels more than a little like presentation based markup. This is very much like using JavaScript or server side programs to identify different browsers and send them content tailored specifically to them. This syntax is definitely easier-to-use, and more powerful than the various JavaScript and server-side hacks people use today; but should we be doing this at all? Wahtever happened to the vision of sending browsers XML documents with appropriate stylesheets and letting the client decide how to best present it? The thing that bothers me the most about this proposal is that the syntax mixes the presentation information straight into the document, rather than linking to it from a separate hints sheet. In many ways, this document seems to reflect a belief that the the W3C has been going down the wrong road for the last eight years in attempting to separate content from presentation.