cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: [C2] <parameter> or <map:parameter> ?
Date Fri, 11 May 2001 08:47:40 GMT

giacomo a écrit :
> On Thu, 10 May 2001, Sylvain Wallez wrote:
> >
> > Sorry for starting this hot thread, but I'm digging deeper and deeper in
> > C2, and when I don't understand something, I ask. Just tell me if I
> > shouldn't...
> No problem :) go ahead if you like it hot :)
> Giacomo
Not that I particularly like hot discussions, but let me make a last
try, since there is another point of view that make me think
<map:parameter> is more consistent ;-)

Some of you may find childish to discuss about "map:" which is only 4
characters long, but the sitemap will be for most users the visible part
of the Cocoon iceberg, and IMHO consistency is really important here.

So, let's consider the following sitemap snippet :

   <map:transformer name="xslt"
    <use-store map:value="true"/>
    <use-request-parameters map:value="false"/>
    <use-browser-capabilities-db map:value="false"/>

In this snippet, the tag names "use-store", "use-request-parameters" and
"use-browser..." are component-dependent and must conform to the
configuration entry names awaited by TraxTransformer. But what is this
"map:value" which belongs to the sitemap namespace ? Well, it's an
equivalent notation for "<use-store>true</use-store>", which is also
allowed by the sitemap.

Now, we could imagine to also have an equivalent syntax for the
configuration entry name similar to map:value, which could be
<map:config name="use-store"...> . And we obtain 4 semantically
equivalent syntaxes (of which 2 are accepted today) which the sitemap
will convert into the exact same Configuration for the component :

  <use-store map:value="true"/>
  <map:config name="use-store" value="true"/>
  <map:config name="use-store">true</map:config>

What is shown by the above is that the names of non-namespaced elements
are component dependent, while the names of map-namespaced elements are
sitemap dependent.

Now consider this snippet :

    <map:transform type="sql">
      <parameter name="use-connection" value="personnel"/>

What is important for the SQLTransformer is "use-connection", but not
"parameter", which is used by the sitemap to build a Parameters object.
Following the conclusions of the first snippet, the possible consistent
syntaxes would be :

  <use-connection map:value="personnel"/>
  <map:parameter name="use-connection" value="personnel"/>
  <map:parameter name="use-connection">personnel</map:parameter>

And we end up with "parameter" belonging to the sitemap namespace...

What do you think of this ? Should I start a vote on this subject ?


To unsubscribe, e-mail:
For additional commands, email:

View raw message