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]

multiple output files in xslt 1.0


Hi all,

What would you say is the quickest way to produce multiple output documents
when using the following environment:
- XSLT 1.0
- Jakarta-Tomcat 3.2.1 (JSP)
- Jakarta XSL-Taglibs

Since the xsl-taglibs come with Xalan.jar it contains Redirect.class, which
should enable me to use, but I can't get it right. Other transformations
work fine with the <xsl:apply> tag from xsl-taglibs.

My JSP file:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd";>
<%@taglib uri="http://jakarta.apache.org/taglibs/xsl-1.0"; prefix="xsl" %>
<html>
<head>
<title>Update</title>
</head>
<body>
    <textarea>
        <xsl:apply xsl="provider.xml" xsl="testje.xsl"/>
    <textarea>
</body>
</html>

My XML document:

<?xml version="1.0" encoding="iso-8859-1"?>
<dummy/>

My XSL document:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/XSL/Transform/1.0";
                xmlns:lxslt="http://xml.apache.org/xslt";
                xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
                extension-element-prefixes="redirect">
<xsl:template match="/">
    <xsl:text>Before redirect.</xsl:text>
      <redirect:write file="redirected.txt" method="text">
        <xsl:text>Inside redirected.txt</xsl:text>
      </redirect:write>
    <xsl:text>After redirect.</xsl:text>
</xsl:template>
</xsl:stylesheet>

My error message (root cause):

javax.servlet.jsp.JspException: org.apache.xalan.xslt.XSLProcessorException:
The root element is required in a well-formed document.
	at org.apache.taglibs.xsl.ApplyTag.doEndTag(ApplyTag.java:274)


Greetings,
bas.alberts@group2000.nl



 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]