如何获取最后一个元素的属性值?

时间:2015-09-11 03:22:10

标签: xml xslt-1.0

输入XML

<pageMeta>
  <trail target="/">SAIR Home</trail>
  <trail target="/handle/10862/1">SEAFDEC Aquaculture Department</trail>
  <trail target="/handle/10862/46">SEAFDEC/AQD Publications</trail>
  <trail target="/handle/10862/85">Institutional and Meeting Reports</trail>
  <trail target="/handle/10862/699">Institutional Reports</trail>
  <trail target="/handle/10862/527">Annual Reports</trail>
</pageMeta>

使用select="pageMeta/trail[@target][last()],我获得年度报告值。如何获取@target的最后一个/handle/10862/527属性的值?

提前致谢。

0 个答案:

没有答案