Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 46828 invoked from network); 4 Jul 2000 12:52:19 -0000 Received: from systemy.systemy.it (194.20.140.20) by locus.apache.org with SMTP; 4 Jul 2000 12:52:19 -0000 Received: from apache.org (pv50-pri.systemy.it [194.21.255.50]) by systemy.systemy.it (8.8.8/8.8.8) with ESMTP id MAA02154 for ; Tue, 4 Jul 2000 12:52:03 GMT Message-ID: <3961C057.12938EAE@apache.org> Date: Tue, 04 Jul 2000 12:45:43 +0200 From: Stefano Mazzocchi Organization: Apache Software Foundation X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; I) X-Accept-Language: en,it MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: [PATCH] Sitemap Draft - Misc. fixes and preliminary schema References: <017801bfe477$27c53520$0b739fce@coffeecup> <396005EC.CA6D7A5C@localbar.com> <019601bfe4a5$1fe71d40$0b739fce@coffeecup> <39610523.ADE332A4@apache.org> <027501bfe544$138ce1c0$0b739fce@coffeecup> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N "N. Sean Timm" wrote: > > "Stefano Mazzocchi" wrote: > > > If you're going to have a node, I think it either needs to > reside > > > in some sort of parameter namespace (which seems messy), or you should > have > > > to specify it like the following: > > > > > > > > > or > > > bac.dtd > > > > Sean, I don't see your problem with > > > > > > bac.dtd > > > > Each component will have access to configurations and namespaces don't > > make it any simpler nor more powerful. > > > > I vote -1 to adding a new namespace for each component. The sitemap will > > "consume" its namespace and make available to components everything > > else. > > > > I don't see any problem with this. > > During my initial schema work, I came under the impression that those > parameters *had* to be declared in a namespace in order to create a schema > at all. I see now that this is not the case. So, yes, we could allow > anything in the default namespace as parameters. The only consequence is > that all parameter names/values will not be able to be validated against a > schema. Of course, that's the point. > I like the idea of being able to validate the entire sitemap > against a schema while I'm developing it. ??? careful: "validation" is the act of saying if some file is valid or not. When your component does: conf.getConfiguration(String path, bookean required); and the required configuration is not there, this is a validation problem. You clearly showed how complex a sitemap becomes if you use XSchema to validate everything... and how unbalanced it might become later on when you add your components and you have to ask for "namespace granting" around here. Here, you simply place your own validation inside your logic and the Avalon classes will provide ways to make it so simply you don't even know you are actually validating something while using it. Cocoon could also be run from the command line in "sitemap validation mode", just like Apache can. > It would certainly help prevent certain simple (but stupid) mistakes. Oh, please don't forget that DTD and XSchema are just two of the infinite possible ways to validate a document. The first works ok with mono-dimensional XML documents, the second is more complex but still very limited compared to any turing-complete language. > On the other hand...doing it like > I suggested (ie. wouldn't allow > parameter validation, either. Yes. > Like I mentioned, I didn't like declaring > namespaces for the parameters, either, but it's the only way to validate the > parameters. Is this something anyone cares about? I'm rather ambivalent at > this point, so I'm curious if anyone else feels that schema-based parameter > validation is important. If not, then the default namespace works just > great. It's not a matter of "caring about validation", of course we all care to see Cocoon say "hey, I need this parameter here"! The point is: should XMLSchema take care of all possible cases? My (pretty strong) answer is no. -- Stefano Mazzocchi One must still have chaos in oneself to be able to give birth to a dancing star. Friedrich Nietzsche -------------------------------------------------------------------- Missed us in Orlando? Make it up with ApacheCON Europe in London! ------------------------- http://ApacheCon.Com ---------------------