我真的很新的XSLT,所以我会很感激,如果有人能帮助我......我 有这样一个XML XML元素属性和XML标记HTML表:如何创建使用XSLT
<dummy>
<element name="O">
<description/>
</element>
<element name="L">
<description>abstract for L</description>
</element>
<element name="Sd">
<description>Description for Sd</description>
</element>
<element name="Dh">
<description/>
</element>
<element name="P">
<description/>
</element>
<element name="S">
<description>Some description for S</description>
</element>
<element name="A">
<description/>
</element>
<L>2010</L>
<A>58.78</A>
<O>O</O>
<Sd>1101</Sd>
<S>0.00</S>
<A>368.38</A>
<L>2009</L>
<Sd>1103</Sd>
</dummy>
我已经到了这样一个最终的HTML表(使用XSLT“1.0”):
<tr>
<td>
I have to select only non element tags one by one, and then replace the tag with the
description of the same element name (in case that decription does not exists then display only element name).
</td>
<td>
Value of non element tag
</td>
</tr>
4 example (upper xml)
[in something like for-each]: take <L> 2010 </L>
然后搜索元素名称=“L”(如果描述存在=真拿 说明其他“L” )和 显示摘要为L 2010
因此,最终输出4给定的XML应该是:
<tr><td> abstract for L </td> <td> 2010 </td> </tr>
<tr><td> A </td> <td> 58.78 </td> </tr>
<tr><td> O </td> <td> O </td> </tr>
<tr><td> Description for Sd </td> <td> 1101 </td> </tr>
<tr><td> Some description for S </td> <td> 0.00 </td> </tr>
<tr><td> A </td> <td> 368.38 </td> </tr>
<tr><td> abstract for L </td> <td> 2009</td> </tr>
<tr><td> Description for Sd </td> <td> 1103 </td> </tr>
对XSLT必须写在XSLT =“1.0”
蒂姆c您排除:) – tequila
完美的作品.... – tequila