所以我有一个客户的这些数据(见下文),我想创建一个可以有任意数量层的项目符号列表。我还希望它在项目可以被多次列出的方面是动态的。CMS 已设置好,因此 TAG 将声明其父级。无论 TAG 声明其父级,其子级都应在下面复制。不知道如何用 XSLT 解决这个问题,但一个简单的例子最终应该看起来像这样......
<ul>
<li>Missions</li>
<li>
<ul>
<li>Kampala, Uganda</li>
<li>Lima, Peru</li>
</ul>
</li>
</ul>
如果Kampala, Uganda
还声称其他东西作为父母,它会出现多次。如果Kampala, Uganda
有其他 TAGS 声称它是父级,这些子级将Kampala, Uganda
在每个实例中级联。
<data>
<tags>
<section id="3" handle="tags">Tags</section>
<entry id="72">
<parents>
<item handle="meetings">Meetings</item>
</parents>
<tag handle="bible-studies">Bible studies</tag>
</entry>
<entry id="51">
<parents>
<item handle="missions">Missions</item>
</parents>
<tag handle="brazil">Brazil</tag>
</entry>
<entry id="31">
<parents>
<item handle="ministry">Ministry</item>
</parents>
<tag handle="childrens-ministry">Children's ministry</tag>
</entry>
<entry id="28">
<parents>
<item handle="ministry">Ministry</item>
</parents>
<tag handle="college-and-career-ministry">College and Career ministry</tag>
</entry>
<entry id="56">
<parents>
<item handle="the-islands-of-vanuatu">The Islands of Vanuatu</item>
</parents>
<tag handle="fanafo-christian-fellowship">Fanafo Christian Fellowship</tag>
</entry>
<entry id="29">
<parents>
<item handle="ministry">Ministry</item>
</parents>
<tag handle="high-school-ministry">High School ministry</tag>
</entry>
<entry id="48">
<parents>
<item handle="missions">Missions</item>
</parents>
<tag handle="holsbybrunn-sweden">Holsbybrunn, Sweden</tag>
</entry>
<entry id="22">
<tag handle="home">Home</tag>
</entry>
<entry id="19">
<tag handle="israel">Israel</tag>
</entry>
<entry id="30">
<parents>
<item handle="ministry">Ministry</item>
</parents>
<tag handle="junior-high-ministry">Junior High ministry</tag>
</entry>
<entry id="47">
<parents>
<item handle="missions">Missions</item>
</parents>
<tag handle="kampala-uganda">Kampala, Uganda</tag>
</entry>
<entry id="49">
<parents>
<item handle="missions">Missions</item>
</parents>
<tag handle="lima-peru">Lima, Peru</tag>
</entry>
<entry id="64">
<parents>
<item handle="" />
</parents>
<tag handle="meetings">Meetings</tag>
</entry>
<entry id="32">
<parents>
<item handle="ministry">Ministry</item>
</parents>
<tag handle="men-s-ministry">Men’s ministry</tag>
</entry>
<entry id="44">
<parents>
<item handle="" />
</parents>
<tag handle="ministry">Ministry</tag>
</entry>
<entry id="33">
<tag handle="missions">Missions</tag>
</entry>
<entry id="54">
<parents>
<item handle="the-islands-of-vanuatu">The Islands of Vanuatu</item>
</parents>
<tag handle="natanara-christian-fellowship">Natanara Christian Fellowship</tag>
</entry>
<entry id="50">
<parents>
<item handle="missions">Missions</item>
</parents>
<tag handle="ouagadougou-burkina-faso">Ouagadougou, Burkina Faso</tag>
</entry>
<entry id="46">
<parents>
<item handle="missions">Missions</item>
</parents>
<tag handle="the-islands-of-vanuatu">The Islands of Vanuatu</tag>
</entry>
<entry id="77">
<parents>
<item handle="missions">Missions</item>
</parents>
<tag handle="villahermosa-mexico">Villahermosa, Mexico</tag>
</entry>
<entry id="27">
<parents>
<item handle="ministry">Ministry</item>
</parents>
<tag handle="womens-ministry">Women's ministry</tag>
</entry>
<entry id="73">
<parents>
<item handle="meetings">Meetings</item>
</parents>
<tag handle="worship">Worship</tag>
</entry>
</tags>