<RefEntry id="string-list-sosofo">
<!-- This file is generated automatically from the DSSSL source. -->
<!-- Do not edit this file! -->
<?html-filename string-list-sosofo.html>

<RefMeta>
  <RefEntryTitle>string-list-sosofo</RefEntryTitle>
  <RefMiscInfo Role="file">dblib.dsl</RefMiscInfo>
</RefMeta>

<RefNameDiv>
  <RefName>string-list-sosofo</RefName>
  <RefPurpose>Build sosofo from a list of strings and an associative list</RefPurpose>
</RefNameDiv>

<RefSynopsisDiv><Title>Synopsis</Title>
<Synopsis>
(string-list-sosofo string-list assoc-list)
</Synopsis>
</RefSynopsisDiv>

<RefSect1><Title>Description</Title>

<para>
Take a list of strings and an associative list that maps strings
to sosofos and return an appended sosofo.
</para>
<para>
(This function is used for a particular task in the DocBook stylesheets.
It may not be particularly general, but it<literal>s in </literal>dblib.dsl' because
there is nothing DTD-specific about it.)</para>


</RefSect1>

<RefSect1><Title>Example</Title>

<para>
Given the string list <literal>("what is " "1" " " "+" " " "1")</literal>
and the associative list 
<literal>(("1" (literal "one")) ("2" (literal "two")) ("+" (literal "plus")))</literal>,
<literal>(string-list-sosofo)</literal> returns the sequence of sosofos
equivalent to <literal>(literal "what is one plus one")</literal>.
</para>


</RefSect1>

<RefSect1><Title>Author</Title>

<para>
Norman Walsh, &lt;ndw@nwalsh.com&gt;
</para>
</RefSect1>
<RefSect1><Title>Source Code</Title>

<ProgramListing>
(define (string-list-sosofo string-list assoc-list)
  ;; Build sosofo from a list of strings and an associative list
  (if (null? string-list)
      (empty-sosofo)
      (sosofo-append (match-substitute-sosofo (car string-list) assoc-list)
		     (string-list-sosofo (cdr string-list) assoc-list))))
</ProgramListing>
</RefSect1>

</RefEntry>
