source: project/release/2/stream-ldif/stream-ldif.html @ 8751

Last change on this file since 8751 was 8751, checked in by felix winkelmann, 12 years ago

rrb2 move completion

File size: 2.6 KB
Line 
1<html>
2<head><title>Eggs Unlimited - StreamLDIF</title></head>
3<body>
4<font face="Arial, Helvetica">
5
6<center><img src="egg.jpg"></center>
7<center><a href="index.html">back</a></center>
8
9<h2>LDIF</h2>
10
11<h3>Description:</h3>
12
13<p>Library to parse and produce
14files in the LDAP Data Interchange Format (LDIF) file format.</p>
15
16<h3>Author:</h3>
17
18<p>Alejandro Forero Cuervo</p>
19
20<h3>Version:</h3>
21
22<p>This file: $Id: stream-ldif.html 1582 2005-03-14 02:54:14Z azul $</p>
23
24<ul>
25<li>1.2 added .setup script (felix)</li>
26<li>1.1 adapted to SRFI-69-compatible hash-tables</li>
27<li>1.0 (r1582) - First public release</li>
28</ul>
29
30<h3>Usage:</h3> 
31
32<pre>(require-extension stream-ldif)</pre>
33
34<h3>Requires:</h3>
35
36<code><a href="srfi-1.html">srfi-1</a></code> (compile-time) and
37<code><a href="srfi-40.html">srfi-40</a></code> (compile-time) and
38<code><a href="stream-ext.html">stream-ext</a></code>
39<code><a href="stream-base64">stream-base64</a></code>
40
41<h3>Download:</h3>
42
43<p><a href="stream-ldif.scm">stream-ldif.scm</a></p>
44
45<h3>Documentation:</h3>
46
47<dl>
48<dt><pre><b>[procedure] (stream->ldif stream)</b></pre></dt>
49
50<dd>
51
52<p>Given a stream of characters corresponding to a file in the
53LDIF format, returns a stream of hash tables.  Each hash table
54corresponds to one of the entries in the LDIF file.  The
55hash tables are indexed by the names of the attributes in
56lowercase (as
57symbols); each value is a list with all the values (as
58streams of characters).</p>
59
60<p>The parsing of the LDIF stream is done in a lazy file,
61reading entries only as required (as the stream of hash
62table is built).</p>
63
64<pre class=verbatim>(stream-car (ldif-&gt;stream (port-&gt;stream (current-input-port))))
65==&gt; #&lt;hash-table&gt;</pre>
66
67</dd>
68
69<dt><pre><b>[procedure] (ldif->stream stream)</b></pre></dt>
70
71<dd>
72
73<p>Performs the opposite function of <code>stream-&gt;ldif</code>:
74given a stream with hashes corresponding to changes, produces an
75LDIF file and returns it as a stream of characters.  Each hash
76should be indexed by the names of the attribute as symbols; the
77value for each entry must be a list with the values for the
78attributes as streams of characters encoded in UTF-8.</p>
79
80<p>Note that each hash table must contain a <code>dn</code> entry.</p>
81
82<pre class=verbatim>(stream-car (stream-&gt;ldif (stream hash-one hash-two)))
83==&gt; #\d</pre>
84
85</dd>
86
87</dl>
88
89<h3>License:</h3>
90
91<p>
92The stream LDIF egg for Chicken Scheme is in the public domain and may be reproduced or
93copied without
94permission from its author.  Citation of the source is appreciated.
95</p>
96
97<hr><a href="index.html">back</a>
98
99</font>
100</body>
101</html>
102
Note: See TracBrowser for help on using the repository browser.