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]
Other format: [Raw text]

Re: xalan error with plain text


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]