这里是XML:为什么这个xpath返回一个空的节点集?
<recordTarget>
<patientRole>
<patient>
<religiousAffiliationCode code="1013" displayName="Christian (non-Catholic, non-specific)" codeSystem="2.16.840.1.113883.5.1076" codeSystemName="HL7 Religious Affiliation"/>
</patient>
</patientRole>
</recordTarget>
这里是我的XPath语句(n1为命名空间)
<xsl:variable name="religion" select="n1:recordTarget/n1:patientRole/n1:patient/n1:religiousAffilliationCode/@displayName"/>
我只包含少量XML,但当前上下文正确,名称空间n1已定义。迈克尔凯有一个敏锐的目光。这是拼写错误。 –