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

Re: Tranforming XML document in tomcat...

Subject: Re: Tranforming XML document in tomcat...
From: Peter Flynn <pflynn@xxxxxx>
Date: Tue, 13 Jul 2004 11:01:49 +0100
tomcat xml
On Tue, 2004-07-13 at 10:30, Arulraj wrote:
> Hello,
>   I am tranforming XML document to someother text file
> using Xalan in Tomcat 5.0.25 server.
> 
> I got the following error;
> HTTP Status 500 - 
[...]
> root cause 
> 
> javax.xml.transform.TransformerException: Content is
> not allowed in prolog.

It sounds as if you have stray characters in the prolog to your document
instance (the bit at the top, before the root element start-tag). I find
the easiest way to trace this kind of error is to run an external 
stand-alone parser/validator over the document (eg rxp, nsgmls, etc) to 
check well-formedness or validity, because they will give you explicit 
line numbers and error messages. 

Java applications are notorious for giving you a megabyte of trace 
showing where *Java* spat blood, and nothing at all about where in the 
document the error was detected. Java people do themselves a great 
disservice by assuming that it is their Java code that has failed, 
when oftentimes it is the user's document/schema/dtd/stylesheet 
that is at fault.

///Peter

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.