我有一个XML文件,这也是我写它生成html XSL文件。 我的XML文件:
<?xml version="1.0" encoding="UTF-8"?>
<expert_questions>
<question Id="10">
<source_ip>192.168.150.1</source_ip>
<port>545</port>
<packet_size>1400</packet_size>
<more_details>
<time>13:42</time>
<count>100</count>
<comment>more details</comment>
</more_details>
</question>
<question Id="...">
.
.
.
</question>
</expert_questions>
我的XSL文件:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output omit-xml-declaration="yes" indent="yes" />
<xsl:template match="/">
<xsl:for-each select="expert_questions">
<table border="1" cellspacing="0" cellpadding="0">
<tr class ="table-title">
<th class="th">source ip</th>
<th class="th">port</th>
<th class="th">packet size</th>
<th class="th">more details</th>
</tr>
<xsl:for-each select="question">
<tr>
<xsl:attribute name="id">
<xsl:value-of select="@Id" />
</xsl:attribute>
<td><xsl:value-of select="source_ip"></xsl:value-of></td>
<td><xsl:value-of select="port"></xsl:value-of></td>
<td><xsl:value-of select="packet_size"></xsl:value-of></td>
<td>
<xsl:for-each select="more_details">
<xsl:attribute name="title">
<xsl:value-of select="concat('Time: ', time, ' ')" />
<xsl:value-of select="concat('Count: ', count)" />
<xsl:value-of select="concat('Comment: ', comment)" />
</xsl:attribute>
<xsl:text>more details</xsl:text>
</a>
</xsl:for-each>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
在XML信息太长,这应该是在显示某些页面。
我需要使用分页。 我搜索, 我发现这个网页 (约XSLT寻呼例子 ),以帮助我做到这一点。
它没有任何的XML文件,我不能完全理解要做什么(我在XSL新)。
我能做到这一点,而不一把umbraco与否?