-- Quote ->
Ok this sounds good - so assuming the initial configuration is in a
file called "setup.xqy" could you provide and example of how would the
user run it using xmlsh?
<--

If all you need to do is post a single xquery file then using curl on
your CD would probably be easiset.
Where something like xmlsh benifits is if you have to do more then that,
such as was mentioned in a previous post about dynamically creating the
configuration data using xslt or xquery then invoking dynamic queries to
the ML server.
xmlsh provides full cross-platform scripting of most major XML tools as
well as integration in the shell of XDM types directly so scripting this
sort of thing is exactly what its good at.

To answer your question.
Presuming you have a CD with all the prerequisits for xmlsh (essentially
the Java runtime if it doesnt exist, plus the xmlsh runtime plus the ML
extension).   And you have a simple file like setup.xqy

You would make an xmlsh script file like this

install.xsh
-----
import module ml=marklogic 
MLCONNECT=xcc://...connection string
ml:query -f setup.xqy 
----

Then run this in your .bat or .sh file as

xmlsh install.xsh


 





-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Andrew
Welch
Sent: Tuesday, March 02, 2010 1:17 PM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] user installation using a query

On 2 March 2010 18:04, Lee, David <[email protected]> wrote:
> You might want to consider the MarkLogic extension to xmlsh which
> provides cross-platform access to xml processing and sending requests
> via either HTTP or XCC.
> This is all "100% pure java" so the scripting, and the execution will
> run identically independent of the OS.
> (windows, linux/unix , mac ... anything with a Java 1.6 ).
> And since it can execute ad-hoc queries constructed dynamnically it
> doesn't rely on "/use-cases/eval2.xqy" pre-existing.
>
> This way you don't have to write separate .BAT and .sh files for
> different OS's or depend on installations of additional 3rd party
tools
> (like curl, perl, etc).
>
> http://www.xmlsh.org

Ok this sounds good - so assuming the initial configuration is in a
file called "setup.xqy" could you provide and example of how would the
user run it using xmlsh?

Fwiw, curl doesn't need installing, it would just need to be on the
disc, so the user could just run "install.bat" and that would be it
(providing the query it curls to eval2.xqy runs without a problem)


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
_______________________________________________
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