Re: Considerations on RDF presentation

From: Chris Bizer <bizer_at_gmx.de>
Date: Mon, 21 Mar 2005 11:10:17 -0500

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 :-)

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 ;
   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?
If not please correct me. Looks like we are inventing some nice use cases for Cocoon ;-)

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

Disadvantages
- Less expressive.
- blurres the distinction between selection and styling (by having label and image in the lens)

Comments?

Chris

----- Original Message -----
From: "Chris Bizer" <bizer_at_gmx.de>
To: <general_at_simile.mit.edu>
Sent: Sunday, March 20, 2005 6:49 PM
Subject: Re: Considerations on RDF presentation


> Hi Stefano,
>
> interesting new ideas.
>
> > I believe the biggest mistake we made was to consider the output of a
> > lens an RDF model (a tree encoded in a graph with explicit names of
> > relationships) instead of thinking of it as an XML model (a tree encoded
> > in a tree-oriented structure with implicit nesting relationships). This
> > creates unnecessary complexity to the 'style' part of fresnel and for no
> > benefit.
>
> You might be right about the mistake. I'm not sure yet.
>
> We definitively don't want implizit relationsships because such a
> transformation would be a information loss.
>
> So basically we are talking about styling a tree like this:
>
> ex:stefano
> rdf:type foaf:Person
> foaf:name "Stefano"
> foaf:depict http://idontknow.org/image.gif
> foaf:homepage http://idontknow.org
> foaf:homepage http://idontknow3.org
> foaf:knows ex:ryan
> rdf:type foaf:Person
> foaf:name "Stefano"
> ex:foaf:depict http://idontknow2.org/image.gif
> foaf:homepage http://idontknow.org
>
> Or a little bit more verbose if expressed in XML, on which we could use CSS
> now.
>
> Questions questions coming to my mind with this approach are:
>
> 1. Is CSS alone expressive enought?
> We are having this PropertyValueStyle vocabulary in Fresnel for saying that
> values of foaf:depict should be retrieved and rendered as an image, video or
> whatever. How could we express this with CSS?
> Would we extend CSS?
>
> 2. Is the CSS selector language expressive enought?
> Currently we can say stuff like "Display be labels of all properties in a
> certain namespace bold" or "Draw a gray frame around all persons that are
> older than 70 years". I guess it would be hard to express this in the CSS
> selector language?
>
> 3. What about labels?
> In order to have proper property labels we would have to mode the labeling
> vocabulary from the styling to the selection part of fresnel, which feels
> wrong: Labels are definitivly style.
>
> Let me try to sketch an XML tree including property labels, in order to see
> if we can style it with CSS.
>
> <foaf:person uri=ex:stefano>
> <foaf:name fresnel:label="Name: ">Stefano</foaf:name>
> <foaf:depict>http://idontknow.org/image.gif</foaf:depict>
> <foaf:homepage fresnel:label="Person's Homepage:
> ">http://idontknow.org</foaf:depict>
> <foaf:homepage fresnel:label="Person's Homepage:
> ">http://idontknow3.org</foaf:depict>
> </foaf:person>
>
> and than have CSS styles like
>
> foaf:person {border-top-style: solid }
>
> OK. I guess this would work in general. But we are blurring the destinction
> between styling and selection with custom labels like "Person's Homepage: ".
> Might not matter.
>
> Also the CSS selectors are getting tricky.
>
> Can I say in CSS that the second "Person's Homepage:" shouldn't be
> displayed?
> How do I get the comma between the two homepages and the dot at the end?
>
> > But I do advocate that we should aim at a clearer separation between
> > Fresnel and CSS, allowing lenses to be 'classified' and CSS selectors to
> > work on those lenses, instead of using fresnel selectors for selection
> > and embedding CSS instructions in the fresnel model directly as we do
> today.
> >
>
> I don't get what you mean with classified. Why can't we just use the names
> given by the RDF schema as shown above and attach the CSS style to them?
>
> It is an interesting think piece if we should go down the XML path or not.
> Gives us an interesting topic for our meting tomorrow.
>
> Chris
>
> P.S. The first part of your mail is also great input for the paper about
> fresnel ;-)
>
Received on Mon Mar 21 2005 - 16:08:57 EST

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