RE: DISelect and the media attribute

Hi Jose,

The reasoning was that XSLT already defined {} as the syntax wrapper for AVT and we simply adopted it.

This is one of the things that we might revisit in a new revision of DISelect that used different expression languages. For the current spec, it's completely consistent, but I agree that for different expression languages, the tradeoffs are different.

Best wishes
Rhys

-----Original Message-----
From: jmcf@tid.es [mailto:jmcf@tid.es] 
Sent: 20 October 2006 09:06
To: Rhys.Lewis@volantis.com
Cc: www-di@w3.org
Subject: Re: DISelect and the media attribute

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:48:23 UTC