From dev-return-81341-apmail-cocoon-dev-archive=cocoon.apache.org@cocoon.apache.org Thu Nov 03 09:35:11 2005 Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 66127 invoked from network); 3 Nov 2005 09:35:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Nov 2005 09:35:11 -0000 Received: (qmail 93302 invoked by uid 500); 3 Nov 2005 09:35:08 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 93219 invoked by uid 500); 3 Nov 2005 09:35:07 -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 93207 invoked by uid 99); 3 Nov 2005 09:35:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2005 01:35:07 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [84.96.21.10] (HELO mail.anyware-tech.com) (84.96.21.10) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2005 01:35:02 -0800 Received: from localhost (localhost [127.0.0.1]) by mail.anyware-tech.com (Postfix) with ESMTP id CBB4133A60 for ; Thu, 3 Nov 2005 10:34:49 +0100 (CET) Received: from mail.anyware-tech.com ([127.0.0.1]) by localhost (trinity [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31474-02 for ; Thu, 3 Nov 2005 10:34:46 +0100 (CET) Received: from [10.0.0.27] (poukram.anyware [10.0.0.27]) by mail.anyware-tech.com (Postfix) with ESMTP id D56A133A5A for ; Thu, 3 Nov 2005 10:34:46 +0100 (CET) Message-ID: <4369D9B2.70904@apache.org> Date: Thu, 03 Nov 2005 10:34:42 +0100 From: Sylvain Wallez User-Agent: Thunderbird 1.4.1 (Macintosh/20051006) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: CForms widget ID naming (was Re: [Vote] Releasing on friday) References: <4369A459.1030805@apache.org> <4369CE73.8040803@apache.org> <4369D4F1.5000808@student.tuwien.ac.at> In-Reply-To: <4369D4F1.5000808@student.tuwien.ac.at> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at anyware-tech.com X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Andreas Hochsteger wrote: > (I think this should be discussed in a separate thread) > > Sylvain Wallez wrote: > >> The last minute change is just about replacing "-input" with ":input" >> within two XSLs, to avoid problems later. > > Isn't ":" used as separator for the namespace prefix? > I don't know if this applies to IDs too, but perhaps we should > double-check before. The ":" is a valid character in element names and ID and IDREF attributes (they are defined using the same grammar rule). Parsers use the ":" in a special way for element names only, when namespace processing is activated (the default in all modern browsers) > If it is allowed by the XML spec, it makes me wonder, if we want to > prefix the IDs some time in the future to use some kind of "namespace" > here too. This usage in CForms has already been introduced by the recent library stuff, which associates prefixes to libraries, thus effectively forbidding the use of ":" in widget ids (otherwise you cannot differenciate between a widget name and a composite name that references a library widget). That is why I chose this character. The "/" and "." are also forbidden (used for lookup paths). The "." cannot be used as it is used to combine widget names in the generated IDs, and thus would lead to a similar problem as the current one: "-" can conflict with siblings, and "." can conflict with children. So the choice is between "/" and ":", but "/" is not allowed in XML names. Hence the result, ":"... > Wouldn't this conflict with ":input" as you then cannot distinguish > between the two anymore (namespace prefix vs. ":input" suffix). No, because as I said above, using ":" in widget names is effectively forbidden by the library prefix notation. Another possibility is to prefix the name of generated-ids with ":" (this is allowed by the XML spec), e.g. ":foo-input" instead of "foo:input". But I prefer to keep the widget ID as the prefix of all that is related to its styling. The rule is then: a styling stylesheed can generate whatever ID its needs for a widget by suffixing the widget's id with ":" followed by a name. Care should be taken of course that this name doesn't conflict with names produced by other stylesheets. > Just some random thoughts ... > > Perhaps it would help to write something up which summarizes all the > IDs, names, prefixes, suffixes and namespaces involved in every part > of CForms. Yup. That should be part of the documentation of the various stylings. Sylvain -- Sylvain Wallez Anyware Technologies http://people.apache.org/~sylvain http://www.anyware-tech.com Apache Software Foundation Member Research & Technology Director