- From: Reto Bachmann-Gmuer <reto@gmuer.ch>
- Date: Tue, 21 Oct 2003 14:16:00 +0200
- To: leo@gnowsis.com, www-rdf-interest@w3.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Leo Sauermann wrote: (...) | But still I think it would be a good approach to "rebuilt" the existing | XSLT vocabulary and adapt it to the RDF topic. Many developers are used | to the principles behind XSLT, selection and "apply-templates" etc. | It would not be very hard to "restructure" the XSLT stuff and bring the | syntax into a RDF graph model. | | So I identify two goals that may be good for RDFSTYLES: | | 1. Stick closely to the XSLT syntax, use the same words and similiar | structure. Make it that developers have a easy step to RDFSTYLES (...) | some ideas are very close to XSLT: | | style:renderedType => could be <rslt:template | rslt:match="[rdf:type=rdfs:Literal]"> | style:LiteralOutputAction => <rslt:output rslt:value-of="." /> | stlye:TextAction => <rslt:Text><rslt:textvalue>Blabla and also | <xml></rslt:textvalue></rslt:Text> Renaming the properties to be more like XSLT is no problem, I'll do this. I don't like however the idea of having a Literal for type based selections, is there a disadvantage in having a resource? | (...) | | your architecture is very property-focused and actions, I guess. I would have said "resource centered" | | Perhaps shift it more to the XSLT idea of "writing the output document | and inserting the dynamic stuff like with placeholders" This idea contrasts with the type-based template concept which is also implemented in XSLT. In RDF even more XML the type of a value may not be determined. A style written with "<vc:name>Leo Sauermann</vc:name>" in mind, should also reasonably work for "<vc:name><foaf:person>...</foaf:person></vc:name>". In this case a property of ObjectAction could give hints which available Person-Renderer should be chosen to render the foaf:peson (not yet in schema) <style:PropertyTypeAction> <style:renderedPropertyType rdf:resource="http://purl.org/vc/1.0/name"/> <style:propertyActions> <rdf:Seq> <rdf:li> <style:ObjectAction> <style:styleType rdf:resource="http://...#text_inline> <style:styleType rdf:resource="http://...#short> </style:ObjectAction> </rdf:li> </rdf:Seq> </style:propertyActions> </style:renderedPropertyType> </style:PropertyTypeAction> (ok, I see, the Seq and li could be made facultative for one-action PropertyActions) | | In XSLT the whole stream is parsed and divided into <xsl:text> and | <xsl:...> things that are all in a stream, so the processor does "ah, a | text, output; a command, do it". | | In RDF / XSLT this may be: | | <rslt:template rslt:match="<some resouce>"> | <rdf:Seq> I think rdf:Seq should be the value of a property | <rdf:li> | <rslt:Text><rslt:textvalue (ignoreXML)><h1></textvalue></rslt:Text> | </rdf:li> | <rdf:li> | <rslt:Value rslt:match="(. rdfs:label ?)" /> <!-- this XPATH/RDF hack | should return the label, the "?" --> | </rdf:li> should a template be applyed to the label, or should it just be assumed to be litteral and ouputted? | <rdf:li> | <rslt:Text><rslt:textvalue | (ignoreXML)></h1><TABLE></textvalue></rslt:Text> | </rdf:li> | <rdf:li> | <rslt:ApplyTemplates rslt:select="(. http://purl.org/rss/1.0/items | ?)" /> ... here the optional attribute rslt:style could be added to have the resources rendered with the templates of another style | </rdf:li> | <rdf:li> | <rslt:Text><rslt:textvalue | (ignoreXML)></h1></TABLE></textvalue></rslt:Text> | </rdf:li> | </rdf:Seq> | </rslt:template> | | <!-- match all things that are called by applytemplates and have a type | of "rss:item" --> | <rslt:template rslt:match="(? rdf:type http://purl.org/rss/1.0/item)"> | <rdf:Seq> | <rdf:li> | <rslt:Text><rslt:textvalue | (ignoreXML)><tr><td></textvalue></rslt:Text> | </rdf:li> | <rdf:li> | <rslt:Value rslt:match="(. rdfs:label ?)" /> <!-- this XPATH/RDF hack | should return the label, the "?" --> | </rdf:li> | <rdf:li> | <rslt:Text><rslt:textvalue | (ignoreXML)></td></tr></textvalue></rslt:Text> | </rdf:li> | </rdf:Seq> | </rslt:template> | | | | With this "near to XSLT" syntax, more people would see what it is about. Agreed. Even without the XPATH like expressions the processor could handle a style much closer to what you outlined, I'll work on it (next weekend)! | If we also could get rid of those pesky <rdf:Seq> and <rdf:Li> things | and instead write: | | <rslt:template rslt:match="(? rdf:type http://purl.org/rss/1.0/item)"> | <rslt:Text><rslt:textvalue | (ignoreXML)><tr><td></textvalue></rslt:Text> | <rslt:Value rslt:match="(. rdfs:label ?)" /> <!-- this XPATH/RDF hack | should return the label, the "?" --> | <rslt:Text><rslt:textvalue | (ignoreXML)></td></tr></textvalue></rslt:Text> | </rslt:template> | | It would be much simpler, but I think that most RDF parser do not | "garantuee" the correct order of the triples here, but you may write | your own parser anyway. I don't think the problem are the parsers, it's my right as rdf user to shake the triples and have the same as before. So either RDF/XML could be simplified (not a lot of potential, imo) or the stylesheets are written in a special syntax and interpreted with an rslt aware deserialiser, but I'd prefer to focus on the schema first. | | | hope that is some inspiration for you, inspiration and concreete improvements, thanks! cheers, reto -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/lSOAD1pReGFYfq4RAm6MAJ0Y5rGx2ikoYD/2l/W8D+DyAdasVQCgtN2P 49EyE59Fihl+ML1nGaZv8Qg= =CpZo -----END PGP SIGNATURE-----
Received on Tuesday, 21 October 2003 08:15:25 UTC