|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Large Document
Jack Cane wrote:
Markus, outputting to multiple files is not possible with 'pure' XSLT 1.0., so you need to rely on some extension function. XSLT 2.0 will be able to do it using the <xsl:result-document> element, you can find an example in the draft there (http://www.w3.org/TR/xslt20/). Saxon 7.+ implements this already, so you could try it. I can see naming issues. Maybe XSL can look in the XML file for certain element property names (i.e., chapterheading="Chapter 1."), etc.), and I can write code that maps section names to file names? Is that how it can work? [snippet using Xalan splitting at sect1 elements] <?xml version="1.0" encoding="ISO-8859-1" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
extension-element-prefixes="redirect">
...<xsl:template match="sect1">
<!-- assuming sect1 elements have an id attribute -->
<redirect:write select="concat(@id, '.html')">
<html>
<body>
<xsl:apply-templates />
</body>
</html>
</redirect:write>
</xsl:template>... </xsl:stylesheet> Saxon 6 would use <saxon:output> with saxon bound to xmlns:saxon="http://icl.com/saxon" Maybe you can point me to the best online source? a nice example for this checking fpr the availability of the extensions can be found in the docbook XSL Stylesheets: http://docbook.sourceforge.net/projects/xsl/ have a look at chunker.xsl in the html diretory. hth, Markus XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








