This is the cxml-stp Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 04:56:31 2024 GMT+0.
cxml-stp/cxml-stp.asd
cxml-stp/package.lisp
cxml-stp/classes.lisp
cxml-stp/node.lisp
cxml-stp/parent-node.lisp
cxml-stp/leaf-node.lisp
cxml-stp/document.lisp
cxml-stp/element.lisp
cxml-stp/attribute.lisp
cxml-stp/document-type.lisp
cxml-stp/comment.lisp
cxml-stp/processing-instruction.lisp
cxml-stp/text.lisp
cxml-stp/builder.lisp
cxml-stp/xpath.lisp
The main system appears first, followed by any subsystem dependency.
cxml-stp
cxml
(system).
alexandria
(system).
xpath
(system).
package.lisp
(file).
classes.lisp
(file).
node.lisp
(file).
parent-node.lisp
(file).
leaf-node.lisp
(file).
document.lisp
(file).
element.lisp
(file).
attribute.lisp
(file).
document-type.lisp
(file).
comment.lisp
(file).
processing-instruction.lisp
(file).
text.lisp
(file).
builder.lisp
(file).
xpath.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cxml-stp/cxml-stp.asd
cxml-stp/package.lisp
cxml-stp/classes.lisp
cxml-stp/node.lisp
cxml-stp/parent-node.lisp
cxml-stp/leaf-node.lisp
cxml-stp/document.lisp
cxml-stp/element.lisp
cxml-stp/attribute.lisp
cxml-stp/document-type.lisp
cxml-stp/comment.lisp
cxml-stp/processing-instruction.lisp
cxml-stp/text.lisp
cxml-stp/builder.lisp
cxml-stp/xpath.lisp
cxml-stp/cxml-stp.asd
cxml-stp
(system).
perform
(method).
closure-source-file
(class).
cxml-stp/classes.lisp
package.lisp
(file).
cxml-stp
(system).
attribute
(class).
comment
(class).
data
(reader method).
data
(reader method).
data
(reader method).
(setf data)
(method).
(setf data)
(method).
(setf data)
(method).
document
(class).
document-type
(class).
dtd
(reader method).
(setf dtd)
(method).
element
(class).
internal-subset
(reader method).
(setf internal-subset)
(method).
local-name
(reader method).
namespace-prefix
(reader method).
namespace-uri
(reader method).
node
(class).
parent
(reader method).
parent-node
(class).
processing-instruction
(class).
public-id
(reader method).
(setf public-id)
(method).
root-element-name
(reader method).
(setf root-element-name)
(method).
system-id
(reader method).
(setf system-id)
(method).
target
(reader method).
(setf target)
(method).
text
(class).
value
(reader method).
(setf value)
(method).
%attributes
(reader method).
(setf %attributes)
(writer method).
%children
(reader method).
(setf %children)
(writer method).
%local-name
(reader method).
(setf %local-name)
(writer method).
%namespace-prefix
(reader method).
(setf %namespace-prefix)
(writer method).
%namespace-uri
(reader method).
(setf %namespace-uri)
(writer method).
%namespaces
(reader method).
(setf %namespaces)
(writer method).
(setf %parent)
(writer method).
document
(class).
document-type
(class).
leaf-node
(class).
named-node-mixin
(class).
cxml-stp/node.lisp
classes.lisp
(file).
cxml-stp
(system).
*check-uri-syntax*
(special variable).
base-uri
(generic function).
child-position
(function).
child-position-if
(function).
copy
(generic function).
count-children
(function).
count-children-if
(function).
detach
(generic function).
do-children
(macro).
do-recursively
(macro).
document
(function).
filter-children
(function).
filter-recursively
(function).
find-child
(function).
find-child-if
(function).
find-recursively
(function).
find-recursively-if
(function).
first-child
(function).
last-child
(function).
list-children
(function).
map-children
(generic function).
map-recursively
(function).
next-sibling
(function).
nth-child
(function).
number-of-children
(function).
parent
(generic reader).
previous-sibling
(function).
print-object
(method).
root
(function).
serialize
(generic function).
stp-error
(function).
stp-error
(condition).
string-value
(generic function).
check-namespace-uri
(function).
defreader
(macro).
maybe-uri->string
(function).
pretty-print-node
(function).
reconstruct
(generic function).
slots-for-print-object
(generic function).
ugly-print-node
(function).
cxml-stp/parent-node.lisp
node.lisp
(file).
cxml-stp
(system).
append-child
(function).
(setf base-uri)
(generic function).
delete-child
(function).
delete-child-if
(generic function).
delete-nth-child
(function).
insert-child
(generic function).
insert-child-after
(function).
insert-child-before
(function).
map-children
(method).
parent-node
(function).
prepend-child
(function).
replace-child
(generic function).
%base-uri
(generic function).
(setf %base-uri)
(method).
%nuke-nth-child
(function).
%unchecked-insert-child
(function).
check-deletion-allowed
(generic function).
check-insertion-allowed
(generic function).
fill-in-base-uri
(function).
find-base-uri
(function).
maybe-fill-in-base-uri
(function).
reconstruct
(method).
cxml-stp/leaf-node.lisp
parent-node.lisp
(file).
cxml-stp
(system).
map-children
(method).
%children
(method).
cxml-stp/document.lisp
leaf-node.lisp
(file).
cxml-stp
(system).
base-uri
(method).
(setf base-uri)
(method).
copy
(method).
document-element
(function).
(setf document-element)
(function).
document-type
(function).
(setf document-type)
(function).
make-document
(function).
replace-child
(method).
serialize
(method).
string-value
(method).
assert-orphan
(function).
check-deletion-allowed
(method).
check-deletion-allowed
(method).
check-insertion-allowed
(method).
document
(function).
reconstruct
(method).
cxml-stp/element.lisp
document.lisp
(file).
cxml-stp
(system).
add-attribute
(function).
add-extra-namespace
(function).
attribute-value
(function).
(setf attribute-value)
(function).
base-uri
(method).
(setf base-uri)
(method).
copy
(method).
delete-children
(function).
element
(function).
find-attribute-if
(function).
find-attribute-named
(function).
find-extra-namespace
(function).
find-local-namespace
(function).
find-namespace
(function).
list-attributes
(function).
local-name
(generic reader).
(setf local-name)
(generic function).
make-element
(function).
map-attributes
(function).
map-extra-namespaces
(function).
namespace-prefix
(generic reader).
(setf namespace-prefix)
(function).
namespace-uri
(generic reader).
(setf namespace-uri)
(function).
of-name
(function).
qualified-name
(function).
remove-attribute
(function).
remove-extra-namespace
(function).
serialize
(method).
string-value
(method).
with-attributes
(macro).
%add-attribute
(function).
%remove-attribute
(function).
attributes-for-print
(function).
check-deletion-allowed
(method).
check-insertion-allowed
(method).
check-nc-name
(function).
check-uri-like
(function).
childp
(function).
collect-local-namespaces
(function).
copy-attributes
(function).
escape-uri
(function).
find-attribute-namespace
(function).
named-node-mixin
(function).
namespaces-for-print
(function).
nc-name-p
(function).
non-empty-string
(function).
qualified-of-name
(function).
reconstruct
(method).
reconstruct
(method).
sanitize-attribute-name
(function).
slots-for-print-object
(method).
slots-for-print-object
(method).
cxml-stp/attribute.lisp
element.lisp
(file).
cxml-stp
(system).
attribute
(function).
copy
(method).
detach
(method).
(setf local-name)
(method).
make-attribute
(function).
rename-attribute
(function).
serialize
(method).
string-value
(method).
value
(generic reader).
(setf value)
(generic function).
reconstruct
(method).
slots-for-print-object
(method).
xml-characters-p
(function).
xor
(function).
cxml-stp/document-type.lisp
attribute.lisp
(file).
cxml-stp
(system).
copy
(method).
(setf dtd)
(writer method).
end-document
(method).
internal-subset
(generic reader).
(setf internal-subset)
(generic function).
make-document-type
(function).
notation-declaration
(method).
public-id
(generic reader).
(setf public-id)
(generic function).
root-element-name
(generic reader).
(setf root-element-name)
(generic function).
serialize
(method).
string-value
(method).
system-id
(generic reader).
(setf system-id)
(generic function).
*serialize-canonical-notations-only-p*
(special variable).
check-xml-name
(function).
collected-notations
(reader method).
(setf collected-notations)
(writer method).
document-type
(function).
namep
(function).
notation-collector
(class).
reconstruct
(method).
slots-for-print-object
(method).
cxml-stp/comment.lisp
document-type.lisp
(file).
cxml-stp
(system).
comment
(function).
copy
(method).
data
(generic reader).
(setf data)
(generic function).
make-comment
(function).
serialize
(method).
string-value
(method).
reconstruct
(method).
slots-for-print-object
(method).
cxml-stp/processing-instruction.lisp
comment.lisp
(file).
cxml-stp
(system).
copy
(method).
(setf data)
(writer method).
make-processing-instruction
(function).
processing-instruction
(function).
serialize
(method).
string-value
(method).
target
(generic reader).
(setf target)
(generic function).
reconstruct
(method).
slots-for-print-object
(method).
cxml-stp/text.lisp
processing-instruction.lisp
(file).
cxml-stp
(system).
copy
(method).
(setf data)
(writer method).
make-text
(function).
serialize
(method).
string-value
(method).
text
(function).
reconstruct
(method).
slots-for-print-object
(method).
cxml-stp/builder.lisp
text.lisp
(file).
cxml-stp
(system).
attribute-declaration
(method).
characters
(method).
comment
(method).
element-declaration
(method).
end-document
(method).
end-element
(method).
end-internal-subset
(method).
external-entity-declaration
(method).
internal-entity-declaration
(method).
make-builder
(function).
notation-declaration
(method).
processing-instruction
(method).
start-document
(method).
start-dtd
(method).
start-element
(method).
start-internal-subset
(method).
start-prefix-mapping
(method).
unparsed-entity-declaration
(method).
builder
(class).
builder-append
(function).
builder-doctype
(reader method).
(setf builder-doctype)
(writer method).
builder-internal-subset-sink
(reader method).
(setf builder-internal-subset-sink)
(writer method).
builder-nodes
(reader method).
(setf builder-nodes)
(writer method).
dtd
(method).
namespace-declarations
(reader method).
(setf namespace-declarations)
(writer method).
cxml-stp/xpath.lisp
builder.lisp
(file).
cxml-stp
(system).
attribute-pipe-using-navigator
(method).
attribute-pipe-using-navigator
(method).
attribute-pipe-using-navigator
(method).
base-uri-using-navigator
(method).
base-uri-using-navigator
(method).
base-uri-using-navigator
(method).
base-uri-using-navigator
(method).
child-pipe-using-navigator
(method).
child-pipe-using-navigator
(method).
child-pipe-using-navigator
(method).
child-pipe-using-navigator
(method).
get-element-by-id-using-navigator
(method).
hash-key-using-navigator
(method).
local-name-using-navigator
(method).
local-name-using-navigator
(method).
local-name-using-navigator
(method).
local-name-using-navigator
(method).
local-name-using-navigator
(method).
local-name-using-navigator
(method).
namespace-pipe-using-navigator
(method).
namespace-pipe-using-navigator
(method).
namespace-pipe-using-navigator
(method).
namespace-prefix-using-navigator
(method).
namespace-prefix-using-navigator
(method).
namespace-prefix-using-navigator
(method).
namespace-prefix-using-navigator
(method).
namespace-prefix-using-navigator
(method).
namespace-uri-using-navigator
(method).
namespace-uri-using-navigator
(method).
namespace-uri-using-navigator
(method).
namespace-uri-using-navigator
(method).
namespace-uri-using-navigator
(method).
namespace-uri-using-navigator
(method).
node-equal-using-navigator
(method).
node-p-using-navigator
(method).
node-p-using-navigator
(method).
node-text-using-navigator
(method).
node-text-using-navigator
(method).
node-type-p-using-navigator
(method).
node-type-p-using-navigator
(method).
node-type-p-using-navigator
(method).
node-type-p-using-navigator
(method).
node-type-p-using-navigator
(method).
node-type-p-using-navigator
(method).
node-type-p-using-navigator
(method).
node-type-p-using-navigator
(method).
node-type-p-using-navigator
(method).
parent-node-using-navigator
(method).
parent-node-using-navigator
(method).
processing-instruction-target-using-navigator
(method).
processing-instruction-target-using-navigator
(method).
qualified-name-using-navigator
(method).
qualified-name-using-navigator
(method).
qualified-name-using-navigator
(method).
qualified-name-using-navigator
(method).
qualified-name-using-navigator
(method).
qualified-name-using-navigator
(method).
unparsed-entity-uri-using-navigator
(method).
copy-stp-namespace
(function).
make-stp-namespace
(function).
normalize-text-nodes!
(function).
stp-namespace
(structure).
stp-namespace-p
(function).
stp-namespace-parent
(reader).
(setf stp-namespace-parent)
(writer).
stp-namespace-prefix
(reader).
(setf stp-namespace-prefix)
(writer).
stp-namespace-uri
(reader).
(setf stp-namespace-uri)
(writer).
vector->pipe
(function).
Packages are listed by definition order.
cxml-stp-impl
common-lisp
.
cxml-stp
.
%add-attribute
(function).
%attributes
(generic reader).
(setf %attributes)
(generic writer).
%base-uri
(generic function).
(setf %base-uri)
(generic function).
%base-uri
(slot).
%children
(generic function).
(setf %children)
(generic writer).
%children
(slot).
%local-name
(generic reader).
(setf %local-name)
(generic writer).
%namespace-prefix
(generic reader).
(setf %namespace-prefix)
(generic writer).
%namespace-uri
(generic reader).
(setf %namespace-uri)
(generic writer).
%namespaces
(generic reader).
(setf %namespaces)
(generic writer).
%nuke-nth-child
(function).
(setf %parent)
(generic writer).
%remove-attribute
(function).
%unchecked-insert-child
(function).
*serialize-canonical-notations-only-p*
(special variable).
assert-orphan
(function).
attributes
(slot).
attributes-for-print
(function).
builder
(class).
builder-append
(function).
builder-doctype
(generic reader).
(setf builder-doctype)
(generic writer).
builder-internal-subset-sink
(generic reader).
(setf builder-internal-subset-sink)
(generic writer).
builder-nodes
(generic reader).
(setf builder-nodes)
(generic writer).
check-deletion-allowed
(generic function).
check-insertion-allowed
(generic function).
check-namespace-uri
(function).
check-nc-name
(function).
check-uri-like
(function).
check-xml-name
(function).
childp
(function).
collect-local-namespaces
(function).
collected-notations
(generic reader).
(setf collected-notations)
(generic writer).
copy-attributes
(function).
copy-stp-namespace
(function).
defreader
(macro).
document
(function).
document
(class).
document-type
(function).
document-type
(class).
escape-uri
(function).
fill-in-base-uri
(function).
find-attribute-namespace
(function).
find-base-uri
(function).
leaf-node
(class).
make-stp-namespace
(function).
maybe-fill-in-base-uri
(function).
maybe-uri->string
(function).
named-node-mixin
(function).
named-node-mixin
(class).
namep
(function).
namespace-declarations
(generic reader).
(setf namespace-declarations)
(generic writer).
namespaces
(slot).
namespaces-for-print
(function).
nc-name-p
(function).
non-empty-string
(function).
normalize-text-nodes!
(function).
notation-collector
(class).
pretty-print-node
(function).
qualified-of-name
(function).
reconstruct
(generic function).
sanitize-attribute-name
(function).
slots-for-print-object
(generic function).
stp-namespace
(structure).
stp-namespace-p
(function).
stp-namespace-parent
(reader).
(setf stp-namespace-parent)
(writer).
stp-namespace-prefix
(reader).
(setf stp-namespace-prefix)
(writer).
stp-namespace-uri
(reader).
(setf stp-namespace-uri)
(writer).
ugly-print-node
(function).
vector->pipe
(function).
xml-characters-p
(function).
xor
(function).
cxml-stp-system
asdf/interface
.
common-lisp
.
closure-source-file
(class).
cxml-stp
STP is a data structure for well-formed XML documents.
@begin[Parsing and Serializing]{section}
To parse into STP, use an STP builder together with a function
generating SAX events:
@aboutfun{make-builder}
Serialize STP by sending SAX events for the tree to a sink:
@aboutfun{serialize}
@end{section}
@begin[Names and Namespace URIs]{section}
STP represents namespace-well-formed documents only. All functions
accepting names take a local-name and and a namespace URI as an argument.
Qualified names are accepted where it makes sense, and named nodes have
a namespace prefix that is taken into account for well-formedness checks.
There are two kinds of named nodes: @class{element} and @class{attribute}.
Their slots are:
@aboutfun{local-name}
@aboutfun{namespace-uri}
@aboutfun{namespace-prefix}
For @code{element}, all of the above can be changed using SETF (subject
to well-formedness checks).
For attribute, @fun{local-name} can be changed directly, while URI and
prefix always have to be changed in the same step using
@fun{rename-attribute}.
A node’s qualified name can be be queried:
@aboutfun{qualified-name}
@code{of-name} is convenient when searching for elements or attributes:
@aboutfun{of-name}
@end{section}
@begin[Subclasses of Node]{section}
All STP nodes have a common superclass.
@aboutclass{node}
Documents and elements can have children:
@aboutclass{parent-node}
@aboutclass{document}
@aboutclass{element}
Attributes belong to an @code{element}:
@aboutclass{attribute}
Other kinds of nodes:
@aboutclass{comment}
@aboutclass{document-type}
@aboutclass{processing-instruction}
@aboutclass{text}
@end{section}
@begin[Creating nodes]{section}
Nodes are created using the following functions:
@aboutfun{make-attribute}
@aboutfun{make-comment}
@aboutfun{make-document}
@aboutfun{make-document-type}
@aboutfun{make-element}
@aboutfun{make-processing-instruction}
@aboutfun{make-text}
In addition, nodes can be copied including all their children:
@aboutfun{copy}
@end{section}
@begin[Listing Child Nodes]{section}
Nodes have an optional parent node and can have children.
@aboutfun{parent}
If a node has a @class{document} as its ancestor, it can be found using
the @fun{document} function.
@aboutfun{document}
Since the @code{parent} slot needs to be updated when children are added or
removed, the sequence of children is not exposed as a mutable Common
Lisp sequence.
@aboutfun{list-children}
@aboutfun{map-children}
@aboutmacro{do-children}
The following DOM-like functions are also offered:
@aboutfun{nth-child}
@aboutfun{first-child}
@aboutfun{last-child}
@aboutfun{previous-sibling}
@aboutfun{next-sibling}
A wide variety of sequence-related functions is offered that work
like the Common Lisp functions of the same name, but without the need
to call @fun{list-children} first:
@aboutfun{find-child}
@aboutfun{find-child-if}
@aboutfun{child-position}
@aboutfun{child-position-if}
@aboutfun{count-children}
@aboutfun{count-children-if}
@aboutfun{filter-children}
The functions listed above walk only across the direct children of the
parent node. In addition, the node hierarchy can be mapped recursively
using these functions:
@aboutfun{map-recursively}
@aboutmacro{do-recursively}
@aboutfun{find-recursively}
@aboutfun{filter-recursively}
@end{section}
@begin[Adding and Removing Child Nodes]{section}
While all nodes can be asked for their children, only documents and
elements permit actually adding children. (For all other nodes, the
sequence of children appears as empty.)
The most flexible function capable of changing the child nodes is
@fun{replace-children}. Perhaps more common is @fun{insert-child},
a specialized version for only one new child.
@aboutfun{replace-children}
@aboutfun{insert-child}
Various convenience functions are offered in addition:
@aboutfun{prepend-child}
@aboutfun{append-child}
@aboutfun{delete-child}
@aboutfun{delete-child-if}
@aboutfun{delete-nth-child}
@aboutfun{insert-child-before}
@aboutfun{insert-child-after}
@aboutfun{replace-child}
A node can also be deleted from its parent directly using @fun{detach}.
@aboutfun{detach}
@fun{detach} also works for attributes.
@end{section}
@begin[Elements and their Attributes]{section}
In addition to their children, elements have attributes and "extra
namespaces".
Attributes themselves are nodes and be accessed using these functions:
@aboutfun{add-attribute}
@aboutfun{remove-attribute}
@aboutfun{find-attribute-named}
@aboutfun{find-attribute-if}
@aboutfun{list-attributes}
@aboutfun{map-attributes}
@aboutmacro{with-attributes}
As a shortcut, the @fun{attribute-value} and its @code{setf} function
allow access to attribute values by name, without having to look up the
attribute node first:
@aboutfun{attribute-value}
There are three ways to declare a namespace: Using the name of the
element, using the name of one of its attributes, or using an "extra
namespace". A prefix can be looked up from any of these local
declarations. It is also possible to look up a namespace while taking
into account all declarations on parent elements.
@aboutfun{find-local-namespace}
@aboutfun{find-namespace}
Extra namespaces are needed only when a namespace must be declared even
though there is no element or attribute referencing it through its name.
For example, an attribute declared with type @code{QName} using
RelaxNG/XSD must reference a namespace in scope.
@aboutfun{add-extra-namespace}
@aboutfun{remove-extra-namespace}
@aboutfun{find-extra-namespace}
@aboutfun{map-extra-namespaces}
@end{section}
stp
common-lisp
.
*check-uri-syntax*
(special variable).
add-attribute
(function).
add-extra-namespace
(function).
append-child
(function).
attribute
(function).
attribute
(class).
attribute-value
(function).
(setf attribute-value)
(function).
base-uri
(generic function).
(setf base-uri)
(generic function).
child-position
(function).
child-position-if
(function).
comment
(function).
comment
(class).
copy
(generic function).
count-children
(function).
count-children-if
(function).
data
(generic reader).
(setf data)
(generic function).
delete-child
(function).
delete-child-if
(generic function).
delete-children
(function).
delete-nth-child
(function).
detach
(generic function).
do-children
(macro).
do-recursively
(macro).
document
(function).
document
(class).
document-element
(function).
(setf document-element)
(function).
document-type
(function).
(setf document-type)
(function).
document-type
(class).
dtd
(slot).
dtd
(generic reader).
(setf dtd)
(generic function).
element
(function).
element
(class).
filter-children
(function).
filter-recursively
(function).
find-attribute-if
(function).
find-attribute-named
(function).
find-child
(function).
find-child-if
(function).
find-extra-namespace
(function).
find-local-namespace
(function).
find-namespace
(function).
find-recursively
(function).
find-recursively-if
(function).
first-child
(function).
insert-child
(generic function).
insert-child-after
(function).
insert-child-before
(function).
internal-subset
(slot).
internal-subset
(generic reader).
(setf internal-subset)
(generic function).
last-child
(function).
list-attributes
(function).
list-children
(function).
local-name
(slot).
local-name
(generic reader).
(setf local-name)
(generic function).
make-attribute
(function).
make-builder
(function).
make-comment
(function).
make-document
(function).
make-document-type
(function).
make-element
(function).
make-processing-instruction
(function).
make-text
(function).
map-attributes
(function).
map-children
(generic function).
map-extra-namespaces
(function).
map-recursively
(function).
namespace-prefix
(generic reader).
(setf namespace-prefix)
(function).
namespace-uri
(slot).
namespace-uri
(generic reader).
(setf namespace-uri)
(function).
next-sibling
(function).
node
(class).
nth-child
(function).
number-of-children
(function).
of-name
(function).
parent
(slot).
parent
(generic reader).
parent-node
(function).
parent-node
(class).
prepend-child
(function).
previous-sibling
(function).
processing-instruction
(function).
processing-instruction
(class).
public-id
(slot).
public-id
(generic reader).
(setf public-id)
(generic function).
qualified-name
(function).
remove-attribute
(function).
remove-extra-namespace
(function).
rename-attribute
(function).
replace-child
(generic function).
root
(function).
root-element-name
(slot).
root-element-name
(generic reader).
(setf root-element-name)
(generic function).
serialize
(generic function).
stp-error
(function).
stp-error
(condition).
string-value
(generic function).
system-id
(slot).
system-id
(generic reader).
(setf system-id)
(generic function).
target
(generic reader).
(setf target)
(generic function).
text
(function).
text
(class).
value
(generic reader).
(setf value)
(generic function).
with-attributes
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
If true (the default), a warning is issued if a string specified as a namespace URI does not have URI syntax.
@arg[var]{symbol, a variable name}
@arg[node]{a @class{node}}
@arg[result]{a form}
@return{the result of evaluating @code{result}}
Executes @code{body} with @code{var} bound to successive child
nodes.
@arg[var]{symbol, a variable name}
@arg[node]{a @class{node}}
@arg[result]{a form}
@return{the result of evaluating @code{result}}
Executes @code{bode} with @code{var} bound to successive descendants of
@code{node} in pre-order.
Evaluate body with the specified attributes bound lexically as if they
were variables.
Each entry in @code{entries} is a list of the form
@em{(variable-name attribute-name &optional uri)}, where
@code{variable-name}
is a symbol and @code{attribute-name} and @code{uri} are strings.
The macro with-attributes invokes @fun{attribute-value}
to access the attributes. specified by each entry.
Both setf and setq can be used to set the value of the attribute.
@arg[element]{an instance of @class{element}}
@arg[attribute]{an instance of @class{attribute}}
@short{Add a new attribute to @code{element} or replace an existing
attribute node of the same name.}
It is an error if the attribute’s namespace conflicts with existing namespace declarations on this element.
@arg[prefix]{string, an NCName}
@arg[uri]{string, a namespace URI}
@arg[element]{an instance of @class{element}}
@return{@code{uri}}
@short{Add an extra namespace to @code{element} that maps @code{prefix} to
@code{uri}.}
It is an error if the new namespace conflicts with existing namespace declarations on this element.
@arg[child]{a @class{node}}
@arg[parent]{a @class{parent-node}}
Adds @code{child} as the last child of @code{parent}, if allowed.
Signals an error if the child already has a parent.
@unexport{}
@arg[element]{an instance of @class{element}}
@arg[name]{string, an NCName}
@arg[uri]{string, a namespace URI}
@return{a string or nil}
@short{Searches for an attribute node of @code{element} with the
specified local name and namespace URI and returns its value.}
Returns nil if no such attribute was found.
@arg[value]{an object}
@arg[parent]{a @class{node}}
@arg[from-end]{a generalized boolead}
@arg[start, end]{bounding index designators for @code{parent}’s child list}
@arg[key]{a designator for a function of one argument, or nil}
@arg[test]{a designator for a function of two arguments, or nil}
@return{a @class{node} or nil}
Searches for a child node of @code{parent} that satisfies the @code{test}
and returns its position.
@see{child-position-if}
@arg[predicate]{a designator for a function of one argument that returns
a generalized boolean}
@arg[parent]{a @class{node}}
@arg[from-end]{a generalized boolead}
@arg[start, end]{bounding index designators for @code{parent}’s child list}
@arg[key]{a designator for a function of one argument, or nil}
@arg[test]{a designator for a function of two arguments, or nil}
@return{a @class{node} or nil}
Searches for a child node of @code{parent} that satisfies the @code{test}
and returns its position.
@see{child-position}
@unexport{}
@arg[value]{an object}
@arg[parent]{a @class{node}}
@arg[from-end]{a generalized boolead}
@arg[start, end]{bounding index designators for @code{parent}’s child list}
@arg[key]{a designator for a function of one argument, or nil}
@arg[test]{a designator for a function of two arguments, or nil}
@return{a non-negative integer less than or equal to the number of
child nodes}
Counts (and returns the number of) @code{parent}’s child nodes satisfying
the test.
@see{number-of-children}
@see{count-children-if}
@arg[predicate]{a designator for a function of one argument that returns
a generalized boolean}
@arg[parent]{a @class{node}}
@arg[from-end]{a generalized boolead}
@arg[start, end]{bounding index designators for @code{parent}’s child list}
@arg[key]{a designator for a function of one argument, or nil}
@return{a non-negative integer less than or equal to the number of
child nodes}
Counts (and returns the number of) @code{parent}’s child nodes satisfying
@code{predicate}.
@see{number-of-children}
@see{count-children}
@arg[child]{an object}
@arg[parent]{a @class{node}}
@arg[from-end]{a generalized boolead}
@arg[start, end]{bounding index designators for @code{parent}’s child list}
@arg[key]{a designator for a function of one argument, or nil}
@arg[test]{a designator for a function of two arguments, or nil}
@return{a @class{node} or nil}
Searches for a child node of @code{parent} that satisfies the @code{test}
and removes it, if allowed.
@arg[parent]{an @class{element}}
@return{nil}
Deletes all children of @code{element}.
@arg[idx]{a non-negative integer}
@arg[parent]{a @class{parent-node}}
Removes child @code{idx} of @code{parent}, if allowed.
@arg[node]{an instance of @class{node}}
@return{a @class{document} or nil}
@short{Returns the document node ancestor of @code{node}.}
Returns the @class{document} node that is the @fun{root} of @code{node} or @code{nil} if the root node is not a document.
@arg[document]{a @class{document}}
@return{an @class{element}}
This function returns the child node that is an element.
@see{document-type}
@arg[document]{a @class{document}}
@return{a @class{document-type}, or nil}
This function returns the child node that is a document type, or nil.
@see{document-element}
@unexport{}
@arg[predicate]{a designator for a function of one argument that returns
a generalized boolean}
@arg[parent]{a @class{node}}
@arg[from-end]{a generalized boolead}
@arg[start, end]{bounding index designators for @code{parent}’s child list}
@arg[key]{a designator for a function of one argument, or nil}
@arg[test]{a designator for a function of two arguments, or nil}
@arg[count]{an integer or nil}
@return{a sequence containing nodes}
@short{Return a list of child nodes of @code{parent} from which nodes that
do not satisfy @code{predicate} have been removed.}
This function returns the same list as @code{remove-if-not} on the result of @fun{list-children}.
@arg[test]{a designator for a function of one argument that returns
a generalized boolean}
@arg[node]{a @class{node}}
@arg[key]{a designator for a function of one argument, or nil}
@arg[test]{a designator for a function of two arguments, or nil}
@return{a sequence containing nodes}
Return a list of descendant nodes of @code{node} in pre-order, from which
nodes that do not satisfy @code{predicate} have been removed.
@arg[test]{a designator for a function of one argument.}
@arg[element]{an instance of @class{element}}
@return{an @class{attribute} or nil}
@short{Searches for an attribute node of @code{element} satisfying
@code{test}}
Returns nil if no such attribute was found.
@arg[element]{an instance of @class{element}}
@arg[name]{string, an NCName}
@arg[uri]{string, a namespace URI}
@return{an @class{attribute} or nil}
@short{Searches for an attribute node of @code{element} with the
specified local name and namespace URI and returns it.}
Returns nil if no such attribute was found.
@arg[value]{an object}
@arg[parent]{a @class{node}}
@arg[from-end]{a generalized boolead}
@arg[start, end]{bounding index designators for @code{parent}’s child list}
@arg[key]{a designator for a function of one argument, or nil}
@arg[test]{a designator for a function of two arguments, or nil}
@return{a @class{node} or nil}
Searches for a child node of @code{parent} that satisfies the @code{test}
and returns it.
@see{find-child-if}
@arg[predicate]{a designator for a function of one argument that returns
a generalized boolean}
@arg[parent]{a @class{node}}
@arg[from-end]{a generalized boolead}
@arg[start, end]{bounding index designators for @code{parent}’s child list}
@arg[key]{a designator for a function of one argument, or nil}
@return{a @class{node} or nil}
Searches for a child node of @code{parent} that satisfies @code{predicate}
and returns it.
@see{find-child}
@arg[prefix]{a string}
@arg[element]{an instance of @class{element}}
@return{the namespace URI (a string), or nil}
Find the extra namespace named @code{prefix} declared on @code{element}
and return its namespace URI, or return nil if no such namespace was found.
@arg[prefix]{a string}
@arg[element]{an instance of @class{element}}
@return{the namespace URI (a string), or nil}
@short{Find the namespace @code{prefix} declared on @code{element}
and return its namespace URI, or return nil if no such namespace was found.}
The namespaces considered by this function are: The namespace of the element itself. The namespaces of element’s attributes. Extra namespaces declared by the element. The "xmlns" namespace, which is always fixed.
@arg[prefix]{a string}
@arg[element]{an instance of @class{element}}
@return{the namespace URI (a string), or nil}
@short{Find the namespace @code{prefix} declared on @code{element}
or its parent and return its namespace URI, or return nil if no such
namespace was found.}
This functions returns the same result as @fun{find-local-namespace} if the namespace is declared directly on @code{element}. Otherwise it takes into account namespaces declared on parent elements.
@arg[item]{an object}
@arg[node]{a @class{node}}
@arg[key]{a designator for a function of one argument, or nil}
@arg[test]{a designator for a function of two arguments, or nil}
@return{a @class{node} or nil}
Searches in pre-order for the first descendant of @code{node} that
satisfies the @code{test} and returns it.
@see{find-child-if}
@arg[test]{a designator for a function of one argument that returns
a generalized boolean}
@arg[node]{a @class{node}}
@arg[key]{a designator for a function of one argument, or nil}
@return{a @class{node} or nil}
Searches in pre-order for the first descendant of @code{node} that
satisfies the @code{test} and returns it.
@see{find-child-if}
@arg[node]{a @class{node}}
@return{a @class{node} or nil}
Returns first child of @code{node}, or nil.
@arg[parent]{a @class{parent-node}}
@arg[new-child]{a @class{node}}
@arg[ref-child]{a @class{node}}
@short{Adds @code{new-child} after @code{ref-child} as a child node of
@code{parent}, if allowed.}
Signals an error if the child already has a parent.
Also signals an error if @code{ref-child} is not a child of @code{parent}.
@arg[parent]{a @class{parent-node}}
@arg[new-child]{a @class{node}}
@arg[ref-child]{a @class{node}}
@short{Adds @code{new-child} before @code{ref-child} as a child node of
@code{parent}, if allowed.}
Signals an error if the child already has a parent.
Also signals an error if @code{ref-child} is not a child of @code{parent}.
@arg[node]{a @class{node}}
@return{a @class{node} or nil}
Returns last child of @code{node}, or nil.
@arg[element]{an @class{element}}
@return{a list of @class{attribute} nodes}
Returns a freshly consed list containing the attributes of @code{element}.
@arg[node]{a @class{node}}
@return{a list of nodes}
Returns a freshly consed list containing the child nodes of @code{node}.
@arg[value]{a string containing XML characters only}
@arg[name]{a string, either a QName or an NCName}
@arg[uri]{a string, the namespace URI}
@return{an @class{attribute}}
@short{This function creates an attribute node of the given value and name.}
@see{element}
@return{STP builder, a SAX handler}
@short{This function creates SAX handler that constructs an STP document.}
The builder processes SAX events and can be used with any
function generating such events, in particular with cxml:parse-file.
Examples. Parsing a file:
@begin{pre}(cxml:parse #p"example.xml" (stp:make-builder))@end{pre}
Parsing a string:
@begin{pre}(cxml:parse "<example/>" (stp:make-builder))@end{pre}
@see{serialize}
@arg[data]{a string containing XML characters only}
@return{an @class{comment}}
@short{This function creates a comment node.}
@code{data} must not contain two consecutive dashes, or a dash at the end.
@arg[document-element]{an @class{element}}
@return{an @class{document}}
@short{This function creates document.}
The given element is used as the document’s only initial child.
@arg[root-element-name]{string, a Name}
@arg[system-id]{a string allowed as a system ID}
@arg[public-id]{a string allowed as a public ID}
@arg[internal-subset]{a well-formed internal subset as a string}
@return{an @class{documen-type}}
@short{This function creates a document-type node.}
@see{document}
@arg[name]{string, a QName or NCName}
@arg[uri]{a string, the namespace URI}
@return{an @class{element}}
@short{This function creates an element node of the given name.}
@arg[target]{string, an NCName}
@arg[data]{string containing XML characters only}
@return{an @class{processing-instruction}}
@short{This function creates a processing instruction.}
@code{target} must not equal "xml".
@code{data} must not contain the substring "?>".
@arg[data]{a string containing XML characters only}
@return{an @class{text}}
@short{This function creates a text node.}
@arg[result-type]{a sequence type specifier, or nil}
@arg[fn]{a designator for a function of one argument}
@arg[element]{an instance of @class{element}}
@return{an sequence of @code{result-type}, or nil}
@short{Applies @code{fn} to each attribute nodes of @code{element}.}
The @code{result-type} specifies the type of the resulting sequence. @code{map-children} returns nil if @code{result-type} is nil.
@arg[fn]{a designator for a function of two arguments}
@arg[element]{an instance of @class{element}}
@return{nil}
Call fn for each extra namespace declared on @code{element} with
namespace prefix and URI as arguments.
@arg[fn]{a designator for a function of one argument}
@arg[node]{a @class{node}}
@return{nil}
Applies @code{fn} to successive descendants of @code{node} in
pre-order.
@arg[node]{a @class{node}}
@return{a @class{node} or nil}
@short{Returns the child following @code{node} in the child list of its
parent.}
Signals an error if @code{node} has no parent or is the last child of its parent.
@arg[n]{a non-negative integer}
@arg[parent]{a @class{node}}
@return{a @class{node}}
@short{Returns child node @code{n} of @code{parent}}, or signals an error
if n is negative or as large or larger that the number of child nodes.
@arg[parent]{a @class{node}}
@return{the number of child nodes}
Returns the number of @code{parent}’s child nodes.
@see{count-children}
@arg[name]{an NCName string or @code{nil}}
@arg[uri]{a string, the namespace URI}
@return{an function of one argument}
@short{This function creates a test function for nodes of this name.}
The function returned will return T if the argument is an instance
of @class{attribute} or @class{element} and has the specified local-name
and namespace URI, and will return NIL otherwise.
If local-name is nil, only the namespace URI is considered for comparison.
@see{local-name}
@see{namespace-uri}
@unexport{}
@arg[parent]{a @class{parent-node}}
@arg[child]{a @class{node}}
@short{Adds @code{child} as the first child of @code{parent}, if allowed.}
Signals an error if the child already has a parent.
@arg[node]{a @class{node}}
@return{a @class{node} or nil}
@short{Returns the child preceding @code{node} in the child list of its
parent.}
Signals an error if @code{node} has no parent or is the first child of its parent.
@unexport{}
@arg[node]{an @class{element} or @class{attribute}}
@return{string, a QName}
@short{Returns the node’s qualified name.}
The qualified name is computed as prefix ’:’ local-name.
@see{local-name}
@see{namespace-uri}
@see{namespace-prefix}
@arg[element]{an instance of @class{element}}
@arg[attribute]{an instance of @class{attribute}}
@return{the attribute}
@short{Remove an attribute node from @code{element}.}
It is an error if @code{attribute} is not an attribute of @code{element}.
@arg[prefix]{string, an NCName}
@arg[element]{an instance of @class{element}}
@return{@code{uri}}
Removed the extra namespace declared on @code{element} for @code{prefix}.
@arg[attribute]{the @class{attribute} to be renamed}
@arg[prefix]{string, an NCName}
@arg[uri]{a string, the namespace URI}
@return{the attribute}
@short{This function changed namespace prefix and URI of an attribute.}
Since there is no default namespace for attributes, prefix and uri must
be changed in the same step to rename an attribute with no namespace to
an attribute with both namespace prefix and URI.
@see{local-name}
@arg[node]{an instance of @class{node}}
@return{a @class{node} or nil}
@short{Returns the root of the tree of nodes @code{node} is part of.}
In a complete document, this is an instance of @class{document}, but a detached subtree can have any node as its root. In particular, the argument itself is returned if it does not have a @fun{parent}.
@arg[node]{an @class{node}}
@return{a string}
@short{Returns the node’s base URI.}
@arg[newval]{string, the new base URI} @arg[node]{an @class{parent-node}} @return{the new base URI} @short{Sets the node’s base URI.}
@arg[node]{a @class{node}}
@short{This function copies a node recursively.}
The resulting node is of the same class as the argument, and all
child nodes and attributes are copied in the same way.
Shared structure includes only primitive slot values like strings. (The consequences are undefined if user code mutates such values, whether @code{copy} is used or not.)
@arg[node]{a @class{comment}, @class{processing-instruction},
or @class{text}}
@return{a string of XML characters}
@short{Returns the node’s data.}
processing-instruction
)) ¶automatically generated reader method
data
.
@arg[newval]{a string of XML characters}
@arg[node]{a @class{comment}, @class{processing-instruction},
or @class{text}}
@return{the data}
@short{Sets the node’s data.}
processing-instruction
)) ¶data
.
processing-instruction
)) ¶automatically generated writer method
@arg[predicate]{a designator for a function of one argument that returns
a generalized boolean}
@arg[parent]{a @class{node}}
@arg[from-end]{a generalized boolead}
@arg[start, end]{bounding index designators for @code{parent}’s child list}
@arg[key]{a designator for a function of one argument, or nil}
@arg[test]{a designator for a function of two arguments, or nil}
@return{a @class{node} or nil}
Searches for an child node of @code{parent} that satisfies @code{predicate}
and removes it, if allowed.
parent-node
) &key from-end start end count key) ¶@arg[node]{a @class{node}}
@short{This function removes a child node or attribute.}
In contrast to functions for child nodes, this function can also remove
an attribute from its parent.
@see{parent}
document-type
)) ¶automatically generated reader method
dtd
.
document-type
)) ¶dtd
.
document-type
)) ¶automatically generated writer method
@arg[parent]{a @class{parent-node}}
@arg[child]{a @class{node}}
@arg[position]{a non-negative integer}
@short{Adds @code{child} as a child node of @code{parent} at position
@code{position} if allowed.}
Signals an error if the new child already has a parent.
Also signals an error if @code{position} is greater than the number @code{parent}’s child nodes.
parent-node
) (child node
) i) ¶@arg[document-type]{@class{document-type}}
@return{string, a well-formed internal subset}
@short{Returns the document-type’s internal subset as a string.}
document-type
)) ¶automatically generated reader method
@arg[newval]{string, a well-formed internal subset}
@arg[document-type]{@class{document-type}}
@return{the internal-subset}
@short{Sets the document-type’s internal subset.}
document-type
)) ¶document-type
)) ¶automatically generated writer method
@arg[node]{an @class{element} or @class{attribute}}
@return{string, an NCName}
@short{Returns the node’s local name.}
@see{qualified-name}
@see{namespace-uri}
@see{namespace-prefix}
named-node-mixin
)) ¶automatically generated reader method
@arg[result-type]{a sequence type specifier, or nil}
@arg[function]{a designator for a function of one argument}
@arg[node]{a @class{node}}
@return{an sequence of @code{result-type}, or nil}
@short{Applies @code{function} to successive child nodes.}
The @code{result-type} specifies the type of the resulting sequence. @code{map-children} returns nil if @code{result-type} is nil. Otherwise it returns a sequence such that element i is the result of applying @code{function} to child i of @class{node}.
parent-node
)) ¶@arg[node]{an @class{element} or @class{attribute}}
@return{string, an NCName}
@short{Returns the node’s namespace prefix.}
@see{qualified-name}
@see{local-name}
@see{namespace-uri}
named-node-mixin
)) ¶automatically generated reader method
@arg[node]{an @class{element} or @class{attribute}}
@return{string, a URI}
@short{Returns the node’s namespace URI.}
@see{qualified-name}
@see{local-name}
@see{namespace-prefix}
named-node-mixin
)) ¶automatically generated reader method
@arg[node]{an @class{node}} @return{the parent node, or nil} @short{Returns the node’s parent.}
@arg[document-type]{@class{document-type}} @return{string suitable as a system ID} @short{Returns the document-type’s public-id.}
document-type
)) ¶automatically generated reader method
@arg[newval]{string, suitable as a system ID}
@arg[document-type]{@class{document-type}}
@return{the public-id}
@short{Sets the document-type’s public-id.}
document-type
)) ¶document-type
)) ¶automatically generated writer method
@arg[parent]{a @class{parent-node}}
@arg[old-child]{a @class{node}}
@arg[new-child]{a @class{node}}
@short{Adds @code{new-child} instead of @code{old-child} as a child node of
@code{parent}, if allowed.}
Signals an error if the new child already has a parent.
Also signals an error if @code{old-child} is not a child of @code{parent}.
parent-node
) old-child new-child) ¶@arg[document-type]{@class{document-type}}
@return{string, a Name}
@short{Returns the document-type’s root-element-name.}
document-type
)) ¶automatically generated reader method
@arg[newval]{string, a Name}
@arg[document-type]{@class{document-type}}
@return{the root-element-name}
@short{Sets the document-type’s root-element-name.}
document-type
)) ¶document-type
)) ¶automatically generated writer method
@arg[node]{a @class{node}}
@short{This function generates SAX events representing @code{node}.}
Use this function together with a serialization sink to generate
a serialized XML document.
Examples. Serializing to a stream:
@begin{pre}CL-USER> (stp:serialize (stp:make-document (stp:make-element "test"))
(cxml:make-character-stream-sink *standard-output*))
<?xml version="1.0" encoding="UTF-8"?>
<test/>
#<SWANK-BACKEND::SLIME-OUTPUT-STREAM {10037EA611@}>
@end{pre}
Examples. Serializing to a string:
@begin{pre}CL-USER> (stp:serialize (stp:make-document (stp:make-element "test"))
(cxml:make-string-sink))
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<test/>"
@end{pre}
@see{make-builder}
processing-instruction
) handler) ¶document-type
) handler) ¶@arg[node]{an instance of @class{node}}
@return{a string}
@short{Returns the string value of @code{node} as defined by XPath.}
For a document, this is the value of its root element.
For an element, the concatenation of the values of those child nodes
is returned that are elements or text nodes.
(Leaving only the PCDATA content.)
For a text, comment, and processing instruction nodes, the node’s data
is returned.
For an attribute, the attribute value is returned.
The value for document types is not specified.
processing-instruction
)) ¶document-type
)) ¶@arg[document-type]{@class{document-type}} @return{string suitable as a system ID} @short{Returns the document-type’s system-id.}
document-type
)) ¶automatically generated reader method
@arg[newval]{string, suitable as a system ID}
@arg[document-type]{@class{document-type}}
@return{the system-id}
@short{Sets the document-type’s system-id.}
document-type
)) ¶document-type
)) ¶automatically generated writer method
@arg[processing-instruction]{@class{processing-instruction}}
@return{string, a Name}
@short{Returns the processing-instruction’s target.}
processing-instruction
)) ¶automatically generated reader method
@arg[newval]{string, a Name}
@arg[processing-instruction]{@class{processing-instruction}}
@return{the target}
@short{Sets the processing-instruction’s target.}
processing-instruction
)) ¶processing-instruction
)) ¶automatically generated writer method
@arg[attribute]{an @class{attribute}} @return{a string of XML characters} @short{Returns the attribute’s value.}
@arg[newval]{a string of XML characters}
@arg[attribute]{an @class{attribute}}
@return{the value}
@short{Sets the attribute’s value.}
builder
) element-name attribute-name type default) ¶sax
.
notation-collector
)) ¶sax
.
builder
) kind name public-id system-id) ¶sax
.
notation-collector
) name public system) ¶sax
.
compile-op
) (s closure-source-file
)) ¶asdf/action
.
builder
) name public-id system-id notation-name) ¶sax
.
@short{Instances of this class represent attributes of an @class{element},
excluding namespace declarations.}
The @fun{parent} of an attribute is always an @class{element} or nil,
but the attribute is not a child of that element.
@see-slot{local-name}
@see-slot{namespace-prefix}
@see-slot{namespace-uri}
@see-slot{qualified-name}
@see-slot{value}
@see{list-attributes}
@see-constructor{make-attribute}
Instances of this class represent XML comments. @see-slot{data} @see-constructor{make-comment}
@short{Instances of this class represent an entire XML document.}
A document may have at most one document-type, and must have exactly one
element as a child (in this order).
It may also have comments and processing-instructions anywhere.
@see-constructor{make-document}
@see-slot{document-element}
@see-slot{document-type}
(setf base-uri)
.
base-uri
.
base-uri-using-navigator
.
check-deletion-allowed
.
check-deletion-allowed
.
check-insertion-allowed
.
child-pipe-using-navigator
.
copy
.
local-name-using-navigator
.
namespace-prefix-using-navigator
.
namespace-uri-using-navigator
.
node-type-p-using-navigator
.
qualified-name-using-navigator
.
reconstruct
.
replace-child
.
serialize
.
string-value
.
@short{Instances of this class represent the DOCTYPE declaration at the
beginning of a document.}
The document type is an optional child of a @class{document}. At most one document type is allowed, and it must precede the document element.
Since STP checks well-formedness only, not validity, the document type
only declares what DTD the document claims to be conforming to, but
does not guarantee that it actually does.
@see-constructor{make-document-type}
@see-slot{root-element-name}
@see-slot{system-id}
@see-slot{public-id}
@see-slot{internal-subset}
copy
.
(setf dtd)
.
(setf dtd)
.
dtd
.
(setf internal-subset)
.
(setf internal-subset)
.
internal-subset
.
(setf public-id)
.
(setf public-id)
.
public-id
.
reconstruct
.
(setf root-element-name)
.
(setf root-element-name)
.
root-element-name
.
serialize
.
slots-for-print-object
.
string-value
.
(setf system-id)
.
(setf system-id)
.
system-id
.
@short{Instances of this class represent XML elements with their attributes
and namespaces.}
See @class{node} for functions to query the list of children.
See @class{parent-node} for functions to add or remove children.
@see-slot{local-name}
@see-slot{namespace-prefix}
@see-slot{namespace-uri}
@see-slot{qualified-name}
@see{add-attribute}
@see{remove-attribute}
@see{find-attribute-named}
@see{find-attribute-if}
@see{with-attributes}
@see{list-attributes}
@see{map-attributes}
@see{attribute-value}
@see{find-namespace}
@see{find-attribute-namespace}
@see{find-local-namespace}
@see{find-extra-namespace}
@see{add-extra-namespace}
@see{remove-extra-namespace}
@see{map-extra-namespaces}
@see-constructor{make-element}
(setf %attributes)
.
%attributes
.
(setf %namespaces)
.
%namespaces
.
attribute-pipe-using-navigator
.
base-uri
.
(setf base-uri)
.
base-uri-using-navigator
.
check-deletion-allowed
.
check-deletion-allowed
.
check-insertion-allowed
.
child-pipe-using-navigator
.
copy
.
(setf local-name)
.
namespace-pipe-using-navigator
.
node-type-p-using-navigator
.
reconstruct
.
serialize
.
slots-for-print-object
.
string-value
.
@short{The superclass of all nodes.}
Although only @class{document} and @class{element} allow children,
read-only functions accessing the list of children are available for
all nodes and always return zero children for other classes.
@see-slot{parent}
@see-slot{base-uri}
@see{document}
@see{root}
@see{detach}
@see{copy}
@see{serialize}
@see{map-children}
@see{do-children}
@see{list-children}
@see{first-child}
@see{last-child}
@see{nth-child}
@see{previous-sibling}
@see{next-sibling}
@see{count-children}
@see{find-child}
@see{child-position}
@see{count-children-if}
@see{find-child-if}
@see{child-position-if}
@see{filter-children}
@see{map-recursively}
@see{do-recursively}
@see{find-recursively}
@see{filter-recursively}
(setf %base-uri)
.
%base-uri
.
(setf %parent)
.
attribute-pipe-using-navigator
.
base-uri-using-navigator
.
check-deletion-allowed
.
check-deletion-allowed
.
child-pipe-using-navigator
.
detach
.
get-element-by-id-using-navigator
.
insert-child
.
local-name-using-navigator
.
namespace-pipe-using-navigator
.
namespace-prefix-using-navigator
.
namespace-uri-using-navigator
.
node-p-using-navigator
.
node-text-using-navigator
.
node-type-p-using-navigator
.
parent
.
parent-node-using-navigator
.
print-object
.
processing-instruction-target-using-navigator
.
qualified-name-using-navigator
.
unparsed-entity-uri-using-navigator
.
@short{Instances of this class can have children.}
See @class{node} for functions to query the list of children without
changing it.
@see{prepend-child}
@see{append-child}
@see{delete-nth-child}
@see{delete-child}
@see{insert-child-before}
@see{insert-child-after}
@see{replace-child}
@see{insert-child}
@see{delete-child-if}
@see{replace-children}
Instances of this class represent processing instructions.
@see-slot{target}
@see-slot{data}
@see-constructor{make-processing-instruction}
copy
.
(setf data)
.
(setf data)
.
data
.
local-name-using-navigator
.
namespace-prefix-using-navigator
.
namespace-uri-using-navigator
.
node-type-p-using-navigator
.
processing-instruction-target-using-navigator
.
qualified-name-using-navigator
.
reconstruct
.
serialize
.
slots-for-print-object
.
string-value
.
(setf target)
.
(setf target)
.
target
.
:target
Instances of this class represent text nodes. @see-slot{data} @see-constructor{make-text}
@unexport{}
@unexport{}
@unexport{}
@arg[qname]{string, a QName}
@arg[element]{an element in which to look up @code{name}’s namespace}
@return{an function of one argument}
@short{This function creates a test function for nodes of this name.}
@code{qname}’s namespace prefix is resolved into its namespace URI
as declared by @code{element}. If @code{qname} does not have a prefix,
the namespace URI is the empty string. If @code{qname}’s prefix is
not declared on @code{element}, an error is signalled.
A function is returned that will return T if the argument is an instance of @class{attribute} or @class{element} and has the local-name namespace URI specified by @code{qname}, and will return NIL otherwise.
@see{qualified-name}
@see{local-name}
@see{find-namespace}
@see{namespace-uri}
uri
.
parent-node
)) ¶automatically generated reader method
parent-node
)) ¶automatically generated writer method
named-node-mixin
)) ¶automatically generated reader method
named-node-mixin
)) ¶automatically generated writer method
named-node-mixin
)) ¶automatically generated reader method
named-node-mixin
)) ¶automatically generated writer method
named-node-mixin
)) ¶automatically generated reader method
named-node-mixin
)) ¶automatically generated writer method
notation-collector
)) ¶automatically generated reader method
notation-collector
)) ¶automatically generated writer method
progn
.
:most-specific-first
processing-instruction
) &key data target &allow-other-keys) ¶document-type
) &key root-element-name system-id public-id internal-subset &allow-other-keys) ¶element
) &key attributes extra-namespaces &allow-other-keys) ¶named-node-mixin
) &key local-name namespace-prefix namespace-uri &allow-other-keys) ¶parent-node
) &key base-uri children &allow-other-keys) ¶append
.
:most-specific-first
processing-instruction
)) ¶document-type
)) ¶named-node-mixin
)) ¶parent-node
)) ¶structure-object
.
attribute-pipe-using-navigator
.
base-uri-using-navigator
.
child-pipe-using-navigator
.
hash-key-using-navigator
.
local-name-using-navigator
.
namespace-pipe-using-navigator
.
namespace-uri-using-navigator
.
node-equal-using-navigator
.
node-p-using-navigator
.
node-text-using-navigator
.
node-type-p-using-navigator
.
node-type-p-using-navigator
.
parent-node-using-navigator
.
qualified-name-using-navigator
.
content-handler
.
attribute-declaration
.
(setf builder-doctype)
.
builder-doctype
.
(setf builder-internal-subset-sink)
.
builder-internal-subset-sink
.
(setf builder-nodes)
.
builder-nodes
.
characters
.
comment
.
dtd
.
element-declaration
.
end-document
.
end-element
.
end-internal-subset
.
external-entity-declaration
.
internal-entity-declaration
.
(setf namespace-declarations)
.
namespace-declarations
.
notation-declaration
.
processing-instruction
.
start-document
.
start-dtd
.
start-element
.
start-internal-subset
.
start-prefix-mapping
.
unparsed-entity-declaration
.
cl-source-file
.
@short{Instances of this class represent an entire XML document.}
A document may have at most one document-type, and must have exactly one
element as a child (in this order).
It may also have comments and processing-instructions anywhere.
@see-constructor{make-document}
@see-slot{document-element}
@see-slot{document-type}
(setf base-uri)
.
base-uri
.
base-uri-using-navigator
.
check-deletion-allowed
.
check-deletion-allowed
.
check-insertion-allowed
.
child-pipe-using-navigator
.
copy
.
local-name-using-navigator
.
namespace-prefix-using-navigator
.
namespace-uri-using-navigator
.
node-type-p-using-navigator
.
qualified-name-using-navigator
.
reconstruct
.
replace-child
.
serialize
.
string-value
.
@short{Instances of this class represent the DOCTYPE declaration at the
beginning of a document.}
The document type is an optional child of a @class{document}. At most one document type is allowed, and it must precede the document element.
Since STP checks well-formedness only, not validity, the document type
only declares what DTD the document claims to be conforming to, but
does not guarantee that it actually does.
@see-constructor{make-document-type}
@see-slot{root-element-name}
@see-slot{system-id}
@see-slot{public-id}
@see-slot{internal-subset}
copy
.
(setf dtd)
.
(setf dtd)
.
dtd
.
(setf internal-subset)
.
(setf internal-subset)
.
internal-subset
.
(setf public-id)
.
(setf public-id)
.
public-id
.
reconstruct
.
(setf root-element-name)
.
(setf root-element-name)
.
root-element-name
.
serialize
.
slots-for-print-object
.
string-value
.
(setf system-id)
.
(setf system-id)
.
system-id
.
Jump to: | %
(
A B C D E F G H I L M N O P Q R S T U V W X |
---|
Jump to: | %
(
A B C D E F G H I L M N O P Q R S T U V W X |
---|
Jump to: | %
*
A C D I L N P R S T U V |
---|
Jump to: | %
*
A C D I L N P R S T U V |
---|
Jump to: | A B C D E F L N P S T X |
---|
Jump to: | A B C D E F L N P S T X |
---|