aboutsummaryrefslogtreecommitdiffhomepage
path: root/unittest/data/parser/input/mbox/jwz/144
blob: 56e36af39a893646b925d5475ed96cbdfc2a080a (plain)
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
Return-Path: <dnew>
Received: from nevada.bellcore.com by greenbush.bellcore.com (4.1/4.7)
	id <AA22702> for nsb; Mon, 8 Jun 92 15:57:08 EDT
Received: by nevada.bellcore.com (4.1/4.7)
	id <AA08471> for nsb@greenbush; Mon, 8 Jun 92 15:57:01 EDT
Received: from Messages.8.5.N.CUILIB.3.45.SNAP.NOT.LINKED.nevada.galaxy.sun4.41
          via MS.5.6.nevada.galaxy.sun4_41;
          Mon,  8 Jun 1992 15:56:59 -0400 (EDT)
Message-Id: <0eAvi=C0M2U=0U4XZI@thumper.bellcore.com>
Date: Mon,  8 Jun 1992 15:56:59 -0400 (EDT)
From: Darren New <dnew>
X-Andrew-Message-Size: 8538+4
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="Interpart.Boundary.keAvi9O0M2U=AU4XRw"
To: Nathaniel Borenstein <nsb>
Subject: Fwd: revised MIME architecture
References: <9206062231.AA23867@pixel.convex.com>

> THIS IS A MESSAGE IN 'MIME' FORMAT.  Your mail reader does not support MIME.
> Please read the first section, which is plain text, and ignore the rest.

--Interpart.Boundary.keAvi9O0M2U=AU4XRw
Content-type: text/plain; charset=US-ASCII


I am on the WWW mailing list and got this interesting tidbit of which I
thought you should be aware...
      -- Darren



Return-Path: <new@ee.udel.edu>
Received: from thumper.bellcore.com by nevada.bellcore.com (4.1/4.7)
	id <AA08378> for dnew; Mon, 8 Jun 92 15:50:28 EDT
Received: from udel.edu (louie.udel.edu) by thumper.bellcore.com (4.1/4.7)
	id <AA01533> for dnew@nevada; Mon, 8 Jun 92 15:50:25 EDT
Received: from snow-white.ee.udel.edu by louie.udel.edu id ah01113;
          8 Jun 92 15:45 EDT
Received: from louie.udel.edu by snow-white.ee.udel.edu id aa01403;
          8 Jun 92 18:34 GMT
Received: from CEARN.cern.ch by pucc.Princeton.EDU (IBM VM SMTP V2R2)
   with BSMTP id 0017; Sat, 06 Jun 92 18:56:24 EDT
Received: from CEARN by CEARN.cern.ch (Mailer R2.07B) with BSMTP id 7873; Sun,
 07 Jun 92 00:35:28 SET
Received: from dxmint.cern.ch by CEARN.cern.ch (IBM VM SMTP V2R1) with TCP;
   Sun, 07 Jun 92 00:35:21 SET
Received: by dxmint.cern.ch (dxcern) (5.57/3.14)
	id AA02301; Sun, 7 Jun 92 00:34:37 +0200
Received: from dxmint.cern.ch by  nxoc01.cern.ch  (NeXT-1.0 (From Sendmail
 5.52)/NeXT-2.0)
	id AA08529; Sun, 7 Jun 92 00:34:17 MET DST
Received: by dxmint.cern.ch (dxcern) (5.57/3.14)
	id AA02281; Sun, 7 Jun 92 00:32:19 +0200
Received: from pixel.convex.com by convex.convex.com (5.64/1.35)
	id AA04364; Sat, 6 Jun 92 17:32:01 -0500
Received: from localhost by pixel.convex.com (5.64/1.28)
	id AA23867; Sat, 6 Jun 92 17:31:59 -0500
Message-Id: <9206062231.AA23867@pixel.convex.com>
To: www-interest@nxoc01.cern.ch
Subject: revised MIME architecture
Mime-Version: 1.0
Content-Type: multipart/mixed;boundary=cut-here
Date: Sat, 06 Jun 92 17:31:58 CDT
From: Dan Connolly <connolly@pixel.convex.com>
Resent-Date:  Mon, 8 Jun 92 18:34:59 GMT
Resent-From: new@ee.udel.edu
Resent-To: dnew@thumper.bellcore.com

