Skip site navigation (1) Skip section navigation (2)

Re: PostgreSQL 8.3 XML parser seems not to recognize the DOCTYPE element in XML files

From: Kevin Grittner <kevin(dot)grittner(at)wicourts(dot)gov>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: PostgreSQL 8.3 XML parser seems not to recognize the DOCTYPE element in XML files
Date: 2008-06-03 18:48:05
Message-ID: 484591E5.7050309@wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
Bruce Momjian wrote:
> Added to TODO:
> 
> * Allow XML to accept more liberal DOCTYPE specifications

Is any form of DOCTYPE accepted?

We're getting errors on a second line in an XML document that
starts like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE DOT_OFFICER_CITATION SYSTEM "http://host.domain/dtd/dotdisposition0_02.dtd">

The actual host.domain value is resolved by DNS,
and wget of the url works on the server running PostgreSQL.
Attempts to cast the document to type xml give:

ERROR:  invalid XML content
DETAIL:  Entity: line 2: parser error : StartTag: invalid element name
<!DOCTYPE DOT_OFFICER_CITATION SYSTEM "http://host.domain/dtd/dot
^

It would be nice to use the xml type, but we always have DOCTYPE.
I understand that PostgreSQL won't validate against the specified
DOCTYPE, but it shouldn't error out on it, either.

-Kevin

In response to

pgsql-hackers by date

Next:From: Teodor SigaevDate: 2008-06-03 18:53:06
Subject: Re: [GENERAL] Fragments in tsearch2 headline
Previous:From: Kevin GrittnerDate: 2008-06-03 18:40:31
Subject: Re: PostgreSQL 8.3 XML parser seems not to recognize the DOCTYPE element in XML files

pgsql-general by date

Next:From: Teodor SigaevDate: 2008-06-03 18:53:06
Subject: Re: [GENERAL] Fragments in tsearch2 headline
Previous:From: Kevin GrittnerDate: 2008-06-03 18:40:31
Subject: Re: PostgreSQL 8.3 XML parser seems not to recognize the DOCTYPE element in XML files

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group