This is the xmls Reference Manual, version 3.3.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 08:07:33 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
xmls
Robert P. Goldman <rpgoldman@sift.net>
BSD
3.3.0
xmls.lisp
(file).
xmlrep-helpers.lisp
(file).
extract-path.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
xmls/xmls.asd
xmls
(system).
xmls
.
xmls-source-file
(class).
xmls/xmls.lisp
xmls
(system).
xmls
.
debug-off
(function).
debug-on
(function).
initialize-instance
(method).
make-node
(function).
node
(structure).
node->nodelist
(function).
node-attrs
(reader).
(setf node-attrs)
(writer).
node-children
(reader).
(setf node-children)
(writer).
node-name
(reader).
(setf node-name)
(writer).
node-ns
(reader).
(setf node-ns)
(writer).
node-p
(function).
nodelist->node
(function).
parse
(function).
parse-to-list
(function).
proc-inst-contents
(reader).
(setf proc-inst-contents)
(writer).
proc-inst-p
(function).
proc-inst-target
(reader).
(setf proc-inst-target)
(writer).
toxml
(function).
write-prolog
(function).
write-prologue
(function).
write-xml
(function).
%make-node
(function).
*char-escapes*
(special variable).
*compress-whitespace*
(special variable).
*dbg-ids*
(special variable).
*discard-processing-instructions*
(special variable).
*entities*
(special variable).
*parser-line-number*
(special variable).
*parser-stream*
(special variable).
*strip-comments*
(special variable).
*test-files*
(special variable).
*test-verbose*
(special variable).
*whitespace*
(special variable).
attr-or-nsdecl
(function).
attr-text-dq
(function).
attr-text-sq
(function).
chardata
(function).
comment
(function).
comment-char
(function).
comment-or-cdata
(function).
comment-or-doctype
(function).
compress-whitespace
(function).
content
(function).
copy-element
(function).
copy-node
(function).
copy-proc-inst
(function).
copy-state
(function).
dbg
(macro).
defmatch
(macro).
defrule
(macro).
digit
(function).
document
(function).
eat
(macro).
element
(function).
element
(structure).
element-p
(function).
element-type
(reader).
(setf element-type)
(writer).
element-val
(reader).
(setf element-val)
(writer).
end-tag
(function).
error-line
(reader method).
escape-for-html
(function).
generate-xml
(function).
letter
(function).
make-element
(function).
make-extendable-string
(function).
make-proc-inst
(function).
make-state
(function).
match
(macro).
match*
(macro).
match+
(macro).
match-seq
(macro).
matchfn
(macro).
misc
(function).
must
(macro).
name
(function).
namechar
(function).
ncname
(function).
ncname-char
(function).
next-char
(symbol macro).
none-or-more
(function).
one-or-more
(function).
peek
(macro).
peek-stream
(function).
pi-contents
(function).
proc-inst
(structure).
processing-instruction
(function).
puke
(macro).
push-string
(function).
qname
(function).
read-char
(function).
read-stream
(function).
resolve-entity
(function).
resolve-namespace
(function).
start-tag
(function).
state
(structure).
state-got-doctype
(reader).
(setf state-got-doctype)
(writer).
state-lines
(reader).
(setf state-lines)
(writer).
state-nsstack
(reader).
(setf state-nsstack)
(writer).
state-p
(function).
state-stream
(reader).
(setf state-stream)
(writer).
test
(function).
translate-raw-value
(function).
unread-char
(function).
write-escaped
(function).
ws
(function).
ws-attr-or-nsdecl
(function).
ws-char
(function).
xml-parse-error
(condition).
xmldecl
(function).
xmls/xmlrep-helpers.lisp
xmls.lisp
(file).
xmls
(system).
make-xmlrep
(function).
xmlrep-add-child!
(generic function).
xmlrep-attrib-value
(function).
(setf xmlrep-attrib-value)
(function).
xmlrep-attribs
(generic function).
(setf xmlrep-attribs)
(generic function).
xmlrep-boolean-attrib-value
(function).
xmlrep-children
(generic function).
(setf xmlrep-children)
(generic function).
xmlrep-find-child-tag
(function).
xmlrep-find-child-tags
(function).
xmlrep-integer-child
(function).
xmlrep-string-child
(function).
xmlrep-tag
(generic function).
xmlrep-tagmatch
(function).
find-attrib
(function).
xmls/extract-path.lisp
xmls.lisp
(file).
xmls
(system).
extract-path
(function).
Packages are listed by definition order.
xmls
common-lisp
.
debug-off
(function).
debug-on
(function).
extract-path
(function).
make-node
(function).
make-xmlrep
(function).
node
(structure).
node->nodelist
(function).
node-attrs
(reader).
(setf node-attrs)
(writer).
node-children
(reader).
(setf node-children)
(writer).
node-name
(reader).
(setf node-name)
(writer).
node-ns
(reader).
(setf node-ns)
(writer).
node-p
(function).
nodelist->node
(function).
parse
(function).
parse-to-list
(function).
proc-inst-contents
(reader).
(setf proc-inst-contents)
(writer).
proc-inst-p
(function).
proc-inst-target
(reader).
(setf proc-inst-target)
(writer).
toxml
(function).
write-prolog
(function).
write-prologue
(function).
write-xml
(function).
xmlrep-add-child!
(generic function).
xmlrep-attrib-value
(function).
(setf xmlrep-attrib-value)
(function).
xmlrep-attribs
(generic function).
(setf xmlrep-attribs)
(generic function).
xmlrep-boolean-attrib-value
(function).
xmlrep-children
(generic function).
(setf xmlrep-children)
(generic function).
xmlrep-find-child-tag
(function).
xmlrep-find-child-tags
(function).
xmlrep-integer-child
(function).
xmlrep-string-child
(function).
xmlrep-tag
(generic function).
xmlrep-tagmatch
(function).
%make-node
(function).
*char-escapes*
(special variable).
*compress-whitespace*
(special variable).
*dbg-ids*
(special variable).
*discard-processing-instructions*
(special variable).
*entities*
(special variable).
*parser-line-number*
(special variable).
*parser-stream*
(special variable).
*strip-comments*
(special variable).
*test-files*
(special variable).
*test-verbose*
(special variable).
*whitespace*
(special variable).
attr-or-nsdecl
(function).
attr-text-dq
(function).
attr-text-sq
(function).
chardata
(function).
comment
(function).
comment-char
(function).
comment-or-cdata
(function).
comment-or-doctype
(function).
compress-whitespace
(function).
content
(function).
copy-element
(function).
copy-node
(function).
copy-proc-inst
(function).
copy-state
(function).
dbg
(macro).
defmatch
(macro).
defrule
(macro).
digit
(function).
document
(function).
eat
(macro).
element
(function).
element
(structure).
element-p
(function).
element-type
(reader).
(setf element-type)
(writer).
element-val
(reader).
(setf element-val)
(writer).
end-tag
(function).
error-line
(generic reader).
escape-for-html
(function).
find-attrib
(function).
generate-xml
(function).
letter
(function).
make-element
(function).
make-extendable-string
(function).
make-proc-inst
(function).
make-state
(function).
match
(macro).
match*
(macro).
match+
(macro).
match-seq
(macro).
matchfn
(macro).
misc
(function).
must
(macro).
name
(function).
namechar
(function).
ncname
(function).
ncname-char
(function).
next-char
(symbol macro).
none-or-more
(function).
one-or-more
(function).
peek
(macro).
peek-stream
(function).
pi-contents
(function).
proc-inst
(structure).
processing-instruction
(function).
puke
(macro).
push-string
(function).
qname
(function).
read-char
(function).
read-stream
(function).
resolve-entity
(function).
resolve-namespace
(function).
start-tag
(function).
state
(structure).
state-got-doctype
(reader).
(setf state-got-doctype)
(writer).
state-lines
(reader).
(setf state-lines)
(writer).
state-nsstack
(reader).
(setf state-nsstack)
(writer).
state-p
(function).
state-stream
(reader).
(setf state-stream)
(writer).
test
(function).
translate-raw-value
(function).
unread-char
(function).
write-escaped
(function).
ws
(function).
ws-attr-or-nsdecl
(function).
ws-char
(function).
xml-parse-error
(condition).
xmldecl
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Stop dbg on the ids. With no ids, stop dbg altogether.
Extracts data from XML parse tree. KEY-LIST is a path for descending down
named objects in the XML parse tree. For each KEY-LIST element, XML subforms
are searched for a matching tag name. Finally the whole last XML subform on the
path is normally returned if found; however the symbol * may be added at the end
of KEY-LIST to return list of all objects /enclosed/ by the last subform on
KEY-LIST. Also KEY-LIST may be dotted as explained below to return XML tag
attributes from the last subform on KEY-LIST.
XML is to have the forms as returned by PARSE-TO-LIST or PARSE:
(tag-name (attributes-list) subform*),
((tag-name . name-space) (attributes-list) subform*), or
#s(node :name tag-name
:ns name-space
:attrs attributes-list
:children subform*)
The first element in KEY-LIST must match the top level form in XML.
Subsequently each element in the KEY-LIST is to match a subform.
An element of KEY-LIST may be a string atom. In that case the first subform
with tag-name matching the string is matched. An element of KEY-LIST may also
be a list of string atoms in this format:
(tag-name (attribute-name attribute-value) ...)
The first subform with name matching TAG-NAME /and/ having attributes matching
attribute-names and attribute-values is matched. Zero or more attribute/value
pairs may be given.
Normally the whole subform matching last element in KEY-LIST is returned. The
symbol * can be the last element of KEY-LIST to return list of all subforms
enclosed by the last matched form. Attributes of last matched subform may be
searched by ending KEY-LIST in dot notation, in which case the string after dot
matches an attribute name. The two element list of attribute name and value is
returned. The symbol * may be used after dot to return the whole attribute list.
In the case where the search fails NIL is returned. However it is possible that
the search partially succeeds down the key path. Three values are returned
altogether and the 2nd and 3rd values give information about how much of
KEY-LIST was matched, and at what point in XML:
(values RESULT KEY-LIST-FRAGMENT XML-FRAGMENT)
When RESULT is non-NIL, the others are NIL. When result is NIL however, the
others are:
XML-FRAGMENT
The last XML form that /did/ match in the key list. It matches the first
element of KEY-LIST-FRAGMENT.
KEY-LIST-FRAGMENT
The /remaining/ part of the KEY-LIST that did not succeed. However the
/first/ item on KEY-LIST-FRAGMENT matches the XML-FRAGMENT returned. The
failure is at the second item on KEY-LIST-FRAGMENT.
In the case of complete failure, where even the very first item on KEY-LIST does not match the top XML form given, all three return values are NIL. (It suffices to check the first two return values.)
xmls
.
Convenience function for creating a new xml node.
xmls
.
Backwards compatibility function. Will take a NODE (the output of PARSE), and translate it into a list structure that looks like the output of PARSE from XMLS 1.x. This should only be needed if there’s client code that didn’t obey the API and instead directly accessed the Lisp list structures that XMLS used to produce. Such code should be fixed.
Take old-style list representation of XMLS nodes and translate it into a NODE.
Parses the supplied stream or string into a lisp node tree.
Renders a lisp node tree to an xml string.
Render the leading <?xml ... ?> and <!DOCTYPE ... > tags to an xml stream.
Renders a lisp node tree to an xml stream. Indents if indent is non-nil.
Find the value of ATTRIB, a string, in TREENODE.
if there is no ATTRIB, will return the value of IF-UNDEFINED,
which defaults to :ERROR.
xmls
.
Find the value of ATTRIB, a string, in TREENODE.
The value should be either "true" or "false". The
function will return T or NIL, accordingly. If there is no ATTRIB,
will return the value of IF-UNDEFINED, which defaults to :ERROR.
xmls
.
Find a single child of TREENODE with TAG. Returns an error if there is more or less than one such child.
xmls
.
Find all the children of TREENODE with TAG.
xmls
.
The currently-being-parsed stream. Used so that we can appropriately track the line number.
Print debugging info if (DEBUG ID) has been specified.
Match definition macro that provides a common lexical environment for matchers.
Rule definition macro that provides a common lexical environment for rules.
Attempts to match the next input character with one of the supplied matchers.
Matches any occurances of any of the supplied matchers.
Matches one or more occurances of any of the supplied matchers.
Tries to match the supplied matchers in sequence with characters in the input stream.
Convenience macro for creating an anonymous function wrapper around a matcher macro.
Throws a parse error if the supplied forms do not succeed.
Looks ahead for an occurance of any of the supplied matchers.
Escapes the characters #\<, #\>, #\’, #\", and #\& for HTML output.
Returns the attrib CELL (not the attrib value) from TREENODE, if found. This cell will be a list of length 2, the attrib name (a string) and its value.
xmls
.
Renders a lisp node tree to an xml string stream.
Creates an adjustable string with a fill pointer.
Collects any matches of the supplied rule with the input stream.
Collects one or more matches of the supplied rule with the input stream.
Looks one character ahead in the input stream. Serves as a potential hook for character translation.
Shorthand function for adding characters to an extendable string.
Reads a character from the stream, translating entities as it goes.
Resolves the xml entity ENT to a character. Numeric entities are converted using CODE-CHAR, which only works in implementations that internally encode strings in US-ASCII, ISO-8859-1 or UCS.
Maps the ns prefix to its associated url via the supplied ns env.
xmls
.
Run the test suite. If it fails, either return NIL (if INTERACTIVE), otherwise exit with an error exit status.
Helper function for xml generation.
xmls
.
xml-parse-error
)) ¶Common return type of all rule functions.
Represents parser state. Passed among rules to avoid threading issues.
Component class to quash some ACL warnings.
cl-source-file
.
Jump to: | %
(
A C D E F G I L M N O P Q R S T U W X |
---|
Jump to: | %
(
A C D E F G I L M N O P Q R S T U W X |
---|
Jump to: | *
A C G L N S T V |
---|
Jump to: | *
A C G L N S T V |
---|
Jump to: | C E F N P S X |
---|
Jump to: | C E F N P S X |
---|