Steve Ratcliffe wrote:
With these two rules, even if they are run in same order as
they are written, the second one could never
have an effect if ${name} is defined.

  
highway=* { name '${name} (${ref})' | '${ref}' | '${name}' }
highway=* { name '${name} ${name1}' | '${name1}' | '${name}' }
    

This is because you can only set the name once.  If ${name} is set
then the name will be set in the first rule and so the only
way that the second rule can be used is if ${name1} is set and ${name}
is not set.

You could fix that by doing everything together, if that is
the effect you want:

highway=* {
	name '${name} (${ref})'
		| '${ref}'
		| '${name} ${name1}'
		| '${name1}'
		| '${name}'
}

..Steve
  
The problem ist that generating a list that does everything together will become to complex, say you have to write down all combination for 10 keys. Or am I missing something? The problem is that if I write everything into one line, and one key listed there is not present on highway=* it will fail.
highway=* {
	name '${name} (${ref})'
		| '${ref}'
		| '${name} ${name1}'
		| '${name1}'
		| '${name}'
}
would become for one more value
highway=* {
	name 	| '${ref} ${name} ${name1} ${name2}'
		| '${name} ${name1} ${name2}'
		| '${ref} ${name1} ${name2}'
		| '${ref} ${name} ${name2}'
		| '${ref} ${name} ${name}1'
		| '${ref} ${name}
		| '${ref} ${name1}
		| '${ref} ${name2}
		| '${name} ${name1}
		| '${name} ${name2}
		| '${name1} ${name2} 
		| '${name}'
		| '${name1}'
		| '${name2}'
		| '${ref}'

}

Adding one more and it gets even worse....... but adding 10 more keys and this list will grow into eternity.....

Now the problem is that I don't want to have the value of the key in the name itself each time, but on presence of a key I wan't to have another value inside. 

so if route=mtb is present I want to have mtbrt in the name, or for route=bicycle I would like to have cyrt and so on. So I have to run some tests whether values are present or not, which would make the task to put everything into on line even more difficult...

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev