[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Three folders Three output xml file with same input.xs
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|