Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 61712 invoked from network); 18 Jan 2007 13:02:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jan 2007 13:02:12 -0000 Received: (qmail 33897 invoked by uid 500); 18 Jan 2007 13:02:17 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 33835 invoked by uid 500); 18 Jan 2007 13:02:17 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 33824 invoked by uid 99); 18 Jan 2007 13:02:17 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jan 2007 05:02:17 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [213.46.255.15] (HELO viefep11-int.chello.at) (213.46.255.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jan 2007 05:02:07 -0800 Received: from [192.168.1.30] (really [62.178.239.20]) by viefep11-int.chello.at (InterMail vM.6.01.05.04 201-2131-123-105-20051025) with ESMTP id <20070118130145.IWWS4990.viefep11-int.chello.at@[192.168.1.30]> for ; Thu, 18 Jan 2007 14:01:45 +0100 Message-ID: <45AF6FB6.6000707@apache.org> Date: Thu, 18 Jan 2007 14:01:42 +0100 From: Reinhard Poetz User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: [RT] Add schema validation for sitemap References: <45AF5DAD.2010100@apache.org> <45AF6663.5000708@apache.org> <45AF6D2C.4000100@apache.org> In-Reply-To: <45AF6D2C.4000100@apache.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Carsten Ziegeler wrote: > Reinhard Poetz wrote: >> Carsten Ziegeler wrote: >>> I started writing an XML schema for our sitemap. You can find a first >>> version in the 2.1.x branch at tools/src/sitemap-1.0.xsd. >>> >>> My idea is to add schema validation to our tree processor engine in >>> trunk and validate a sitemap when it is read. Of course this will be >>> configurable and can be turned off. >>> >>> I'm not interested in discussions whether XML schema is the best >>> solution for validation. But I'm interested to hear if others think that >>> this is a useful idea or not. >> So far I've been happy with the validation performed by the tree processor. One >> problem with schema validation is that the error messages are often difficult to >> understand. It could also be confusing to our users if validation errors come >> from two different sources. > Hmm, yes, might be. The current validation of the tree processor is not > complete, for example it doesn't detect typos (try using map:prameter > for example). > The validation errors of the parser are very good imho, they tell you > exactly where which error occurs. In addition, they tell you which > elements are allowed, so you can spot typos etc. very easily. probably it depends ;-) I remember some weird error messages together with substitution groups and extension/restriction relationships but without having looked at the sitemap schema, I don't think it is that complicated. As it will be configureable anyway and we already have all necessary libraries in our dependency graph, just add it. Whether we set schema validation to true or false per default, can be decided later on. -- Reinhard P�tz Independent Consultant, Trainer & (IT)-Coach {Software Engineering, Open Source, Web Applications, Apache Cocoon} web(log): http://www.poetz.cc --------------------------------------------------------------------