Context: English Narrative Report version 2015.04.02
Phrase: PhPlacedescription
I have a number of situations where I need to generate a phrase containing only the “place name” (P0) and the “county or region” (P4).
Instead of digging into the current PhPlaceDescription phrase and risking to screw everything up, I decided to use the if-then-else approach.
The first part of the phrase would be limited to the situation where only P0 and P4 would be present, followed by the original phrase that would cover the else condition.
Something like:
[{?!1}[{?!2}[{?!3}[{?4}[{?!5}[{?!6}[{?!7}<Case where only P4 is present>]]]]]]]
[{!}<Unchanged default phrase>]
The "P0-and-P4-only" case triggers correctly and produces the expected output, but strangely enough this seems to change the way the standard phrase behaves.
If I load the following into the phrase editor tool, the presence/absence of the last parameter seems to influence the whole phrase.
[{?!1}[{?!2}[{?!3}[{?4}[{?!5}[{?!6}[{?!7} *** {!13h}{!0}{!14h} {4} ***]]]]]]]
[{!}{!13h}{!0}{!14h} is[ {1}][{?2} at {2}][{?3|4|5|6|7}[{?2},][{!} in][ {3h}][[{?2|3},] {4h}][[{?2|3|4},] {5h}][ {7h}][ {6h}][{?11|12}[{?2|3|4|5|6|7} and is] located at[ latitude {11}][[{?11},] longitude {12}]]].{\br}]
Notes:
- The asteriscs “***” are only used to make the result stand out and easier to find in the output of the phrase editor.
- I limited the condition to the first 7 parameters for ease of testing and to keep it readable.
Any ideas?