This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Where does xalan redirect:write go to?!?


Hi,

i need to use the xalan redirect:write extension to create 
multiple file output. (I have used saxon:output, which works
as documented! But, for whatever reasons, I am reqiured to use 
xalan for this one). 

The "primary" file is written correctly, using the OutFileName 
command line parameter. However, all attempts to generate 
secondary output files, using redirect:write, produces no 
results, and no complaints either. 

I also tried to run the provided example, exactly as is, and it
aslo has the same results. The example I am referring to is at: 
http://heechee.osc.edu:7180/xalan-docs/extensions.html#ex-redirect


I am running it, on W2000, with:
XalanTransform test.xml test.xsl out.xml

However, the file "foo.out" is nowhere to be seen.
For convenience, the input files added below.

Many thanks, mario


====================
test.xml
--------
<?xml version="1.0"?> 
<doc>
  <foo file="foo.out">
    Testing Redirect extension:
      <bar>A foo subelement text node</bar>
  </foo>
  <main>
    Everything else
  </main>  
</doc>

====================
test.xsl
--------

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    version="1.0"
    xmlns:lxslt="http://xml.apache.org/xslt";
    xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
    extension-element-prefixes="redirect">

  <xsl:template match="/">
    <standard-out>
      Standard output:
      <xsl:apply-templates/>
    </standard-out>
  </xsl:template>
  
  <xsl:template match="main">
    <main>
      <xsl:apply-templates/>
    </main>
  </xsl:template>
  
  <xsl:template match="/doc/foo">
    <redirect:write select="@file">
      <foo-out>
        <xsl:apply-templates/>
      </foo-out>
    </redirect:write>
  </xsl:template>
  
  <xsl:template match="bar">
    <foobar-out>
      <xsl:apply-templates/>
    </foobar-out>
  </xsl:template>
  
</xsl:stylesheet>

=================================================


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]