RE: [xsl] splitting one xml into many xml documents using xsl

Subject: RE: [xsl] splitting one xml into many xml documents using xsl
From: "Sebastian Rahtz" <sebastian.rahtz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 9 Mar 2001 22:40:25 +0000
Michael Kay writes:
 > Many XSLT processors have the ability to do it but (until XSLT 1.1) the
 > details are vendor-specific. Use xsl:document with Saxon, xalan:write with
 > Xalan, etc.

my current solution is appended. a template "outputChunk" to which you
pass the desired filename, and the material to write to it. note the
use of version="1.1", to get the xsl:document through (this fires with
Saxon 6.2.1 and jdxslt).

I'd be interested in other xsl:when statements for this. among
the problems:

   - unless its changed, Oracle processor can't work this way, it wants
     some top-level declaration
   - Xalan J and Xalan C return the same "vendor" - does anyone know how
     to distinguish them
   - XT does not implement forward-compatible processing properly
   - not does Sablotron (and it has no extensions anyway)
   - what are the right incantations for 4xslt? I would install it and try,
     but Python applications never work for me, cos they dont like the colour
     of my socks
   - do any other processors support the functionality? Unicorn?



<xsl:template name="outputChunk">
 <xsl:param name="ident"/>
 <xsl:param name="content"/>
  <xsl:when test="element-available('xsl:document')">
      <xsl:document encoding="{$outputEncoding}" 
               method="html" href="{$ident}">
        <xsl:copy-of select="$content"/>
  <xsl:when test="contains($processor,'SAXON')">
      <saxon:output encoding="{$outputEncoding}" 
               method="html" file="{$ident}">
        <xsl:copy-of select="$content"/>
  <xsl:when test="contains($processor,'Apache')">
        <xsl:copy-of select="$content"/>
    <xsl:copy-of select="$content"/>



 XSL-List info and archive:

Current Thread