W3C home > Mailing lists > Public > www-di@w3.org > October 2006

RE: DISelect and the media attribute

From: Rhys Lewis <Rhys.Lewis@volantis.com>
Date: Fri, 20 Oct 2006 08:47:32 +0100
To: "Josť Manuel Cantera Fonseca" <jmcf@tid.es> , "www-di@w3.org" <www-di@w3.org>
Message-ID: <20061020084732264.00000003976@v-rhys3>

Hi Jose, 

It is specifically allowed in the full profile of DISelect. Section 7 covers the use of AVTs to set host language attributes. So if your example were, for example, from DIAL, it would be fine. However, you do need the curly brackets to satisfy the AVT syntax, so I think you example would actually need to be:

<style type="text/css" src="mystyle.css" media="{DISelect expression 1}" />
<style type="text/css" src="mystyle2.css" media="{DISelect expression 2}" />
<style type="text/css" src="mystyle4.css" media="{DISelect expression 4}" />

You could of course also code it as 

<style type="text/css" src="mystyle.css" expr="DISelect expression 1" />
<style type="text/css" src="mystyle2.css" expr="DISelect expression 2" />
<style type="text/css" src="mystyle4.css" expr="DISelect expression 4" />

where the expressions evaluate to true or false rather than to some value of media. The <select> element can also be used as you showed.

That's the trouble with flexibility, there are often several ways of achieving things!

Best wishes


-----Original Message-----
From: www-di-request@w3.org [mailto:www-di-request@w3.org] On Behalf Of Josť Manuel Cantera Fonseca
Sent: 20 October 2006 08:07
To: www-di@w3.org
Subject: DISelect and the media attribute


Is this is allowed?

<style type="text/css" src="mystyle.css" media="DISelect expression 1" />
<style type="text/css" src="mystyle2.css" media="DISelect expression 2" />
<style type="text/css" src="mystyle4.css" media="DISelect expression 4" />

Or is it a better practice to put:

  <sel:when expr="">
	<style type="text/css" src="mystyle.css" />
  <sel:when expr="">
	<style type="text/css" src="mystyle2.css" />
    <style type="text/css" src="mystyle4.css" />


Thanks for your responses
Received on Friday, 20 October 2006 07:46:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:54:25 UTC