Subclipse 1.10 + Maven (M2E)
I had a tricky time getting the Eclipse Maven tool (m2e) to work in Eclipse Luna with the latest version of Subclipse 1.10.6. It turns out that the Maven SCM Handler for Subclipse (m2e-subclipse) linked to in the Luna Marketplace on the Sonatype site is no longer supported. The gory details and a .zip file containing an updated m2e-subclipse plugin are available at subclipse.tigris.org/issues/show_bug.cgi.
JAXP Packages
- javax.xml
- javax.xml.datatype
- javax.xml.namespace
- javax.xml.parsers
- javax.xml.stream
- javax.xml.stream.events
- javax.xml.stream.util
- javax.xml.transform
- javax.xml.transform.com
- javax.xml.transform.sax
- javax.xml.transform.stax
- javax.xml.transform.stream
- javax.xml.validation
- javax.xml.xpath
- org.w3c.dom
- org.w3c.dom.bootstrap
- org.w3c.dom.ls
- org.w3c.dom.views
- org/xml/sax
- org/xml/sax.ext
- org/xml/sax.helpers
MarkLogic XQuery MultiUpload
Some jQuery and XQuery code to load content into a MarkLogic database:
'form#uploadForm': function(idx, elm) { var form = $(elm) form.submit(function(evt) { evt.preventDefault(); rn_util.log('SUBMITTED: ', form); $.ajax({ url: 'spike/uploadController.xqy', type: 'POST', data: new FormData(elm), cache: false, contentType: false, processData: false, beforeSend: function(jqXHR, settings) { rn_util.log('beforeSend', jqXHR.upload); }, success: function(data, textStatus, jqXHR) { rn_util.log('POST COMPLETED: ', textStatus, '; ', jqXHR); } }); }); }
xquery version "1.0-ml"; declare namespace zip = "xdmp:zip"; declare namespace aib = "co.wlv.xml.aib"; xdmp:log("GREETINGS:UPLOAD"), for $headerName as xs:string in xdmp:get-request-header-names() return xdmp:log(concat("HEADERNAME: ", $headerName, " = ", xdmp:get-request-header($headerName))), for $fieldName as xs:string in xdmp:get-request-field-names() return xdmp:log(concat("FIELDNAME: ", $fieldName)), for $inputFile as xs:string in xdmp:get-request-field-filename("inputFiles") return xdmp:log(concat("FILENAME: ", $inputFile)), let $fileNames as xs:string* := xdmp:get-request-field-filename("inputFiles"), $inventory as element(aib:inventory) := doc("/packages/inventory.xml")/aib:inventory for $inputFile as item() at $i in xdmp:get-request-field("inputFiles") let $fileName as xs:string := $fileNames[$i], $packageUri as xs:anyURI := xs:anyURI(concat("/packages/package-", xdmp:random())), $zipManifest as node() := xdmp:zip-manifest($inputFile) return ( xdmp:log(concat("FILE: ", $fileName, "; ", xdmp:quote($zipManifest), " COUNT: ", count($zipManifest/zip:part))), xdmp:node-insert-child($inventory, element {QName("co.wlv.xml.aib", "package")} { attribute uri {$packageUri}, attribute name {$fileName}, attribute added {current-dateTime()}, for $part as element(zip:part) in $zipManifest/zip:part let $file as node()+ := xdmp:zip-get($inputFile, string($part)), $XXX := xdmp:log(xs:anyURI(concat($packageUri, "/", replace(string($part), "\\", "/")))), $fileUri as xs:anyURI := xs:anyURI(concat($packageUri, "/", replace(string($part), "\\", "/"))) return ( xdmp:log(concat("PART: ", string($part), "; COUNT: ", count($file))), xdmp:document-insert($fileUri, $file[1]), element {QName("co.wlv.xml.aib", "file")} { attribute uri {$fileUri}, attribute size {$part/@uncompressed-size}, $part/@last-modified } ) }) )