Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Three folders Three output xml file with same input.xsl and input.xml

From: "Shailesh Shinde" <shailesh@------------>
To:
Date: 10/3/2005 12:15:00 PM
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent