This note is mostly for the benefit of anyone else searching for help 
with Redirect. Sorry if Xalan is a bit off topic for Cocoon2, but I 
expect that a lot of XSLT users will be using Cocoon as a framework for 
Xalan-J/XSLT-based applications.

I spotted Redirect in Chapter 8(?) of "XSLT" by Doug Tidwell, August 
2001, O'Reilly and Associates. It does work in Cocoon2 but I had a few 
problems getting it to run. I finally solved it by looking at the 
Xalan-J docs at xml.apache.org as well as the source code for Redirect.

The Redirect class seems to have moved from 
org.apache.xalan.xslt.extensions.Redirect to the more concise
org.apache.xalan.lib.Redirect.

The comments in Redirect are actually useful! (thank you Mr Boag!)

It appears that you need to include several namespaces in the 
stylesheet tag. This was another source of 'the fog of war' for me.

<xsl:stylesheet version="1.0"
        xmlns:lxslt="http://xml.apache.org/xslt";
        xmlns:redirect="org.apache.xalan.lib.Redirect"
        extension-element-prefixes="redirect"
        ... rest omitted ...

This did not work for me when I followed examples from various sources.

I have one minor complaint about Redirect (may apply to all extensions).
This facility is terrific but it is strangely silent when things go 
wrong. For example, I used file="concat(... at one point and created a 
directory named "concat(...".

When I had mis-spelled namespace URI's nothing worked and it did so 
silently. When the lxslt declaration was missing ... same thing. I know 
I had perms wrong and was rewarded again with silence.

Thanks again. Hope this helps.


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to