我试图将大型项目中的XML表转换为HTML表格,而且我对这个XSLT游戏很新。我发现了大量的材料,但我还没有看到任何东西,是相当类似这样的问题,所以我认为我会问:具有相同属性值的XSLT wrap元素(具有行attr的表格)
<table name="my table (2 columns)">
<!-- some column headers -->
<colhddef colnum="1">This is column 1</colhddef>
<colhddef colnum="2">This is column 2</colhddef>
<entry row="1" colnum="1">entry 1</entry>
<entry row="1" colnum="2">entry 2</entry>
<entry row="2" colnum="1">entry 3</entry>
<entry row="2" colnum="2">entry 4</entry>
<entry row="3" colnum="1">entry 5</entry>
<entry row="3" colnum="2">entry 6</entry>
<entry row="4" colnum="1">entry 7</entry>
<entry row="4" colnum="2">entry 8</entry>
</table>
我期待包裹每一组具有共同属性的行条目与<tr></tr>
,并确保列适当放置在表中不会伤害。这可能比我做得更简单...但任何帮助都非常感谢!
奖励积分:哪里可以找到XSLT的优质学习资源?推荐书籍?等等?
再次提前致谢!
至于学习,看到http://stackoverflow.com/tags/xslt/info末尾的资源部分。 –
至于没有找到类似的东西,今天http://stackoverflow.com/questions/42228190/how-do-i-sort-a-list-of-xml-items-into-rows-for-an-html-表似乎是相同的要求,稍微不同的格式,所以尝试适应,如果你坚持发布你的尝试。 –