Marc Portier wrote:
> Hi there,
>
> just found out that
> <map:serialize status-code="{statusCode}" />
>
> kept giving me a statuscode 200 no matter what the value of statusCode was.
>
> as it turns out the SerializeNodeBuilder will in it's buildNode do:
>
>> this.node = new SerializeNode(
>> type,
>> VariableResolverFactory.getResolver(config.getAttribute("src",
>> null), this.manager),
>>
>> VariableResolverFactory.getResolver(config.getAttribute("mime-type", null),
>> this.manager),
>> config.getAttributeAsInteger("status-code", -1)
>> );
>
>
> which I read as: @src and @mime-type can but @status-code can-not be
> resolved from variables
>
> from an end-user POV this difference in handling is quite arbitrary
> (meaning: if there are good considerations for this we should document
> them well)
>
Hmm, I see no reason why status-code should not be able to use variables.
> <SNIP/>
>>./SerializeNodeBuilder.java: "mime-type"
>>./SerializeNodeBuilder.java: "status-code"
>>
Hmm, either your script is not correct, or your statement above :) Can
mime-type use variables or not?
> <SNIP/>
>
> anyone any opinion on these?
>
> maybe it makes sense to look at these with our "rule of least
> surprise"-glasses on?
>
Yes, I think we should go through all these attributes and see/vote
which ones can be made dynamic.
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/