Return-Path: Delivered-To: apmail-xml-forrest-dev-archive@www.apache.org Received: (qmail 64604 invoked from network); 3 May 2004 07:04:17 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 May 2004 07:04:17 -0000 Received: (qmail 96699 invoked by uid 500); 3 May 2004 07:03:52 -0000 Delivered-To: apmail-xml-forrest-dev-archive@xml.apache.org Received: (qmail 96659 invoked by uid 500); 3 May 2004 07:03:52 -0000 Mailing-List: contact forrest-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: forrest-dev@xml.apache.org Delivered-To: mailing list forrest-dev@xml.apache.org Received: (qmail 96645 invoked from network); 3 May 2004 07:03:51 -0000 Received: from unknown (HELO indexgeo.net) (65.77.211.93) by daedalus.apache.org with SMTP; 3 May 2004 07:03:51 -0000 Received: from dialup-163.146.220.203.acc01-aubu-gou.comindico.com.au (dialup-163.146.220.203.acc01-aubu-gou.comindico.com.au [203.220.146.163]) (authenticated bits=0) by www2.kc.aoindustries.com (8.12.9-20030917/8.12.9) with ESMTP id i4373nKc019257 for ; Mon, 3 May 2004 02:04:01 -0500 Subject: Re: [DEVOTE] Solving the skinconf riddle From: David Crossley To: forrest-dev@xml.apache.org In-Reply-To: References: <1083323942.2035.162.camel@ighp> <1083385469.5609.92.camel@ighp> Content-Type: text/plain Organization: Message-Id: <1083567826.31080.225.camel@ighp> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 03 May 2004 17:03:48 +1000 Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Nicola Ken Barozzi wrote: > David Crossley wrote: > > Nicola Ken Barozzi wrote: > >>David Crossley wrote: > ... > >>>The skinconfig could still have a single namespace so that tools > >>>could decide which RNG grammar to apply. > >> > >>Hmmm, hadn't thought of that... IIUC this makes it possible for > >>extensions to validate their part too. I like it, also because > >>of the suggestion from Dave, about skins declaring what they need > >>(in this case about non-standard features). > > > > Oooh, that idea has potential. > > Mine or your's? ;-) I love it when these ideas come out like this, and > we both think that it's the other one that thought it. You can never > tell who actually came up with it :-) Yes, opensource is wonderful. Nobody owns the ideas, they just evolve. > > When skin developers want to add a > > new feature, then they still follow the feature-element-property > > model and simply change the namespace to be > > > > and then apply their own RNG validation if they want to. > > This is then consistent with normal forrest skinning machinery. > > Yup :-) > > Or add their own namespace for the extra elements. I was trying to stay away from multiple namespaces for this task because that means that we cannot have the simple DTD. > Then this: > > > > > > Forrest" > http://.../forrest/ > images/project-logo.gif > > > > name="myfeature"> > My Name > 84kg > > > Okay, i created a simple skinconf.xml instance along those lines and it can be validated using an internal DTD. This format seems ideal to me. > Or if one prefers this is an alternative syntax to the same effect: > > > > > > Forrest" > http://.../forrest/ > images/project-logo.gif > > > > > My Name > 84kg > > > This is back to the multiple namespaces which means that we cannot have the simple internal DTD. > >>How about the comment section? > ... > >> -- > >> |4| > >> -- > >> > >> > >> > >> > >> > >> > >>I think that (4) is the best for comments, as it can easily be > >>transformed to documentation with a stylesheet like the one below, and > >>is easy on the eye (in contrast with namespaced docs): > > > > > > -- > > |5| > > -- > > > > > > > > Display various credit logos. > > > > > > Logo to be shown for credits > > > > title > > The title for the logo > > yes > > > > > > url > > The URL that the logo refers to > > no > > > > > > image > > Relative path to the image file > > yes > > > > > > width > > image width in pixels > > yes > > > > > > height > > image height in pixels > > yes > > > > > > > > Built with Cocoon > http://xml.apache.org/cocoon/ > > images/built-with-cocoon.gif > > 88 > > 31 > > > > ... > > ... > > > > > > Documentation can easily be generated from this. > > > > The xml editors can control the addition of documentation > > for features in the skinconf.xml, because the doc structure > > can be defined in the simple internal skinconf DTD. > > Hmmm... it looks *much* more verbose than version 4, ... Yes, it is verbose. However there are other things to bear in mind. We are aiming to generate documentation and schema from these comments, so i would think it would be more reliable to control that information with a good structure and the internal DTD. The information does not need to be repeated on every and for a particular feature. Does the verbosity really matter? > ... and defeats the > purpose of using comments, that is to make the system available to any > xml file, regardless the schema-dtd-whatever it uses to validate. Sorry, i cannot parse that. Would you try to explain again please. > > Perhaps even RELAX NG grammars can be generated from the > > skinconf.xml files. > > This is an excellent idea! A sort of schema by example, really neat! We have not done it yet, but yes, it seems to be possible. . > Hmm, what about this then: > > -- > |6| > -- > > value="true" > description="Display various credit logos" > > > > required="true" > name="title" >Built with Cocoon > > required="true" > name="url" >http://xml.apache.org/cocoon/ > > required="true" > name="image" >images/built-with-cocoon.gif > > required="false" > name="width" >88 > > required="false" > name="height" >31 > > This might confuse the user. Which attributes do they need to edit and which attributes are for doc purposes? There are mixed concerns. However, that is a minor issue. This format is looking really neat and also well-defined. > Alternative comment notation: > > > value="true"> > > > > > Built with Cocoon > > > > http://xml.apache.org/cocoon/ > > > > images/built-with-cocoon.gif > > > > 88 > > > > 31 > > > My worry with this is that it might not be robust enough to generate documentation and schema from it. However, the main file will be the one in "forrest seed site" and we have control over that, so perhaps this will be okay. So the competitors in the grand final are 5 and 6a and 6b. --David