You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by kb...@informatica.com on 2000/07/11 22:04:36 UTC

Version 1.1 to 1.2 problems

I have a DTD that used to parse fine with 1.1. If I have 
<?xml version="1.0"?> in the DTD file, then the new version of xerces(1.2)
throws a parsing exception				'Bad XML encoding
declaration, '{0}'.'

If I remove this line from the DTD things work ok. can anyone explain.

Kiran

Re: Version 1.1 to 1.2 problems

Posted by Arundhati Bhowmick <ar...@hyperreal.org>.
You probably have to inspect that line against the XML spec to check if its
valid or not. This might have been overlooked in 1.1 version. 1.2 version is
more robust in checking errors.
Arundhati

kbagepalli@informatica.com wrote:

> I have a DTD that used to parse fine with 1.1. If I have
> <?xml version="1.0"?> in the DTD file, then the new version of xerces(1.2)
> throws a parsing exception                              'Bad XML encoding
> declaration, '{0}'.'
>
> If I remove this line from the DTD things work ok. can anyone explain.
>
> Kiran
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Version 1.1 to 1.2 problems

Posted by Dean Roddey <dr...@charmedquark.com>.
All external parsed entities start wtih an optional TextDecl, which is
different from the XMLDecl that starts the main entity.

    TextDecl ::=  '<?xml' VersionInfo? EncodingDecl S? '?>'

So the encoding is not optional in such entities. The external DTD subset is
an external parsed entity. This was a failing in the previous version, which
did not enforce this part of the spec.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"You young, and you gotcha health. Whatchoo wanna job fer?"


----- Original Message -----
From: <kb...@informatica.com>
To: <xe...@xml.apache.org>
Sent: Tuesday, July 11, 2000 1:04 PM
Subject: Version 1.1 to 1.2 problems


> I have a DTD that used to parse fine with 1.1. If I have
> <?xml version="1.0"?> in the DTD file, then the new version of xerces(1.2)
> throws a parsing exception 'Bad XML encoding
> declaration, '{0}'.'
>
> If I remove this line from the DTD things work ok. can anyone explain.
>
> Kiran
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>