<?xml version="1.0" encoding="utf-8"?>
<ConfigurationMappings>
<ConfigurationMap>
<Widget Type="All" Include="true" NeedsMandatoryEffectConfiguration="true"/>
<Trigger Type="Show" />
<ConfigurationEffects>
<Effect>1</Effect>
<Effect>2</Effect>
<Effect>3</Effect>
<Effect>9</Effect>
</ConfigurationEffects>
</ConfigurationMap>
<ConfigurationMap>
<Widget Type="All" Include="true" NeedsMandatoryEffectConfiguration="true"/>
<Trigger Type="Hide" />
<ConfigurationEffects>
<Effect>1</Effect>
<Effect>2</Effect>
<Effect>3</Effect>
<Effect>9</Effect>
</ConfigurationEffects>
</ConfigurationMap>
</ConfigurationMappings>
需要为上述 XML 输入编写 xsl。因为输出将采用小部件类型 all 和触发器类型 show 的形式需要输出所有效果需要有关如何编写 xsl 的帮助,因为我不知道 xsl。我的项目需要这个
我自己写了下面的xsl
<tr>
<td><xsl:value-of select="ConfigurationMappings/ConfigurationMap/Widget/@Type"/></td>
<td><xsl:value-of select="ConfigurationMappings/ConfigurationMap/Trigger/@Type"/></td>
<td><xsl:value-of select="ConfigurationMappings/ConfigurationMap/ConfigurationEffects/Effect"/></td>
</tr>
它以以下格式提供输出:
Widget Trigger Effects
----------------------------
All Show 1
但我想要以下格式的输出 Widget Trigger Effects
---------------------------
All Show 1
--------------------------
All Show 2
--------------------------
All Show 3
-------------------------
All Show 9
----------------------------
All Hide 1
---------------------------
All Hide 3
--------------------------
All Hide 6
----------------------------
All Hide 9
---------------------------------
请帮帮我,忽略为发布问题而添加的子标题(----)