我有一个循环节点 NationalityDet 包含多个当前前国籍或公民身份(CurrentNatCit)我需要确保当前国籍地图的所有国家值都转到国籍节点,并且当前公民身份映射到公民身份节点,所有前国籍/公民身份映射到 OtherNationality/OtherCitizenship(Citizenship 只允许一条记录,它是节点)。有任何想法吗?
源样本
<NationalityDet>
<NatCit>
<Type>NATIONALITY/CITIZENSHIP</Type>
<Status>CURRENT/FORMER</Status>
<Country>UK</Country>
</NatCit>
<OtherNatCit>
<Type>NATIONALITY/CITIZENSHIP</Type>
<Status>CURRENT/FORMER</Status>
<Country>UK</Country>
</OtherNatCit>
</NationalityDet>
目的地样本
<Person>
<Person1>
<Nationality>NATIONALITY/CURRENT</Nationality>
<Nationality>NATIONALITY/CURRENT</Nationality>
<Nationality>NATIONALITY/CURRENT</Nationality>
<Citizenship>CITIZENSHIP/CURRENT</Citizenship>
<Citizenship>CITIZENSHIP/CURRENT</Citizenship>
<Citizenship>CITIZENSHIP/CURRENT</Citizenship>
<OtherNationality>
<Nationality>NATIONALITY/FORMER</Nationality>
<Nationality>NATIONALITY/FORMER</Nationality>
<Nationality>NATIONALITY/FORMER</Nationality>
</OtherNationality>
<OtherCitizenship>CITIZENSHIP/FORMER</OtherCitizenship>
</Person1>
</Person>
目前已经使用了你提到的循环functoid和一些等号和&来允许这个映射。对于 TYPE=CITIZENSHIP 和 STATUS=FORMER 对于 OtherCitizenship 的两个不同父节点的节点计数,我陷入了困境。有什么想法吗?