You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by do...@ms.greatwall.com.tw on 2002/03/20 05:17:09 UTC
Is it Xalan bug?
When I am using Xalan, I encounter a error:
The XML declaration may only appear at the very beginning of the
document.
I am sure that the style sheet is a well-defined XML document. The first
line
is just an empty line. I test it on Microsoft's MSXML, it works.
So, why Xalan does not work just due to the first empty line?
Thank you!
Sincerely
================================
董祥麟 Albert, S. L. Dong
大成長城股份有限公司 資訊處
台南縣永康市蔦松二街3號
TEL: 886-6-2531111 ext. 556
FAX: 886-6-2534596
Email: dong@ms.greatwall.com.tw
================================
Re: Is it Xalan bug?
Posted by John Keyes <jo...@capeclear.com>.
The first line of your XML file should be:
<?xml version="1.0"?>
See the XML Specification[1] for more details on this.
-John K
[1] http://www.w3.org/TR/2000/REC-xml-20001006#NT-XMLDecl
On Wed, 2002-03-20 at 04:17, dong@ms.greatwall.com.tw wrote:
> When I am using Xalan, I encounter a error:
>
> The XML declaration may only appear at the very beginning of the
> document.
>
> I am sure that the style sheet is a well-defined XML document. The first
> line
> is just an empty line. I test it on Microsoft's MSXML, it works.
>
> So, why Xalan does not work just due to the first empty line?
>
> Thank you!
>
> Sincerely
>
> ================================
> 董祥麟 Albert, S. L. Dong
> 大成長城股份有限公司 資訊處
> 台南縣永康市蔦松二街3號
> TEL: 886-6-2531111 ext. 556
> FAX: 886-6-2534596
> Email: dong@ms.greatwall.com.tw
> ================================
--
NEW CapeStudio 3, out now
Design, develop, integrate & deploy Web Services
http://www.capeclear.com/download
RE: Is it Xalan bug?
Posted by Paul Brown <pr...@fivesight.com>.
> When I am using Xalan, I encounter a error:
> The XML declaration may only appear at the very beginning of the
document.
The XML declaration must be at the VERY beginning of the file -- no
whitespace or anything else is allowed before the declaration. Microsoft's
parser is broken to tolerate the leading whitespace.
-- Paul