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

Re: xalan 2.4 transformation to fo - "Content is not a

Subject: Re: xalan 2.4 transformation to fo - "Content is not allowed in prolog"
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 28 Aug 2002 14:53:36 -0400
xalan fo
Joseph,

This isn't really an XSLT question, but rather a question about parsing your XML. (So it's out of scope for the list; yet sometimes we go a little astray.)

You should try parsing your files (including, in this case, the stylesheet itself) outside of an XSLT environment to make sure they conform to XML well-formedness rules.

The particular error you are describing, or something like it, I have seen with some parsers when the file has a UTF-8 BOM in the front ... which is kind of an "advanced" nit to try to handle. Apparently parsers vary on their interpretation of what UTF-8 allows. (No doubt we'll hear some clarification from a more knowledgeable person if I don't have this right.)

Yet one can't be sure whether that's even the problem without looking at the file. I only think it might be given the fact that it works in one toolset but not another. Yet I don't even know if your files purport to be UTF-8. You want to make sure the encoding actually used is the same one declared in the XML declaration.

Good luck,
Wendell

At 10:33 PM 8/27/2002, you wrote:
I have xalan 2.4 D1 jar files installed on my IBM USS
environment trying to transform my xml to fo.

My env :
PATH=/usr/lpp/java/IBM/J1.3/bin
CLASSPATH=:.:/u/rstda/xalan/xerces.jar:/u/rstda/xalan/xalan.jar:/u/rstda/xalan/x
ercesImpl.jar:/u/rstda/xalan/xml-apis.jar:/u/rstda/xalan/xsltc.jar:/u/rstda/xala
n/dom.jar:/u/rstda/xalan/sax.jar:/u/rstda/xalan/jaxp-api.jar
JAVA_HOME=usr/lpp/java/IBM/J1.3/



When I execute the command
"java org.apache.xalan.xslt.Process -in stmt2.xml -xsl
stmt2.xsl -out stmt2.fo"

I get the message
"[Fatal Error] stmt2.xsl:1:1: Content is not allowed
in prolog.

file:///u/rstda/xalan/stmt2.xsl; Line 1; Column 1;
XSLT Error (javax.xml.transfo
rm.TransformerConfigurationException):
javax.xml.transform.TransformerException:
 org.xml.sax.SAXParseException: Content is not allowed
in prolog. "

The transformation works fine under Windows
environment using James Clark XSL-T Processor (WinEXE
version).


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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.