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