Liking cljdoc? Tell your friends :D

net.cgrand.enlive-html

enlive-html is a selec-based transformation and extraction engine.

enlive-html is a selec-based transformation and extraction engine.
raw docstring

*options*clj


add-classclj

(add-class & classes)

Adds the specified classes to the selected element.

Adds the specified classes to the selected element.
raw docstring

afterclj

(after & values)

Inserts the values after the current selection (node or fragment).

Inserts the values after the current selection (node or fragment).
raw docstring

alter-ns-options!clj

(alter-ns-options! f & args)

Sets the default options to use by all templates and snippets in the declaring ns.

Sets the default options to use by all templates and snippets in the
declaring ns.
raw docstring

annotateclj

(annotate node)

anyclj


any-nodeclj


appendclj

(append & values)

Appends the values to the content of the selected element.

Appends the values to the content of the selected element.
raw docstring

append!clj

(append! t)
(append! t a)
(append! t a b)
(append! t a b c)
(append! t a b c d)
(append! t a b c d e)
(append! t a b c d e f)
(append! t a b c d e f g)
(append! t a b c d e f g & more)

as-nodesclj

(as-nodes node-or-nodes)

atcljmacro

(at node-or-nodes & rules)

at*clj

(at* node-or-nodes rules)

attr-containsclj

Selector predicate, tests if the specified attributes contain the specified values. See CSS *= .

Selector predicate, tests if the specified attributes contain the specified values. See CSS *= .
raw docstring

attr-endsclj

Selector predicate, tests if the specified attributes end with the specified values. See CSS $= .

Selector predicate, tests if the specified attributes end with the specified values. See CSS $= .
raw docstring

attr-hasclj

(attr-has attr & values)

Selector predicate, tests if the specified whitespace-seperated attribute contains the specified values. See CSS ~=

Selector predicate, tests if the specified whitespace-seperated attribute contains the specified values. See CSS ~=
raw docstring

attr-startsclj

Selector predicate, tests if the specified attributes start with the specified values. See CSS ^= .

Selector predicate, tests if the specified attributes start with the specified values. See CSS ^= .
raw docstring

attr-valuesclj

(attr-values node attr)

Returns the whitespace-separated values of the specified attr as a set or nil.

Returns the whitespace-separated values of the specified attr as a set or nil.
raw docstring

attr=clj

Selector predicate, tests if the specified attributes have the specified values.

Selector predicate, tests if the specified attributes have the specified values.
raw docstring

attr?clj

(attr? & kws)

Selector predicate, tests if the specified attributes are present.

Selector predicate, tests if the specified attributes are present.
raw docstring

attr|=clj

Selector predicate, tests if the specified attributes start with the specified values. See CSS |= .

Selector predicate, tests if the specified attributes start with the specified values. See CSS |= .
raw docstring

beforeclj

(before & values)

Inserts the values before the current selection (node or fragment).

Inserts the values before the current selection (node or fragment).
raw docstring

butclj

(but selector-step)

Selector predicate, matches elements which are rejected by the specified selector-step. See CSS :not

Selector predicate, matches elements which are rejected by the specified selector-step. See CSS :not
raw docstring

but-nodeclj

(but-node selector-step)

Selector predicate, matches nodes which are rejected by the specified selector-step. See CSS :not

Selector predicate, matches nodes which are rejected by the specified selector-step. See CSS :not
raw docstring

cacheableclj

(cacheable selector)

cacheable?clj

(cacheable? selector)

clone-forcljmacro

(clone-for comprehension & forms)

comment-nodeclj


contentclj

(content & values)

Replaces the content of the element. Values can be nodes or collection of nodes.

Replaces the content of the element. Values can be nodes or collection of nodes.
raw docstring

defsnippetcljmacro

(defsnippet name source selector args & forms)

Define a named snippet -- equivalent to (def name (snippet source selector args ...)).

Define a named snippet -- equivalent to (def name (snippet source selector args ...)).
raw docstring

defsnippetscljmacro

(defsnippets source & specs)

deftemplatecljmacro

(deftemplate name source args & forms)

Defines a template as a function that returns a seq of strings.

Defines a template as a function that returns a seq of strings.
raw docstring

do->clj

(do-> & fns)

Chains (composes) several transformations. Applies functions from left to right.

Chains (composes) several transformations. Applies functions from left to right.
raw docstring

emit*clj

(emit* node-or-nodes)

emit-tagclj

(emit-tag tag t)

evenclj


first-childclj


first-of-typeclj


flatmapclj

(flatmap f node-or-nodes)

flatten-nodes-collclj

(flatten-nodes-coll x)

fragment-selector?clj

(fragment-selector? selector)

get-resourcecljmultimethod

(get-resource resource loader)

Loads a resource, using the specified loader. Returns a seq of nodes.

Loads a resource, using the specified loader. Returns a seq of nodes.
raw docstring

hasclj

(has selector)

Selector predicate, matches elements which contain at least one element that matches the specified selector. See jQuery's :has

Selector predicate, matches elements which contain at least one element that
matches the specified selector. See jQuery's :has
raw docstring

has-classclj

(has-class & classes)

Selector predicate, :.foo.bar is as short-hand for (has-class "foo" "bar").

Selector predicate, :.foo.bar is as short-hand for (has-class "foo" "bar").
raw docstring

htmlclj

(html & nodes-specs)

Allows to define inline fragments with a hiccup-like syntax.

Allows to define inline fragments with a hiccup-like syntax.
raw docstring

html-contentclj

(html-content & values)

Replaces the content of the element. Values are strings containing html code.

Replaces the content of the element. Values are strings containing html code.
raw docstring

html-resourceclj

(html-resource resource)
(html-resource resource options)

Loads an HTML resource, returns a seq of nodes.

Loads an HTML resource, returns a seq of nodes.
raw docstring

html-snippetclj

(html-snippet & values)

Concatenate values as a string and then parse it with tagsoup. html-snippet doesn't insert missing <html> or <body> tags.

Concatenate values as a string and then parse it with tagsoup.
html-snippet doesn't insert missing <html> or <body> tags.
raw docstring

id=clj

(id= id)

Selector predicate, :#foo is as short-hand for (id= "foo").

Selector predicate, :#foo is as short-hand for (id= "foo").
raw docstring

intersectionclj

(intersection preds)

last-childclj


last-of-typeclj


leftclj

(left selector-step)

Selector predicate, matches nodes whose immediate left sibling element is matched by the specified selector-step.

Selector predicate, matches nodes whose immediate left sibling element is
matched by the specified selector-step.
raw docstring

leftsclj

(lefts selector-step)

Selector predicate, matches nodes whose one left sibling element is matched by the specified selector-step.

Selector predicate, matches nodes whose one left sibling element is matched by
the specified selector-step.
raw docstring

let-selectcljmacro

(let-select nodes-or-fragments bindings & body)

For each node or fragment, performs a subselect and bind it to a local, then evaluates body. bindings is a vector of binding forms and selectors.

For each node or fragment, performs a subselect and bind it to a local,
then evaluates body.
bindings is a vector of binding forms and selectors.
raw docstring

lockstep-transformclj

(lockstep-transform nodes transformations-map)

lockstep-transformationcljmacro

(lockstep-transformation & forms)

moveclj

(move src-selector dest-selector)
(move src-selector dest-selector combiner)

Takes all nodes (under the current element) matched by src-selector, removes them and combines them with the elements matched by dest-selector. By default, destination elements are replaced.

Takes all nodes (under the current element) matched by src-selector, removes
them and combines them with the elements matched by dest-selector.
By default, destination elements are replaced.
raw docstring

node-selector?clj

(node-selector? selector)

ns-optionsclj

(ns-options)
(ns-options ns)

nth-childclj

(nth-child b)
(nth-child a b)

Selector step, tests if the node has an+b-1 siblings on its left. See CSS :nth-child.

Selector step, tests if the node has an+b-1 siblings on its left. See CSS :nth-child.
raw docstring

nth-last-childclj

(nth-last-child b)
(nth-last-child a b)

Selector step, tests if the node has an+b-1 siblings on its right. See CSS :nth-last-child.

Selector step, tests if the node has an+b-1 siblings on its right. See CSS :nth-last-child.
raw docstring

nth-last-of-typeclj

(nth-last-of-type b)
(nth-last-of-type a b)

Selector step, tests if the node has an+b-1 siblings of the same type (tag name) on its right. See CSS :nth-last-of-type.

Selector step, tests if the node has an+b-1 siblings of the same type (tag name) on its right. See CSS :nth-last-of-type.
raw docstring

nth-of-typeclj

(nth-of-type b)
(nth-of-type a b)

Selector step, tests if the node has an+b-1 siblings of the same type (tag name) on its left. See CSS :nth-of-type.

Selector step, tests if the node has an+b-1 siblings of the same type (tag name) on its left. See CSS :nth-of-type.
raw docstring

oddclj


only-childclj


only-of-typeclj


predclj

(pred f)

Turns a predicate function on elements into a predicate-step usable in selectors.

Turns a predicate function on elements into a predicate-step usable in selectors.
raw docstring

prependclj

(prepend & values)

Prepends the values to the content of the selected element.

Prepends the values to the content of the selected element.
raw docstring

re-predclj

(re-pred re)

Turns a regex into a predicate-step on text nodes usable in selectors.

Turns a regex into a predicate-step on text nodes usable in selectors.
raw docstring

register-resource!cljmultimethod


remove-attrclj

(remove-attr & attr-names)

Dissocs attributes on the selected element.

Dissocs attributes on the selected element.
raw docstring

remove-classclj

(remove-class & classes)

Removes the specified classes from the selected element.

Removes the specified classes from the selected element.
raw docstring

replace-varsclj

(replace-vars m)
(replace-vars re m)
(replace-vars re m f)

By default, takes a map (or function) of keywords to strings and replaces all occurences of ${foo} by (m :foo) in text nodes and attributes. Does not recurse, you have to pair it with an appropriate selector. re is a regex whose first group will be passed to (comp m f) and f by default is #'keyword.

By default, takes a map (or function) of keywords to strings and replaces
all occurences of ${foo} by (m :foo) in text nodes and attributes.
Does not recurse, you have to pair it with an appropriate selector.
re is a regex whose first group will be passed to (comp m f) and f by
default is #'keyword.
raw docstring

replace-wordsclj

(replace-words words-to-replacements)

Takes a map of words to replacement strings and replaces all occurences. Does not recurse, you have to pair it with an appropriate selector.

Takes a map of words to replacement strings and replaces 
all occurences. Does not recurse, you have to pair it with an appropriate
selector.
raw docstring

(right selector-step)

Selector predicate, matches nodes whose immediate right sibling element is matched by the specified selector-step.

Selector predicate, matches nodes whose immediate right sibling element is
matched by the specified selector-step.
raw docstring

rightsclj

(rights selector-step)

Selector predicate, matches nodes whose one left sibling element is matched by the specified selector-step.

Selector predicate, matches nodes whose one left sibling element is matched by
the specified selector-step.
raw docstring

rootclj


selectclj

(select node-or-nodes selector)

Returns the seq of nodes or fragments matched by the specified selector.

Returns the seq of nodes or fragments matched by the specified selector.
raw docstring

select-fragments*clj

(select-fragments* nodes selector)

select-nodes*clj

(select-nodes* nodes selector)

self-closing-tagsclj


set-attrclj

(set-attr & kvs)

Assocs attributes on the selected element.

Assocs attributes on the selected element.
raw docstring

set-ns-options!clj

(set-ns-options! options)

Sets the default options to use by all templates and snippets in the declaring ns.

Sets the default options to use by all templates and snippets in the
declaring ns.
raw docstring

set-ns-parser!clj

(set-ns-parser! parser)

Sets the default parser to use by all templates and snippets in the declaring ns.

Sets the default parser to use by all templates and snippets in the
declaring ns.
raw docstring

snippetcljmacro

(snippet source selector args & forms)

A snippet is a function that returns a seq of nodes.

A snippet is a function that returns a seq of nodes.
raw docstring

snippet*cljmacro

(snippet* nodes & body)

sniptestcljmacro

(sniptest source-string & forms)

A handy macro for experimenting at the repl

A handy macro for experimenting at the repl
raw docstring

sniptest*clj

(sniptest* nodes f)

strict-modecljmacro

(strict-mode & forms)

Adds xhtml-transitional DTD to switch browser in 'strict' mode.

Adds xhtml-transitional DTD to switch browser in 'strict' mode.
raw docstring

strict-mode*clj

(strict-mode* node)

substituteclj

(substitute & values)

Replaces the current selection (node or fragment).

Replaces the current selection (node or fragment).
raw docstring

tag=clj

(tag= tag-name)

Selector predicate, :foo is as short-hand for (tag= :foo).

Selector predicate, :foo is as short-hand for (tag= :foo).
raw docstring

templatecljmacro

(template source args & forms)

A template returns a seq of string.

A template returns a seq of string.
raw docstring

textclj

(text node)

Returns the text value of a node.

Returns the text value of a node.
raw docstring

text-nodeclj


text-predclj

(text-pred f)

Turns a predicate function on strings (text nodes) into a predicate-step usable in selectors.

Turns a predicate function on strings (text nodes) into a predicate-step usable in selectors.
raw docstring

textsclj

(texts nodes)

Returns the text value of a nodes collection.

Returns the text value of a nodes collection.
raw docstring

this-nodeclj


transformclj

(transform nodes selector transformation)

transform-contentcljmacro

(transform-content & body)

transformationcljmacro

(transformation)
(transformation form)
(transformation form & forms)

unionclj

(union preds)

unwrapclj


voidclj


whitespaceclj


with-optionscljmacro

(with-options m & body)

wrapclj

(wrap tag)
(wrap tag attrs)

xml-parserclj

(xml-parser stream)

Loads and parse a XML resource and closes the stream.

Loads and parse a XML resource and closes the stream.
raw docstring

xml-resourceclj

(xml-resource resource)

Loads an XML resource, returns a seq of nodes.

Loads an XML resource, returns a seq of nodes.
raw docstring

zip-predclj

(zip-pred f)

Turns a predicate function on elements locs into a predicate-step usable in selectors.

Turns a predicate function on elements locs into a predicate-step usable in selectors.
raw docstring

zip-selectclj

(zip-select locs selector)

Returns the seq of locs matched by the specified selector.

Returns the seq of locs matched by the specified selector.
raw docstring

zip-select-fragments*clj

(zip-select-fragments* locs state-from state-to)

zip-select-nodes*clj

(zip-select-nodes* locs state)

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

× close