W3C home > Mailing lists > Public > www-style@w3.org > November 2007

Re: [CSS3] Generated content: environment variables

From: David Dorward <david@dorward.me.uk>
Date: Fri, 2 Nov 2007 10:25:39 +0000
Message-Id: <086F0DDA-E311-4DEF-B341-D5EE1C3632C9@dorward.me.uk>
To: www-style@w3.org

On 2 Nov 2007, at 10:14, Gabriele Romanato wrote:
> The case scenario of using Javascript or other languages to achieve  
> this goal.

The ability to do something with one technology doesn't indicate a  
need for another technology to be able to do the same thing.

> Imagine this case: an author have to write 100 pages with a  
> breadcrumb section in each page.

Typically, a breadcrumb section should be an ordered list of links to  
either the pages the user has just visited, or (more commonly) each  
page that is higher up in the hierarchy than the current page (with  
the titles of those pages being the link text).

Your proposal doesn't appear to address that use case at all. Neither  
the date, time nor URL of the current page are displayed in any set  
of breadcrumbs I've ever seen.

I can't see how any form of CSS environment variables could get the  
titles of other documents, nor work out which pages should be linked to.

> Yes, an author could also use a server-side script to achieve this  
> goal, but with an extra work, both for the server and the client.

As I mentioned, I don't think that this is possible to achieve client  
side[1]. It would be work for the server, but it is a relatively  
trivial task given a half decent CMS and a site organised as a  
hierarchy. Parsing HTML in a document and applying CSS to it would, I  
suspect, be rather less work then trying to generate content from CSS.




[1] OK, it is possible, just insanely inefficient. You could, if the  
URI structure of the site was set up to aid you, get the current URI  
from document.location, remove the query string, split in slash  
characters, fetch every directory index with XMLHttpRequest, and read  
their titles, then generate the list using that. I wouldn't want to  
use that on a live site though, it would be slow and bandwidth hungry.

-- 
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
Received on Friday, 2 November 2007 10:25:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:56 GMT