下面是我的 XML 文件 -
<CVs>
<CV>
<Name>ABC</Name>
<Address></Address>
<Introduction></Introduction>
<CompSkills>Java, XSLT, XPATH, XML, Oracle, VB.NET</CompSkills>
<Experience>
<Profile></Profile>
<Duration></Duration>
<Info></Info>
</Experience>
<Experience>
<Profile></Profile>
<Duration></Duration>
<Info></Info>
</Experience>
<Experience>
<Profile></Profile>
<Duration></Duration>
<Info></Info>
</Experience>
<CV>
<CV>
<Name>XYZ</Name>
<Address></Address>
<Introduction></Introduction>
<CompSkills>Java, XSLT, XPATH, XML, JSP, HTML</CompSkills>
<Experience>
<Profile></Profile>
<Duration></Duration>
<Info></Info>
</Experience>
<Experience>
<Profile></Profile>
<Duration></Duration>
<Info></Info>
</Experience>
<Experience>
<Profile></Profile>
<Duration></Duration>
<Info></Info>
</Experience>
<CV>
</CVs>
下面是 XSLT 文件 - 一个简短的版本来了解一下
<xsl:template match="Name">
<table align='center' width='800' style="font-family:tahoma; font-size:13pt;">
<tr><td>
<xsl:apply-templates/>
</td></tr>
</table>
</xsl:template>
<xsl:template match="Experience">
<table align='center' width='800' style="font-family:tahoma; font-size:13pt;">
<tr><td>
<xsl:apply-templates/>
</td></tr>
</table>
</xsl:template>
我使用Java作为前端。为了以 HTML 格式显示输出,我有一个 XSLT 文件。该 XSLT 文件是标准文件,即;它显示所有简历。
现在我要做的是使用包含所有候选人姓名的列表框,当单击特定名称时,只应显示他的简历。我已经编写了 Java 部分代码,以将候选人的姓名显示到列表框中。现在,在以 HTML 格式显示所选候选人的简历时遇到一些问题。
当前 XSLT 文件正在显示所有 CV。那么我是否需要另一个使用从程序传递的参数并显示其详细信息的 XSLT 文件?如果是,那么有关如何执行此操作的一些帮助...?
提前致谢 - 约翰