我真的很新的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