Re: styling xml with css - copying xml attribute values into CSS attribute values

Thanks, Laurens.
  
  When I wrote:
  
  "This would let me create complete web-pages using a custom tag set  that's particular to the  type of web-page that I'm building."
  
  I meant that XHTML, is not as meaningful to me as a custom tagset. If I  cared about how meaningful it was to others, I could supply an XSLT  script to transform my tagset to less-meaningful XHTML. Or maybe a tool  could map my css and custom-tag file to a new css file + an xhtml file.  But if you could understand css at all, then why not just look at my  original css file?  All css pages require it anyway. 
  
  If machine-readability, accessibility, and automation are concerns, then maybe xml CSS is a good idea. 
  
  Instead of :
  
  my_webpage_header[height]   {height:attr(height,px);}
  
  how about:
  
  <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>
  
  ?
  
  Thanks for your help. Next time I'll read the CSS3 specification more closely.
  
  -Noah

Laurens Holst <lholst@students.cs.uu.nl> wrote:  
Noah Scales schreef:
> To create xml mark-up intended specifically to describe what I want to 
> display,
> I would like to be able to do the following:
>
> xml_element[xml_attribute]    {css_attribute:xml_attribute_value;}

You are looking for the CSS3 attr() function from the CSS3 Values and 
Units working draft:
http://www.w3.org/TR/2005/WD-css3-values-20050726/#attribute

It lets you create rules like this:

my-webpage-header[height] { height: attr(height,px); }

> To get a value from xml into a CSS attribute-value pair, you have to 
> add lots of rows to your CSS file.  If there were a way, within CSS, 
> to specify that an xml value belonging to an attribute of some xml 
> element should be the value of a CSS attribute, that would be great.  
> Let CSS get a url value from an xml attribute's value, and create 
> links that way,  instead of in XHTML. This would let me create 
> complete web-pages using a custom tag set that's particular to the 
> type of web-page that I'm building.

I do not think that’s a good idea, such a website poses 0 value from a 
semantic point of view.

> From my limited expressions of the semantics of my writing, the 
> scripting of what I'm designing for a web browser is best described 
> with a custom tag-set, whether I'm designing knowledge or a graphical 
> display. Using classes with xhtml is a choice to mark-up a graphical 
> display that I design, but it's no fun.
>
> webpage
>
> seems less expressive than
>
> 
webpage

In the contrary, the latter is much much less expressive. Only because I 
know English, I understand what it means. Computers and people that do 
not understand English have no clue whatsoever. That’s why there are 
standards, which say ‘a’ designates a hyperlink, its ‘href’ attribute 
contains the link’s target. 
 in this case is just as 
meaningless as class="breadcrumb", and compared to the first you loose 
all semantics by even (seemingly without reason) changing the attribute 
for the target.

Also, the nice thing about classes (or roles) is that you can state 
subclasses: ‘this is a hyperlink of type breadcrumb’, while your example 
just says ‘this is a breadcrumb’.

So, I think what you want to do is a bad idea. The pages that you create 
that way will not be accessible, not be machine-readable, and will be a 
bother to read and edit for people outside an UA because for every case 
they have to familiarise themselves with a new XML language.


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.





			
---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping 

Received on Sunday, 11 December 2005 20:45:02 UTC