This is the xml-mop Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 08:07:26 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
xml-mop
xml-mop allows representing parts of XML documents as CLOS objects
Red Daly
MIT License
0.0.1
s-xml
(system).
closer-mop
(system).
src
(module).
Modules are listed depth-first from the system components tree.
xml-mop/src
xml-mop
(system).
package.lisp
(file).
xml-model.lisp
(file).
parsing.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
xml-mop/src/xml-model.lisp
package.lisp
(file).
src
(module).
compute-effective-slot-definition
(method).
direct-slot-definition-class
(method).
effective-slot-definition-class
(method).
element
(class).
element-class
(class).
element-text
(reader method).
(setf element-text)
(writer method).
initialize-instance
(method).
initialize-instance
(method).
reinitialize-instance
(method).
reinitialize-instance
(method).
validate-superclass
(method).
assign-node-tag-descriptors
(function).
descriptor-case-sensitive
(reader method).
descriptor-element-type
(reader method).
descriptor-element-type
(reader method).
descriptor-matcher
(reader method).
descriptor-multiple
(reader method).
descriptor-multiple
(reader method).
descriptor-primary-description
(reader method).
descriptor-tag-aliases
(reader method).
element-class-auto
(reader method).
(setf element-class-auto)
(writer method).
element-class-parser
(reader method).
element-class-reduces-to
(reader method).
(setf element-class-reduces-to)
(writer method).
element-class-tag-descriptors
(reader method).
(setf element-class-tag-descriptors)
(writer method).
element-direct-slot-definition
(class).
element-effective-slot-definition
(class).
element-slot-attribute
(reader method).
(setf element-slot-attribute)
(writer method).
element-slot-attributes
(generic reader).
(setf element-slot-attributes)
(writer method).
element-slot-subelement
(reader method).
(setf element-slot-subelement)
(writer method).
element-slot-subelements
(generic reader).
(setf element-slot-subelements)
(writer method).
element-tag-string
(reader method).
(setf element-tag-string)
(writer method).
ensure-list
(function).
named-node-descriptor
(class).
node-class-allowed-elements
(reader method).
(setf node-class-allowed-elements)
(writer method).
parse-node-tag-descriptors
(function).
parse-subelement-descriptor-aliases
(function).
parser-case-insensitive-table
(reader method).
parser-case-sensitive-table
(reader method).
parser-lambda-table
(reader method).
resolve-node-descriptor-definition
(function).
resolve-subelement-descriptor-definition
(function).
standard-parser
(class).
subelement-descriptor
(class).
xml-treenode-class
(class).
xml-mop/src/parsing.lisp
xml-model.lisp
(file).
src
(module).
child-element-value
(generic function).
element-value
(generic function).
encountered-unknown-element
(condition).
on-loaded-from-xml
(generic function).
on-start-xml-load
(generic function).
parse-xml-stream
(function).
active-handle-finish-element
(function).
active-handle-new-element
(function).
active-handle-text
(function).
active-parse-stream
(function).
assign-attribute
(generic function).
assign-attributes
(generic function).
assign-child-element
(function).
condition-element-name
(reader method).
(setf condition-element-name)
(writer method).
condition-parent-element
(reader method).
(setf condition-parent-element)
(writer method).
descriptor-matches-name?
(generic function).
descriptor-matches?
(function).
destructure-seed
(function).
determine-element-class-matching-tag
(function).
encountered-unmatched-attribute
(condition).
finalize-after-parse
(generic function).
find-allowed-element
(generic function).
find-slot-matching-attribute
(generic function).
find-slot-matching-subelement
(generic function).
find-subelement-matching-tag
(generic function).
generate-seed
(function).
process-element
(generic function).
Packages are listed by definition order.
org.iodb.xml-mop
xml-mop allows representing parts of XML documents as CLOS objects
xml-mop
common-lisp
.
s-xml
.
child-element-value
(generic function).
element
(class).
element-class
(class).
element-text
(generic reader).
(setf element-text)
(generic writer).
element-value
(generic function).
encountered-unknown-element
(condition).
on-loaded-from-xml
(generic function).
on-start-xml-load
(generic function).
parse-xml-stream
(function).
active-handle-finish-element
(function).
active-handle-new-element
(function).
active-handle-text
(function).
active-parse-stream
(function).
assign-attribute
(generic function).
assign-attributes
(generic function).
assign-child-element
(function).
assign-node-tag-descriptors
(function).
condition-element-name
(generic reader).
(setf condition-element-name)
(generic writer).
condition-parent-element
(generic reader).
(setf condition-parent-element)
(generic writer).
descriptor-case-sensitive
(generic reader).
descriptor-element-type
(generic reader).
descriptor-matcher
(generic reader).
descriptor-matches-name?
(generic function).
descriptor-matches?
(function).
descriptor-multiple
(generic reader).
descriptor-primary-description
(generic reader).
descriptor-tag-aliases
(generic reader).
destructure-seed
(function).
determine-element-class-matching-tag
(function).
element-class-auto
(generic reader).
(setf element-class-auto)
(generic writer).
element-class-parser
(generic reader).
element-class-reduces-to
(generic reader).
(setf element-class-reduces-to)
(generic writer).
element-class-tag-descriptors
(generic reader).
(setf element-class-tag-descriptors)
(generic writer).
element-direct-slot-definition
(class).
element-effective-slot-definition
(class).
element-slot-attribute
(generic reader).
(setf element-slot-attribute)
(generic writer).
element-slot-attributes
(generic reader).
(setf element-slot-attributes)
(generic writer).
element-slot-subelement
(generic reader).
(setf element-slot-subelement)
(generic writer).
element-slot-subelements
(generic reader).
(setf element-slot-subelements)
(generic writer).
element-tag-string
(generic reader).
(setf element-tag-string)
(generic writer).
encountered-unmatched-attribute
(condition).
ensure-list
(function).
finalize-after-parse
(generic function).
find-allowed-element
(generic function).
find-slot-matching-attribute
(generic function).
find-slot-matching-subelement
(generic function).
find-subelement-matching-tag
(generic function).
generate-seed
(function).
named-node-descriptor
(class).
node-class-allowed-elements
(generic reader).
(setf node-class-allowed-elements)
(generic writer).
parse-node-tag-descriptors
(function).
parse-subelement-descriptor-aliases
(function).
parser-case-insensitive-table
(generic reader).
parser-case-sensitive-table
(generic reader).
parser-lambda-table
(generic reader).
process-element
(generic function).
resolve-node-descriptor-definition
(function).
resolve-subelement-descriptor-definition
(function).
standard-parser
(class).
subelement-descriptor
(class).
xml-treenode-class
(class).
Definitions are sorted by export status, category, package, and then by lexicographic order.
This is where we interact with s-xml. Returns a list of the parsed root elements. Usually there is only one unless you are doing something weird.
Returns the value that child-element takes when assigned to parent-slot on parent-element
By default do not do anything special, just return the element-value of the child element
Returns the ’value’ of the element in general. This depends on
the element. For example, if it is a price, then this might return a number in US cents.
This function is called on the element by default before it is assigned as the slot-value
to a parent element.
In general, the value of an element is itself.
Called when the element has finished loading in the xml stream.
Called when the element has started to load in the xml stream. After attribs have been assigned.
element-class
) slot-name direct-slot-definitions) ¶sb-mop
.
element-class
) &key &allow-other-keys) ¶sb-mop
.
element-class
) &key &allow-other-keys) ¶sb-mop
.
element-class
) &key) ¶element-class
) &rest initargs &key direct-superclasses tags) ¶element-class
) &key) ¶element-class
) &rest initargs &key direct-superclasses tags) ¶element-class
) super) ¶sb-mop
.
Raised when an element is encountered with no matching xml-mop class.
A metaclass for XML elements. An additional option that
can be passed to element classes is the :tags option, which accepts a sequence
of node-string identifiers.
compute-effective-slot-definition
.
direct-slot-definition-class
.
effective-slot-definition-class
.
(setf element-class-auto)
.
element-class-auto
.
(setf element-class-reduces-to)
.
element-class-reduces-to
.
(setf element-class-tag-descriptors)
.
element-class-tag-descriptors
.
find-slot-matching-subelement
.
find-subelement-matching-tag
.
initialize-instance
.
initialize-instance
.
reinitialize-instance
.
reinitialize-instance
.
validate-superclass
.
:tags
t
:auto
:reduces-to
Called when the end of an element is encountered and we are in the process of churning out objects.
Called when an element is encountered and we are in the process of churning out objects.
Called when text is encountered and we are in the process of churning out objects.
This is where we interact with s-xml.
Assigns a child element to the given slot of the parent element. This function
takes into account the user’s preferences for child element plurality and type conversion
of the element.
Returns multiple values:
1. element stack
2. allowed-root-element-classes
3. root elements
4. slot
Generates the seed that is passed along as an XML stream is parsed. This is currently not
the greatest system because of how the parse system is set up (event-driven, and does not allow
extra consumption).
Currently a seed encodes the following data:
the element classes allowed as root elements
* a list of root elements encountered so far
* the corresponding slots on the element stack
* the element stack as a list
* a list of slots that correspond to elements on the stack, which will be assigned when elements
on the stack are popped off
Takes either a list of descriptor-definitions or a single descriptor definition.
Does not allow multiple descriptor definitions as is the case for a node descriptor.
encountered-unknown-element
)) ¶encountered-unknown-element
)) ¶encountered-unknown-element
)) ¶encountered-unknown-element
)) ¶named-node-descriptor
)) ¶automatically generated reader method
subelement-descriptor
)) ¶automatically generated reader method
named-node-descriptor
)) ¶automatically generated reader method
named-node-descriptor
)) ¶automatically generated reader method
Determines if the given descriptor matches the test string. Remember, a descriptor is a way to specify nodes in an XML document. The test string is a node name, probably a tag or attribute.
named-node-descriptor
) test-string) ¶subelement-descriptor
)) ¶automatically generated reader method
named-node-descriptor
)) ¶automatically generated reader method
named-node-descriptor
)) ¶If this is true, then this is the description used to
output an XML version of this descriptor.
subelement-descriptor
)) ¶alternative node descriptors for this subelement.
element-class
)) ¶automatically generated reader method
auto
.
element-class
)) ¶automatically generated writer method
auto
.
xml-treenode-class
)) ¶automatically generated reader method
element-class
)) ¶automatically generated reader method
element-class
)) ¶automatically generated writer method
element-class
)) ¶automatically generated reader method
tags
.
element-class
)) ¶automatically generated writer method
tags
.
element-direct-slot-definition
)) ¶automatically generated reader method
element-direct-slot-definition
)) ¶automatically generated writer method
element-effective-slot-definition
)) ¶automatically generated reader method
element-effective-slot-definition
)) ¶automatically generated writer method
element-direct-slot-definition
)) ¶automatically generated reader method
element-direct-slot-definition
)) ¶automatically generated writer method
element-effective-slot-definition
)) ¶automatically generated reader method
element-effective-slot-definition
)) ¶automatically generated writer method
Finds the element class underneath parent-element that corresponds to the tag string.
xml-treenode-class
) tag-name) ¶Finds a slot in an element class that matches the tag-name given
element-class
) tag-name) ¶Finds the most specific sub-element class of the supplied parent
element (generally an element class) that matches the tag string. This will
check the slot definitions of the class for a slot with matching ’subelement’
descriptor, and then check the allowed-subelements field of the class.
element-class
) tag-name) ¶xml-treenode-class
)) ¶xml-treenode-class
)) ¶automatically generated writer method
standard-parser
)) ¶For looking up member elements by tag name.
standard-parser
)) ¶For looking up member elements by tag name.
standard-parser
)) ¶For looking up elements by calling a test function.
Adds the child element with the given tag name and attribs to the parent elem.
condition
.
Direct slots of ELEMENT-CLASS (that is those that are defined in
a defclass form where element-class is the metaclass) have an ATTRIBUTE and SUBELEMENT
property. These direct slot definitions are transformed into effective slot definitions
in compute-effective-slot-definition.
This is the standard way to describe an XML node. A node descriptor helps map
from a cased or uncased string to a handler class or function. Several descriptors may map to a
single element.
:matcher
, :string
This slot is read-only.
:case-sensitive
This slot is read-only.
:element-type
This slot is read-only.
:multiple
This slot is read-only.
If this is true, then this is the description used to
output an XML version of this descriptor.
:primary
This slot is read-only.
The parser class keeps track of element or attributes
an XML node can have. Typically, each element class has a parser associated
with it that will attempt to look up a node. If that fails, a parser is invoked
for the document.
For looking up member elements by tag name.
(make-hash-table :test (function equal))
:case-sensitive-table
This slot is read-only.
For looking up member elements by tag name.
(make-hash-table :test (function equalp))
:cased-sensitive-table
This slot is read-only.
For looking up elements by calling a test function.
:lambda-table
This slot is read-only.
Describes a subelement associated with a slot on an element class.
:element-type
This slot is read-only.
:multiple
This slot is read-only.
alternative node descriptors for this subelement.
:aliases
This slot is read-only.
standard-class
.
:allowed-elements
(make-instance (quote org.iodb.xml-mop::standard-parser))
:parser
This slot is read-only.
Jump to: | (
A C D E F G I M N O P R V |
---|
Jump to: | (
A C D E F G I M N O P R V |
---|
Jump to: | A C E L M P R S T |
---|
Jump to: | A C E L M P R S T |
---|
Jump to: | C E F M N O P S X |
---|
Jump to: | C E F M N O P S X |
---|