Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 33646 invoked from network); 24 May 2007 15:29:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 May 2007 15:29:57 -0000 Received: (qmail 26645 invoked by uid 500); 24 May 2007 15:30:01 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 26584 invoked by uid 500); 24 May 2007 15:30:01 -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 26573 invoked by uid 99); 24 May 2007 15:30:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2007 08:30:01 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 24 May 2007 08:29:55 -0700 Received: (qmail 33525 invoked from network); 24 May 2007 15:29:34 -0000 Received: from localhost (HELO carsten-ziegelers-computer.local) (127.0.0.1) by localhost with SMTP; 24 May 2007 15:29:34 -0000 Message-ID: <4655AFF8.3090407@apache.org> Date: Thu, 24 May 2007 17:32:08 +0200 From: Carsten Ziegeler User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: CForms binding with namespaces error - advice wanted References: <4653073A.1020300@mi.unimaas.nl> <46535023.1050507@gmx.de> <46540208.1030209@gmail.com> <465410CC.6020605@apache.org> <465416ED.3040904@outerthought.org> <4654208B.3060403@gmail.com> <465481F2.7070508@gmx.de> <465495D5.10706@gmail.com> <4654997A.4090002@apache.org> <46553ECD.3010203@outerthought.org> <46555613.6090503@apache.org> <465584C8.7020307@outerthought.org> <465592ED.1070209@gmail.com> <465599CE.4060804@apache.org> <46559B9E.5000209@gmail.com> <46559DC3.5060403@apache.org> <4655AA1F.1010108@gmail.com> In-Reply-To: <4655AA1F.1010108@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Helma wrote: > > That's what I'm slowly starting to realise. For proper XML validation I > do need it so I assumed the parser requires this too. > > That would partially explain why the binding file (without a > namespaceURI for 'oe') still maps to the source (in the source=file > situation). It would also explain the observations in > > https://issues.apache.org/jira/browse/COCOON-1671 > > i.e. if the prefix is the same with a matching or a different > namespaceURI it binds, but if the prefix is different but the > namespaceURI is identical it fails. > > So how should this be solved then? > I think there are two areas: The first one is the parsing of the binding. We have to ensure that the namespace prefixes are correctly send to the cforms component parsing the binding. So we should see that there is no namespace prefix inbetween. Actually, I fear, we can't ensure this in general. So perhaps in these cases a workaround is required and you have to add a dummy attribute somewhere in the binding, like . This is not great, but hopefully solves this problem. Now, the second area is more complicated. When cforms parses a binding it should parse the paths and test them for namespaces and if these namespaces are properly defined - if not, throw exception. When the binding is applied, the namespaces have to be checked, if the uri's are the same. This should then work even if different prefixes are used. I looked into namespaces and jxpath a long time ago and I think to remember that there were problems; so this could get ugly :( I think this is something for our cforms and jxpath experts! Carsten