RE: DISelect and the media attribute

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

Rhys

-----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


Hi,

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:select>
  <sel:when expr="">
	<style type="text/css" src="mystyle.css" />
  </sel:when>
  <sel:when expr="">
	<style type="text/css" src="mystyle2.css" />
  </sel:when>
  <sel:otherwise>
    <style type="text/css" src="mystyle4.css" />
  </sel:otherwise>
</sel:select>

?

Thanks for your responses

Received on Friday, 20 October 2006 07:46:17 UTC