    ;; FIXME XDM keys have only been mocked; unknown if it matches getValueType
 
    ;; XdmAtomic TODO
-   "attribute()" #(.asString %) ;; XdmAttribute TODO
+   "attribute()" #(.asString %) ;; XdmAttribute
    "binary()" #(.asString %) ;; XdmBinary -- XXX unknown if the key used matches getValueType
    "comment()" #(.asString %) ;; XdmComment
    "document-node()" #(.asString %) ;; XdmDocument

(defn submit-request
  "Construct, submit, and return raw results of request for the given
  `session` using `request-factory` and `query`. Modify it
  with (possibly empty) `options` and `variables` maps."
  [request-factory session query options variables]
  (let [ro      (request-options options)
        request (reduce-kv (fn [acc vname vval]
                             (.setNewVariable acc (name vname)

   
   "json:array" #(json/read-str (.toString (.asJsonNode %))) ;; JSArray
   "object-node()" #(json/read-str (.toString (.asJsonNode %))) ;; JSObject -- is this optimal detection method?
   ;; JsonItem - TODO find mocking mechanism or test with real data
   ;; NullNode TODO
   ;; NumberNode TODO
   ;; ObjectNode TODO
