你能告诉我为什么它不起作用吗?我是 xsl 的新手....
xsl:
<ol id="presents">
<xsl:for-each select="tns:meeting/tns:jobs/tns:ausents/tns:ausent-member">
<li id="ausent"><a HREF="#jobs"><b><xsl:value-of select="tns:meeting/tns:members/tns:member[@member_id = current()/@member_id]/@name"/></b></a></li>
</xsl:for-each>
</ol>
xml 示例:
<tns:meeting data="2001-01-01" local="Porto" organization="FCUP" type="ordinária" xmlns:tns="http://www.example.org/meeting" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/meeting meeting.xsd ">
<tns:members>
<tns:member name="João" member_id="i1" title="account manager"></tns:member>
<tns:member name="Carlos" member_id="i2" title="director geral"></tns:member>
<tns:member name="José" member_id="i3" title="colaborador"></tns:member>
<tns:member name="Joana" member_id="i4" title="secretária"></tns:member>
<tns:member name="Carolina" member_id="i5" title="tesoureira"></tns:member>
<tns:member name="Pedro" member_id="i6" title="colaborador"></tns:member>
<tns:member name="Ivo" member_id="i7" title="presidente AE"></tns:member>
<tns:member name="Luis" member_id="i8" title="vice-presidente AE"></tns:member>
</tns:members>
<tns:jobs> <!-- Possibilidade de colocar o atributo nome no trabalho -->
<tns:ausents>
<tns:ausent-member member_id="i1">
<tns:justification>Problemas pessoais</tns:justification>
</tns:ausent-member>
<tns:ausent-member member_id="i2">
<tns:justification>Problemas pessoais</tns:justification>
</tns:ausent-member>
</tns:ausents>
步骤
"tns:meeting/tns:members/tns:member[@member_id = current()/@member_id]">"
不工作,我找不到问题....