|
En/na Thorsten Scherler ha escrit: When you use a default namespace all elements without explicit namespace are in the default namespace.Answering my own question: On Thu, 2005-09-01 at 13:47 +0200, Thorsten Scherler wrote:Hi all, This document: [doc1] <contacts xmlns="http://testing.com/"> ... </contacts> is equals to: [doc2] <contacts:contacts xmlns:contacts="http://testing.com/" > ... </contacts:contacts> not to: [doc3] <contacts xmlns:contacts="http://testing.com/" > ... </contacts:contacts>In the [doc3] the contacts element has not namespace while in the [doc1] and [doc2] documents the contacts element is in the "http://testing.com/" In the binding document you must match contacts:contacts and not just contacts if you use a default namespace. The binding document must be: <fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" xmlns:contacts="http://testing.com/" path="."> <fb:simple-repeater id="contacts" parent-path="contacts:contacts" row-path="contacts:contact"> <fb:value id="ID" path="@id"/> <fb:value id="firstname" path="contacts:firstname"/> <fb:value id="lastname" path="contacts:lastname"/> </fb:simple-repeater> </fb:context> I think this must work, but I don't test it. Today I see tree pages [1][2][3] about the problems with default namespaces, maybe the binding xpath have this problems too: [1]http://www.anyware-tech.com/blogs/sylvain/archives/000213.html [2]http://www.xml.com/pub/a/2004/02/25/qanda.html [3]http://weblogs.mozillazine.org/weirdal/archives/008806.html-- Josep A. Frau Centre de Tecnologies de la Informació Universitat de les Illes Balears |
