Re: [Selectors], XSLT, and a browser's internal view of an xml document

On Thu, 02 Feb 2006 01:27:06 +0100, Noah Scales <noahjscales@yahoo.com>  
wrote:
>> Actually, XSLT changes the DOM and therefore the
>> semantics of the  document... From what I understand
>> of STTS it would not do such a thing.
>
> OK. It's confusing for me to properly relate the
> following:
>
> [snip]
>
> Sorry, and thank you for your patient reply.

To what question?


>> (CSS declarations can appear inside style=""
>> attribute constructs. Such a  style="" attribute is
>> available in various markup languages, including
>> XHTML and SVG.)
>
> In CSS3, if you want to specify multiple inline
> attributes inside arbitrary XML, you have to use
> separate attributes and then separate selectors for
> each.
>
> So
>
> foo[width] {width:attr(width,px);}
> foo[height] {height:attr(height,em);}
> <foo width="100" height="200">bar bar</foo>
>
> versus
>
> <foo css:style="width:100px;height:200em;">bar
> bar</foo>
>
> So a css:style attribute is convenient. A css:class
> attribute would help mark-up authors who want to embed
> CSS rules in a document.

It depends. Mixing style and presentation is not really what you would  
want in the first place.


>> How exactly would an XML version of Selectors be
>> different from the current Selectors draft? There is
>> at least one XBL proposal (as pointed out
>> previously) > that uses Selectors to select elements
>> in an XML
>> tree. No modifications necessary.
>>
>
> Well, you might remember something similar:
>
> <style xmlns:css="http://www.w3.org/now-css-xml">
> <css:selector="my_webpage_header[@height]">
> <css:height value="attr(height,px)" />
> </css:selector>
> </style>
>
> Or maybe
>
> <css:style xmlns:css="http://www.w3.org/now-css-xml">
> <css:rule selector="foo">
> <css:height value="attr(foos-height,px)" />
> </css:rule>
> <css:rule selector="bar"
> value="{width:attr(foos-width,px);color:green;}" />
> <css:style>
>
> The advantages of CSS-XML are subjective to (and
> perhaps misunderstood by) me. Perhaps the advantages
> include:
>
> [snip]
>
> I made a similar presentation last month. Perhaps I've
> have taken this as far as it can go.  Thank you for
> your time.

I don't think CSS as currently designed, implemented and used fits really  
well in some tree-based language. It is not really clear to me what point  
you're trying to make.

Also, the examples you gave still show the need for some kind of CSS  
parser, the order of elements is significant and the syntax (with  
namespaces and all) is horrible.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Saturday, 4 February 2006 16:18:49 UTC