<Geometry>
<Shapes>
<Shape id="b1" author-id="a1">
<width>First</width>
<height>Shape</height>
<color>Color</color>
<Shape id="b2" author-id="a2">
<width>Second</width>
<height>Shape</height>
<color>Color</color>
</Shape>
</Shapes>
<Authors>
<Author id="b1">
<name>Andrew</name>
<secondname>Coldwater</secondname>
<tel>978-3-16-148410-0</tel>
</Author>
<Author id="b2">
<name>Andrew</name>
<secondname>Coolwater</secondname>
<tel>9781-140-201</tel>
</Author>
</Author>
<xsl:key name="exampleName" match="Author" use="@id"/>
<xsl:apply-templates select="key('exampleName', @author-id)" />
答案 0 :(得分:0)
使用模板来匹配Author
中的<xsl:apply-templates select="key('exampleName', @author-id)" />
个元素。
喜欢
<xsl:template match="Author">
<xsl:value-of select="name" />
<xsl:value-of select="secondname" />
</xsl:template>