Re: xml_valid function

From: John Gray <jgray(at)azuli(dot)co(dot)uk>
To: Roger Hand <rhand(at)ragingnet(dot)com>
Cc: gpavlov(at)mynewplace(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: xml_valid function
Date: 2006-01-27 21:21:25
Message-ID: 1138396885.12520.8.camel@adzuki.azuli.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2006-01-27 at 12:32 -0800, Roger Hand wrote:
> John Gray wrote on
> Friday, January 27, 2006 12:24 PM
> > On Wed, 25 Jan 2006 17:11:04 -0800, George Pavlov wrote:
> >
> >> Not sure what the correct forum for pgxml/xml2 questions is. I was
> >> wondering what is the definition of "valid" that the xml_valid(text)
> >> function that is part of that module uses? It seems different from the
> >> W3C definition of "valid" XML (is there an implicit DTD?) Maybe it is
> >> more akin to "well-formed"?
> >>
> >
> > It is indeed well-formed. That just seemed a long name for the function!
> >
> > John
>
> Valid means it's been checked against, and conforms to, a DTD. If it hasn't been then it can't
> be said to be valid.
>

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.

Regards

John

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2006-01-27 21:37:53 Re: xml_valid function
Previous Message Doug McNaught 2006-01-27 21:21:13 Re: Are rules transaction safe?