Roll back changelist 180942763

*** Reason for rollback ***

Breaks the FOSS build.

We'll reincorporate this change once Closure Rules is properly updated to accommodate it.

*** Original change description ***

Change all foreach loops in Soy templates to use the for loop syntax

Soy supports 2 kinds of loops:
foreach- for iterating over items in a collection  e.g. {foreach $item in $list}...{/foreach}
for - for indexed iteration  e.g. {for $i in range(0, 10)}...{/for}

The reason Soy has 2 different loops is an accident of history, Soy didn’t use to have a proper grammar for expressions and so the alternate ‘for...range’ syntax was added to make it possible to write indexed loops.  As the gramma...

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180961695
This commit is contained in:
mcilwain 2018-01-05 12:37:30 -08:00 committed by Ben McIlwain
parent d52a701f50
commit ffcfa283f6
24 changed files with 103 additions and 109 deletions

View file

@ -28,7 +28,7 @@
<create>
<contact:create xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
<contact:id>{$item['contact:id']}</contact:id>
{for $pi in $item['contact:postalInfo']}
{foreach $pi in $item['contact:postalInfo']}
<contact:postalInfo type="{if index($pi) == 0}int{else}loc{/if}">
<contact:name>{$pi['contact:name']}</contact:name>
<contact:org>{$pi['contact:org']}</contact:org>
@ -41,7 +41,7 @@
<contact:cc>{$addr['contact:cc']}</contact:cc>
</contact:addr>
</contact:postalInfo>
{/for}
{/foreach}
<contact:voice>{$item['contact:voice']}</contact:voice>
<contact:fax>{$item['contact:fax']}</contact:fax>
<contact:email>{$item['contact:email']}</contact:email>
@ -70,7 +70,7 @@
<contact:update xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
<contact:id>{$item['contact:id']}</contact:id>
<contact:chg>
{for $pi in $item['contact:postalInfo']}
{foreach $pi in $item['contact:postalInfo']}
<contact:postalInfo type="{if index($pi) == 0}int{else}loc{/if}">
<contact:name>{$pi['contact:name']}</contact:name>
<contact:org>{$pi['contact:org']}</contact:org>
@ -83,7 +83,7 @@
<contact:cc>{$addr['contact:cc']}</contact:cc>
</contact:addr>
</contact:postalInfo>
{/for}
{/foreach}
<contact:voice>{$item['contact:voice']}</contact:voice>
<contact:fax>{$item['contact:fax']}</contact:fax>
<contact:email>{$item['contact:email']}</contact:email>