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

Re: DISelect and the media attribute

From: José Manuel Cantera Fonseca <jmcf@tid.es>
Date: Fri, 20 Oct 2006 10:06:28 +0200
To: "Rhys.Lewis@volantis.com" <Rhys.Lewis@volantis.com>
Cc: "www-di@w3.org" <www-di@w3.org>
Message-id: <45388384.2040008@tid.es>

Thanks Rhys, for your quick response. 

Taking into account that different expression languages can be together 
in authoring unit, wouldn't it be better to define a more specific 
syntax for the expressions?

For example JSP 2.0 E.L. expressions are ${a.b > 5}.

DISelect expressions could be

diselect{<expression>}

Or, as DISelect are XPATH expressions, wouldn't it be better that the 
expressions were as

xpath{<DISelectExpression>}

Defining the expressions with a prefix will make the specification more 
extensible and could even incoporate in a future other E.L.s

What do you think?

Rhys Lewis escribió:
> 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 08:06:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 20 October 2006 08:06:19 GMT