[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Xalan redirect::write

Subject: Xalan redirect::write
From: Joel Hughes <joel@xxxxxxxxxxx>
Date: Wed, 23 Feb 2000 16:42:46 -0500
xalan redirect
Experiencing problems with Xalan's redirect extension.
The code attached is from the Xalan docs describing the extension.
Issue: data directed to the file is not captured in the file. The file is created, but empty.
Notes: bsf.jar and bsfengines.jar from IBM are required in the classpath to use this extension.
 
Things work from the command line:
java org.apache.xalan.xslt.Process -IN foo.xml -XSL foo.xsl -OUT foo1.out
Note: when running from the command line the Cocoon PI in foo.xml was not present.
 
From within the Cocoon process the output file is created but empty.
 
Cocoon files:
foo.xml
 
<?xml version="1.0"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="" type="text/xsl"?>
 
<doc>
  <foo file="C:\temp\foo.out">
    Testing Redirect extension:
      <bar>A foo subelement text node</bar>
  </foo>
  <main>
    Everything else
  </main>
</doc>
 
foo.xsl
<?xml version="1.0"?>
 
<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>
 
 
Joel Hughes
ph: 905-625-8235
 
Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.