Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 42139 invoked from network); 9 Nov 2004 17:15:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Nov 2004 17:15:14 -0000 Received: (qmail 60590 invoked by uid 500); 9 Nov 2004 17:15:07 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 60492 invoked by uid 500); 9 Nov 2004 17:15:05 -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 Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 60479 invoked by uid 99); 9 Nov 2004 17:15:05 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [84.96.21.10] (HELO mail.anyware-tech.com) (84.96.21.10) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 09 Nov 2004 09:15:04 -0800 Received: from [10.0.0.27] (unknown [10.0.0.27]) by mail.anyware-tech.com (Postfix) with ESMTP id 6E47B5EBA9 for ; Tue, 9 Nov 2004 18:15:01 +0100 (CET) Message-ID: <4190FB17.7000304@apache.org> Date: Tue, 09 Nov 2004 18:15:03 +0100 From: Sylvain Wallez Organization: Anyware Technologies User-Agent: Mozilla Thunderbird 0.9 (Macintosh/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Problem in session-fw / RequestContext Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Carsten Ziegeler wrote: >Sylvain Wallez wrote: > > >>Hi, >> >>We just came across a very annoying problem in session-fw: >>the RequestContext class creates a DOM which represents the >>full contents of a request, translating all request >>attributes to XML elements having names. >> >>Now when the session transformer is called by a flowscript, >>there's a request attribute whose name is "FOM JavaScript >>GLOBAL SCOPE/file://my/path/to/flow/script.js" which is >>obviously an invalid name for an XML element and leads to a >>nice DOMException :-( >> >>I added a quick'n dirty workaround (just catch the exception) >>as we need it to work and have a tight schedule, but there >>are IMO two problems there: >>- we cannot assume request nor session attributes names are >>valid XML element names, >>- building a complete DOM representing the full request >>(headers, cookies, parameters, attributes, etc, etc) seems >>really overkill when most uses will just extract a single >>data. It makes me think to the old days of Cocoon 1. Using >>some lazy instanciation techniques would really speedup the >>thing and lower memory consumption. >> >> >Yepp, definitly - I never found a good way of doing it, so if >you or someone else is able to provide a good implementation, >let's change it. > > http://domify.sourceforge.net/ ? What do you think of the quick fix that consists in ignoring attributes that lead to an exception? Is it acceptable? Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }