cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <bdelacre...@apache.org>
Subject Re: DO NOT REPLY [Bug 27432] New: - Malformed HTTP headers (debug information in Parameters object)
Date Fri, 05 Mar 2004 06:21:04 GMT

Le Jeudi, 4 mars 2004, à 22:56 Europe/Zurich, Sylvain Wallez a écrit :

> ....Although individual parameter location may be useful, the location 
> parameter I'm talking about is that of the statement. This makes me 
> think "SitemapParameters" with a "getStatementLocation()" is better 
> than "LocatedParameters" I suggested above.
>
> Let's consider the following snippet:
> 10 ...
> 11   <map:generate src="foo.xml">
> 12     <map:parameter name="bar" value="baz"/>
> 13   </map:parameter>
> 14 ...
>
> ((SitemapParameters)parameters).getStatementLocation() --> 
> "sitemap.xmap:11:2"
> parameters.getLocation("bar") --> "sitemap.xmap:12:4"
>
> getLocation(name) can be useful to notify a problem about a particular 
> parameter, while getStatementLocation() relates to the whole > statement.
>
> getLocation(name) can also be useful for Parameterizable components, 
> as it replaces Configuration.getLocation() which is no more available.

Sounds good, having both is certainly useful for error reporting.

Just a detail, how about casting to a SitemapLocation interface instead 
of classes?
   ((SitemapLocation)parameters).getStatementLocation() --> 
"sitemap.xmap:11:2"

And assuming you get plain Parameters
   ((SitemapLocation)parameters).getParameterLocation("bar") -> 
"sitemap.xmap:12:4"

-Bertrand


Mime
View raw message