Re: xml_valid function - Mailing list pgsql-general

From Scott Marlowe
Subject Re: xml_valid function
Date
Msg-id 1138397872.22740.65.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: xml_valid function  (John Gray <jgray@azuli.co.uk>)
List pgsql-general
On Fri, 2006-01-27 at 15:21, John Gray wrote:

> I know that - my point was just that when I was naming the functions, I
> (perhaps foolishly, in hindsight) decided that xml_wellformed seemed a
> longish name for a basic function. The README does in fact state that it
> checks well-formedness and not validity. It's easily changed in the SQL
> file if you'd rather have a different name for your installation.
>
> As for changing it in the distribution, I can see some
> backward-compatibility issues (I suspect it may be in production use
> under that name) - but if there were to be a version which validated a
> document against a DTD it would be a two parameter version which would
> therefore have a different signature for PG.

A lot of validators make it clear that you can validate xml with or
without a DTD.  So, it makes sense to have an overloaded xml_valid()
function that accepts a single argument (plain xml) and a two parter
that takes xml and a dtd as the two arguments.

pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: Are rules transaction safe?
Next
From: Alexander Farber
Date:
Subject: Basic questions about PQprepare()