[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Error "(StylesheetHandler) xsl:value-of not allowed inside a

Subject: Error "(StylesheetHandler) xsl:value-of not allowed inside a stylesheet"
From: "Loh, Huan" <Huan_Loh@xxxxxxx>
Date: Wed, 15 Mar 2000 16:28:18 -0600
xsl value of error
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.