[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

Subject: 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
output xml file
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.