私はこのデータをクライアント用に持っています(以下を参照)、任意の数の層を持つことができる箇条書きリストを作成したいと思います。私はまた、項目が複数回リストアップされるという側面では動的であることを望んでいます。 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>
良い質問、+1。 @Alejandroのものより少し単純で短い解決策(全くパラメータを必要としない)については私の答えを見てください。 :) –
@ Kirk-Strobeck:私は自分の答えを更新しました。そして、 'tag'が複数の親を持つとき、正しい結果が生成されるようになりました。繰り返しますが、これは簡単で短く、パラメータを使用せず、 ''の基本的な機能に基づいています。 –