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
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> </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 to get output. How do get output when its done with first file
transform?
Thanks,
Shailesh
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--