基本上,我有两个目录,
in
out
我使用XSLT在目录中创建文件
在里面
<file name="1 old.xml"><...></file>
<file name="2 new.xml"><...></file>
包含
<source>
<target>
<xsl:template match="file">
<xsl:result-document method="xml" href="{outputfolder\@name}">
<xsl:when test="unparsed-text-available(inputfolder\@name)">
<xsl:apply-templates select="document(inputfolder\@name)"/>
</xsl:when>
</xsl:template>
在里面
-
-
如果文件名包含“old”,我想修改“1 old.xml”中的一个节点。
<xsl:template match="target">
<xsl:choose>
<xsl:when test="...">
<xsl:copy>
<xsl:copy-of select="ancestor::*/source"/>
</xsl:copy>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:template>
在此模板中,当前节点是
<
1 old.xml
filelist.xml
创建了我的输出文档?