Re: XML import with DTD

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: walt(at)brookhouse(dot)co(dot)uk
Cc: artacus(at)comcast(dot)net, pgsql-general(at)postgresql(dot)org
Subject: Re: XML import with DTD
Date: 2009-07-11 17:41:18
Message-ID: 21536.1247334078@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Roy Walter <walt(at)brookhouse(dot)co(dot)uk> writes:
> This one does not:

> INSERT INTO wms_collection (docxml) VALUES (XMLPARSE(content(
> '<?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE publicwhip
> [
> <!ENTITY ndash "&#8211;">
> <!ENTITY mdash "&#8212;">
> ]>
> <shop>
> <product>Shoes</product>
> </shop>')))

What I know about XML wouldn't fill a thimble, but shouldn't you say
DOCUMENT not CONTENT if you are trying to provide a complete document?
Doing that seems to make this work without error.

The fine manual states near the bottom of 8.13.1
http://www.postgresql.org/docs/8.4/static/datatype-xml.html
that CONTENT is less restrictive than DOCUMENT, but at least for
this specific point that seems not to be true.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Berkus 2009-07-11 18:41:25 Anyone in New Zealand?
Previous Message Martijn van Oosterhout 2009-07-11 15:39:35 Re: Idle in transaction help