You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@verizon.net> on 2003/11/07 14:39:14 UTC

Re: cvs commit: cocoon-2.1/src/java/org/apache/cocoon/generation XPathDirectoryGenerator.java

giacomo@apache.org wrote:

>  + * resource. A <code>nsmapping</code> parameter can be specified to point to a file containing lines to map prefixes
>  + * to namespaces like this:
>  + * </p>
>  + * <p>
>  + *  prefix=namespace-uri<br/>
>  + *  prefix2=namespace-uri-2
>  + * </p>
>  
>

Just a quick one -- why configuration is not used, but properties file?

Vadim



Re: cvs commit: cocoon-2.1/src/java/org/apache/cocoon/generation XPathDirectoryGenerator.java

Posted by Vadim Gritsenko <va...@verizon.net>.
Giacomo Pati wrote:

> Vadim Gritsenko wrote:
>
>> giacomo@apache.org wrote:
>>
>>>  + * resource. A <code>nsmapping</code> parameter can be specified 
>>> to point to a file containing lines to map prefixes
>>>  + * to namespaces like this:
>>>  + * </p>
>>>  + * <p>
>>>  + *  prefix=namespace-uri<br/>
>>>  + *  prefix2=namespace-uri-2
>>>  + * </p> 
>>
>>
>> Just a quick one -- why configuration is not used, but properties file?
>
>
> I couldn't think of an elegant way to parametrize more that one 
> prefix/namespace pair as
>
>  <map:parameter name="prefix.1" value="p"/>
>  <map:parameter namespace.1" value="http://....."/>
>  <map:parameter name="prefix.2" value="q"/>
>  <map:parameter namespace.2" value="http://....."/>
>
> wasn't really elegant. But if you have a good idea just throw it in :-)


Two ideas:

1) Use configure():
    <namespace prefix="wd">http://apache.org/cocoon/woody/...</namespace>
2) Seen in recent commit in some other component:
    <map:parameter name="namespace.wd" 
value="http://apache.org/cocoon/woody/..."/>

Is it better? :)

Vadim


Re: cvs commit: cocoon-2.1/src/java/org/apache/cocoon/generation XPathDirectoryGenerator.java

Posted by Giacomo Pati <gi...@apache.org>.

Vadim Gritsenko wrote:
> giacomo@apache.org wrote:
> 
>>  + * resource. A <code>nsmapping</code> parameter can be specified to 
>> point to a file containing lines to map prefixes
>>  + * to namespaces like this:
>>  + * </p>
>>  + * <p>
>>  + *  prefix=namespace-uri<br/>
>>  + *  prefix2=namespace-uri-2
>>  + * </p>
>>  
>>
> 
> Just a quick one -- why configuration is not used, but properties file?

I couldn't think of an elegant way to parametrize more that one 
prefix/namespace pair as

  <map:parameter name="prefix.1" value="p"/>
  <map:parameter namespace.1" value="http://....."/>
  <map:parameter name="prefix.2" value="q"/>
  <map:parameter namespace.2" value="http://....."/>

wasn't really elegant. But if you have a good idea just throw it in :-)


-- 
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com