[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Recursion

Subject: Recursion
From: "Shailesh Shinde" <shailesh@xxxxxxxxxxxx>
Date: Mon, 7 Nov 2005 12:43:34 +0530
 Recursion
Hi All,

I have input xml file as:

<Root>
<file fileloc="A/gen1.xml" />
<file fileloc="A/gen2.xml" />
</Root>

I have to transform this and get:

gen1.xml
gen2.xml

As I have done some changes in these two file.

My XSL for the same is:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<xsl:output method="xml" version="1.0" encoding="UTF-8"
indent="yes"/>
	<xsl:template match="/">
<xsl:for-each select="Root/file">
			<fileloc>
				<xsl:attribute name="path"><xsl:value-of
select="concat(substring-before(substring-after(@fileloc,'/xml/'),'.'),'.htm
')"/> </xsl:attribute>
				<xsl:attribute
name="noNamespaceSchemaLocation">MSD_book.xsd</xsl:attribute>
				<xsl:text>&#13;</xsl:text>
				<xsl:apply-templates select="script"/>
				<xsl:apply-templates
select="document(@fileloc)/Test/topic"/>
			</fileloc>
</xsl:for-each>
	</xsl:template>
	<xsl:template match="script">
		<scriptinc>
			<xsl:copy-of select="@*"/>
		</scriptinc>
	</xsl:template>
	<xsl:template match="topic">
		<xsl:copy-of select="."/>
	</xsl:template>
</xsl:stylesheet>

With this xsl I am getting one xml file where i need two xml files as output
How I use Recursion to get output.

Thanks,
Shailesh

Current Thread
  • Recursion
    • Shailesh Shinde - 7 Nov 2005 07:13:38 -0000 <=

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.