CL-XML notes

Home : Linux resources : XML : CL-XML notes


[These are notes on CL-XML, which which I am presently hacking around. -- rgr, 31-Oct-02.]

[The local documentation tree starts in repositories/cl-xml-0.918/documentation/index.html.

Table of Contents

  1. CL-XML notes
    1. Table of Contents
    2. API

Classes

xqdm:def-elem-type
Defines the "type" of an element. These are normally the children of DTD objects (e.g. xqdm::ext-subset-node). Default xqdm:node-class is xqdm:elem-node.]

API

xqdm:bind-definition (definition context)
Adds definition to context. definition may be a xqdm:def-general-entity, xqdm:def-parameter-entity, xqdm:def-notation, or xqdm:def-elem-type object. context must be a xqdm:doc-node (in which case the object's name is defined in the appropriate mapping), a hash-table (in which case the name is mapped to the object), or null (in which case the binding is ignored).
xqdm:document (node)
Returns the node's containing document.
xml-parser:construct-element-node (construction-context name attr-plist+ns-node*)
Given a context and an element name, returns a new element of the appropriate class. [Much hair goes into mapping the name into the right class, but xqdm:elem-node is the usual default.] This must be done after all attributes are parsed, so that namespace declarations can be taken into account, which is why we get a third arg with attribute and namespace nodes.
xqdm:node-class (def-node)
Returns the class to use when instantiating elements with the def-node's name. [This is only defined for xqdm:def-elem-type; are the other classes hardwired? -- rgr, 31-Oct-02.]
xqdm:ordinality (node)
Returns the node's ordinal position [need general definition]. For an element, this is as if an index is assigned to each of the start tags in document order, starting with 1 for the root element.
xqdm:root (doc-node)
Returns the document root element.
xqdm:value (node)
Returns the XML "value" of the node [as defined by XPath?], e.g. the string for a text node, the attribute value for an attribute node, the URL for a namespace node, etc. The value can be modified via setf for xml-path::singleton, xqdm:ref-elem-property-node, xqdm:value-node, and xqdm:pi-node objects.
Low-level parsing stuff:
xml-parser::|Element-Constructor| (construction-context content* etag stag)
Called when a complete element has been parsed. stag is whatever element object xml-parser::|STag-Constructor| produced for the start tag, and etag is the QName string returned by xml-parser::|ETag-Constructor| for the end tag. Installs the content in the element. An error is signalled if the stag and etag QName's don't match.
xml-parser::|ETag-Constructor| (structure)
Called when an end tag is parsed, passed a string with the tag's QName.
xml-parser:|STag-Constructor| (construction-context attribute-sequence qname)
Called when a start tag is parsed.


Bob Rogers <rogers@rgrjr.dyndns.org>
Last modified: Mon Dec 23 21:25:31 EST 2002