是否可以引用当前XML中定义的标记的内容?
例如,xml中包含以下内容:
<Scheduler>
<Faculty_Roster>
<Faculty>foo</Faculty>
<Faculty>bar</Faculty>
</Faculty_Roster>
<Subjects>
<Subject>
<Name>Fakeology</Name>
<Semester>1</Semester>
</Subject>
<Subject>
<Name>Onionology</Name>
<Semester>2</Semester>
</Subject>
<Sections>
<Section>C</Section>
<Section>X</Section>
</Sections>
我想在教师,科目和科室之间创建以下类型的XML映射[我需要在方括号中]:
<Subject_Faculty_Collection>
<Subject_Faculty_Sec>
<Subject_Name>@Subjects/Subject/Name:1 [refer to the first entry] [Instead of Fakeology]</Subject_Name>
<Faculty_Name>@Faculty_Roster/Faculty:1 [ instead of foo]</Faculty_Name>
<Section_Name>@Sections/Section:1 [instead of C] </Section_Name>
<Subject_Faculty_Sec>
我想这样做是为了避免重复。可能吗 ?如果没有,这里有设计缺陷吗?