Re: What are the benefits of the stylingHooks?

From: Chris Bizer <chris_at_bizer.de>
Date: Sat, 21 May 2005 09:51:37 +0100

Hi Ryan,

> http://simile.mit.edu/repository/fresnel/trunk/examples/output/
> to-xhtml.xsl
> style.css
> foaf.xml
> out.html
>

Nice to see a first running example :-)

I think that this is exactly the procedure browsers that are not interested
in the CSS styling part of Fresnel should use:
Take the intermediate tree, transform it into the target output format, use
a classic CSS stylesheet on the output.

But it isn't a way to express CSS styling information *inside* Fresnel. See
below.

----- Original Message -----
From: "Ryan Lee" <ryanlee_at_w3.org>
To: <fresnel-dev_at_simile.mit.edu>
Sent: Friday, May 20, 2005 4:45 PM
Subject: Re: What are the benefits of the stylingHooks?


> 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
> message...
>

If I forget about the CSS selectors then I don't see a way to use styling
hooks to express that this CSS class should be used for a label and another
one for the value. Or do I miss something?

> > 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="http://example.org/id.jpg" />
> > </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.
>

OK, but the problem of distinguishing between hooks for resources,
properties, labels and values in the lenses still remains. Or?

> >>>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,

OK great, I also prefer a tree of general parts.

Chris

> 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:
>
> http://simile.mit.edu/repository/fresnel/trunk/examples/output/
> to-xhtml.xsl
> style.css
> foaf.xml
> out.html
>
> where foaf.xml is the output of running:
>
> [~/fresnel/trunk]% ./fresnel.sh
>
http://simile.mit.edu/repository/fresnel/trunk/examples/foaf-example-fresnel
-simple-core-and-lens-group.n3
> http://simile.mit.edu/repository/ontologies/official/foaf.owl
> http://ryanlee.org/foaf.rdf > 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 ryanlee_at_w3.org
> W3C Research Engineer +1.617.253.5327
> http://simile.mit.edu/
Received on Sat May 21 2005 - 07:51:11 EDT

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