logo       

Re: Character encodings: msg#00249

text.xml.exist

Subject: Re: Character encodings

The XML-RPC spec is kind of nuts; it was only designed for very very simple use cases.

Here is one way to make the REST interface "fully featured":

1. declare a namespace for each Service: e.g. user="http://exist-db.org/service/UserManagementService";
2. expose all the methods on the Service interface as XQuery functions.

Then, the existing REST/Query interface allows all possible operations. With the added bonus that they are also available to XQuery writers. ;-)

I have one suggestion that makes working with the "collection" based functions easier - it would be different from xmldb:collection(), which currently expects a URI as its first argument to pass to DatabaseManager.getCollection(uri, user, pass). As a remote user I may not know the database-id of the engine running the query; it is not necessarily correct to assume that xmldb:exist:///db points to the local database. Also, the user running the query is already authenticated, so why should they pass authentication information again in the query?

May I propose (yet another) xmldb: function

xmldb:local-collection($uri as xs:string) object?

which essentially just calls context.getBroker().getCollection(uri)?

On Wed, 29 Sep 2004, Wolfgang Meier wrote:

Hi,

Also, org.apache.xmlrpc.XmlWriter.chardata() limits the range of valid XML
characters to < 0xFF. I had to learn that the XMLRPC spec officially only
allows ASCII characters to be used in strings. Everything else should be
Base64 encoded. If we accept that, we can't use the string type anywhere. I
have thus just removed the limit.

I'm not really happy with these fixes. I really think we should move from
XMLRPC to REST as the main interface sooner or later.

Wolfgang




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise