Hi Dave,

You need to send requests to an XDBC Server using the XDBC protocol, which is 
what the XCC libraries (there are ones available for Java and .NET) do.  XCC 
uses HTTP to send the protocol to the server.  Using XCC, you  can write a 
program to send adhoc queries to that XDBC server, and the results are returned 
to the program.  See the Hello World example in the XCC Javadoc to get an idea 
how to do this.

http://developer.marklogic.com/pubs/4.0/javadoc/index.html

or more specifically:

http://developer.marklogic.com/pubs/4.0/javadoc/com/marklogic/xcc/examples/doc-files/HelloWorld.java.txt

When you use an HTTP Server to service requests, it knows how to execute XQuery 
directly.  So if you have an HTTP Server listening on a port (say 8765) with a 
root of /myroot, and a file called hello.xqy in that root that looks like this:

"hello"

Then a request to http://yourserver:8765/hello.xqy will execute that query and 
return the results (the string hello).  It is an HTTP Server, so it is also 
capable of returning html pages, headers, and the usual things you can do from 
an HTTP Server.  Also, there are a bunch of XQuery AppServer extensions you can 
use in an HTTP Server to do various HTTP stuff in XQuery, making it convenient 
to write HTTP-based programs 100% in XQuery.

I hope that help with untangling the mystery....

-Danny

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Pawson
Sent: Friday, December 05, 2008 3:48 AM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] Re: XDBC creation / access

2008/12/4 Danny Sokolsky <[EMAIL PROTECTED]>:
> Actually, all of the character set encodings listed in that Dev Guide chapter 
> are supported (there are many of them);  UTF-8 and ISO-8859-1 are just 
> examples of what are supported.
>
> You can also specify encodings for output.  If you look at the HTTP (or XDBC) 
> Server Configuration page for one of your App Servers in the Admin Interface, 
> you will see a drop-down (the last or second-to-last one in the list) for 
> output encoding.  All of the encoding in that list are supported.

Thanks. That makes sense. We don't all use utf-8 ... yet :-)


>
> FYI, it is possible to write an XQuery program that uses 
> xdmp:filesystem-directory to search through files on a filesystem (as long as 
> the filesystem is accessible by MarkLogic Server), then use 
> xdmp:document-load to load all of the files into the database (in case you 
> get tired of using Java :)  ).


Struck me if users want to load data into a database, the chances of
wanting just one file were slim!
I'll look into that further.

Your suggestion leads me on to another piece of my ignorance.
Using Michaels software I've created an 'xdbc'? 'database' / interface.
The 'getting started' piece uses an HTTP interface, and shows running
xquery queries against
that interface.

Is it possible to run xquery queries against the xdbc interface please.

regards


ps
  Definately OT
I've just moved up from Fedora Core 9 (Redhat OSS software) to version 10.
The SELinux software is complaining bitterly about MarkLogic accessing files
all over the disk :-)




-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to