Re: PostgreSQL and SOAP, suggestions? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: PostgreSQL and SOAP, suggestions?
Date
Msg-id Pine.LNX.4.44.0304021743160.3656-100000@peter.localdomain
Whole thread Raw
In response to Re: PostgreSQL and SOAP, suggestions?  ("Andrew Dunstan" <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan writes:

> If the intention is to use field names as (local) tag names, how will you
> handle the case where the field name isn't a valid XML name? Of course, one
> could do some sort of mapping (replace illegal chars with "_", for example)
> but then you can't be 100% certain that you haven't generated a collision,
> I should think.

The SQL/XML draft specifies an reversible escape mechanism.  Basically,
when mapping an SQL identifier to an XML name you replace problematic
characters with an escape sequence based on the Unicode code point, like
_x2A3B_.

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Frank Wiles
Date:
Subject: TODO list problem or am I way off base?
Next
From: Peter Eisentraut
Date:
Subject: Re: PostgreSQL and SOAP, suggestions?