Liking cljdoc? Tell your friends :D

dunnage.sitoa.bootstrapped-schema


->kwclj

(->kw x)
source

->nskwclj

(->nskw x default-ns)
source

->nskw-seqclj

(->nskw-seq x default-ns)
source

all-maps?clj

(all-maps? x)
source

anon-type?clj

(anon-type? ty)
source

collect-facetsclj

(collect-facets x)
(collect-facets coll x)
source

complex-attrs-mapclj

(complex-attrs-map x {default-ns :default-ns :as context})
source

complex-tagclj

(complex-tag complex)
source

every-sequence?clj

(every-sequence? map-keys x)
source

get-primitive-typeclj

(get-primitive-type x)
source

group-particleclj

(group-particle context in)
source

handle-element-declclj

(handle-element-decl {default-ns :default-ns :as context} x)
source

handle-fields-wrapper2clj

(handle-fields-wrapper2
  {optional-group :optional-group default-ns :default-ns :as context})
source

handle-model-groupclj

(handle-model-group context x)
source

handle-model-group-declclj

(handle-model-group-decl {default-ns :default-ns :as context} x)
source

handle-model-group-decl-seqclj

source

handle-model-group-seqclj

source

handle-toplevel-particleclj

(handle-toplevel-particle context in)
source

handle-wildcardclj

(handle-wildcard x)
source

handleparticleclj

source

into-sorted-mapclj

(into-sorted-map x)
source

keywordize-leading-tagclj

(keywordize-leading-tag v)

:decode/string :enter hook for the schemas produced by or->multi: keywordizes a string leading tag so leading-tag-dispatch can dispatch on decoded input. Descends the leading position ([0], [0 0], deeper for nested chunks) and passes everything else through untouched.

`:decode/string` `:enter` hook for the schemas produced by `or->multi`:
keywordizes a string leading tag so `leading-tag-dispatch` can dispatch on
decoded input. Descends the leading position (`[0]`, `[0 0]`, deeper for
nested chunks) and passes everything else through untouched.
sourceraw docstring

leading-tag-dispatchclj

(leading-tag-dispatch v)

Dispatch fn for the schemas produced by or->multi: returns the leading XML tag keyword of a parsed value, or nil when there is none.

Parsed values are either a flat tuple [:Tag v] or a flat chunk [[:Tag v] ...]: sitoa's -cat-parser treats :cat/:alt children as inline data and splices their chunks FLAT into the parent accumulator, so even a branch whose first child is a nested :cat parses to a flat chunk whose first element is a tagged tuple. The descent past the second level is harmless generality. Returning nil rather than throwing lets :multi report an invalid value for input it cannot dispatch.

Dispatch fn for the schemas produced by `or->multi`: returns the leading XML
tag keyword of a parsed value, or nil when there is none.

Parsed values are either a flat tuple `[:Tag v]` or a flat chunk
`[[:Tag v] ...]`: sitoa's `-cat-parser` treats `:cat`/`:alt` children as
inline data and splices their chunks FLAT into the parent accumulator, so even
a branch whose first child is a nested `:cat` parses to a flat chunk whose
first element is a tagged tuple. The descent past the second level is harmless
generality. Returning nil rather than throwing lets `:multi` report an invalid
value for input it cannot dispatch.
sourceraw docstring

malli-string-primitiveclj

(malli-string-primitive prim {default-ns :default-ns :as context})
source

MalliXMLcljprotocol

-mtypeclj

(-mtype x context)

-seq-possible?clj

(-seq-possible? x context)

-seq-refclj

(-seq-ref x context)
source

name-regexclj

source

not-empty-stringclj

(not-empty-string x)
source

or->multiclj

(or->multi form)
(or->multi form opts)

Convert a discriminated choice form (an :or/:alt of element-tagged seqex arms) into [:multi {:dispatch leading-tag-dispatch :decode/string {:enter keywordize-leading-tag}} ...].

Branch keys are the XML start tags of the arms, and they MUST stay that way: sitoa's serde parser (-multi-parser) ignores :dispatch entirely and looks the XML start-tag keyword up directly among the branch keys. The unparser and malli coercion are the ones that use :dispatch.

Original properties and arms are preserved verbatim; a :cat arm led by an :alt is split into one branch per member, sharing the arm's tail.

The result contains fn objects, so it is NOT EDN-serializable: this is a load-time transform, never something to serialize, and it must be applied AFTER any *-seq derivation (the derivation does not descend into :multi).

Throws ex-info on arms with no fixed leading tag, on duplicate branch keys (:multi would silently keep the last), and — by default — on :alt-headed input that would produce a :cat branch, because an :alt chunk arm is spliced inline while a :multi consumes exactly one slot.

opts: :decode-string? (default true) attach the :decode/string enter hook :seqex-branches (default :throw) :allow permits :cat branches from :alt-headed input

