match-substitute-sosofo

Name

match-substitute-sosofo -- Return matching sosofo from associative list

Synopsis

(match-substitute-sosofo string assoc-list)

Description

Given a string and an associative list of strings and sosofos, return the sosofo of the matching string, or return the literal string as a sosofo.

(This function is used for a particular task in the DocBook stylesheets. It may not be particularly general, but its in dblib.dsl' because there is nothing DTD-specific about it.)

Author

Norman Walsh, <ndw@nwalsh.com>

Source Code

(define (match-substitute-sosofo string assoc-list)
  ;; Return matching sosofo from associative list
  (if (assoc string assoc-list)
      (car (cdr (assoc string assoc-list)))
      (literal string)))