In an earlier message, I proposed we make the W3 project
interoperate with MIME systems. I made the mistake
of using existing names for formats and types that
don't yet exist.

I'd like to make a more organized transition to MIME
interoperability.

First, we define some types for existing web servers
and documents.

X-HTTP is an access-type for message/external-body body
parts to access existing W3 servers.
Additional parameters include host, port, path, and anchor.

X-HTML is a subtype of text for existing W3 documents.

So the next part of this message is an HTML document expressed
as a MIME external-body message.


[An Andrew ToolKit view (mailobjv) was included here, but could not be
displayed.]Then we address limitations in the existing format with two
new types:

In order to encapsulate multimedia objects in web nodes,
we define X-HYPERTEXT to be a subtype of the multipart body type.
The first part of a multipart/X-HYPERTEXT is the content of the hypertext.
The other parts are multimedia attachments and links to other documents.

The user agent (WWW client) displays the first part and allows the
user to choose attachments and/or links. The attachments and links
will be displayed in addition to or in place of the original content.

Then, in order to formalize the structure of hypertext parts,
we define X-SGML to be a subtype of text. The body of an X-SGML part must
be a complete SGML document. The user agent (WWW client) will resolve
external entities (such as the DTD and the mutlimedia attachments).

So here's a multimedia web node expressed as MIME body part:


[An Andrew ToolKit view (mailobjv) was included here, but could not be
displayed.]
[An Andrew ToolKit view (mailobjv) was included here, but could not be
displayed.]
[An Andrew ToolKit view (mailobjv) was included here, but could not be
displayed.]And here's the DTD for WEB-NODE documents:

<!-- This DTD was produced by DeveGram on Tue Jun  2 18:58:16 1992 -->
<!-- and hand-edited by connolly@convex.com -->

<!--     Parameter Entities       -->

<!--      Terminal symbols        -->

<!ENTITY % words "#PCDATA" >

<!--    Non-ELEMENT symbols       -->

<!ENTITY % inline	"%words | A" >
<!ENTITY % text         "%inline | P | IMAGE" >
<!ENTITY % heading "H1|H2|H3|H4|H5|H6" >

<!ENTITY lt "<">
<!ENTITY gt ">">
<!ENTITY amp "&">

<!ENTITY lt. "<">
<!ENTITY gt. ">">
<!ENTITY amp. "&">

<!--     Document structure       -->

<!ELEMENT WEB-NODE	O O  (TITLE, NEXTID?, ISINDEX?, section+, ADDRESS?)>

<!ELEMENT TITLE	- -  (%inline)+>
<!ELEMENT ADDRESS - - (%text)+>

<!ELEMENT NEXTID - O EMPTY >
<!ATTLIST NEXTID N NUMBER #IMPLIED>

<!ELEMENT ISINDEX - O EMPTY >


<!ELEMENT section O O ((%heading)?,
			(
			%text |
			section |
			MENU |
			UL |
			OL |
			DIR |
			DL)+)>

<!ELEMENT (H1|H2|H3|H4|H5|H6)	- -  (%inline) >

<!ELEMENT P	- O  EMPTY -- paragraph SEPARATOR -->

<!ELEMENT IMAGE - O  EMPTY>
<!ATTLIST IMAGE ATTACHMENT ENTITY #REQUIRED>

<!ELEMENT A	- -  (%inline)+>
<!ATTLIST A
	NAME CDATA #IMPLIED
	HREF ENTITY #IMPLIED
	TYPE CDATA #IMPLIED --@@-- >

<!ELEMENT MENU	- -  (LI+)>

<!ELEMENT UL	- -  (LI+)>

<!ELEMENT OL	- -  (LI+)>

<!ELEMENT DIR	- -  (LI+)>

<!ELEMENT LI	- O  (%text)+>

<!ELEMENT DL	- -  ((DT, DD)+)>

<!ELEMENT DT	- O  (%inline)+>

<!ELEMENT DD	- O  (%text)+>

And here's a perl script to convert an HTML document
into a multipart/X-HYPERTEXT MIME body part:

#!/usr/local/bin/perl

