This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
xsl:value-of not allowed inside a stylesheet
Hi!
I getting this sort of error message from XALAN StylesheetHandler:
XSLT error: (StylesheetHandler) xsl:value-of not allowed inside a stylesheet.
(file:///var/www/xslt/Header.xsl, line 62, column 85)
The situation is the same if I use xsl:copy-of.
The part of the Header.xsl what seems to be wrong looks like this:
<p><b>Message count= </b><xsl:value-of select="$NumberOfMessages" /></p>
Since the value comes from a variable, the list of variables is
in a separate file. The variable is like this:
<xsl:variable name="NumberOfMessages">
<xsl:for-each select="Document">
<xsl:value-of select="count(Information)" />
</xsl:for-each>
</xsl:variable>
The xml file syntax is like this:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<Document>
<Information SignStatus="Open">
<Time>01/09/09</Time>
<Clock>01:45:03</Clock>
<Sender>Moilanen Jarkko</Sender>
<Subject id="0000000004" id2="001">3. JPr hyökkäyskäsky Haminassa</Subject>
<Subject2>Xsl- muutokset</Subject2>
<Infofield>
<Topic>Include hommat ei pelaa</Topic>
</Infofield>
</Information>
<Information SignStatus="Signed">
<Time>01/09/10</Time>
<Clock>11:45:03</Clock>
<Sender>Moilanen Jarkko</Sender>
<Subject id="0000000004" id2="002">RE:3. JPr hyökkäyskäsky Haminassa</Subject>
<Subject2>Xsl- muutokset</Subject2>
<Infofield>
<Topic>Include hommat ei pelaa</Topic>
</Infofield>
</Information>
Could some one tell me the reason to this error message and solution to this
situation/ prob.
Cheers
Jarkko
******************************************************************
Jarkko Moilanen *You are wise, witty, and wonderful, *
Researcher/ ITCM *but you spend too much time *
jm60697@uta.fi *reading this sort of trash. *
www.uta.fi/~jm60697 * *
GSM: +358 50 3766 927 * *
******************************************************************
* ITCM | Information Technology and Crisis Management *
* http://www.itcm.org *
******************************************************************
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list