Convert a discriminated choice form (an `:or`/`:alt` of element-tagged seqex
arms) into `[:multi {:dispatch leading-tag-dispatch
                     :decode/string {:enter keywordize-leading-tag}} ...]`.

Branch keys are the XML start tags of the arms, and they MUST stay that way:
sitoa's serde parser (`-multi-parser`) ignores `:dispatch` entirely and looks
the XML start-tag keyword up directly among the branch keys. The unparser and
malli coercion are the ones that use `:dispatch`.

Original properties and arms are preserved verbatim; a `:cat` arm led by an
`:alt` is split into one branch per member, sharing the arm's tail.

The result contains fn objects, so it is NOT EDN-serializable: this is a
load-time transform, never something to serialize, and it must be applied
AFTER any `*-seq` derivation (the derivation does not descend into `:multi`).

Throws `ex-info` on arms with no fixed leading tag, on duplicate branch keys
(`:multi` would silently keep the last), and — by default — on `:alt`-headed
input that would produce a `:cat` branch, because an `:alt` chunk arm is
spliced inline while a `:multi` consumes exactly one slot.

opts:
  :decode-string? (default true)    attach the `:decode/string` enter hook
  :seqex-branches (default :throw)  `:allow` permits `:cat` branches from
                                    `:alt`-headed input
sourceraw docstring

or->multi-keysclj

(or->multi-keys registry ks)
(or->multi-keys registry ks opts)

Apply or->multi to the named entries of a keyword->form registry map, returning the updated registry. opts is passed through to or->multi. Throws on keys absent from the registry unless {:missing :skip}.

Apply `or->multi` to the named entries of a keyword->form registry map,
returning the updated registry. `opts` is passed through to `or->multi`.
Throws on keys absent from the registry unless `{:missing :skip}`.
sourceraw docstring

parse-xsdclj

(parse-xsd f)
source

particle-sequence?clj

(particle-sequence? map-keys x)
source

raw-xsd->schemaclj

(raw-xsd->schema context f)
source

serialize-registryclj

(serialize-registry schema filename)
source

serialize-schemaclj

(serialize-schema schema filename)
source

simplify-fieldsclj

(simplify-fields props)
source

trim-registry-for-top-typesclj

(trim-registry-for-top-types registry top-types)
source

trim-registry-for-top-types-clj

(trim-registry-for-top-types- full-registry trimmed-registry next-keys)
source

union-reducibleclj

(union-reducible in)
source

unwrap-andclj

(unwrap-and x if-empty)
source

uri->nsclj

(uri->ns x)
source

wrap-ref-npclj

(wrap-ref-np x)
source

wrap-regexclj

(wrap-regex context in msch)
source

xmlschema-nsclj

source

xsd->registryclj

(xsd->registry {default-ns :default-ns :as context} schema)
source

xsd->schemaclj

(xsd->schema context f)
source

xsd->top-typeclj

(xsd->top-type {default-ns :default-ns :as context} schema)
source

xsd-builtin-decl?clj

(xsd-builtin-decl? x default-ns)

True when a declaration is a built-in XML Schema type rather than something the parsed document declares. Decided from the declaration's own name so a -seq dual is dropped or kept together with its base entry.

True when a declaration is a built-in XML Schema type rather than something
the parsed document declares. Decided from the declaration's own name so a
-seq dual is dropped or kept together with its base entry.
sourceraw docstring

xsd-builtin-kw?clj

(xsd-builtin-kw? x)

True for a keyword naming a built-in XML Schema type.

True for a keyword naming a built-in XML Schema type.
sourceraw docstring

xsd-builtin-namesclj

Local names XSOM synthesizes in the XML Schema namespace for the built-in datatype hierarchy; they come from XSOM's bundled datatypes.xsd, not from the document being parsed. The ones sitoa models are the keys of xml-primitives/xmlschema-registry; anyType and the three builtin list types are builtins too, sitoa simply has no mapping for them.

Anything else in that namespace can only come from a document that declares it - the schema for schemas (XMLSchema.xsd) declares element, complexType, particle and friends there - so it is a real declaration and must reach the registry.

Local names XSOM synthesizes in the XML Schema namespace for the built-in
datatype hierarchy; they come from XSOM's bundled datatypes.xsd, not from the
document being parsed. The ones sitoa models are the keys of
xml-primitives/xmlschema-registry; anyType and the three builtin list types
are builtins too, sitoa simply has no mapping for them.

Anything else in that namespace can only come from a document that declares
it - the schema for schemas (XMLSchema.xsd) declares element, complexType,
particle and friends there - so it is a real declaration and must reach the
registry.
sourceraw docstring

xsd-unmodeled-builtin-formsclj

Inline malli forms for built-in XML Schema types xmlschema-registry does not model. They never become registry entries, so a reference to one is inlined instead of left dangling. anyType is unconstrained content.

Inline malli forms for built-in XML Schema types xmlschema-registry does not
model. They never become registry entries, so a reference to one is inlined
instead of left dangling. anyType is unconstrained content.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close