Have you tried leaving off the StringConstant lines and just use the containerName attribute? Like this:
<Value algorithm="wt.rule.algorithm.SubString">
<Attr id="containerName"/>
<Arg>0</Arg>
<Arg>5</Arg>
</Value>
It works this way with the number field of the part (when not autogenerated).