[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How to process a list of files
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|