- From: Eric Prud'hommeaux <eric@w3.org>
- Date: Wed, 21 Oct 1998 03:26:16 -0400 (EDT)
- To: Ralph Swick <swick@w3.org>, Janne Saarela <jsaarela@w3.org>, Daniel Lopex <ridruejo@bart.us.es>, Massimo Marchiori <massimo@w3.org>, Stefano Mazzocchi <mazzocchi@systemy.id>, Pierpaolo Fumagalli <p.fumagalli@fumagalli.org>
Ralph, Janne, and Massimo: the apache folks would like to put together a config file format that is useful for apache as well as other apps. They were considering using XML so I suggested using XML namespaces and RDF. Daniel, Stefano, Pierpaolo and I discussed the example below which I ran by Ralph. Everybody: I talked about this with one of the RDF spec authors (Ralph). He said this was reasonable RDF. I swapped <gui> to <g.type> to illustrate the way namepaces dis-ambiguate the vocabulary, but it's pretty much the same as we left it: <xml version="1.0"> <rdf:RDF xmlns:rdf="http://www....rdf#" xmlns:c="http://www....codepage#" xmlns:h="http://www....help#" xmlns:g="http://www....gui#" xmlns:a="http://www.apache.org/configuration/xml#"> <a:directive name="serverName"> <a:type>String</a:type> <a:description>This sets the name of the server</a:description> <a:priority>Needed</a:priority> <g:type>Textfield</g:type> </a:directive> <a:directive name="port"> <a:type>Integer</a:type> <a:description>The port this host is listening to</a:description> <a:priority>Needed</a:priority> <a:default>80</a:default> <a:format><port=%d></a:format> <g.type>Counter</g.type> </directive> </rdf> When we were talking in SF, I didn't mention what RDF buys for you syntactically: "<a><b>blah</b></a>" is equivilent to "<a b='blah'/>" which opens up some syntactic options for the stuff above: <a:directive name="serverName" a:type="String" a:description="This sets the name of the server" a:priority="Needed" g:type="Textfield" /> "<some-tag/>" is called an empty element tag in XML-speak. I am working on an API for an RDF parser. I adapted one in Java six months ago, but RDF has changed a lot since then so I have to re-think it. Using the SAX callback from the parser, I can pick up a startElement for a.directive with an attributeList containing the rest of the stuff (a.type="String" ... g.type="Textfield"). It could also parse the previous example by associating the startTag for a.directive with the tags for all the contained tags (a.type et al.). The callbacks to characters('String') (for instance) would be associated with their innermost tag, producing a similar structure to the parse tree for the empty element tag. I haven't figured out a good way to represent it yet. What do you think? Janne, what would this look like in your triplet presentation? I also have a Perl parser but there are a bunch of RDF directives that I need to add to the parser because they associate elements that are not necessarily nested when they are parsed. For example, aboutEach directive seen in the ACL code: <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/TR/WD-rdf-syntax#" xmlns:s="http://www.w3.org/schema/certHTMLv1"> <rdf:Bag ID="B1"> <rdf:li><rdf:Description rdf:ID="http://www.w3.org/Tools/certACL/bygroup/valid-user" s:access="head,get"/></rdf:li> <rdf:li><rdf:Description rdf:ID="http://www.w3.org/Tools/certACL/bygroup/w3cteamgroup" s:access="chacl,racl,head,get,put,delete,connect,options,trace"/></rdf:li> <rdf:li><rdf:Description rdf:ID="http://www.w3.org/Tools/certACL/byip/18.29.0.156" s:access="chacl,racl,head,get,put,delete,connect,options,trace"/></rdf:li> <rdf:li><rdf:Description rdf:ID="http://www.w3.org/Tools/certACL/byip/192.48.232.40" s:access="chacl,racl,head,get,put,delete,connect,options,trace"/></rdf:li> <rdf:li><rdf:Description rdf:ID="http://www.w3.org/Tools/certACL/byuser/eric" s:access="chacl,racl,head,get,put,delete,connect,options,trace"/></rdf:li> </rdf:Bag> <rdf:Description aboutEach="#B1"> <s:hasAccessTo rdf:ID="http://www.w3.org/Team/Eric/rfc2068.html"/> </rdf:Description> </rdf:RDF> I need to implement the association implied by rdf:aboutEach and a few other directives like that. Janne, is working on the same code base as I am. He has written this parser, but I beleive he needs to separate it from a graphical presenter that he wrote. Between him and myself, we should be able to give you something usefull soon. I've thought a little about the codepage schema. I suspect we'll end up introducing a list of supported languages: xmlns:c-eng="http://www....codepage#english" xmlns:c-it="http://www....codepage#italian" xmlns:c-rus="http://www....codepage#russian" and use it inside subsequent directives that change between languages: <a:format c-eng="<port=%d>" c-it="<???=%d>"/> Anybody have any better ideas? Perhaps the alphabet will be associated with the url for the codepage (ie ISO Cyrrilic for "http://www....codepage#russian"). The help schema should be easy to use: <a:directive name="serverName"> <h.help c-eng="name of the server" c-backwords="revres eht fo eman"> ... What do you-all think? -eric PS. any batteries left in your laser pointer?
Received on Saturday, 24 October 1998 22:42:52 UTC