This technique works very well for single-request type things. For example I've built a xmlsh servlet which can run xmlsh code so that I can do XSLT 1 and 2.0 processing to generate PDF from XML in MarkLogic. I send a http post to the servlet, it runs xslt and FOP and spits out to stdout the PDF, which is then sent back to ML and displayed in the browser. Users don't know it didn't come from ML.
http://www.xmlsh.org/EmbeddingServlet There's even a JDBC bridge using this technology. But thats why I mentioned "single-request" type things. Its great for doing a SQL Request ... but I wish it were integrated more closely into XQuery. You cant do a cross join of ML data across SQL data using this method like you can using some other XQuery technology like DataDirect. The ML data and SQL data are still in different silos and not really accessible 'as one'. I would love to see this special case of accessing SQL data more closely integrated in ML XQuery. I think this would make a better "sell" to shops which are already entrenched in a relational DB. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Geert Josten Sent: Friday, February 12, 2010 1:51 AM To: General Mark Logic Developer Discussion Subject: RE: [MarkLogic Dev General] How to connect Perl code to xquery Hi Shri, Adrew Welch's suggestion can be used for integrating any kind of code. Just host it as a webservice and connect to it using the http function provided by MarkLogic Server. It provides shielding, securitability, and loose coupling. MLJAM is running as a webservice as well, but is designed for code injection, which is arguably not very safe, and certainly not loose coupling. By the way, it is fairly easy to put your MLJAM Java code in a JSP and host that with Tomcat or so. Apache HTTPD can host perl script for you, and plenty more script styles as well. Kind regards, Geert > drs. G.P.H. (Geert) Josten Consultant Daidalos BV Hoekeindsehof 1-4 2665 JZ Bleiswijk T +31 (0)10 850 1200 F +31 (0)10 850 1199 mailto:[email protected] http://www.daidalos.nl/ KvK 27164984 P Please consider the environment before printing this mail. De informatie - verzonden in of met dit e-mailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. > From: [email protected] > [mailto:[email protected]] On Behalf Of > SrinivasanM > Sent: vrijdag 12 februari 2010 6:11 > To: [email protected] > Subject: [MarkLogic Dev General] How to connect Perl code to xquery > > Hi All, > > > > Thanks to all, Now i started to connect my > java code in xquery using "MLJAM", side by side, i tried to > connect perl code into xquery, but my friends said, there is > no way to connect perl code to xquery. Is it true? If it is > false, how to connect? > > > > Thanks > > Shri > > > > _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
