xml POS&COUNT
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xml POS&COUNT相关的知识,希望对你有一定的参考价值。
<mvt:assign name="l.settings:days[1]" value="'Sunday'" />
<mvt:assign name="l.settings:days[2]" value="'Monday'" />
<mvt:assign name="l.settings:days[3]" value="'Tuesday'" />
<mvt:assign name="l.settings:days[4]" value="'Wednesday'" />
<mvt:assign name="l.settings:days[5]" value="'Thursday'" />
<mvt:assign name="l.settings:days[6]" value="'Friday'" />
<mvt:assign name="l.settings:days[7]" value="'Saturday'" />
<mvt:assign name="l.settings:meals[1]" value="'Breakfast'" />
<mvt:assign name="l.settings:meals[2]" value="'Lunch'" />
<mvt:assign name="l.settings:meals[3]" value="'Dinner'" />
<ul>
<mvt:foreach iterator="day" array="days">
<li>
<h2>&mvt:day;</h2>
<p>
l.pos1=<mvt:eval expr="l.pos1" /><br>
l.count1=<mvt:eval expr="l.count1" /><br>
</p>
<ul>
<mvt:foreach iterator="meal" array="meals">
<li>
<h4>&mvt:meal;</h4>
<p>
l.pos2=<mvt:eval expr="l.pos2" /><br>
l.count2=<mvt:eval expr="l.count2" /><br>
</p>
</li>
</mvt:foreach>
</ul>
</li>
</mvt:foreach>
</ul>
Output:
<ul>
<li>
<h2>Sunday</h2>
<p>
l.pos1=1<br>
l.count1=7<br>
</p>
<ul>
<li>
<h4>Breakfast</h4>
<p>
l.pos2=1<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Lunch</h4>
<p>
l.pos2=2<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Dinner</h4>
<p>
l.pos2=3<br>
l.count2=3<br>
</p>
</li>
</ul>
</li>
<li>
<h2>Monday</h2>
<p>
l.pos1=2<br>
l.count1=7<br>
</p>
<ul>
<li>
<h4>Breakfast</h4>
<p>
l.pos2=1<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Lunch</h4>
<p>
l.pos2=2<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Dinner</h4>
<p>
l.pos2=3<br>
l.count2=3<br>
</p>
</li>
</ul>
</li>
<li>
<h2>Tuesday</h2>
<p>
l.pos1=3<br>
l.count1=7<br>
</p>
<ul>
<li>
<h4>Breakfast</h4>
<p>
l.pos2=1<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Lunch</h4>
<p>
l.pos2=2<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Dinner</h4>
<p>
l.pos2=3<br>
l.count2=3<br>
</p>
</li>
</ul>
</li>
<li>
<h2>Wednesday</h2>
<p>
l.pos1=4<br>
l.count1=7<br>
</p>
<ul>
<li>
<h4>Breakfast</h4>
<p>
l.pos2=1<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Lunch</h4>
<p>
l.pos2=2<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Dinner</h4>
<p>
l.pos2=3<br>
l.count2=3<br>
</p>
</li>
</ul>
</li>
<li>
<h2>Thursday</h2>
<p>
l.pos1=5<br>
l.count1=7<br>
</p>
<ul>
<li>
<h4>Breakfast</h4>
<p>
l.pos2=1<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Lunch</h4>
<p>
l.pos2=2<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Dinner</h4>
<p>
l.pos2=3<br>
l.count2=3<br>
</p>
</li>
</ul>
</li>
<li>
<h2>Friday</h2>
<p>
l.pos1=6<br>
l.count1=7<br>
</p>
<ul>
<li>
<h4>Breakfast</h4>
<p>
l.pos2=1<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Lunch</h4>
<p>
l.pos2=2<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Dinner</h4>
<p>
l.pos2=3<br>
l.count2=3<br>
</p>
</li>
</ul>
</li>
<li>
<h2>Saturday</h2>
<p>
l.pos1=7<br>
l.count1=7<br>
</p>
<ul>
<li>
<h4>Breakfast</h4>
<p>
l.pos2=1<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Lunch</h4>
<p>
l.pos2=2<br>
l.count2=3<br>
</p>
</li>
<li>
<h4>Dinner</h4>
<p>
l.pos2=3<br>
l.count2=3<br>
</p>
</li>
</ul>
</li>
</ul>
以上是关于xml POS&COUNT的主要内容,如果未能解决你的问题,请参考以下文章
断言失败:第 24 行 pos 15:'color != null && color.alpha == 0xFF':不正确