[xsl] Problems with stylesheet processing

Subject: [xsl] Problems with stylesheet processing
From: "Michael Welter" <mike@xxxxxxxxxxxxxx>
Date: Fri, 19 Apr 2002 07:44:18 -0600
I have an xsl stylesheet that works perfectly when run from the command line
(org.apache.xalan.xslt.Process...)  However, I can't get it to work when
using the Java API.

Using the API, control is passed to the top-level template (<xsl:template
match="/">) where the <xsl:message>'s are printed.  This top-level template
contains <xsl:apply-templates select="Trades"/>, but control never gets to
the <xsl:template match="Trades"> template.  The incoming XML is simply
"<Trades/>".

When I change to <xsl:apply-templates/>, control is passed from the top
level to the  <xsl:template match="*"> template.  The name() function here
indicates the name is blank or null.

I'm using the ContentHandler interface of TransformerHandler to send SAX
events from the app.  I'm reasonably certain that this is working correctly
because, when I
call newTransformerHandler() with no parameters, the incoming XML is echo'd
back out (<Trades/>).  When I call newTransformerHandler( new
StreamSource( "foo.xsl" ) ), I have the problem.

I'm using Xalan on Win2000.  I just installed j2sdk1.4.0 and removed Xalan
from the classpath, but the problem persists.

Has anyone had a similar experience?

Thanks for your help,
Mike



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


Current Thread