私は個人1のためにそのような何かにXSLT 2.0XSL 2.0:
<data>
<attributes>
<attribute code="Name" datatyp="String" class="A"></attribute>
<attribute code="Age" datatyp="Integer" class="A"></attribute>
<attribute code="sex" datatyp="String" class="A"></attribute>
<attribute code="height" datatyp="Integer" class="B"></attribute>
</attributes>
<personal>
<name>Klaus</name>
<Age>16</Age>
<sex>male</sex>
<height>180</height>
</personal>
<personal>
<height>165</height>
</personal>
</data>
に属性がどのクラスに表示されて依存性がある
<personal>
<class>
<classtype>A</classtype>
<name>Klaus</name>
<Age>16</Age>
<sex>male</sex>
</class>
<class>
<classtype>B</classtype>
<height>180</height>
</class>
</personal>
<personal>
<class>
<classtype>B</classtype>
<height>165</height>
</class>
</personal>
を変換しようとする定義済みの属性に応じたテンプレートを呼び出します入力XMLの冒頭に定義されています。クラスAとBのテンプレートをPersonごとに1回だけ呼び出す必要があります。そのため、次のような試みは機能しません。
私は、指定されたパラメータに従って適切なテンプレートを呼び出す問題を解決するためにいくつかの助けが必要です。
http://stackoverflow.com/help/someone-answers –