pjt / saxon Goto Github PK
View Code? Open in Web Editor NEWClojure wrapper library for the Saxon XSLT 2.0 processor.
Clojure wrapper library for the Saxon XSLT 2.0 processor.
Just wondering if this project is dead? It would be a shame if that's the case.
Just curious. Why do the serialize methods take multiple props but only use the first one?
I think I am having a memory leak an testing the usage of get-proc I think it should use "locking" like so:
(defn get-proc
"Returns the Saxon Processor object, the thread-safe generator class for documents,
stylesheets, & XPaths. Creates & defs the Processor if not already created."
{:tag Processor}
[]
(locking get-proc
(defonce ^:private p
(Processor. false))
p))
This is because in a very heavy threading environment this can happen (example):
(defn f1 [m]
(locking f1
(println "Entrando a " m)
(Thread/sleep 5000)
(println "saliendo de " m)
m))
(defn getx [] ; similar to get-proc
(defonce ^:private c
(f1 (rand-int 100)))
c)
(doseq [n (range 0 3)]
(future (getx)))
; you will see that f1 is invoked 3 times!
Best regards and thank you for this very helpful library.
Saludos
If you load up the saxon library in 1.3 and evaluate
(saxon/compile-xquery "distinct-values(//element()/local-name())")
the result is:
NoSuchMethodError clojure.lang.Numbers.lt(II)Z saxon/compile-xquery/fn--67 (saxon.clj:149)
This seems to be the case for all queries I've tried, and they work when I load the library in 1.2.
I've been looking for the source of incompatibility but so far I haven't found it. Any idea on what causes this to fail in 1.3?
Thanks,
Rob
user=> (require '[saxon :as xml])
nil
user=> (let [xmldoc "<html><body><span>Hello world</span></body></html>"] (xml/query "distinct-values(//element()/local-name())" xmldoc))
NoSuchMethodError clojure.lang.Numbers.lt(II)Z saxon/compile-xquery/fn--67 (saxon.clj:149)
$ cat project.clj
...
:dependencies [
[org.clojure/clojure "1.4.0"]
[clojure-saxon "0.9.2"]
]
Hi,
The variable command-line-args contains the name of the program at first position. So we have to take the rest of the sequence to get the right argument list.
(let [args command-line-args
->
(let [args (rest command-line-args)
Ludovic Kuty
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.