File: test.xml

package info (click to toggle)
libmojomojo-perl 1.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,524 kB
  • sloc: perl: 14,730; xml: 120; sh: 97; makefile: 8; ruby: 6
file content (149 lines) | stat: -rw-r--r-- 3,925 bytes parent folder | download | duplicates (5)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<article lang="fr">
  <title>TEST colorisation de code d'un fichier docbook</title>

  <section id="test">
    <title>test</title>

    <para>De nombreux languages sont reconnus par le modules <emphasis
    role="bold">Syntax::Highlight::Engine::Kate</emphasis> ( voir <ulink
    url="http://search.cpan.org/~hanje/Syntax-Highlight-Engine-Kate-0.04/lib/Syntax/Highlight/Engine/Kate.pod#PLUGINS">http://search.cpan.org/~hanje/Syntax-Highlight-Engine-Kate-0.04/lib/Syntax/Highlight/Engine/Kate.pod#PLUGINS</ulink>
    )</para>

    <para></para>

    <section id="Perl">
      <title>Perl</title>

      <para><programlisting lang="perl">my $a = "toto";
if ( $a eq "titi" ) {
    $b = 1;
    $c
        = "Une très longue ligne de plus de 78 caratères pout montrer l'utilité de perltidy";
}
else {

    # un commentaire
    $b = 2;
}
print $b, $a, $c . "\n";</programlisting></para>
    </section>

    <section id="Bash">
      <title>Bash</title>

      <para><programlisting lang="bash"># if $LOGLEVEL is not set, default to "info"
############################################
if [ -z "$LOGLEVEL" ]; then
  LOGLEVEL="info"
fi


sanity_check()
{
  # root check
  if [ "$(id -u)" != "0" ]; then
    printf "\033[40m\033[1;31mERROR: Root check FAILED (you MUST be root to use this script)! Quitting...\033[0m\n" &gt;&amp;2
    exit 1
  fi
</programlisting></para>
    </section>

    <section id="C">
      <title>C</title>

      <para><programlisting lang="c">       count(buf, size)
          int size, buf[ ]; {
               int i, c;
               for( i=0; i&lt;=size; i++ )
                       buf[i]  =  0;                     /*  set buf to zero */
               while(  (c=getchar(  )) != '\0' ) {       /* read til eof */
                       if( c &gt; size || c &lt; 0 )
                               c = size;                 /* fix illegal input */
                       buf[c]++;
               }
               return;
       }</programlisting></para>

      <para></para>
    </section>

    <section id="Java">
      <title>Java</title>

      <para><programlisting lang="java">class myfirstjavaprog
{  
        public static void main(String args[])
        {
           System.out.println("Hello World!");
        }
}</programlisting><emphasis role="bold"></emphasis></para>
    </section>

    <section id="Javascript">
      <title>Javascript</title>

      <programlisting lang="JavaScript">var progress;

function startPopupProgressBar(form, options) {
    var id = generateProgressID();
    if (form.action.match(/\?/))
        form.action += '&amp;progress_id=' + id;
    else
        form.action += '?progress_id=' + id;

    var width  = options.width  || '480';
    var height = options.height || '150';
    window.open ('progress?progress_id='+id,'Apache2-UploadProgress','location=0,status=0,width='+width+',height='+height); return true;


}</programlisting>

      <para></para>
    </section>

    <section id="Css">
      <title>CSS</title>

      <programlisting lang="CSS">/* ------ Default ----------*/

.access_denied {
  color: #CC4444;
  display: block;
  background-color: #e2dc45;
  padding: 5px 5px 5px 20px;
  margin: 20px;
  border: 1px dotted #F00;
  text-align: center;
  font-weight: bold;
}

.message {
  color: #66AA66;
  display: block;
  background-color: #ccc;
  padding: 5px 5px 5px 20px;
  margin: 20px;
  border: 1px dotted #0F0;
  text-align: center;
  font-weight: bold;
}</programlisting>

      <para></para>
    </section>
  </section>
  <section id="image">
    <title>Image png</title>
      <para><mediaobject>
          <imageobject>
            <imagedata fileref="catalyst.png" />
          </imageobject>
        </mediaobject>
      </para>

    bla bla bla
  </section>

</article>