XML News from Friday, July 27, 2007

The W3C Device Independence Working Group has posted the candidate recommendation of Content Selection Primer 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.

Here's an example from the primer:

       <sel:when expr="eg:getStyleSheetSupport() = 'excellent'">
          <link rel="stylesheet" type="text/css" href="../styles/sensational.css"/>
       <sel:when expr="eg:getStyleSheetSupport() = 'basic'">
          <link rel="stylesheet" type="text/css" href="../styles/mediocre.css"/>


The basic idea is that markup inline in the document will indicate the device classes for which given content is appropriate. Such hints may be necessary and useful, but I'm still skeptical that it really has to be inline. I don't see why it couldn't be part of some kind of external style sheet, much as CSS rules can be attached through external style sheets. I still think this mixes markup and presentation.