File: entities.xml

package info (click to toggle)
libapache2-mod-rivet 3.2.0-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 5,868 kB
  • sloc: xml: 8,496; tcl: 7,212; ansic: 6,959; sh: 5,030; makefile: 261; sql: 91; lisp: 78
file content (70 lines) | stat: -rw-r--r-- 3,084 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<section id="entities">
    <title>RivetEntities</title>
    <section>
        <title>Introduction</title>
        <para>
				The <command>RivetEntities</command> package was kindly provided by Harald Oehlmann and 
				is largely taken from a simple yet clever encoder/decoder of HTML entities
 				starting from a utf-8 character string. The original code writted by Andy Goth is 
				at http://wiki.tcl.tk/26403. Package entities extends the functionality in the 
				original code combining it with Tcl's 'encoding' command to encode/decode from 
				any supported encoding
        </para>

    </section>
    <refentry id="encode">
        <refnamediv>
            <refname>encode</refname>
            <refpurpose>
                encode a string replacing every occurrence of characters for 
                which an SGML entity exists
            </refpurpose>
        </refnamediv>
        <refsynopsisdiv>
            <cmdsynopsis>
                <command>::rivet::encode</command>
                <arg choice="plain">string</arg>
                <arg><option>-encoding <replaceable>&lt;encoding&gt;</replaceable></option></arg>
            </cmdsynopsis>
        </refsynopsisdiv>
        <refsect1>
            <title>Description</title>
            <para>
                <command>::rivet::encode</command> returns a copy of the input string
                after replacing every occurence of characters for which an SGML entity 
                exists.  By default the command assumes the string is encoded in UTF-8,
                other encodings are supported by passing the 
                <command>-encoding &lt;encoding&gt;</command> argument. The list of
                available encodings is returned by command
            </para>
            <programlisting>encoding names</programlisting>
        </refsect1>
    </refentry>
    <refentry id="decode">
        <refnamediv>
            <refname>decode</refname>
            <refpurpose>
                decode an SGML encoded string replacing every entity with the
                corresponding character
            </refpurpose>
        </refnamediv>
        <refsynopsisdiv>
            <cmdsynopsis>
                <command>::rivet::decode</command>
                <arg choice="plain">string</arg>
                <arg><option>-encoding <replaceable>&lt;encoding&gt;</replaceable></option></arg>
            </cmdsynopsis>
        </refsynopsisdiv>
        <refsect1>
            <title>Description</title>
            <para>
                    <command>::rivet::decode</command> implements the inverse function of
                    <command>::rivet::encode</command>. The input string is scanned searching
                    and replacing every SGML entity with its corresponding character.
                    By default the command assumes the output string has to be encoded in UTF-8.
                    Other encodings are supported by passing the 
                    <command>-encoding &lt;encoding&gt;</command> argument.
            </para>
        </refsect1>
    </refentry>
</section>