drsxml

Method summary
extract-drs-condition-from-element kind element
Function summary
drs-condition-from-element element
extract-drs-conditions-from-node-list node-list
parse-drsxml blob
Macro summary
define-drs-condition-extractor element-name class-name (element) &body body
extract-drs-condition-from-element   kind element  [Generic function]

Syntax:

extract-drs-condition-from-node kind element => drs-condition

Arguments and Values:

  • kind --- a class, or a symbol that names a class

  • node --- a DOM element

Description:

Extract-drs-condition-from-element builds a drs-condition, specifically of type kind from element. How this particular process is carried out depends on the kind of object being constructed.

Extract-drs-condition-from-element should usually not be called by user code directly, but rather by drs-condition-from-element . Similarly, it is not expected that extract-condition-from-element methods will be defined directly, but rather using define-drs-condition-extractor .

See Also:

drs-condition-from-element   element  [Function]

Syntax:

drs-condition-from-node node => drs-condition

Arguments and Values:

Description:

Extracts a drs-condition from element. The type of drs-condition to build is determined based on the element's tag name (based on a mapping established by define-drs-condition-extractor ) and then extract-drs-condition-from-element is applied to the type the element. The resulting drs-condition is returned.

Exceptional Situations:

If the element's tag name does not correspond to a class, an error is signalled.

extract-drs-conditions-from-node-list   node-list  [Function]

Syntax:

extract-drs-conditions-from-node-list node-list => conditions

Arguments and Values:

  • node-list --- a DOM node list

  • conditions --- a list of drs-condition

Description:

Returns a list of drs-conditions extracted from the DOM element nodes in node list. Conditions are extracted from element nodes using drs-condition-from-element .

parse-drsxml   blob  [Function]

Syntax:

parse-drsxml blob => drs

Arguments and Values:

  • blob --- a string (or other suitable input for cxml:parse)

  • drs --- a drs object

Description:

parse-drsxml parses the XML representation of a DRS in the format produced by the APE Webservice. The XML representation is parsed by Closure XML [1], particularly using the function cxml:parse [2]. cxml:parse can accept strings, pathnames, octet vectors or streams.

See Also:

define-drs-condition-extractor   element-name class-name (element) &body body  [Macro]

Syntax:

define-drs-condition-extractor element-name class-name (element) [[declaration* | documentation ]] form*

Arguments and Values:

  • element-name --- a string

  • class-name --- a symbol or class, not evaluated

  • element --- a variable

Description:

define-drs-condition-extractor associates element-name with class-name (via install-element-name-drs-condition-type-mapping ), and defines a method on extract-drs-condition-from-element whose first parameter is specialized with (eql class-name), and whose second parameter is non-specialized, and named node. Declarations, documentation, and forms appear as the body of the method. The body should construct and return a drs-condition of type class-name from the element.

See Also: