Liking cljdoc? Tell your friends :D

sigel.extension

Facilities for defining Saxon integrated extension functions.

Facilities for defining Saxon [integrated extension functions](http://www.saxonica.com/html/documentation/extensibility/integratedfunctions/).
raw docstring

functionclj

(function qname arg-types result-type body)

Define a Saxon integrated extension function.

Example:

(require '[sigel.extension :as ext])

(ext/function
 ["local" "double"] ;; the namespace URI and local name
 [[:one :int]]  ;; the argument types
 [:one :double] ;; the result type
 (fn [x] (double (* x 2)))) ;; body

The argument and result types of the extension function are defined as tuples of an OccurrenceIndicator and ItemType, but as Clojure :keywords instead of Java CONSTANTS.

For example, ONE becomes :one, ANY_NODE becomes :any-node etc.

Define a Saxon integrated extension function.

Example:

```
(require '[sigel.extension :as ext])

(ext/function
 ["local" "double"] ;; the namespace URI and local name
 [[:one :int]]  ;; the argument types
 [:one :double] ;; the result type
 (fn [x] (double (* x 2)))) ;; body
```

The argument and result types of the extension function are defined as tuples
of an [OccurrenceIndicator](http://www.saxonica.com/html/documentation/javadoc/net/sf/saxon/s9api/OccurrenceIndicator.html)
and [ItemType](www.saxonica.com/html/documentation/javadoc/net/sf/saxon/s9api/ItemType.html),
but as Clojure `:keywords` instead of Java `CONSTANTS`.

For example, `ONE` becomes `:one`, `ANY_NODE` becomes `:any-node` etc.
raw docstring

make-sequence-typeclj

(make-sequence-type occurrence-indicator item-type)

A wrapper for SequenceType/makeSequenceType. Takes arguments in the reverse order to the original method because it's more pleasant to write [:one :boolean] than [:boolean :one].

A wrapper for [`SequenceType/makeSequenceType`](http://www.saxonica.com/html/documentation/javadoc/net/sf/saxon/s9api/SequenceType.html). Takes arguments in the reverse
order to the original method because it's more pleasant to write
`[:one :boolean]` than `[:boolean :one]`.
raw docstring

register-extension-function!clj

(register-extension-function! host function)

Register a Saxon integrated extension function.

You can use function to define an integrated extension function.

host can be a Saxon Processor, XPathCompiler, or XsltCompiler.

Register a Saxon integrated extension function.

You can use [[function]] to define an integrated extension function.

`host` can be a Saxon `Processor`, `XPathCompiler`, or `XsltCompiler`.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close