Return-Path: Delivered-To: apmail-xml-general-archive@xml.apache.org Received: (qmail 29021 invoked by uid 500); 12 Oct 2001 17:35:38 -0000 Mailing-List: contact general-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: general@xml.apache.org Delivered-To: mailing list general@xml.apache.org Delivered-To: moderator for general@xml.apache.org Received: (qmail 32212 invoked from network); 12 Oct 2001 13:28:29 -0000 Message-ID: <3BC6EF03.30408@icogs.com> Date: Fri, 12 Oct 2001 15:24:19 +0200 From: Vincent Faidherbe User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010913 X-Accept-Language: en-us MIME-Version: 1.0 To: general@xml.apache.org Subject: Crimson: Bug when document begins with whitespaces? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N When a parsed XML document begin with one or more whitespace(s), Crimson fails when it encounters the XML declaration and it returns the message P-019 : "XML declaration may only begin entities". I've the problem with the RSS documents generated by 10.am. So i've added a line in the parseInternal (InputSource input) of Parse2, here's the code private void parseInternal (InputSource input) throws SAXException, IOException { if (input == null) fatal ("P-000"); try { .... contentHandler.setDocumentLocator (locator); contentHandler.startDocument (); .... // Add by Vincent Faidherbe (vfaid@icogs.com) // Because the XML document could start with whitespaces. // Check RSS feed from 10.am for example ;-) // maybeWhitespace(); // end add maybeXmlDecl (); .... Now, it's works fine when the document starts with whitespaces. I don't know if it is a bug but if it is, i think i've fixed it. -- Vincent Faidherbe icogs "Do you think C++ is lovable? Unless you're into SM (Software Masochism), probably not." (JLG) --------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: general-unsubscribe@xml.apache.org For additional commands, e-mail: general-help@xml.apache.org