Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 33700 invoked by uid 500); 19 Mar 2003 14:54:00 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 33687 invoked from network); 19 Mar 2003 14:53:59 -0000 Received: from unknown (HELO trinity.anyware-tech.com) (217.112.237.100) by daedalus.apache.org with SMTP; 19 Mar 2003 14:53:59 -0000 Received: (qmail 7762 invoked from network); 19 Mar 2003 15:02:39 -0000 Received: from unknown (HELO anyware-tech.com) (10.1.0.254) by trinity.anyware-tech.com with SMTP; 19 Mar 2003 15:02:39 -0000 Message-ID: <3E788488.6040603@anyware-tech.com> Date: Wed, 19 Mar 2003 15:54:00 +0100 From: Sylvain Wallez Organization: Anyware Technologies User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030210 X-Accept-Language: fr, en-us, en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: Strengthening setup() contract References: <20030319142638.GA14537@expresso.localdomain> <3E787EB1.2080506@verizon.net> In-Reply-To: <3E787EB1.2080506@verizon.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Vadim Gritsenko wrote: > Jeff Turner wrote: > >> Hi, >> >> Generator, Reader and Transformer all inherit from >> SitemapModelComponent, which declares the setup() method: >> >> public interface SitemapModelComponent extends Component { >> /** >> * Set the SourceResolver, objectModel >> * Map, the source and sitemap Parameters >> * used to process the request. >> */ >> void setup(SourceResolver resolver, Map objectModel, String src, >> Parameters par) >> throws ProcessingException, SAXException, IOException; >> } >> >> If there's no objections, I would like to: >> - assert in the Javadoc that 'src' will never be null >> > > Some generators do not require src attribute. Yep. >> - modify AbstractProcessingPipeline to ensure this, and throw meaningful >> exceptions otherwise. >> >> Currently, leaving out the 'src' attribute causes a typically unhelpful >> Cocoon error message: >> >> java.net.MalformedURLException: Invalid System ID >> > > May be add more helpful message to the AbstractGenerator / > AbstractTransformer? Nope, as we still don't know there if the "src" attribute will be of real use. This is the job of each concrete implementation, or at least a common superclass that actually does something with the "src". Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }