我正在使用XSLT操縱XML文件內的數據(我將一個XML文件的內容放入另一個XML文件的新shell中)。我只使用第一個文件中的一些數據,並且將不使用的部分數據連接到新文件的末尾。我如何讓XSLT不這樣做?我的文件末尾的XSLT轉儲垃圾
謝謝!
編輯:下面是一些僞代碼,我不能發佈的實際代碼:
<xsl:output method="xml"/>
<xsl:template match="foo">
<xsl:element name="bar">
<!--... makes elements and traverses some of the other file ...-->
</xsl:element>
</xsl:template>
和輸出:
<foo>
<bar>
<!-- ... -->
</bar>
</foo>
<!-- junk at the end of the file that matches up with the content of the unused data tags -->
0
N
N
Y
00000148
ASDF
XSLT文件的末尾收集所有其餘的你需要,如果你想好後一些代碼中的空白模板答案。 – 2010-07-07 23:09:14