Re: Considerations on RDF presentation

From: Stefano Mazzocchi <stefanom_at_mit.edu>
Date: Mon, 21 Mar 2005 11:49:44 -0500

Chris Bizer wrote:
> Hi,
>
> I'm starting to like Stefano's idea of getting rid of the style vocabulary.
> Let's make my conversion process public and answer the questions I
> raised yesterday :-)

Awesome!

> We could have lenses that do selection and some basic styling:
>
> :personsKnowsLens rdf:type fresnel:Lens ;
> rdfs:label "Displays persons together with people they
> know."_at_en^^dtype:string <mailto:"Displays persons together with people
> they know."_at_en^^dtype:string> ;
> fresnel:lensDomain foaf:Person ;
> fresnel:showProperties ( foaf:name
> [ fresnel:property foaf:depiction ;
> fresnel:label fresnel:none ;
> fresnel:value fresnel:image ]
> [ fresnel:property foaf:homepage ;
> fresnel:label "Homepages of the guy: ";
> fresnel:value fresnel:uri ]
> [ rdf:type fresnel:PropertyDetails ;
> fresnel:property foaf:knows ;
> fresnel:label "He knows the following
> people: ";
> fresnel:sortValues fresnel:asc ;
> fresnel:sublens :FOAFPersonDefaultLens ] ) .
>
>
> This lens could produce an XML tree like this:
>
> <fresnel:container>
> <foaf:person uri=ex:stefano>
> <fresnel:property>
> <foaf:name>
> <fresnel:label>Name: </fresnel:label>
> <fresnel:value>Stefano</fresnel:value>
> </foaf:name>
> <foaf:depict>
> <fresnel:value>
>
> <fresnel:image>http://idontknow.org/image.gif</fresnel:image>
> <fresnel:value>
> </foaf:depict>
> <foaf:homepage>
> <fresnel:label>Homepages of the guy: </fresnel:label>
>
> <fresnel:value><fresnel:uri>http://idontknow.org</fresnel:uri></fresnel:value>
>
> <fresnel:value><fresnel:uri>http://idontknow.org</fresnel:uri></fresnel:value>
> <foaf:homepage>
> <fresnel:property>
> </foaf:person>
> </fresnel:container>
>
> Which could be styled using CSS and relying heavyly on child element
> selectors:
>
> fresnel:container {background-color: white}
> foaf:person {border-top-style: solid }
> foaf:person > fresnel:property > foaf:depict > fresnel:value >
> fresnel:image {border: thick silver solid }
> foaf:homepage > fresnel:label {font-weight: bold }
> foaf:homepage > fresnel:value:after {content: "," }
>
> When the tree is finally rendered to different output formats like HTML
> or SVG, the renderer would have to replace <fresnel:image> or
> <fresnel:uri> with the appropriate tags from the output language. e.g.
> <img>. He might also want to adjust the CSS selectors abouve to the CSS
> class names, which he uses in the output.
>
> Stefano: Is the above the direction into which you were thinking?

Yes, exactly!

Two things, though, that I didn't realize: first of all CSS selectors
have no notion of namespaces. there was a proposal in 1999, but is still
as a working draft, so I'm really not sure that fresnel:value:after
would work.

Second, the above feels still a little too much RDFish for my XML
tastes, there might be a way to make it look a little less verbose and
yet as expressive (maybe using some attributes... not sure really, but I
have that gut feeling that we can do more about this).

> If not please correct me. Looks like we are inventing some nice use
> cases for Cocoon ;-)

This was definately a driver, yes. I thought about integrating fresnel
capabilities into Cocoon and it triggered me to think back about some of
our decisions.

> Advantages:
> - Less terms in Fresnel.
> - Better integration into the XML would (XSLT,Cocoon)
> - Reuse of CSS selectors and classic CSS stylesheets.

yes, but with the problem that CSS2 selectors have no notion of
namespaces and CSS3 namespace aware selection is not yet recommended
(nor supported by anybody).

> Disadvantages
> - Less expressive.

Why is it less expressive? not trying to be dense, just curious.

> - blurres the distinction between selection and styling (by having label
> and image in the lens)

True, although HTML suffers the same problem and we can't really say
HTML was a failure, can we? ;-)

No, seriously, maybe there is a way to fix that, let me think about it.

-- 
Stefano Mazzocchi
Research Scientist                 Digital Libraries Research Group
Massachusetts Institute of Technology            location: E25-131C
77 Massachusetts Ave                   telephone: +1 (617) 253-1096
Cambridge, MA  02139-4307              email: stefanom at mit . edu
-------------------------------------------------------------------
Received on Mon Mar 21 2005 - 16:48:16 EST

This archive was generated by hypermail 2.3.0 : Thu Aug 09 2012 - 16:39:17 EDT