Re: What are the benefits of the stylingHooks?

From: Ryan Lee <>
Date: Fri, 20 May 2005 11:45:59 -0400

Chris Bizer wrote:
> Hi,
> I was thinking about the stylingHooks in the lenses and wondering what their
> benefits are.

Apparently it was a very bad choice on my part to express 'special
token' by making it look like a qname. fresnel:property, etc. is not a
valid CSS selector because the ':' character has special meaning. To
advance this discussion, try to forget I wrote those examples after this

> And a general intermediate tree as Emmanuel originally proposed plus an
> additional root element:
> <intermediate:root>
> <foaf:Person uri="foo:EP">
> <foaf:firstName label="Firstname">
> Emmanuel
> </foaf:firstName>
> <foaf:surname label="Surname">
> Pietriga
> </foaf:surname>
> <foaf:depiction uri="" />
> </foaf:Person>
> </intermediate:root>
> I think we could express the same CSS selectors without having custom
> stylingHooks. See below:

The CSS selectors below are invalid for reasons stated above, and it's
the precise reason we need to allow a custom hook.

>>>I'm pretty sure a CSS selector could be written to cover interesting
>>>cases using what's here:
>>>- style a person:
>>> .person
> intermediate:root foaf:person
> as a replacement of the .person hook
>>>- a person's properties
>>> .person .fresnel:property
> intermediate:root foaf:person fresnel:property
>>>- properties' values
>>> .person .fresnel:property .fresnel:value
>>>- friend:
>>> .person .friend
> intermediate:root foaf:person foaf:knows foaf:person
> as a replacement for the friend hook.
>>>- foaf:know's label's value:
>>> .person .knows .fresnel:label
>>>- foaf:know's value's label:
>>> .person .knows .fresnel:value .fresnel:label
> I think this would be an even easier solution with a similar expressivity
> that the one proposed by Ryan and would keep the lenses free of styling
> information.
> The expressivity of CSS selectors is of course much lower that the
> expressivity of the FSL. But as people start agreeing that we don't want
> expressive styling for now (which I oppose) and that we want to style the
> intermediate tree (which I also oppose), I think we should aim for a really
> simple solution as the one above.

Note that I (retroactively...) claim my CSS style examples were for an
XHTML transformation of the tree, not styling the tree itself.

Chris, your proposal also doesn't allow me to later say something in CSS
like 'put a border around all resources,' something I can do far more
easily when the tree is made up of more general parts, like
inter:resource and inter:property, when I end up transforming it. Based
on the misperception I was perpetuating, I don't think the above is
going to work.

To better ground what I was trying to say the first time:

where foaf.xml is the output of running:

[~/fresnel/trunk]% ./ > examples/foaf.xml

and out.html is the output of running:

[~/fresnel/trunk]% saxon foaf.xml to-xhtml.xsl > out.html

(or some other XSLT transformer besides saxon)

Don't focus too heavily on foaf.xml at this point.

The CSS doesn't rely on any specifics of the data for this example (also
because I didn't implement the style hook feature).

Ryan Lee       
W3C Research Engineer    +1.617.253.5327
Received on Fri May 20 2005 - 15:44:39 EDT

This archive was generated by hypermail 2.3.0 : Thu Aug 09 2012 - 16:40:51 EDT