Comments (5)
Version 0.2.6, now available, handles document-node
and element
variables given as a String, hiccup-style vector, or clojure.data.xml.Element.
from uruk.
I had intended to request that XML elements passed as arguments from Clojure would be arriving in the Query as element
, not xs:string
. I know that it is possible to parse the string to an XML element in the query, and it may actually be faster, yet I find that to be an extra step it would also look better if XML arguments could be declared as having the type element()
. Can you investigate whether that'd be easy to implement and discuss if in doubt?
from uruk.
We're currently using Request.setNewVariable with ValueType set to element()
, which from my research appears to be the extent that a variable passed in can be declared to be element()
. As you say, it appears to still be necessary to xdmp:unquote
or otherwise parse such a variable.
I will investigate further.
from uruk.
See http://developer.marklogic.com/pipermail/general/2016-July/019265.html
from uruk.
At this point I'm confident that Uruk is doing everything in its power to send XML elements through as elements. The variable type is set on the MarkLogic side, and in XQuery the node-kind
is coming through as "element" without any casting:
(with-open [session (create-session db)]
(execute-xquery session "xquery version \"1.0-ml\";
declare variable $my-variable external;
xdmp:node-kind($my-variable)"
{:variables {"my-variable" {:value "<foo/>"
:type :element}}
:shape :single!}))
=> "element"
...therefore I am closing this for the moment. If other scenarios with XML element type issues arise, we can reopen.
from uruk.
Related Issues (9)
- Adapt uruk to clojure.data.xml 0.1.0-beta2 HOT 7
- allow create-session[*] to have specified host and port separatedly instead of URI HOT 9
- clojure.edn is called without being required HOT 6
- Options as "&rest" arguments HOT 2
- execute-xquery and variables HOT 6
- Improve exception reporting HOT 10
- Is uruk converting single-element result sequences into the single element? HOT 3
- Automatic conversion from clojure types to equivalent XDMValues HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uruk.