You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Ry...@stpaul.com on 2002/11/22 16:08:41 UTC

Xalan on OS/390

Hello,

I'm trying to use Xalan 2.4.0 on an IBM OS/390 mainframe, running within
the Unix Systems Services environment.

I'm trying to use Xalan as the XSL transformer when using FOP to create PDF
documents.  I get the following error:

ÝFatal Error¨ StandardReportsPDF.xsl:1:39: Content is not allowed in
prolog.
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.Trans
formerException: org.xml.sax.SAXParseException: Content is not allowed in
prolog
..



Here's the first line of the style sheet:

<?xml version="1.0" encoding="UTF-8"?>



Which shouldn't be a problem.

It appears it doesn't like the style sheet.  The application runs fine on
Windows 2000.

Is it some sort of encoding error or something like that?  When FTP'ing the
style sheet to the mainframe I use ascii mode -- is this the wrong mode?
Are there any special considerations for using Xalan in the mainframe
environment?

Thanks for your help!





RE: Xalan on OS/390

Posted by Gary L Peskin <ga...@firstech.com>.
(1) How are you invoking Xalan?  It may depend on the type of Source
that you're creating.
(2) Try FTPing in BINARY mode and see if that makes a difference.

Gary

> -----Original Message-----
> From: Ryan.Asleson@stpaul.com [mailto:Ryan.Asleson@stpaul.com] 
> Sent: Friday, November 22, 2002 7:09 AM
> To: xalan-j-users@xml.apache.org
> Subject: Xalan on OS/390
> 
> 
> 
> Hello,
> 
> I'm trying to use Xalan 2.4.0 on an IBM OS/390 mainframe, 
> running within the Unix Systems Services environment.
> 
> I'm trying to use Xalan as the XSL transformer when using FOP 
> to create PDF documents.  I get the following error:
> 
> ÝFatal Error¨ StandardReportsPDF.xsl:1:39: Content is not 
> allowed in prolog.
> javax.xml.transform.TransformerConfigurationException:
> javax.xml.transform.Trans
> formerException: org.xml.sax.SAXParseException: Content is 
> not allowed in prolog ..
> 
> 
> 
> Here's the first line of the style sheet:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> 
> 
> Which shouldn't be a problem.
> 
> It appears it doesn't like the style sheet.  The application 
> runs fine on Windows 2000.
> 
> Is it some sort of encoding error or something like that?  
> When FTP'ing the style sheet to the mainframe I use ascii 
> mode -- is this the wrong mode? Are there any special 
> considerations for using Xalan in the mainframe environment?
> 
> Thanks for your help!
> 
> 
> 
> 


Re: Xalan on OS/390

Posted by David N Bertoni/Cambridge/IBM <da...@us.ibm.com>.



> Here's the first line of the style sheet:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
>
>
> Which shouldn't be a problem.
>
> It appears it doesn't like the style sheet.  The application runs fine on
> Windows 2000.

Is the document is no longer in UTF-8?  Did you use PAX or something like
that, to translate the files to EBCDIC?  Try changing the encoding
declaration to EBCDIC-CP-US.

> Is it some sort of encoding error or something like that?  When FTP'ing
the
> style sheet to the mainframe I use ascii mode -- is this the wrong mode?
> Are there any special considerations for using Xalan in the mainframe
> environment?

I don't know what the 390 does in ASCII mode, but I suspect it's not the
right thing.  Try transferring the file again in binary mode.

Dave


Re: Xalan on OS/390

Posted by Joseph Kesselman <ke...@us.ibm.com>.
Make sure _nothing_ preceeds the XML Declaration -- not even whitespace -- 
except the optional Byte Order Mark.

Make sure _nothing_ comes between the XML Declaration and the start tag 
for the root element except comments, whitespace, or processing 
instructions.

If those check out, we'd need to see the first several lines rather than 
just the XML Declaration. But actually, you should probably be asking the 
Xerces folks, since this is a parser error rather than an Xalan error.

______________________________________
Joe Kesselman  / IBM Research