我附上了我的 xsd 的截断版本
<?xml version="1.0" encoding="UTF-8"?>
<xs:complexType name="School_ip_details">
<xs:sequence>
<xs:element type="xs:string" name="Tarun_Name" />
<xs:element type="xs:string" name="Tarun_IP" />
<xs:element type="xs:string" name="Tarun_Subnet" />
</xs:sequence>
</xs:complexType>
<xs:element name="CLASSESS">
<xs:complexType>
<xs:sequence>
<xs:element name="Taruns">
<xs:complexType>
<xs:sequence>
<xs:element name="Tarun" maxOccurs="127">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="Tarun_Name" />
<xs:element type="xs:string" name="Tarun_Prefix" />
<xs:element type="xs:string" name="Tarun_Subnet" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Schools">
<xs:complexType>
<xs:sequence>
<xs:element name="School">
<xs:complexType>
<xs:sequence>
<xs:element name="School_IPdetails" type="School_ip_details" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:keyref name="TarunRef" refer="TarunKey">
<xs:selector xpath="." />
<xs:field xpath="./School/School_IPdetails/Tarun_Name" />
</xs:keyref>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:key name="TarunKey">
<xs:selector xpath="./Taruns/Tarun/Tarun_Name" />
<xs:field xpath="." />
</xs:key>
<xs:key name="TarunIPKey">
<xs:selector xpath="./Taruns/Tarun/Tarun_Prefix" />
<xs:field xpath="." />
</xs:key>
</xs:element>
这里我想实现以下场景。当我提到任何值CLASSES/Taruns/Tarun/Tarun_Name
时,该特定CLASSES/Scools/School/School_ip_details/Tarun_Name
值的值应反映在CLASSES/Taruns/Tarun/Tarun_Prefix
Tarun_Name
CLASSES/Scools/School/School_ip_details/Tarun_IP
请帮助我