Subject: [xsl] How to process a list of files From: "Shailesh Shinde" <shailesh@xxxxxxxxxxxx> Date: Mon, 7 Nov 2005 17:17:08 +0530 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Identity Transform, Michael Kay | Thread | Re: [xsl] How to process a list of , Ragulf Pickaxe |
Re: [xsl] Identity Transform, Jeni Tennison | Date | Re: [xsl] Identity Transform, Christian Roth |
Month |