This is the xml.location Reference Manual, version 0.3.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 07:09:24 2024 GMT+0.
xml.location/xml.location.asd
xml.location/compat.lisp
xml.location/src/package.lisp
xml.location/src/types.lisp
xml.location/src/conditions.lisp
xml.location/src/variables.lisp
xml.location/src/protocol.lisp
xml.location/src/xpath-creation.lisp
xml.location/src/location.lisp
xml.location/src/singleton-location.lisp
xml.location/src/multi-location.lisp
xml.location/src/location-mixins.lisp
xml.location/src/conversion.lisp
xml.location/src/construction.lisp
xml.location/src/macros.lisp
The main system appears first, followed by any subsystem dependency.
xml.location
This system provides a convenient interface for manipulating XML data. It is inspired by the xmltio library.
Jan Moringen <jmoringe@techfak.uni-bielefeld.de>
Jan Moringen <jmoringe@techfak.uni-bielefeld.de>
LLGPLv3
0.3.0
alexandria
(system).
split-sequence
(system).
iterate
(system).
let-plus
(system)., at least version "0.2"
more-conditions
(system).
closer-mop
(system).
cxml-stp
(system).
xpath
(system).
compat.lisp
(file).
src
(module).
Modules are listed depth-first from the system components tree.
xml.location/src
compat.lisp
(file).
xml.location
(system).
package.lisp
(file).
types.lisp
(file).
conditions.lisp
(file).
variables.lisp
(file).
protocol.lisp
(file).
xpath-creation.lisp
(file).
location.lisp
(file).
singleton-location.lisp
(file).
multi-location.lisp
(file).
location-mixins.lisp
(file).
conversion.lisp
(file).
construction.lisp
(file).
macros.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
xml.location/xml.location.asd
xml.location/compat.lisp
xml.location/src/package.lisp
xml.location/src/types.lisp
xml.location/src/conditions.lisp
xml.location/src/variables.lisp
xml.location/src/protocol.lisp
xml.location/src/xpath-creation.lisp
xml.location/src/location.lisp
xml.location/src/singleton-location.lisp
xml.location/src/multi-location.lisp
xml.location/src/location-mixins.lisp
xml.location/src/conversion.lisp
xml.location/src/construction.lisp
xml.location/src/macros.lisp
xml.location/compat.lisp
xml.location
(system).
define-dynamic-class-family
(macro).
%ensure-class-name
(function).
%make-key/sorted
(function).
%make-key/unsorted
(function).
%parse-doc-and-options
(function).
%process-superclass-specs
(function).
ensure-find-class
(function).
superclass-spec
(type).
superclass-spec-end
(type).
superclass-spec-simple
(type).
superclass-spec-start
(type).
xml.location/src/types.lisp
package.lisp
(file).
src
(module).
assign-mode-designator
(type).
if-multiple-matches-policy-designator
(type).
if-no-match-policy-designator
(type).
xml.location/src/conditions.lisp
types.lisp
(file).
src
(module).
->xml-conversion-error
(function).
->xml-conversion-error
(condition).
conversion-error
(condition).
conversion-error-destination
(reader method).
conversion-error-function
(reader method).
conversion-error-type
(reader method).
conversion-error-value
(reader method).
empty-result-set
(condition).
invalid-binding-form
(condition).
invalid-binding-form-form
(reader method).
invalid-binding-form-name
(reader method).
invalid-binding-form-spec
(reader method).
invalid-result-type
(condition).
location-error
(condition).
location-error-document
(reader method).
location-error-path
(reader method).
missing-xpath-source
(condition).
no-->xml-conversion-method
(condition).
no-conversion-method-mixin
(condition).
no-such-accessor-form
(condition).
no-xml->-conversion-method
(condition).
result-condition
(condition).
result-condition-result
(reader method).
too-many-matches-in-result-set
(condition).
xml->-conversion-error
(function).
xml->-conversion-error
(condition).
xpath-creation-error
(condition).
xpath-creation-error-location
(reader method).
xpath-creation-error-name
(reader method).
xpath-creation-error-predicate
(reader method).
xpath-creation-error-type
(reader method).
%add-available-conversion-methods
(function).
%add-available-conversion-methods-for-function
(function).
%location-error-document-string
(function).
location-error-expected
(reader method).
xml.location/src/variables.lisp
conditions.lisp
(file).
src
(module).
*cl-namespaces*
(special variable).
xml.location/src/protocol.lisp
variables.lisp
(file).
src
(module).
->xml
(generic function).
@
(generic function).
(setf @)
(generic function).
create-xpath
(generic function).
ensure-location-class
(function).
loc
(generic function).
location-classes
(function).
location-document
(generic reader).
(setf location-document)
(generic function).
location-path
(generic reader).
(setf location-path)
(generic function).
location-result
(generic reader).
make-location-class
(generic function).
name
(generic function).
(setf name)
(generic function).
val
(generic function).
(setf val)
(generic function).
xml->
(generic function).
*location-classes*
(special variable).
clear-location-classes!
(function).
compile!
(generic function).
create-xpath-element
(generic function).
create-xpath-sibling
(generic function).
evaluate!
(generic function).
location-attribute
(generic function).
maybe-decode-qname
(generic function).
xml.location/src/xpath-creation.lisp
protocol.lisp
(file).
src
(module).
create-xpath
(method).
create-xpath
(method).
%expand-xpath-element
(function).
create-xpath-element
(method).
create-xpath-element
(method).
create-xpath-element
(method).
create-xpath-element
(method).
create-xpath-element
(method).
create-xpath-element
(method).
create-xpath-element
(method).
create-xpath-element
(method).
create-xpath-element
(method).
create-xpath-element
(method).
create-xpath-sibling
(method).
create-xpath-sibling
(method).
xml.location/src/location.lisp
xpath-creation.lisp
(file).
src
(module).
initialize-instance
(method).
initialize-instance
(method).
location
(class).
location-document
(reader method).
(setf location-document)
(writer method).
(setf location-document)
(method).
location-namespaces
(reader method).
(setf location-namespaces)
(writer method).
(setf location-namespaces)
(method).
location-path
(reader method).
(setf location-path)
(writer method).
(setf location-path)
(method).
location-result
(reader method).
(setf name)
(method).
print-object
(method).
%maybe-add-default-namespaces
(function).
compile!
(method).
compile!
(method).
evaluate!
(method).
location-attribute
(method).
location-compiled-path
(reader method).
(setf location-compiled-path)
(writer method).
(setf location-compiled-path)
(method).
maybe-decode-qname
(method).
xml.location/src/singleton-location.lisp
location.lisp
(file).
src
(module).
@
(method).
(setf @)
(method).
loc
(method).
name
(method).
(setf name)
(method).
(setf name)
(method).
singleton-location
(class).
val
(method).
(setf val)
(method).
evaluate!
(method).
location-attribute
(method).
location-attribute
(method).
location-if-multiple-matches
(reader method).
xml.location/src/multi-location.lisp
singleton-location.lisp
(file).
src
(module).
@
(method).
(setf @)
(method).
loc
(method).
multi-location
(class).
name
(method).
(setf name)
(method).
(setf name)
(method).
val
(method).
(setf val)
(method).
(setf val)
(method).
location-attribute
(method).
xml.location/src/location-mixins.lisp
multi-location.lisp
(file).
src
(module).
@
(method).
(setf @)
(method).
(setf @)
(method).
append-nodes-mixin
(class).
create-missing-nodes-mixin
(class).
initialize-instance
(method).
name
(method).
(setf name)
(method).
val
(method).
(setf val)
(method).
(setf val)
(method).
(setf val)
(method).
(setf val)
(method).
ignore-empty-result-mixin
(class).
location-attribute
(method).
location-attribute
(method).
xml.location/src/conversion.lisp
location-mixins.lisp
(file).
src
(module).
->xml
(method).
->xml
(method).
->xml
(method).
->xml
(method).
->xml
(method).
->xml
(method).
->xml
(method).
->xml
(method).
->xml
(method).
->xml
(method).
->xml
(method).
->xml
(method).
xml->
(method).
xml->
(method).
xml->
(method).
xml->
(method).
xml->
(method).
xml->
(method).
xml->
(method).
xml->
(method).
xml->
(method).
xml->
(method).
xml->
(method).
xml->
(method).
xml->
(method).
xml->
(method).
%parse-list-of-atoms
(function).
%split-at-whitespace
(function).
xml.location/src/construction.lisp
conversion.lisp
(file).
src
(module).
%compute-location-class
(function).
xml.location/src/macros.lisp
construction.lisp
(file).
src
(module).
with-locations
(macro).
with-locations-r/o
(macro).
%make-location-and-place-forms
(function).
%make-location-form
(function).
%parse-access-spec
(generic function).
%parse-bindings-and-options
(function).
%signal-no-such-accessor-form
(function).
Packages are listed by definition order.
xml.location.compat
Internal compatibility package.
alexandria
.
common-lisp
.
let-plus
.
define-dynamic-class-family
(macro).
%ensure-class-name
(function).
%make-key/sorted
(function).
%make-key/unsorted
(function).
%parse-doc-and-options
(function).
%process-superclass-specs
(function).
ensure-find-class
(function).
superclass-spec
(type).
superclass-spec-end
(type).
superclass-spec-simple
(type).
superclass-spec-start
(type).
xml.location
This package contains the public interface of the cmxl-location system. The main entry point is the generic function ‘loc’, which creates ‘location’ instances from XML documents and XPaths. The resulting objects can be queried and modified using the location-* accessors and the generic functions ‘name’, ‘val’ and ‘@’.
xloc
alexandria
.
common-lisp
.
iterate
.
let-plus
.
more-conditions
.
split-sequence
.
*cl-namespaces*
(special variable).
->xml
(generic function).
->xml-conversion-error
(function).
->xml-conversion-error
(condition).
@
(generic function).
(setf @)
(generic function).
append-nodes-mixin
(class).
conversion-error
(condition).
conversion-error-destination
(generic reader).
conversion-error-function
(generic reader).
conversion-error-type
(generic reader).
conversion-error-value
(generic reader).
create-missing-nodes-mixin
(class).
create-xpath
(generic function).
empty-result-set
(condition).
ensure-location-class
(function).
invalid-binding-form
(condition).
invalid-binding-form-form
(generic reader).
invalid-binding-form-name
(generic reader).
invalid-binding-form-spec
(generic reader).
invalid-result-type
(condition).
loc
(generic function).
location
(class).
location-classes
(function).
location-document
(generic reader).
(setf location-document)
(generic function).
location-error
(condition).
location-error-document
(generic reader).
location-error-path
(generic reader).
location-namespaces
(generic reader).
(setf location-namespaces)
(generic function).
location-path
(generic reader).
(setf location-path)
(generic function).
location-result
(generic reader).
make-location-class
(generic function).
missing-xpath-source
(condition).
multi-location
(class).
name
(generic function).
(setf name)
(generic function).
no-->xml-conversion-method
(condition).
no-conversion-method-mixin
(condition).
no-such-accessor-form
(condition).
no-xml->-conversion-method
(condition).
result-condition
(condition).
result-condition-result
(generic reader).
singleton-location
(class).
too-many-matches-in-result-set
(condition).
val
(generic function).
(setf val)
(generic function).
with-locations
(macro).
with-locations-r/o
(macro).
xml->
(generic function).
xml->-conversion-error
(function).
xml->-conversion-error
(condition).
xpath-creation-error
(condition).
xpath-creation-error-location
(generic reader).
xpath-creation-error-name
(generic reader).
xpath-creation-error-predicate
(generic reader).
xpath-creation-error-type
(generic reader).
%add-available-conversion-methods
(function).
%add-available-conversion-methods-for-function
(function).
%compute-location-class
(function).
%expand-xpath-element
(function).
%location-error-document-string
(function).
%make-location-and-place-forms
(function).
%make-location-form
(function).
%maybe-add-default-namespaces
(function).
%parse-access-spec
(generic function).
%parse-bindings-and-options
(function).
%parse-list-of-atoms
(function).
%signal-no-such-accessor-form
(function).
%split-at-whitespace
(function).
*location-classes*
(special variable).
assign-mode-designator
(type).
clear-location-classes!
(function).
compile!
(generic function).
create-xpath-element
(generic function).
create-xpath-sibling
(generic function).
evaluate!
(generic function).
if-multiple-matches-policy-designator
(type).
if-no-match-policy-designator
(type).
ignore-empty-result-mixin
(class).
location-attribute
(generic function).
location-compiled-path
(generic reader).
(setf location-compiled-path)
(generic function).
location-error-expected
(generic reader).
location-if-multiple-matches
(generic reader).
maybe-decode-qname
(generic function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Namespace list with a made-up Common Lisp namespace. This namespace should be used when Common Lisp-specific data has to be stored in XML documents in order to represent objects without loss of information.
Define a family of classes in the category NAME. Classes in the
family are fully specified by their respective sets of
superclasses. No further structure is added.
For a family named NAME, the following things are defined:
+ *NAME-classes* [variable]
+ make-NAME-class [generic function]
+ make-NAME-class list [method]
+ ensure-NAME-class [function]
+ NAME-classes [function]
Unless the :package option is supplied, all names will be interned in
NAME’s package. Using the :package option, a different package can be
specified. When supplied, the value of the :package option is
evaluated.
Valid options and their respective defaults are:
+ package [(package-name (symbol-package name))]
The package in which defined variables and functions will be placed.
+ metaclass [’standard-class]
The metaclass that should be used for classes in the family.
+ common-superclasses [nil]
A list of superclasses that should be added to all classes in the
family. List elements can either be classes or lists of the
form (PLACEMENT CLASS) where PLACEMENT is either :start or :end and
CLASS is a class. PLACEMENT controls where a superclass is inserted
into the list of superclasses. The default placement is :end.
+ sort-mixins? [nil]
If non-nil, the list of mixin classes is sorted (according to their
‘class-name’s as strings) prior to looking for or creating a dynamic
class.
Generated documentation is available for the symbol NAME using type :dynamic-class-family.
Execute body with certain variables, specified by BINDINGS bound to
locations in DOCUMENT. DOCUMENT has to be of type
‘stp:document’.
BINDINGS-AND-OPTIONS specifies let-like (generalized) variable
bindings according to the following syntax:
BINDINGS ::= (BINDING* OPTION*)
BINDING ::= (VAR-SPEC XPATH [ARG*])
VAR-SPEC ::= NAME-SPEC | VAL-SPEC | @-SPEC | LOC-SPEC
NAME-SPEC ::= (:name SYMBOL [:prefix? BOOL])
VAL-SPEC ::= SYMBOL | (:val SYMBOL [:type TYPE])
@-SPEC ::= (:@ @-NAME [:type TYPE])
@-NAME ::= SYMBOL | (SYMBOL "STRING")
LOC-SPEC ::= (:loc SYMBOL)
OPTION ::= KEY VALUE
In all cases, SYMBOL is the name of the generalized variable that is
created by the binding. If the (SYMBOL "STRING") form of @-NAME is
used, STRING specifies the name of the attribute independently of the
variable name, otherwise the name of attribute is computed as (string
SYMBOL).
Instead of the keywords :name, :val and :@ symbols of the same name in
the xml.location package can be used.
Example:
XLOC> (xloc:with-locations-r/o
(((:@ (description-brief "brief")) "package/description")
(description-long "package/description/text()")
(author "package/author/text()")
(dependencies "package/depend/@package"
:if-multiple-matches :all)
(build-dependencies "package/rosbuild2/depend/@package"
:if-multiple-matches :all)
((:val messages :type ’list) "package/rosbuild2/msgs/text()")
((:val services :type ’list) "package/rosbuild2/srvs/text()")) doc
(values author messages))
=> "Joe User" ’("msg/bla.msg")
Like ‘with-locations’, but binding places are not ‘setf’-able.
Signal an ‘->xml-conversion-error’ with data VALUE, TYPE and DESTINATION and optional FORMAT-CONTROL and FORMAT-ARGUMENTS.
Find or make the dynamic class composed of MIXINS.
Return list of all classes in the family.
Signal an ‘xml->-conversion-error’ with data VALUE and TYPE and optional FORMAT-CONTROL and FORMAT-ARGUMENTS.
Convert VALUE to a suitable type and store the result of the conversion in the XML node DEST. Should return VALUE.
list
) (dest (eql string)
) (type (eql type)
) &key &allow-other-keys) ¶Convert VALUE to string by ‘prin1’ing it.
sequence
) (dest (eql string)
) type &key inner-types &allow-other-keys) ¶Convert sequence VALUE to string by ‘format’ting.
string
) (dest (eql string)
) type &key &allow-other-keys) ¶Fast-path method for string VALUE.
(eql string)
) type &key &allow-other-keys) ¶Convert VALUE to requested type string by ‘prin1’ing it.
string
) (dest node
) (type (eql string)
) &key &allow-other-keys) ¶Catch-all for STP nodes that do not have an obvious string interpretation.
string
) (dest attribute
) type &key &allow-other-keys) ¶Fast-path method for storing string VALUE into text node DEST.
attribute
) type &key &allow-other-keys) ¶Convert VALUE to string and store in DEST.
string
) (dest text
) type &key &allow-other-keys) ¶Fast-path method for storing string VALUE into text node DEST.
text
) type &key inner-types &allow-other-keys) ¶Convert VALUE to string and store in DEST.
document
) type &rest args &key &allow-other-keys) ¶Convert VALUE to string and store in DEST.
list
) &key &allow-other-keys) ¶Split composite type specification TYPE into head and tail.
list
) &key &allow-other-keys) ¶Intended mainly to catch the case in which TYPE is nil.
Return the value of the attribute named NAME of the node represented by LOCATION. If TYPE is supplied, a type conversion may be performed. LOCATION has to represent an element node. If NAME is a qualified name of the form PREFIX:LOCAL-NAME, LOCATION has to contain an entry for PREFIX in its namespace table.
ignore-empty-result-mixin
) name &key &allow-other-keys) ¶multi-location
) (name string
) &key type) ¶singleton-location
) (name string
) &key type) ¶Set NEW-VALUE as the value of the attribute named NAME of the node represented by LOCATION. If TYPE is supplied, a type conversion may be performed prior to assigning the value. LOCATION has to represent an element node. If NAME is a qualified name of the form PREFIX:LOCAL-NAME, LOCATION has to contain an entry for PREFIX in its namespace table.
append-nodes-mixin
) (name string
) &key type) ¶ignore-empty-result-mixin
) name &key &allow-other-keys) ¶multi-location
) (name string
) &key type) ¶singleton-location
) (name string
) &key type) ¶->xml-conversion-error
)) ¶no-conversion-method-mixin
)) ¶conversion-error
)) ¶type
.
conversion-error
)) ¶Ensure that the nodes referenced in PATH actually exist in DOCUMENT, creating them if necessary.
invalid-binding-form
)) ¶form
.
no-such-accessor-form
)) ¶name
.
no-such-accessor-form
)) ¶spec
.
Construct and return a new location object that represents the
nodes resulting from applying the XPath PATH to the XML document
DOCUMENT. ARGS are passed to the ‘make-instance’ call that creates a
‘location’ instance.
NAMESPACES can be an alist of the form
((PREFIX . NAMESPACE)*)
that specifies XML namespaces that should be made available in PATH.
IF-NO-MATCH specifies the policy for dealing with the situation that
the node set produced by evaluating PATH on DOCUMENT is empty. Valid
values:
:error (the default)
Signal an ‘empty-result-set’ error.
:create
Try to create a location which matches PATH in DOCUMENT, then return
the created location.
:do-nothing.
Return a location object that does not have an associated location
in document.
IF-MULTIPLE-MATCHES specifies the policy for dealing with the
situation that the node set produced by evaluating PATH on DOCUMENT
consists of multiple nodes. Valid values are:
:error (the default)
Signal a ‘too-many-matches-in-result-set’ error.
:first
Return a location object corresponding to the first location in
DOCUMENT which matches PATH.
:any
Return a location object corresponding to an arbitrary location in
DOCUMENT which matches PATH.
:last.
Return a location object corresponding to the last location in
DOCUMENT which matches PATH.
:all
Return a location object corresponding to the set of matching
locations. Operations on the location object affect all locations
simultaneously.
ASSIGN-MODE specifies the semantics of assigning values to ‘val’
places of the location:
:set
An assigned value replaces the previous value.
:append
Subsequently assigned values are stored in newly appended sibling
locations.
The type of the returned ‘location’ instance can depend on the arguments but is a sub-type of ‘location’.
function
) &rest args) ¶Interpret PATH as compiled XPath, skipping the compilation step.
string
) path &rest args) ¶Parse DOCUMENT as XML document before constructing the location.
node
) (path string
) &rest args &key if-multiple-matches if-no-match assign-mode &allow-other-keys) ¶Create a location for DOCUMENT and PATH. The class of the location instance is determined based on the values of IF-MULTIPLE-MATCHES and IF-NO-MATCH.
multi-location
) path &rest args &key &allow-other-keys) ¶singleton-location
) path &rest args &key &allow-other-keys) ¶Return the document (an stp:node instance) associated to LOCATION.
Set NEW-VALUE as LOCATION’s associated document. NEW-VALUE has to be an stp:node instance.
location-error
)) ¶location-error
)) ¶path
.
location
)) ¶Reset computed result of LOCATION when namespaces are changed.
Return the XPath of LOCATION.
Set NEW-VALUE as LOCATION’s associated XPath. NEW-VALUE has to be a string.
Return the node or node set that has been produced by evaluating LOCATION’s associated XPath on LOCATION’s associated document.
Dynamically make a class composed of MIXINS.
list
)) ¶Return the name of the node represented by LOCATION.
If PREFIX? is non-nil, the concatenation of the prefix and the local
name is returned.
ignore-empty-result-mixin
) &key &allow-other-keys) ¶multi-location
) &key prefix?) ¶singleton-location
) &key prefix?) ¶Set NEW-VALUE as the local name of the node represented by LOCATION. If NEW-VALUE is a qualified name of the form PREFIX:LOCAL-NAME, LOCATION has to have an entry for PREFIX in its namespace table.
ignore-empty-result-mixin
)) ¶multi-location
)) ¶multi-location
)) ¶singleton-location
)) ¶singleton-location
)) ¶result-condition
)) ¶Return the value of the node represented by LOCATION. If TYPE is supplied, a type conversion may be performed. When LOCATION represents an element node, TYPE has to be supplied. For attribute and text nodes, the text value is returned in that case.
ignore-empty-result-mixin
) &key &allow-other-keys) ¶multi-location
) &key type) ¶singleton-location
) &key type) ¶Set NEW-VALUE as the value of the node represented by LOCATION. If TYPE is supplied, a type conversion may be performed prior to assigning the value. When LOCATION represents an element node, TYPE has to be supplied. For attribute and text nodes, NEW-VALUE has to be a string in that case.
append-nodes-mixin
) &key &allow-other-keys) ¶Sibling creation invalidates our previous XPath evaluation result, so we have to re-evaluate.
append-nodes-mixin
) &key type) ¶append-nodes-mixin
) &key type) ¶ignore-empty-result-mixin
) &key &allow-other-keys) ¶multi-location
) &key type) ¶multi-location
) &key type) ¶singleton-location
) &key type) ¶Convert VALUE to the type designated by TYPE and, possibly INNER-TYPES. The result of the conversion is returned.
node
) (type symbol
) &key &allow-other-keys) ¶Interpret TYPE as a class name. Try to create an instance and load the contents of VALUE into that instance.
node
) (type class
) &key &allow-other-keys) ¶Interpret TYPE as a class name. Try to create an instance and load the contents of VALUE into that instance.
string
) (type (eql type)
) &key &allow-other-keys) ¶Convert string VALUE to a Common Lisp type.
string
) (type (eql list)
) &key inner-types) ¶Convert intermediate string VALUE to requested list type TYPE.
string
) (type (eql string)
) &key &allow-other-keys) ¶Fast-path method for string VALUE.
string
) type &key &allow-other-keys) ¶Convert intermediate string VALUE to requested type TYPE.
node
) (type (eql string)
) &key &allow-other-keys) ¶Catch-all method for STP nodes that have no obvious string interpretation.
attribute
) (type (eql string)
) &key &allow-other-keys) ¶Fast-path method for attribute nodes if TYPE is string.
attribute
) type &rest args &key &allow-other-keys) ¶Extract attribute value from VALUE for further conversion.
text
) (type (eql string)
) &key &allow-other-keys) ¶Fast-path method for text nodes if TYPE is string.
text
) type &rest args &key &allow-other-keys) ¶Extract text from text node VALUE for further conversion.
document
) type &rest args &key &allow-other-keys) ¶list
) &key &allow-other-keys) ¶Split composite type specification TYPE into head and tail.
list
) &key &allow-other-keys) ¶Intended mainly to catch the case in which TYPE is nil.
xpath-creation-error
)) ¶xpath-creation-error
)) ¶name
.
xpath-creation-error
)) ¶xpath-creation-error
)) ¶type
.
create-missing-nodes-mixin
) &key) ¶This error is signaled when storing a value into an XML location with a certain type fails.
Initarg | Value |
---|---|
:destination | (missing-required-initarg (quote ->xml-conversion-error) destination) |
The destination of the failed conversion. Usually an XML node.
:destination
This slot is read-only.
This error is signaled when a conversion fails.
simple-error
.
Initarg | Value |
---|---|
:format-arguments | nil |
:format-control |
|
The value for which the conversion failed.
:value
This slot is read-only.
The type involved in the failed conversion.
common-lisp
.
:type
This slot is read-only.
This error is signaled when an XPath evaluation produces an empty result in a context that requires a non-empty result set.
Initarg | Value |
---|---|
:result | nil |
This error is signaled when an invalid binding form is encountered during expansion of the ‘with-locations’ macro.
error
.
The invalid binding form.
:form
This slot is read-only.
This error is signaled when an XPath evaluation produces a result which is not of the correct type for the context in which it occurs.
This condition class can be used to discriminate location-related errors.
error
.
Initarg | Value |
---|---|
:path | (missing-required-initarg (quote location-error) path) |
:document | (missing-required-initarg (quote location-error) document) |
The document of the location that caused the error.
:document
This slot is read-only.
The XPath of the location that caused the error.
:path
This slot is read-only.
This condition is signaled when recompilation of an XPath would be required but the XPath source is not available. This can happen, for example, when the namespace table of a location is changed.
error
.
This error is signaled when no method is available to store a value into an XML location with a certain type.
Initarg | Value |
---|---|
:function | (quote ->xml) |
This condition class can be mixed into condition classes that indicate a conversion failure because of a missing conversion method.
condition
.
Initarg | Value |
---|---|
:function | (missing-required-initarg (quote no-conversion-method-mixin) function) |
The name of the conversion function for which no suitable method could be found.
common-lisp
.
:function
This slot is read-only.
This error is signaled if a binding form is encountered within a use of in the ‘with-locations’ macro which contains an unknown accessor.
This error is signaled when no method is available to convert an XML location into a Lisp object with a certain type.
Initarg | Value |
---|---|
:function | (quote xml->) |
Subclasses of this condition are signaled when an XPath evaluation produces a result that is invalid in the a particular context.
condition
.
Initarg | Value |
---|---|
:result | (missing-required-initarg (quote result-condition) result) |
The invalid result.
:result
This slot is read-only.
This error is signaled when an XPath evaluation produces a result set that consists of multiple elements in a context that permits at most one element.
The number of elements the result set should have had.
:expected
This slot is read-only.
This error is signaled when converting an XML location into a Lisp object with a certain type fails.
This error is signaled when the creation of a node based on a XPath fragment fails.
simple-error
.
Initarg | Value |
---|---|
:format-arguments | nil |
:format-control |
|
:predicate | (missing-required-initarg (quote xpath-creation-error) predicate) |
:name | (missing-required-initarg (quote xpath-creation-error) name) |
:type | (missing-required-initarg (quote xpath-creation-error) type) |
:location | (missing-required-initarg (quote xpath-creation-error) location) |
The location at which a node should have been added according to the XPath.
:location
This slot is read-only.
The type of the XPath fragment for which the creation of a node failed.
common-lisp
.
:type
This slot is read-only.
The name mentioned in the XPath fragment for which the creation of a node failed.
:name
This slot is read-only.
The predicate of the XPath fragment for which the creation of a node failed.
:predicate
This slot is read-only.
This mixin changes the default replacing assignment behavior to an appending assignment behavior. That is, assignments to the ‘val’ place of locations create siblings of the node designated by the final XPath component and assign values to these new nodes.
This class adds the automatic creation of XML nodes that are references in the path but missing in the document to location classes.
A location consists of an XML document and an XPath that refers to nodes in the document. Technically the location uses the node set resulting from evaluating the XPath on the document as a concrete representation of this relation. Operation on the location are carried out on the node or nodes of the node set.
compile!
.
compile!
.
evaluate!
.
initialize-instance
.
initialize-instance
.
location-attribute
.
(setf location-compiled-path)
.
(setf location-compiled-path)
.
location-compiled-path
.
(setf location-document)
.
(setf location-document)
.
location-document
.
(setf location-namespaces)
.
(setf location-namespaces)
.
location-namespaces
.
(setf location-path)
.
(setf location-path)
.
location-path
.
location-result
.
maybe-decode-qname
.
(setf name)
.
print-object
.
Initarg | Value |
---|---|
:namespaces | *initial-namespaces* |
The XML document to which the location refers.
cxml-stp:node
:document
An alist of namespaces that should be available in the XPath of the location.
list
An XPath that selects nodes in the document of the location.
(or null string)
:path
Compiled version of the XPath of the location.
(or null function)
:compiled-path
The node-set produced by evaluating the XPath of the location to the document of the location.
:result
This slot is read-only.
Instances of this class represent and operate on a set of XPath matches in a single document simultaneously.
This location class consists of an XML document along with an XPath that produces exactly one match in the document.
Policy for the situation that the XPath evaluates to an empty node set.
xml.location::if-no-match-policy-designator
:error
:if-no-match
Policy for the situation that the XPath
evaluates to a node set that consists of more than one nodes.
(member :error :first :last :any)
:any
:if-multiple-matches
This slot is read-only.
Association of lists of mixins to previously created classes.
Print a list of methods of the generic function associated to CONDITION onto STREAM.
Format the list of methods of the generic function designated by NAME onto STREAM.
Compute a location class based on the values of IF-MULTIPLE-MATCHES and IF-NO-MATCH. This is a separate function to make it usable in compiler macros.
Return a serialization of the XML document associated with CONDITION.
Return a key for the dynamic class described by MIXINS.
Return a key for the dynamic class described by MIXINS.
Generate location and place forms for DOCUMENT and BINDINGS.
When WRITABLE? is non-nil, locations are created in the document if
necessary. Return two values:
+ A list of location forms
+ A list of place forms
Make a form that creates the ‘location’ instance for DOCUMENT, PATH
and ARGS. Return two values:
+ a symbol for the variable that will hold the location instance
+ a form that should be evaluated to compute the location instance or
nil, if a location variable emitted earlier can be reused.
Add default namespaces as defined by ‘xpath::*dynamic-namespaces*’ to NAMESPACES.
Separate BINDINGS-AND-OPTIONS into binding forms and
options. Return two values: the collected binding forms and a plist
containing the collected options.
Parse DOC-AND-OPTIONS which is expected to be a list of the form
([DOC] (:NAME VALUE)*).
Return a list of the form
(DOC :NAME1 VALUE1 ...)
in which DOC may be nil.
Parse superclass specs SPECS and return two values: superclasses that should be inserted at the start of the list of direct superclasses and superclasses that should inserted at the end of the list of direct superclasses.
Clear all previously defined dynamic classes.
(eql xml.location:@)
) &rest args) ¶(eql :@)
) &key inner-specs args) ¶(eql xml.location:val)
) &rest args) ¶(eql :val)
) &key inner-specs args) ¶(eql xml.location:name)
) &rest args) ¶(eql :name)
) &key inner-specs args) ¶(eql :loc)
) &key inner-specs args) ¶symbol
) &rest args) ¶list
) &rest args) ¶(eql nil)
) &key inner-specs) ¶Compile XPath associated to LOCATION.
Create the XPath element designated by TYPE, NAME and PREDICATE in LOCATION.
element
) (type (eql :attribute)
) (name (eql *)
) (predicate (eql nil)
) &rest predicates) ¶element
) (type (eql :attribute)
) (name string
) (predicate (eql nil)
) &rest predicates) ¶node
) (type (eql :child)
) name (predicate list
) &rest predicates) ¶node
) (type (eql :child)
) (name list
) (predicate (eql nil)
) &rest predicates) ¶node
) (type (eql :child)
) (name string
) (predicate (eql nil)
) &rest predicates) ¶node
) (type (eql :child)
) name (predicate integer
) &rest predicates) ¶node
) (type (eql :child)
) name (predicate integer
) &rest predicates) ¶node
) (type (eql :child)
) (name (eql :text)
) (predicate (eql nil)
) &rest predicates) ¶node
) (type (eql :child)
) (name (eql *)
) (predicate (eql nil)
) &rest predicates) ¶node
) (type (eql :child)
) (name (eql :node)
) (predicate (eql nil)
) &rest predicates) ¶Create a "sibling" path of PATH by duplicating the node
designated by PATH and appending the result to the children of the
parent of the node designated by PATH.
Evaluate XPath associated to LOCATION on the document associated to LOCATION.
singleton-location
)) ¶Return the attribute(s) designated by NAME in LOCATION.
append-nodes-mixin
) (name string
) &key uri) ¶create-missing-nodes-mixin
) (name string
) &key uri) ¶multi-location
) (name string
) &key uri if-does-not-exist) ¶singleton-location
) (name string
) &key uri if-does-not-exist) ¶singleton-location
) (name string
) &key if-does-not-exist &allow-other-keys) ¶too-many-matches-in-result-set
)) ¶singleton-location
)) ¶Policy for the situation that the XPath
evaluates to a node set that consists of more than one nodes.
If NAME is qualified, decode it into local-name prefix and uri using the configured namespaces of LOCATION. Return the components as multiple value. If NAME is not qualified, the secondary and tertiary values are both nil.
This mixin class adds the behavior of turning the methods ‘name’, ‘val’ and ‘@’ (and their ‘setf’ variants) into no-ops if the result set is empty.
(setf @)
.
@
.
(setf name)
.
name
.
(setf val)
.
val
.
Superclass spec for appending a superclass at the end of the list of direct superclasses.
A simple superclass spec is a class name.
Superclass spec for appending a superclass at the start of the list of direct superclasses.
Jump to: | %
(
-
@
C D E F G I L M N P R V W X |
---|
Jump to: | %
(
-
@
C D E F G I L M N P R V W X |
---|
Jump to: | *
C D E F I L N P R S T V |
---|
Jump to: | *
C D E F I L N P R S T V |
---|
Jump to: | -
A C E F I L M N P R S T V X |
---|
Jump to: | -
A C E F I L M N P R S T V X |
---|