0
我有一個大的XML文件和另一個小XML文件,名稱與某些大型XML文件的某個屬性值匹配。我想創建一個大的XML文件的記錄的子集,使用小的一個。我的XSL的嘗試是一樣的東西叫「single_include.xml」這XSL基於xml記錄的文件對一組記錄進行子集化
<xsl:stylesheet xmlns:t="http://www.xyz.com/xml/Fixit" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="t:Fixit[.//t:Name[(@OrganisationName!=document('single_include.xml')//OrganisationName)]]"></xsl:template>
</xsl:stylesheet>
我的小XML文件是這樣的
<ListOfOrganisationName>
<OrganisationName>
The first organisation
</OrganisationName>
<OrganisationName>
The second organisation
</OrganisationName>
</ListOfOrganisationName>
它似乎只對第一個記錄工作。有任何想法嗎?
希望這是有道理的。
您可以包括(小)樣本的大型XML,以及您的預期輸出?謝謝! – 2012-07-25 11:51:20
這個問題很含糊。請編輯*這個問題並提供一個* small * XMLDoc1(你稱之爲「大型XML文件」),並提供確切的想要的結果,同時解釋轉換的要求,不清楚你的意思是什麼「記錄的子集」以及「你匹配」的含義。 – 2012-07-25 12:00:22