我正在尝试获取父母的社会保障。我尝试了此代码,但它返回空,但我知道该值不为空。
<xsl:call-template name="render-Employee">
<xsl:with-param name="ssno" select="normalize-space(SocialSecurityNumber)"></xsl:with-param>
<xsl:with-param name="firstName" select="normalize-space(FirstName)"></xsl:with-param>
<xsl:with-param name="middleName" select="normalize-space(MiddleName)"></xsl:with-param>
<xsl:with-param name="lastName" select="normalize-space(LastName)"></xsl:with-param>
<xsl:with-param name="creationDate" select="ChangeDate"></xsl:with-param>
</xsl:call-template>
<xsl:for-each select="Dependents">
<xsl:for-each select="Dependent">
<xsl:call-template name="render-Dependent">
<xsl:with-param name="recordType" select="'BN'" />
<xsl:with-param name="employeeSsno" select="normalize-space(ancestor::Employee[1]/@SocialSecurityNumber)"/>
示例 xml
<Employee>
<EntityKey>
<EntitySetName>Employees</EntitySetName>
<EntityContainerName>...</EntityContainerName>
<EntityKeyValues>
<EntityKeyMember>
<Key>EmployeeId</Key>
<Value xsi:type="xsd:int">873</Value>
</EntityKeyMember>
<EntityKeyMember>
<Key>CompanyId</Key>
<Value xsi:type="xsd:int">33</Value>
</EntityKeyMember>
</EntityKeyValues>
</EntityKey>
<Dependents>
<Dependent>
<EntityKey>
....
</EntityKeyValues>
</EntityKey>
...
<SocialSecurityNumber>123456789</SocialSecurityNumber>
...
</Dependent>
</Dependents>
<EmployeeId>873</EmployeeId>
...
<SocialSecurityNumber>000000000</SocialSecurityNumber>
...
</Employee>