This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: xalan error with plain text
- From: Christian Roth <roth at visualclick dot de>
- To: XSL-List <XSL-List at lists dot mulberrytech dot com>
- Date: Sat, 12 Jan 2002 16:15:29 +0100
- Subject: Re: [xsl] xalan error with plain text
- References: <EC61ECAF-076A-11D6-A893-003065E74B40@earthtrip.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Michael,
><xsl:stylesheet version="1.0"
>xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output method="text" />
>
> <xsl:template match="document">
> <xsl:apply-templates />
> </xsl:template>
>
> <xsl:template match="title">
> <xsl:value-of select="." />
> </xsl:template>
>
></xsl:stylesheet>
I don't know about the exception, but I think you do not have a template
for the document root. So, you should at least add
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
This is what cost me some time to figure out: <document /> is not the
document root, but the one and only child of the document root. And it's
the document root where the processor starts to work.
HTH, Christian.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list