|
Subject: Error "(StylesheetHandler) xsl:value-of not allowed inside a styl esheet" From: "Loh, Huan" <Huan_Loh@xxxxxxx> Date: Wed, 15 Mar 2000 16:28:18 -0600 |
Hi all,
I am new to xml/xslt technologies. I developed a servlet that takes a xml
file and a xsl file as sources and produces the result into its response
object's PrintWriter. However, I am getting the following error message,
"(StylesheetHandler) xsl:value-of not allowed inside a stylesheet". Here is
my code:
Inside my servlet, I have:
//MyServlet.java
public void XMLHelloWorld(PrintWriter _out)
throws java.io.IOException,
org.xml.sax.SAXException
{
XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
XSLTInputSource xmlSource = new XSLTInputSource
("e://Programs/Apache_JServ 1.1/servlets/foo.xml");
XSLTInputSource xslSheet = new XSLTInputSource
("e://Programs/Apache_JServ 1.1/servlets/foo.xsl");
XSLTResultTarget xmlResult = new XSLTResultTarget(_out);
xmlResult.setEncoding("text/html");
// Perform the transformation.
processor.process(xmlSource, xslSheet, xmlResult);
}
//foo.xml
<?xml version="1.0"?>
<doc>Hello</doc>
//foo.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<html>
<head>
<title>
</title>
</head>
<body bgcolor="#ffffff">
<h1><xsl:value-of select="doc"/></h1>
</body>
</html>
</xsl:stylesheet>
I am getting "(StylesheetHandler) xsl:value-of not allowed inside a
stylesheet" error. Any help would be appreciated. Thanks.
Micheal
huan_loh@xxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: FOP out of sequence specifiers, Marta Lobato | Thread | RE: Error "(StylesheetHandler) xsl:, Igor Nakshin |
| XSL for database, Mathews, Silvy (HQP) | Date | Re: MSXML abominations happening fo, Omar López Ruiz |
| Month |