[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Splitting Up XML in many files
Hello group, I would like to split up one XML file into many small files. For that, I would like to use one XML element at the "breakpoint" (in my case, the "book" tag) along which the file is split up. This also decides on the number of XML files created (in my case the number of books). The XSLT I have produced looks like this (following an example from a XSLT book): <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" omit-xml-declaration="yes"/> <xsl:template match="book"> <xsl:variable name="bookNumber"><xsl:number/></xsl:variable> <xsl:document href="{$bookNumber}.xml"> <xsl:copy-of select="*" /> </xsl:document> </xsl:template> </xsl:stylesheet> It does not work however. I get an error message saying that my <xsl:document> tag is not allowed at this position of the stylesheet. I am using XalanJ 2.5.2. It is not the latest version, I know. It seams Xalan (at least in this version) does not allow for this operation. Does somebody have an idea of another stylesheet which coulid do the job? If there is no other way, does somebody know if a new version of Xalan could handle that? Is there any other XSLT Processor which is freely available which does do that for me? I would prefer of keeping Xalan if possible... Kind Regards, Karl -- GMX DSL = Maximale Leistung zum minimalen Preis! 2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
|
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
|