$boundary = "attachment";
print "Content-Type: multipart/X-HYPERTEXT; boundary=$boundary¥n¥n";

print "--$boundary¥n";
print "Content-Type: text/SGML¥n¥n";

print "<!DOCTYPE WEB-NODE SYSTEM ¥n[¥n";

@html = <>;			# read whole file
$_ = join('', @html);
$out = '';

sub fix_anchor{
    local($name, $href, $type);

    # What exactly is the syntax of an SGML attribute value?
    while(s/^(¥w+)¥s*=¥s*((¥"[^¥"]*¥")|([^¥s>]+))¥s*//){
	local($v) = ($3 || $4);
	local($a) = $1;
	$href = $v if $a =‾ /^href$/i;
	$name = $v if $a =‾ /^name$/i;
	$type = $v if $a =‾ /^type$/i;
    }
    s/[^>]*>//;

    $out .= "<A";
    $out .= " NAME=¥"$name¥"" if $name ne '';
    $out .= " TYPE=¥"$type¥"" if $type ne '';
    if($href ne ''){
	if(!defined($anchor{$href})){
	    $anchor{$href} = ++$anchor;
	}
	$out .= " HREF=" . $anchor{$href};
    }
    $out .= ">";
}

$header = 0;
$anchor = "UDI000";
while(/</){
    $out .= $`;
    $_ = $';
    if(s/^A¥s+//i){
	&fix_anchor;
    }elsif(s/^NEXTID¥s+(¥d+)¥s*>//){
	$out .= "<NEXTID N=$1>";
    }elsif(s/^H(¥d)>//){
	local($n) = $1;
	while($n<=$header){ $out .= "</SECTION>"; $header--; }
	while($n>$header){ $out .= "<SECTION>"; $header++; }
	$out .= "<H$n>";
    }else{
	$out .= '<';
    }
}

$out .= $_;

foreach(keys %anchor){
    local($ent) = $anchor{$_};

    print "<!ENTITY $ent SDATA ¥"$_¥">¥n";
}

print "]>¥n", $out;

foreach(keys %anchor){
    local($access_type);

    print "¥n¥n--$boundary¥n";
    print "Content-id: $_¥n";
    print "Content-type: message/external-body¥n";

    $access_type = $1 if s/^(¥w+)://;

    if(s/#([^#]+)$//){
	print "¥t;x-anchor=¥"$1¥"¥n";
    }

    if($access_type =‾ /file/i){
	if(&hostport){
	    &param('access-type', "ANON-FTP");
	}else{
	    &param('access-type', 'LOCAL-FILE');
	}
	&param('name', $_);

	print "¥nContent-Type: application/octet-stream¥n¥n";
    }elsif($access_type =‾ /http/i){
	&param('access-type', 'X-HTTP');
	&hostport;
	&unescape;
	&param('name', $_);

	print "¥nContent-Type: text/X-HTML¥n¥n";
    }elsif($access_type =‾ /news/i){
	&param('access-type', 'X-NEWS');
	&unescape;
	if(/@/){
	    &param('message-id', $_);
	}else{
	    &param('group', $_);
	}

	print "¥nContent-Type: message¥n¥n";

    }elsif($access_type =‾ /telnet/i){
	&param('access-type', 'x-telnet');
	&unescape;
	&param('user', $1) if s/^(.*)@//;
	&param('port', $1) if s/:(.*)$//;
	&param('site', $_);

	print "¥nContent-Type: X-TELNET¥n¥n";

    }elsif($access_type =‾ /gopher/i){
	&param('access-type', 'x-gopher');
	&hostport;
	&param('type', $1) if s-^/(¥d+)/--;
	&unescape;
	&param('selector', $_);

	print "¥nContent-Type: @@@@¥n¥n";

    }elsif($access_type =‾ /wais/i){
	&param('access-type', 'x-wais');
	&hostport;
	if(m-^/-){
	    &param('type', $1) if s-^/(¥w+)--;
	    &param('size', $1) if s-^/(¥d+)--;
	    &unescape;
	    &param('path', $_);
	}else{
	    &unescape;
	    &param('words', $1) if /¥?(.*)/;
	}

	$type = "image/$type" if $type =‾ /gif|tiff/i;
	$type = "application/postscript" if $type =‾ /PS/i;

	print "¥nContent-Type: $type¥n¥n";

    }elsif($access_type eq ""){
	&param('access-type', 'x-relative');
	&unescape;
	&param('name', $_);

	print "¥nContent-Type: message¥n¥n";
    }else{
	warn "unknown access type: $access_type in $_";
    }
}

print "--$boundary--¥n";

sub unescape{
    s/%(¥w¥w)/sprintf("%c",hex($1))/ge;
}

sub param{
    local($p, $v) = @_;
    # quote tspecials in parameter values
    $v = '"'.$v.'"' if $v =‾ m-[¥s()<>@,;:¥¥¥"¥/¥[¥]?¥.=]-;
    print "¥t;$p=$v¥n";
}

sub hostport{
    if(s-//([^:/]+)--){
	&param('host', $1);
	&param('port', $1)  if s/:(¥d+)//;
	1;
    }else{
	0;
    }
}


--Interpart.Boundary.keAvi9O0M2U=AU4XRw
Content-Type: multipart/mixed; 
	boundary="Alternative.Boundary.keAvi9O0M2U=8U4XMt"

--Alternative.Boundary.keAvi9O0M2U=8U4XMt
Content-type: text/richtext; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

<nl>
I am on the WWW mailing list and got this interesting tidbit of which I though=
t you should be aware...<nl>
      -- Darren<nl>
<nl>
<nl>
<smaller><nl>
Return-Path: <lt>new@ee.udel.edu><nl>
Received: from thumper.bellcore.com by nevada.bellcore.com (4.1/4.7)<nl>
	id <lt>AA08378> for dnew; Mon, 8 Jun 92 15:50:28 EDT<nl>
Received: from udel.edu (louie.udel.edu) by thumper.bellcore.com (4.1/4.7)<nl>=

	id <lt>AA01533> for dnew@nevada; Mon, 8 Jun 92 15:50:25 EDT</smaller><smaller><nl>
Received: from snow-white.ee.udel.edu by louie.udel.edu id ah01113;<nl>
          8 Jun 92 15:45 EDT<nl>
Received: from louie.udel.edu by snow-white.ee.udel.edu id aa01403;<nl>
          8 Jun 92 18:34 GMT<nl>
Received: from CEARN.cern.ch by pucc.Princeton.EDU (IBM VM SMTP V2R2)<nl>
   with BSMTP id 0017; Sat, 06 Jun 92 18:56:24 EDT<nl>
Received: from CEARN by CEARN.cern.ch (Mailer R2.07B) with BSMTP id 7873; Sun,=
<nl>
 07 Jun 92 00:35:28 SET<nl>
Received: from dxmint.cern.ch by CEARN.cern.ch (IBM VM SMTP V2R1) with TCP;<nl=
>
   Sun, 07 Jun 92 00:35:21 SET<nl>
Received: by dxmint.cern.ch (dxcern) (5.57/3.14)<nl>
	id AA02301; Sun, 7 Jun 92 00:34:37 +0200<nl>
Received: from dxmint.cern.ch by  nxoc01.cern.ch  (NeXT-1.0 (From Sendmail<nl>=

 5.52)/NeXT-2.0)<nl>
	id AA08529; Sun, 7 Jun 92 00:34:17 MET DST<nl>
Received: by dxmint.cern.ch (dxcern) (5.57/3.14)<nl>
	id AA02281; Sun, 7 Jun 92 00:32:19 +0200<nl>
Received: from pixel.convex.com by convex.convex.com (5.64/1.35)<nl>
	id AA04364; Sat, 6 Jun 92 17:32:01 -0500<nl>
Received: from localhost by pixel.convex.com (5.64/1.28)<nl>
	id AA23867; Sat, 6 Jun 92 17:31:59 -0500<nl>
Message-Id: <lt>9206062231.AA23867@pixel.convex.com><nl>
To: www-interest@nxoc01.cern.ch<nl>
Subject: revised MIME architecture<nl>
Mime-Version: 1.0<nl>
Content-Type: multipart/mixed;boundary=3Dcut-here<nl>
Date: Sat, 06 Jun 92 17:31:58 CDT<nl>
From: Dan Connolly <lt>connolly@pixel.convex.com><nl>
Resent-Date:  Mon, 8 Jun 92 18:34:59 GMT<nl>
Resent-From: new@ee.udel.edu<nl>
Resent-To: dnew@thumper.bellcore.com</smaller><nl>
<nl>
In an earlier message, I proposed we make the W3 project<nl>
interoperate with MIME systems. I made the mistake<nl>
of using existing names for formats and types that<nl>
don't yet exist.<nl>
<nl>
I'd like to make a more organized transition to MIME<nl>
interoperability.<nl>
<nl>
First, we define some types for existing web servers<nl>
and documents.<nl>
<nl>
X-HTTP is an access-type for message/external-body body<nl>
parts to access existing W3 servers.<nl>
Additional parameters include host, port, path, and anchor.<nl>
<nl>
X-HTML is a subtype of text for existing W3 documents.<nl>
<nl>
So the next part of this message is an HTML document expressed<nl>
as a MIME external-body message.<nl>
<nl>
<nl>

--Alternative.Boundary.keAvi9O0M2U=8U4XMt
Content-type: message/external-body;
	access-type="X-HTTP";
	host="info.cern.ch";
	port="2784";
	path="/hypertext/WWW/TheProject.html"
Content-Description: Object of type 'message/external-body;

Content-type: text/X-HTML




--Alternative.Boundary.keAvi9O0M2U=8U4XMt
Content-type: text/richtext; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

<nl>
Then we address limitations in the existing format with two<nl>
new types:<nl>
<nl>
In order to encapsulate multimedia objects in web nodes,<nl>
we define X-HYPERTEXT to be a subtype of the multipart body type.<nl>
The first part of a multipart/X-HYPERTEXT is the content of the hypertext.<nl>=

The other parts are multimedia attachments and links to other documents.<nl>
<nl>
The user agent (WWW client) displays the first part and allows the<nl>
user to choose attachments and/or links. The attachments and links<nl>
will be displayed in addition to or in place of the original content.<nl>
<nl>
Then, in order to formalize the structure of hypertext parts,<nl>
we define X-SGML to be a subtype of text. The body of an X-SGML part must<nl>
be a complete SGML document. The user agent (WWW client) will resolve<nl>
external entities (such as the DTD and the mutlimedia attachments).<nl>
<nl>
So here's a multimedia web node expressed as MIME body part:<nl>
<nl>
<nl>

--Alternative.Boundary.keAvi9O0M2U=8U4XMt
Content-type: text/SGML
Content-Description: Object of type 'text/SGML
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE WEB-NODE SYSTEM
[
<!ENTITY UDI001 SDATA "HTTP://info.cern.ch/hypertext/WWW/TheProject.html"=
>
<!ENTITY part3 SDATA "part3">
]>
<TITLE>Sample mutlimedia web node</TITLE>
<SECTION><H1>Old features</H1>
Here's a link to some info at cern:
 <A HREF=3DUDI001>cern stuff</A>
<SECTION><H2>New features</H2>
Here's a picture: <IMAGE ATTACHMENT=3Dpart3>




--Alternative.Boundary.keAvi9O0M2U=8U4XMt
Content-type: text/richtext; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

<nl>
<nl>

--Alternative.Boundary.keAvi9O0M2U=8U4XMt
Content-type: message/external-body 	;
	access-type="X-HTTP 	";
	host="info.cern.ch";
	name="/hypertext/WWW/TheProject.html"
Content-Description: Object of type 'message/external-body

Content-Type: text/X-HTML



--Alternative.Boundary.keAvi9O0M2U=8U4XMt
Content-type: text/richtext; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

<nl>
<nl>

--Alternative.Boundary.keAvi9O0M2U=8U4XMt
Content-type: image/gif
Content-Description: Object of type 'image/gif
Content-Transfer-Encoding: base64

R0lGODdhdQAvAIQAAL9/v3+ff39/f/+/f/+ff/9/f3+fv///v39/v//fv/+/v/+fv/9/v7+/
f7+ff79/f//////f/7/fv7+/v7+fvwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
ACwAAAAAdQAvAAAF/uARH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lOGc8dEpKdBzvl
+FoaVXkmbHyT46A8F7rTg17wpuaUXBYP9smLihJ3DwRl+XL3O6YlMosRjar4PGlP8fEwizW0
5x+dejBBjlQAwEPqU+PJUbSCT56n3KKlxoewiKqskwpzIAQP1lD33bStZbzgR78HPsZWTpB7
DWQikeq9GkoVqZ1N7D1hyEOGXm6WMFWqDi8HQ3MeM4ZbJSbu5DlUhY21sgAY61zHh9cyltK0
zcwrakva2uX+0ZVVHaU8/jsaSGYmN4el/aIB/OhMZDbznAEFIjQvV6lhljV86wviTQfpSaYx
NpFF7SxqmancZlZVnmSdnDq3ODkHCg+90y2lJzXoRQwmDIMMdSA92SdLoJLPrPoEpPscqdLK
PhW1RWXnXW+KRmO6koKHPKkiiXlK1qZ1h/784hbXy1/wVVim+nzlA8mrxdemNWHr5eFV7dpM
t57UdkB2p051O1nyNfam2luwVcUYQe2prFI1HKtMNRpZAPzzqmjl6EKv+sca4ni0hy3yiitV
ADIr9sprbB8pYfjlTt7ze/1cMgTZ7FJWTtbFUrZcA10JZaTqcKzDPCxyUVliPx/WXMtiAHkn
KchJNbO1sf/87YjLqsXLehmVS0urA0yMSmEyjZQPZOxhF2rovuZWACEAADs=



--Alternative.Boundary.keAvi9O0M2U=8U4XMt
Content-type: text/richtext; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

<nl>
And here's the DTD for WEB-NODE documents:<nl>
<nl>
<lt>!-- This DTD was produced by DeveGram on Tue Jun  2 18:58:16 1992 --><nl>
<lt>!-- and hand-edited by connolly@convex.com --><nl>
<nl>
<lt>!--     Parameter Entities       --><nl>
<nl>
<lt>!--      Terminal symbols        --><nl>
<nl>
<lt>!ENTITY % words "#PCDATA" ><nl>
<nl>
<lt>!--    Non-ELEMENT symbols       --><nl>
<nl>
<lt>!ENTITY % inline	"%words | A" ><nl>
<lt>!ENTITY % text         "%inline | P | IMAGE" ><nl>
<lt>!ENTITY % heading "H1|H2|H3|H4|H5|H6" ><nl>
<nl>
<lt>!ENTITY lt "<lt>"><nl>
<lt>!ENTITY gt ">"><nl>
<lt>!ENTITY amp "&"><nl>
<nl>
<lt>!ENTITY lt. "<lt>"><nl>
<lt>!ENTITY gt. ">"><nl>
<lt>!ENTITY amp. "&"><nl>
<nl>
<lt>!--     Document structure       --><nl>
<nl>
<lt>!ELEMENT WEB-NODE	O O  (TITLE, NEXTID?, ISINDEX?, section+, ADDRESS?)><nl>=

<nl>
<lt>!ELEMENT TITLE	- -  (%inline)+><nl>
<lt>!ELEMENT ADDRESS - - (%text)+><nl>
<nl>
<lt>!ELEMENT NEXTID - O EMPTY ><nl>
<lt>!ATTLIST NEXTID N NUMBER #IMPLIED><nl>
<nl>
<lt>!ELEMENT ISINDEX - O EMPTY ><nl>
<nl>
<nl>
<lt>!ELEMENT section O O ((%heading)?,<nl>
			(<nl>
			%text |<nl>
			section |<nl>
			MENU |<nl>
			UL |<nl>
			OL |<nl>
			DIR |<nl>
			DL)+)><nl>
<nl>
<lt>!ELEMENT (H1|H2|H3|H4|H5|H6)	- -  (%inline) ><nl>
<nl>
<lt>!ELEMENT P	- O  EMPTY -- paragraph SEPARATOR --><nl>
<nl>
<lt>!ELEMENT IMAGE - O  EMPTY><nl>
<lt>!ATTLIST IMAGE ATTACHMENT ENTITY #REQUIRED><nl>
<nl>
<lt>!ELEMENT A	- -  (%inline)+><nl>
<lt>!ATTLIST A<nl>
	NAME CDATA #IMPLIED<nl>
	HREF ENTITY #IMPLIED<nl>
	TYPE CDATA #IMPLIED --@@-- ><nl>
<nl>
<lt>!ELEMENT MENU	- -  (LI+)><nl>
<nl>
<lt>!ELEMENT UL	- -  (LI+)><nl>
<nl>
<lt>!ELEMENT OL	- -  (LI+)><nl>
<nl>
<lt>!ELEMENT DIR	- -  (LI+)><nl>
<nl>
<lt>!ELEMENT LI	- O  (%text)+><nl>
<nl>
<lt>!ELEMENT DL	- -  ((DT, DD)+)><nl>
<nl>
<lt>!ELEMENT DT	- O  (%inline)+><nl>
<nl>
<lt>!ELEMENT DD	- O  (%text)+><nl>
<nl>
And here's a perl script to convert an HTML document<nl>
into a multipart/X-HYPERTEXT MIME body part:<nl>
<nl>
#!/usr/local/bin/perl<nl>
<nl>
$boundary =3D "attachment";<nl>
print "Content-Type: multipart/X-HYPERTEXT; boundary=3D$boundary¥n¥n";<nl>
<nl>
print "--$boundary¥n";<nl>
print "Content-Type: text/SGML¥n¥n";<nl>
<nl>
print "<lt>!DOCTYPE WEB-NODE SYSTEM ¥n[¥n";<nl>
<nl>
@html =3D <lt>>;			# read whole file<nl>
$_ =3D join('', @html);<nl>
$out =3D '';<nl>
<nl>
sub fix_anchor{<nl>
    local($name, $href, $type);<nl>
<nl>
    # What exactly is the syntax of an SGML attribute value?<nl>
    while(s/^(¥w+)¥s*=3D¥s*((¥"[^¥"]*¥")|([^¥s>]+))¥s*//){<nl>
	local($v) =3D ($3 || $4);<nl>
	local($a) =3D $1;<nl>
	$href =3D $v if $a =3D‾ /^href$/i;<nl>
	$name =3D $v if $a =3D‾ /^name$/i;<nl>
	$type =3D $v if $a =3D‾ /^type$/i;<nl>
    }<nl>
    s/[^>]*>//;<nl>
<nl>
    $out .=3D "<lt>A";<nl>
    $out .=3D " NAME=3D¥"$name¥"" if $name ne '';<nl>
    $out .=3D " TYPE=3D¥"$type¥"" if $type ne '';<nl>
    if($href ne ''){<nl>
	if(!defined($anchor{$href})){<nl>
	    $anchor{$href} =3D ++$anchor;<nl>
	}<nl>
	$out .=3D " HREF=3D" . $anchor{$href};<nl>
    }<nl>
    $out .=3D ">";<nl>
}<nl>
<nl>
$header =3D 0;<nl>
$anchor =3D "UDI000";<nl>
while(/<lt>/){<nl>
    $out .=3D $`;<nl>
    $_ =3D $';<nl>
    if(s/^A¥s+//i){<nl>
	&fix_anchor;<nl>
    }elsif(s/^NEXTID¥s+(¥d+)¥s*>//){<nl>
	$out .=3D "<lt>NEXTID N=3D$1>";<nl>
    }elsif(s/^H(¥d)>//){<nl>
	local($n) =3D $1;<nl>
	while($n<lt>=3D$header){ $out .=3D "<lt>/SECTION>"; $header--; }<nl>
	while($n>$header){ $out .=3D "<lt>SECTION>"; $header++; }<nl>
	$out .=3D "<lt>H$n>";<nl>
    }else{<nl>
	$out .=3D '<lt>';<nl>
    }<nl>
}<nl>
<nl>
$out .=3D $_;<nl>
<nl>
foreach(keys %anchor){<nl>
    local($ent) =3D $anchor{$_};<nl>
<nl>
    print "<lt>!ENTITY $ent SDATA ¥"$_¥">¥n";<nl>
}<nl>
<nl>
print "]>¥n", $out;<nl>
<nl>
foreach(keys %anchor){<nl>
    local($access_type);<nl>
<nl>
    print "¥n¥n--$boundary¥n";<nl>
    print "Content-id: $_¥n";<nl>
    print "Content-type: message/external-body¥n";<nl>
<nl>
    $access_type =3D $1 if s/^(¥w+)://;<nl>
<nl>
    if(s/#([^#]+)$//){<nl>
	print "¥t;x-anchor=3D¥"$1¥"¥n";<nl>
    }<nl>
<nl>
    if($access_type =3D‾ /file/i){<nl>
	if(&hostport){<nl>
	    &param('access-type', "ANON-FTP");<nl>
	}else{<nl>
	    &param('access-type', 'LOCAL-FILE');<nl>
	}<nl>
	&param('name', $_);<nl>
<nl>
	print "¥nContent-Type: application/octet-stream¥n¥n";<nl>
    }elsif($access_type =3D‾ /http/i){<nl>
	&param('access-type', 'X-HTTP');<nl>
	&hostport;<nl>
	&unescape;<nl>
	&param('name', $_);<nl>
<nl>
	print "¥nContent-Type: text/X-HTML¥n¥n";<nl>
    }elsif($access_type =3D‾ /news/i){<nl>
	&param('access-type', 'X-NEWS');<nl>
	&unescape;<nl>
	if(/@/){<nl>
	    &param('message-id', $_);<nl>
	}else{<nl>
	    &param('group', $_);<nl>
	}<nl>
<nl>
	print "¥nContent-Type: message¥n¥n";<nl>
<nl>
    }elsif($access_type =3D‾ /telnet/i){<nl>
	&param('access-type', 'x-telnet');<nl>
	&unescape;<nl>
	&param('user', $1) if s/^(.*)@//;<nl>
	&param('port', $1) if s/:(.*)$//;<nl>
	&param('site', $_);<nl>
<nl>
	print "¥nContent-Type: X-TELNET¥n¥n";<nl>
<nl>
    }elsif($access_type =3D‾ /gopher/i){<nl>
	&param('access-type', 'x-gopher');<nl>
	&hostport;<nl>
	&param('type', $1) if s-^/(¥d+)/--;<nl>
	&unescape;<nl>
	&param('selector', $_);<nl>
<nl>
	print "¥nContent-Type: @@@@¥n¥n";<nl>
<nl>
    }elsif($access_type =3D‾ /wais/i){<nl>
	&param('access-type', 'x-wais');<nl>
	&hostport;<nl>
	if(m-^/-){<nl>
	    &param('type', $1) if s-^/(¥w+)--;<nl>
	    &param('size', $1) if s-^/(¥d+)--;<nl>
	    &unescape;<nl>
	    &param('path', $_);<nl>
	}else{<nl>
	    &unescape;<nl>
	    &param('words', $1) if /¥?(.*)/;<nl>
	}<nl>
<nl>
	$type =3D "image/$type" if $type =3D‾ /gif|tiff/i;<nl>
	$type =3D "application/postscript" if $type =3D‾ /PS/i;<nl>
<nl>
	print "¥nContent-Type: $type¥n¥n";<nl>
<nl>
    }elsif($access_type eq ""){<nl>
	&param('access-type', 'x-relative');<nl>
	&unescape;<nl>
	&param('name', $_);<nl>
<nl>
	print "¥nContent-Type: message¥n¥n";<nl>
    }else{<nl>
	warn "unknown access type: $access_type in $_";<nl>
    }<nl>
}<nl>
<nl>
print "--$boundary--¥n";<nl>
<nl>
sub unescape{<nl>
    s/%(¥w¥w)/sprintf("%c",hex($1))/ge;<nl>
}<nl>
<nl>
sub param{<nl>
    local($p, $v) =3D @_;<nl>
    # quote tspecials in parameter values<nl>
    $v =3D '"'.$v.'"' if $v =3D‾ m-[¥s()<lt>>@,;:¥¥¥"¥/¥[¥]?¥.=3D]-;<nl>
    print "¥t;$p=3D$v¥n";<nl>
}<nl>
<nl>
sub hostport{<nl>
    if(s-//([^:/]+)--){<nl>
	&param('host', $1);<nl>
	&param('port', $1)  if s/:(¥d+)//;<nl>
	1;<nl>
    }else{<nl>
	0;<nl>
    }<nl>
}<nl>
<nl>

--Alternative.Boundary.keAvi9O0M2U=8U4XMt--

--Interpart.Boundary.keAvi9O0M2U=AU4XRw--