Subject: [xsl] Three folders Three output xml file with same input.xsl and input.xml From: "Shailesh Shinde" <shailesh@xxxxxxxxxxxx> Date: Mon, 3 Oct 2005 17:44:09 +0530 |
Hi All, There are three folders A, B and C which contains xml files in it. Using XSL, I have to merge xml files from each folder. At the end the output as A.xml, B.xml and C.xml Now, here my input xml contains: Input.xml <Root> <file fileloc="A/gen1.xml" /> <file fileloc="A/gen2.xml" /> <file fileloc="B/gen3.xml" /> <file fileloc="B/gen4.xml" /> <file fileloc="C/gen5.xml" /> <file fileloc="C/gen6.xml" /> </Root> Output should be: A.xml, B.xml and C.xml But with the present xsl it's merging A, B and C in one xml file. My xsl: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes" encoding="UTF-8" /> <xsl:template match="/"> <help> <product name="viewer" major_release="10" minor_release="0"> <onlinehelp> <xsl:for-each select="Root/file"> <fileloc><xsl:attribute name="path"> <xsl:value-of select="concat(substring-before(concat(substring-before(@fileloc,'/xml/'),'/ html/',substring-after(@fileloc,'/xml/')),'.xml'),'.htm')"/> </xsl:attribute> <xsl:apply-templates select="document(@fileloc)/onlinehelp/topic"/> </fileloc> </xsl:for-each> </onlinehelp> </product> </help> </xsl:template> <xsl:template match="topic"> <xsl:copy-of select="."/> </xsl:template> </xsl:stylesheet> If I comment out B and C filelocs, it gives output as A.xml. Here I have to use Input.xsl and Input.xml transform output as A.xml, B.xml and C.xml Can it be possible three folders three output xml file with same input.xml and input.xsl Thanks, Shailesh
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Problem in Preceding node, Ragulf Pickaxe | Thread | [xsl] Muenchian Grouping and Sum, Bret Gillan |
Re: [xsl] Problem in Preceding node, andrew welch | Date | [xsl] Muenchian Grouping and Sum, Bret Gillan |
Month |