There is a duplicate/extra example AFTER the
If the field = territory, and the replacement.field has more than one value, then look up the most likely territory* for the base language code (and script, if there is one). If that likely territory is in the list of replacements, use it. Otherwise, use the first territory in the list.
rule =”<languageAlias type="und-hepburn-heploc"
result=”ja-Latn-alalc97-fonipa” // note that CLDR canonical order of variants is alphabetical
Notice, this chunk of text of example is already ABOVE the "Territory Exception" and it looks awkward since it is not an example of the exception.