Hi all,
Steve Ratcliffe confirmed the existence of this problem to me in a private
message. In the next few days, I plan to implement special syntax for
variable substitution, because it will allow shorter style rules to be
written. See an example of the syntax at the bottom of my original message
below.
Best regards and sorry for top-posting,
Marko
On Mon, Dec 14, 2009 at 11:41:05PM +0200, Marko Mäkelä wrote:
> The problem is that within apply{}, the variable substitutions on the
> right-hand-side of the "set" and "add" action always refer to the tags of
> the relation, not to the relation member. Thus, mkgmap:boundary_name
> will always be empty, and only one relation name will be copied to it.
>
> One possible solution is to have a special form of apply{} where
> SubAction.performOnSubElements(Relation rel) does not invoke
> addTagAction.setValueTags(rel). A patch that introduces the action
> apply_local{} is attached.
>
> An alternative solution would be to have a special form of variable
> substitution that refers to the tags of the element itself. One simple
> way of implementing that could be to introduce the keywords set_local
> and add_local and add another boolean parameter to AddTagAction that
> would imply valueTags == null.
>
> Yet another solution would be to have a special syntax of variable
> substitution that would bypass the valueTags, say, $(var) instead of ${var}:
>
> (type=boundary | type=multipolygon) & boundary=administrative & name=*
> { apply
> {
> set mkgmap:boundary_name='$(mkgmap:boundary_name)/${name}' | '${name}';
> }
> }
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev