-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrfc2629-README.xml
1223 lines (1083 loc) · 41.8 KB
/
rfc2629-README.xml
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
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version='1.0'?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>
<?rfc comments='yes'?>
<?rfc docmapping='yes'?>
<?rfc inline='no'?>
<?rfc compact='no'?>
<?rfc editing='no'?>
<?rfc header='README'?>
<?rfc private='The README file'?>
<?rfc subcompact='no'?>
<?rfc symrefs='no'?>
<?rfc toc='yes'?>
<?rfc tocappendix='no'?>
<?rfc tocindent='no'?>
<rfc>
<front>
<title>xml2rfc v1.36pre1</title>
<author initials='M.T.' surname='Rose' fullname='Marshall T. Rose'>
<organization>Dover Beach Consulting, Inc.</organization>
<address>
<postal>
<street>POB 255268</street>
<city>Sacramento</city> <region>CA</region> <code>95865-5268</code>
<country>US</country>
</postal>
<phone>+1 916 483 8878</phone>
<email>[email protected]</email>
</address>
</author>
<author fullname="Bill Fenner" initials="B." surname="Fenner">
<organization>Arista Networks, Inc.</organization>
<address>
<postal>
<street>275 Middlefield Rd, Suite 50</street>
<city>Menlo Park</city>
<region>CA</region>
<code>94025</code>
<country>US</country>
</postal>
<phone>+1 650 924-2455</phone>
<email>[email protected]</email>
</address>
</author>
<author initials='C.' surname='Levert' fullname='Charles Levert'>
<organization/>
<address>
<postal>
<street/>
<city>Montréal</city>
<region>QC</region>
<country>Canada</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author initials='T.' surname='Hansen' fullname='Tony Hansen'>
<organization>AT&T Labs</organization>
<address>
<postal>
<street/>
<city>Middletown</city>
<region>NJ</region>
<country>USA</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author initials="J. F." surname="Reschke" fullname="Julian F. Reschke">
<organization abbrev="greenbytes">greenbytes GmbH</organization>
<address>
<postal>
<street>Hafenweg 16</street>
<city>Muenster</city><region>NW</region><code>48155</code>
<country>Germany</country>
</postal>
<email>[email protected]</email>
<uri>http://greenbytes.de/tech/webdav/</uri>
</address>
</author>
<date month='January' year='2011' />
</front>
<middle>
<section title='Introduction'>
<t>This is a package to convert memos written in XML to the RFC format.</t>
<t>If you don't want to install any software,
you can use the
<eref target='http://xml.resource.org/'>web-based service</eref>.</t>
</section>
<section title='Requirements'>
<t>You need to have Tcl/Tk version 8 running on your system.
Tcl is a scripting language,
Tk is Tcl with support for your windowing system.</t>
<t>To get a source or binary distribution for your system,
go to the
<eref target='http://www.tcl.tk/software/tcltk/8.4.html'>Tcl Developer Xchange website</eref>
and install it.
If you get the binary distribution,
this is pretty simple.</t>
<figure>
<preamble>Of course,
you may already have Tcl version 8.
To find out,
try typing this command from the shell
(or the “MS-DOS Prompt”):</preamble>
<artwork>
% tclsh
</artwork>
<postamble>If the program launches,
you're good to go with Tcl version 8.</postamble>
</figure>
<figure>
<preamble>If you are running under a windowing system (e.g., X or MS-Windows),
you can also try:</preamble>
<artwork>
% wish
</artwork>
<postamble>If a new window comes up along with a “Console” window,
then you're good to go with Tk version 8.</postamble>
</figure>
<t>Finally,
you may notice a file called <spanx style='verb'>xml2sgml.tcl</spanx>
in the distribution.
It contains some extra functionality for a few special users —
so, if you don't know what it is, don't worry about it...</t>
</section>
<section title='Testing'>
<t>Now test your installation.</t>
<section title='Testing under a windowing system'>
<figure>
<preamble>Type this command from the shell:</preamble>
<artwork>
% xml2rfc.tcl
</artwork>
</figure>
<figure>
<preamble>A new window should come up that looks like this:</preamble>
<artwork align='center' src='xml2rfc-win.png'
alt='[“Convert XML to RFC” window]'
width='486' height='174'>
+------------------------------------------------------------+
| Convert XML to RFC |
| |
| Select input file: ____________________________ [Browse] |
| |
| Select output file: ____________________________ [Browse] |
| |
| [Convert] [Quit] |
| |
+------------------------------------------------------------+
</artwork>
<postamble>Fill-in the blanks and click on [Convert].</postamble>
</figure>
</section>
<section title='Testing without a windowing system'>
<figure>
<preamble>Type this command from the shell:</preamble>
<artwork>
% tclsh
</artwork>
</figure>
<figure>
<preamble>If the program launches, type this command to it:</preamble>
<artwork>
% source xml2rfc.tcl
</artwork>
</figure>
<figure>
<preamble>and you should see these five lines:</preamble>
<artwork>
invoke as "xml2rfc input-file output-file"
or "xml2txt input-file"
or "xml2html input-file"
or "xml2nroff input-file"
or "xml2unpg input-file"
</artwork>
</figure>
</section>
</section>
<section title='Next steps'>
<t>Read the <eref target='draft-mrose-writing-rfcs.html'>2629bis</eref>
document.
In particular,
<eref target='draft-mrose-writing-rfcs.html#anchor13'>Section 3</eref>
has some good information.</t>
<section anchor='processing.instructions' title='Processing Instructions'>
<figure>
<preamble>A <spanx style='emph'>processing instruction</spanx> contains
directives to an XML application.
If you want to give directives to <spanx style='strong'>xml2rfc</spanx>,
the processing instructions (PIs) look like this:</preamble>
<artwork>
<?rfc keyword='value'?>
</artwork>
<postamble>Of course,
if you like the default behavior,
you don't need any behavior-modifying directives in your input file!
Although <spanx style='strong'>xml2rfc</spanx>
supports putting several attribute-like directives in one PI,
be warned that there are issues in
doing this for a non-include-file directive following an
<xref target='include.file.facility'>include-file directive</xref>.
It is good practice to always surround the value with either
single or double quotes.</postamble>
</figure>
<section title='Option Settings'>
<texttable align='left'>
<preamble>The list of valid keywords are:</preamble>
<ttcol align='right'>keyword</ttcol>
<ttcol align='center'>default</ttcol>
<ttcol align='left'>meaning</ttcol>
<c>artworkdelimiter</c>
<c>""</c>
<c>when producing txt or nroff files, use this string to delimit artwork</c>
<c>artworklines</c>
<c>0</c>
<c>when producing txt or nroff files, add this many blank lines around artwork</c>
<c>authorship</c>
<c>yes</c>
<c>render author information</c>
<c>autobreaks</c>
<c>yes</c>
<c>automatically force page breaks to avoid widows and orphans (not perfect)</c>
<c>background</c>
<c>""</c>
<c>when producing a html file, use this image</c>
<c>colonspace</c>
<c>no</c>
<c>put two spaces instead of one after each colon (“:”) in txt or nroff files</c>
<c>comments</c>
<c>no</c>
<c>render <cref> information</c>
<c>compact</c>
<c>(rfcedstyle)</c>
<c>when producing a txt/nroff file, try to conserve vertical whitespace
(the default value is the current value of the rfcedstyle PI)</c>
<c>docmapping</c>
<c>no</c>
<c>use hierarchical tags (e.g., <h1>, <h2>, etc.)
for (sub)section titles</c>
<c>editing</c>
<c>no</c>
<c>insert editing marks for ease of discussing draft versions</c>
<c>emoticonic</c>
<c>no</c>
<c>automatically replaces input sequences such as
<spanx style='verb'>|*text|</spanx> by, e.g.,
<spanx style='verb'><strong>text</strong></spanx>
in html output</c>
<c>footer</c>
<c>""</c>
<c>override the center footer string</c>
<c>header</c>
<c>""</c>
<c>override the leftmost header string</c>
<c>include</c>
<c>n/a</c>
<c>see <xref target='include.file.facility' /></c>
<c>inline</c>
<c>no</c>
<c>if comments is "yes",
then render comments inline;
otherwise render them in an “Editorial Comments” section</c>
<c>iprnotified</c>
<c>no</c>
<c>include boilerplate from Section 10.4(d) of <xref target='RFC2026' /></c>
<c>linkmailto</c>
<c>yes</c>
<c>generate mailto: URL, as appropriate</c>
<c>linefile</c>
<c>n/a</c>
<c>a string like "35:file.xml" or just "35"
(file name then defaults to the containing file's real name
or to the latest linefile specification that changed it)
that will be used to override <spanx style='strong'>xml2rfc</spanx>'s
reckoning of the current input position (right after this PI)
for warning and error reporting purposes (line numbers are 1-based)</c>
<c>needLines</c>
<c>n/a</c>
<c>an integer hint indicating how many contiguous lines are needed at this point in the output</c>
<c>notedraftinprogress</c>
<c>yes</c>
<c>generates "(work in progress)", as appropriate</c>
<c>private</c>
<c>""</c>
<c>produce a private memo rather than an RFC or Internet-Draft</c>
<c>refparent</c>
<c>"References"</c>
<c>title of the top-level section containing all references</c>
<c>rfcedstyle</c>
<c>no</c>
<c>attempt to closely follow finer details
from the latest observable RFC-Editor style
so as to minimize the probability of
being sent back corrections after submission;
this directive is a kludge whose exact behavior
is likely to change on a regular basis
to match the current flavor of the month;
presently,
it will capitalize the adjective “This”
in automatically generated headings,
use the variant “acknowledgement” spelling instead of
Merriam Webster's main “acknowledgment” dictionary entry,
use the “eMail” spelling instead of
Knuth's more modern “email” spelling,
only put one blank line instead of two before top sections,
omit “Intellectual Property and Copyright Statements”
and “Author's Address” from the table of content,
and not limit the indentation to a maximum tag length
in <references> sections.
</c>
<c>rfcprocack</c>
<c>no</c>
<c>if there already is an automatically generated Acknowledg(e)ment section,
pluralize its title and add a short sentence acknowledging that
<spanx style='strong'>xml2rfc</spanx> was used in the document's production
to process an input XML source file in RFC-2629 format</c>
<c>slides</c>
<c>no</c>
<c>when producing a html file, produce multiple files for a slide show</c>
<c>sortrefs</c>
<c>no</c>
<c>sort references</c>
<c>strict</c>
<c>no</c>
<c>try to enforce the ID-nits conventions and DTD validity</c>
<c>subcompact</c>
<c>(compact)</c>
<c>if compact is "yes",
then you can make things a little less compact by setting this to "no"
(the default value is the current value of the compact PI)</c>
<c>symrefs</c>
<c>yes</c>
<c>use anchors rather than numbers for references</c>
<c>text-list-sybols</c>
<c>o*+-</c>
<c>modify the list of symbols used (when generated text) for list type="symbols".
For example, specifying "abcde" will cause "a" to be used for 1st level, "b" for the 2nd level, etc, cycling back to the first character "a" at the 6th level.
Specifying "o*" will cause the characters "o" and "*" to be alternated for each successive level.
</c>
<c>toc</c>
<c>no</c>
<c>generate a table-of-contents</c>
<c>tocappendix</c>
<c>yes</c>
<c>control whether the word “Appendix” appears in the table-of-content</c>
<c>tocdepth</c>
<c>3</c>
<c>if toc is "yes", then this determines the depth of the table-of-contents</c>
<c>tocindent</c>
<c>yes</c>
<c>if toc is "yes", then setting this to "yes" will indent subsections
in the table-of-contents</c>
<c>tocnarrow</c>
<c>yes</c>
<c>affects horizontal spacing in the table-of-content</c>
<c>tocompact</c>
<c>yes</c>
<c>if toc is "yes", then setting this to "no" will make it a little less compact</c>
<c>topblock</c>
<c>yes</c>
<c>put the famous header block on the first page</c>
<c>typeout</c>
<c>n/a</c>
<c>during processing pass 2, print the value to standard output
at that point in processing</c>
<c>useobject</c>
<c>no</c>
<c>when producing a html file,
use the <spanx style='verb'><object></spanx> html element with inner replacement content
instead of the <spanx style='verb'><img></spanx> html element,
when a source xml element includes an <spanx style='verb'>src</spanx> attribute</c>
<postamble>Remember that,
as with everything else in XML,
keywords and values are case-sensitive.</postamble>
</texttable>
<t>With the exception of the <spanx style='verb'>needLines</spanx>,
<spanx style='verb'>typeout</spanx>, and
<spanx style='verb'>include</spanx> directives,
you normally put all of these processing instructions at the beginning
of the document
(right after the XML declaration).</t>
</section>
<section title='Include Files' anchor='include.file.facility'>
<figure>
<preamble><spanx style='strong'>xml2rfc</spanx> has an include-file facility,
e.g.,</preamble>
<artwork>
<?rfc include='file'?>
</artwork>
<postamble><spanx style='strong'>xml2rfc</spanx> will consult the
<spanx style='verb'>XML_LIBRARY</spanx> environment variable for a
search path of where to look for files.
(If this environment variable isn't set,
the directory containing the file that contains the include-file
directive is used.)
The file's contents are inserted right after the PI.
Putting non-include-file directives (especially needLines ones)
after an include-file one in the same PI
may not work as expected because of this.
Remember that file names are generally case-sensitive and that
an input file that is distributed to the outside world may be
processed on a different operating system than that used by
its author.</postamble>
</figure>
<figure>
<preamble>You can also have <spanx style='strong'>xml2rfc</spanx> set
the <spanx style='verb'>XML_LIBRARY</spanx> environment variable directly,
by creating a file called <spanx style='verb'>.xml2rfc.rc</spanx> in
the directory where your
main file is,
e.g.,</preamble>
<artwork><![CDATA[
global env tcl_platform
if {![string compare $tcl_platform(platform) windows]} {
set sep ";"
} else {
set sep ":"
}
if {[catch { set env(XML_LIBRARY) } library]} {
set library ""
foreach bibxmlD [lsort -dictionary \
[glob -nocomplain $HOME/rfcs/bibxml/*]] {
append library $sep$bibxmlD
}
}
set nativeD [file nativename $inputD]
if {[lsearch [split $library $sep] $nativeD] < 0} {
set library "$nativeD$sep$library"
}
set env(XML_LIBRARY) $library
]]></artwork>
</figure>
<t>There are links to various bibliographic databases (RFCs, I-Ds, and so on)
on the <spanx style='strong'>xml2rfc</spanx>
<eref target='http://xml.resource.org/'>homepage</eref>.</t>
</section>
</section>
</section>
<section title='The Page Model'>
<t>The <spanx style='strong'>html</spanx>
rendering engine does not need to
have a tightly defined page model.</t>
<t>The <spanx style='strong'>txt</spanx> and
<spanx style='strong'>nr</spanx> rendering engines
assume the following page model.</t>
<t>Each line has at most 72 columns from the left edge,
including any left margin, but excluding the line terminator.
Every output character is from the ASCII repertoire
and the only control character used is the line-feed (LF);
the character-tabulation (HT) character is never used.</t>
<t>Each page has the following lines
(in 1-based numbering, as reported to the user, but contrary to
<spanx style='strong'>xml2rfc</spanx>'s
internal 0-based numbering):<list>
<t> 1: header line (blank line on first page)</t>
<t> 2: blank line</t>
<t> 3: blank line</t>
<t> 4: 1st line of content</t>
<t>...</t>
<t>51: 48th line of content</t>
<t>52: blank line</t>
<t>53: blank line</t>
<t>54: blank line</t>
<t>55: footer line</t>
<t>56: form-feed character (followed by line terminator)</t>
</list>
Once processed through <spanx style='strong'>nroff</spanx>
and the <spanx style='verb'>fix.sh</spanx> script (from
<eref target='ftp://ftp.rfc-editor.org/in-notes/rfc-editor/2-nroff.template'
>2-nroff.template</eref>), the <spanx style='strong'>nr</spanx>
output differs from this in two ways.
It has three extra blank lines
(that could be numbered -2, -1, and 0, for a total of six)
at the very beginning of the document
(so the first page is that much longer).
It also has no line terminator following the
very last form-feed character of the file.
These differences originate in the design of
the <spanx style='verb'>fix.sh</spanx> script.</t>
<t>Header and footer lines each have three parts:
left, center, and right.</t>
</section>
<section title='Additions to RFC 2629'>
<t>A few additions have been made to the format originally defined in
RFC 2629.
In particular,
<eref target='draft-mrose-writing-rfcs.html#anchor19'>Appendix C</eref>
of the 2629bis document enumerates the additions.</t>
<section title='Extra Attributes'>
<t>In addition,
<spanx style='strong'>xml2rfc</spanx> recognizes the undocumented
<spanx style='verb'>src</spanx>,
<spanx style='verb'>alt</spanx>,
<spanx style='verb'>width</spanx>, and
<spanx style='verb'>height</spanx> attributes in the
<spanx style='verb'>figure</spanx> and
<spanx style='verb'>artwork</spanx> elements,
but only if HTML is being generated.
Here are two examples, one for each case.</t>
<figure>
<preamble>Here, the attributes are added to the
<spanx style='verb'>artwork</spanx> element.</preamble>
<artwork align='center'><![CDATA[
<figure>
<preamble>This is the preamble.</preamble>
<artwork src='layers.png'
alt='[picture of layers only]'>
.-----------.
| ASCII art |
`-----------'
</artwork>
<postamble>This is the postamble.</postamble>
</figure>
]]></artwork>
<postamble>In this case, the
<spanx style='verb'>preamble</spanx> and
<spanx style='verb'>postamble</spanx> elements are kept and
an <spanx style='verb'>img</spanx> tag is placed in the HTML output
to replace the whole <spanx style='verb'>artwork</spanx> element
and its textual drawing, which are ignored.</postamble>
</figure>
<figure>
<preamble>Here, the attributes are added to the
<spanx style='verb'>figure</spanx> element.</preamble>
<artwork align='center'><![CDATA[
<figure src='layers.png'
alt='[picture of layers and explanation]'>
<preamble>This is the preamble.</preamble>
<artwork>
.-----------.
| ASCII art |
`-----------'
</artwork>
<postamble>This is the postamble.</postamble>
</figure>
]]></artwork>
<postamble>In this case,
an <spanx style='verb'>img</spanx> tag is placed in the HTML output
to replace the whole contents of the
<spanx style='verb'>figure</spanx> element
(the <spanx style='verb'>preamble</spanx>,
<spanx style='verb'>artwork</spanx>, and
<spanx style='verb'>postamble</spanx> inner elements
and the textual drawing itself)
which are ignored.</postamble>
</figure>
<t><spanx style='strong'>xml2rfc</spanx> also recognizes
an undocumented <spanx style='verb'>align</spanx> attribute
(with possible values
<spanx style='verb'>left</spanx>,
<spanx style='verb'>center</spanx>, or
<spanx style='verb'>right</spanx>)
in the
<spanx style='verb'>figure</spanx> and
<spanx style='verb'>artwork</spanx> elements.
It affects the whole content of the targeted element
for all types of generated output.
Its default is inherited from the parent of its element.</t>
</section>
<section title='Typed-Artwork Interpretation'>
<t>The <spanx style='verb'>artwork</spanx> element from RFC 2629
supports an optional <spanx style='verb'>type</spanx> attribute.
While most possible values are just ignored,
including the special case
where the attribute is unspecified or just empty,
some values are recognized.
In particular, <spanx style='verb'>type='abnf'</spanx>
can be used if the <spanx style='verb'>artwork</spanx>
contains an Augmented Backus-Naur Form (ABNF)
syntax specification <xref target='RFC4234' />.
As a special extension in its <spanx style='emph'>behavior</spanx>,
<spanx style='strong'>xml2rfc</spanx> will attempt
to validate the syntax and colorize the HTML output of ABNF,
since it is so widely used in RFCs.
It does this colorizing by relying
on the full parsing it does right before,
not on a quick and partial (e.g., line-by-line) pattern-based hack.
ABNF is the only artwork type to benefit
from this kind of internal support at this time.
If the <spanx style='verb'>strict</spanx> rfc-PI directive is activated,
invalid ABNF content will cause <spanx style='strong'>xml2rfc</spanx>
to abort with an error message.
Omitting the <spanx style='verb'>type</spanx> attribute altogether
is the obvious way to avoid having
this validation and colorizing performed.</t>
<figure align='left'>
<preamble>For example (to be viewed in HTML):</preamble>
<artwork align='center' type='abnf'><![CDATA[
char-val = DQUOTE *(%x20-21 / %x23-7E) DQUOTE
; quoted string of SP and VCHAR
without DQUOTE
num-val = "%" (bin-val / dec-val / hex-val)
bin-val = "b" 1*BIT
[ 1*("." 1*BIT) / ("-" 1*BIT) ]
; series of concatenated bit values
; or single ONEOF range
dec-val = "d" 1*DIGIT
[ 1*("." 1*DIGIT) / ("-" 1*DIGIT) ]
hex-val = "x" 1*HEXDIG
[ 1*("." 1*HEXDIG) / ("-" 1*HEXDIG) ]
prose-val = "<" *(%x20-3D / %x3F-7E) ">"
; bracketed string of SP and VCHAR
without angles
; prose description, to be used as
last resort
]]></artwork>
<postamble>This is from the
original RFC on ABNF <xref target='RFC2234' />,
with its minor mistakes in manually folded comment lines
purposely left intact, for illustration.
Since the result is still valid ABNF
(but incorrect with respect to what was intended),
this showcases how colorizing might give a human author
(or editor or reader)
a better chance to spot the three mistakes
(and correct them, e.g., with extra semicolons,
as has been done in
a more recent version <xref target='RFC4234' />
of the ABNF specification).
Note that it is the white space characters
at the beginning of the subsequent lines
(including the commented ones)
that conspire to extend the reach of those rules
across several lines.</postamble>
</figure>
</section>
</section>
<section title='Limitations of xml2rfc'>
<t><list style='symbols'>
<t>The <spanx style='verb'>figure</spanx> element's <spanx style='verb'>title</spanx> attribute is ignored,
except when generating HTML.</t>
<t>The <spanx style='verb'>xref</spanx> element's
<spanx style='verb'>pageno</spanx> attribute is ignored.</t>
</list></t>
</section>
</middle>
<back>
<references>
<reference anchor='RFC2026'>
<front>
<title abbrev='Internet Standards Process'>The Internet Standards Process -- Revision 3</title>
<author initials='S.' surname='Bradner' fullname='Scott O. Bradner'>
<organization>Harvard University</organization>
<address>
<postal>
<street>1350 Mass. Ave.</street>
<city>Cambridge</city>
<region>MA</region>
<code>02138</code>
<country>US</country></postal>
<phone>+1 617 495 3864</phone>
<email>[email protected]</email></address></author>
<date month='October' year='1996' />
<abstract>
<t>This memo documents the process used by the Internet community for the standardization of protocols and procedures. It defines the stages in the standardization process, the requirements for moving a document between stages and the types of documents used during this process. It also addresses the intellectual property rights and copyright issues associated with the standards process.</t></abstract></front>
<seriesInfo name='BCP' value='9' />
<seriesInfo name='RFC' value='2026' />
<format type='TXT' octets='86731' target='ftp://ftp.isi.edu/in-notes/rfc2026.txt' />
</reference>
<reference anchor='RFC2234'>
<front>
<title abbrev='ABNF for Syntax Specifications'>Augmented BNF for Syntax Specifications: ABNF</title>
<author initials='D.' surname='Crocker' fullname='David H. Crocker' role='editor'>
<organization>Internet Mail Consortium</organization>
<address>
<postal>
<street>675 Spruce Dr.</street>
<city>Sunnyvale</city>
<region>CA</region>
<code>94086</code>
<country>US</country></postal>
<phone>+1 408 246 8253</phone>
<facsimile>+1 408 249 6205</facsimile>
<email>[email protected]</email></address></author>
<author initials='P.' surname='Overell' fullname='Paul Overell'>
<organization>Demon Internet Ltd.</organization>
<address>
<postal>
<street>Dorking Business Park</street>
<street>Dorking</street>
<city>Surrey</city>
<region>England</region>
<code>RH4 1HN</code>
<country>UK</country></postal>
<email>[email protected]</email></address></author>
<date year='1997' month='November' />
<keyword>ABNF</keyword>
<keyword>Augmented</keyword>
<keyword>Backus-Naur</keyword>
<keyword>Form</keyword>
<keyword>electronic</keyword>
<keyword>mail</keyword></front>
<seriesInfo name='RFC' value='2234' />
<format type='TXT' octets='24265' target='ftp://ftp.isi.edu/in-notes/rfc2234.txt' />
<format type='HTML' octets='36695' target='http://xml.resource.org/public/rfc/html/rfc2234.html' />
<format type='XML' octets='24067' target='http://xml.resource.org/public/rfc/xml/rfc2234.xml' />
</reference>
<reference anchor='RFC4234'>
<front>
<title>Augmented BNF for Syntax Specifications: ABNF</title>
<author initials='D.' surname='Crocker' fullname='D. Crocker'>
<organization /></author>
<author initials='P.' surname='Overell' fullname='P. Overell'>
<organization /></author>
<date year='2005' month='October' /></front>
<seriesInfo name='RFC' value='4234' />
<format type='TXT' octets='26351' target='ftp://ftp.isi.edu/in-notes/rfc4234.txt' />
</reference>
<reference anchor="RFC5741">
<front>
<title>RFC Streams, Headers, and Boilerplates</title>
<author initials="L." surname="Daigle" fullname="Leslie Daigle"/>
<author initials="O." surname="Kolkman" fullname="Olaf Kolkman"/>
<date month="December" year="2009"/>
</front>
<seriesInfo name="RFC" value="5741"/>
</reference>
</references>
<section title="Producing the IETF 'Boilerplate'" anchor="boilerplate">
<t>
This section was borrowed from <eref target="http://greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html#boilerplate"/>.
<!-- So please notify Julian Reschke when making edits. -->
</t>
<t>
Various attributes of the <spanx style="verb"><rfc></spanx>
element plus some child elements of <spanx style="verb"><front></spanx>
affect the automatically generated parts of the front page, such as the
tabular information at the beginning, the "Status Of This Memo", and the
"Copyright Notice".
</t>
<t>
When submitting an Internet Draft, this "boilerplate" is checked
by "Idnits" (<eref target="http://tools.ietf.org/tools/idnits/"/>) for
compliance with the current Intellectual Property rules, and thus
it is important to set the correct values.
</t>
<t>
Furthermore, the RFC Production Center uses RFC2629-based tools to
generate the final RFC text, so the more accurate the supplied information
is, the less additional work is left, and the risk for errors in producing
the final (and immutable!) document is reduced.
</t>
<t><list>
<t>
Note: this only applies to the case when IETF documents are
produced. The "private" processing instruction <iref item="private PI pseudo-attribute"/><iref item="Processing Instruction pseudo attributes" subitem="private"/>
allows to switch off most of the autogeneration logic.
</t>
</list></t>
<section title="The /rfc/@ipr Attribute" anchor="attribute-ipr">
<t>
As of the time of this writing, this attribute value can take a long list of values. As
frequently, this is not the result of a grand plan, but simply for historic
reasons. Of these values, only a few are currently in use; all others are
supported by the various tools for backwards compatibility with old source
files.
</t>
<t><list>
<t>
Note: some variations of the boilerplate are selected based
on the document's date; therefore it is important to specify the "year",
"month" and "day" attributes of the <spanx style="verb"><date></spanx> element
when archiving the XML source of an Internet Draft on the day of submission.
</t>
</list></t>
<t>
<spanx>Disclaimer: THIS ONLY PROVIDES IMPLEMENTATION INFORMATION. IF YOU NEED
LEGAL ADVICE, PLEASE CONTACT A LAWYER.</spanx>
For further information, refer to <eref target="http://trustee.ietf.org/docs/IETF-Copyright-FAQ.pdf"/>.
</t>
<t>
Finally, for the current "Status Of This Memo" text, the <spanx style="verb">submissionType</spanx> attribute
determines whether a statement about "Code Components" is inserted (this is the
case for the value "IETF", which also happens to be the default). Other values,
such as "independent", suppress this part of the text.
</t>
<section title="Current Values: '*trust200902'" anchor="attribute-ipr-current">
<t>
The name for these values refers to the "TLP" ("IETF TRUST Legal Provisions Relating
to IETF Documents"), on effect February 15, 2009 (see <eref target="http://trustee.ietf.org/license-info/archive/IETF-Trust-License-Policy-20090215.pdf"/>).
Updates to this document were published on September 12, 2009 (TLP 3.0, <eref target="http://trustee.ietf.org/license-info/archive/IETF-Trust-License-Policy-20090912.pdf"/>)
and on December 28, 2009 (TLP 4.0, <eref target="http://trustee.ietf.org/license-info/archive/IETF-Trust-License-Policy-20091228.pdf"/>),
modifying the license for code components.
The actual text is located in Section 6 ("Text To Be Included in IETF Documents")
of these documents.
</t>
<t>
The tools will automatically produce the "right" text depending on the
document's date information (see above):
</t>
<texttable align="left">
<ttcol width="10%">TLP</ttcol><ttcol>URI</ttcol><ttcol width="20%">starting with publication date</ttcol>
<c>3.0</c>
<c><eref target="http://trustee.ietf.org/license-info/archive/IETF-Trust-License-Policy-20090912.pdf"/></c>
<c>2009-11-01</c>
<c>4.0</c>
<c><eref target="http://trustee.ietf.org/license-info/archive/IETF-Trust-License-Policy-20091228.pdf"/></c>
<c>2010-04-01</c>
</texttable>
<section title="trust200902" anchor="attribute-ipr-trust200902">
<t>
This should be the default, unless one of the more specific '*trust200902'
values is a better fit. It produces the text in Sections 6.a and 6.b of
the TLP.
</t>
</section>
<section title="noModificationTrust200902" anchor="attribute-ipr-noModificationTrust200902">
<t>
This produces the additional text from Section 6.c.i of the TLP:
</t>
<t><list>
<t>
This document may not be modified, and derivative works of it may
not be created, except to format it for publication as an RFC or
to translate it into languages other than English.
</t>
</list></t>
</section>
<section title="noDerivativesTrust200902" anchor="attribute-ipr-noDerivativesTrust200902">
<t>
This produces the additional text from Section 6.c.ii of the TLP:
</t>
<t><list>
<t>
This document may not be modified, and derivative works of it may
not be created, and it may not be published except as an Internet-Draft.
</t>
</list></t>
</section>
<section title="pre5378Trust200902" anchor="attribute-ipr-pre5378Trust200902">
<t>
This produces the additional text from Section 6.c.iii of the TLP, frequently
called the "pre-5378 escape clause":
</t>
<t><list>
<t>
This document may contain material from IETF Documents or IETF Contributions published or
made publicly available before November 10, 2008. The person(s) controlling the copyright in
some of this material may not have granted the IETF Trust the right to allow modifications of such
material outside the IETF Standards Process. Without obtaining an adequate license from the
person(s) controlling the copyright in such materials, this document may not be modified outside
the IETF Standards Process, and derivative works of it may not be created outside the IETF
Standards Process, except to format it for publication as an RFC or to translate it into languages
other than English.
</t>
</list></t>
<t>
See Section 4 of <eref target="http://trustee.ietf.org/docs/IETF-Copyright-FAQ.pdf"/>
for further information about when to use this value.
</t>
<t><list>
<t>
Note: this text appears under "Copyright Notice", unless the
document was published before November 2009, in which case it appears
under "Status Of This Memo".
</t>
</list></t>
</section>
</section>
<section title="Historic Values" anchor="attribute-ipr-historic">
<section title="Historic Values: '*trust200811'" anchor="attribute-ipr-200811">
<t>
The attribute values "trust200811",
"noModificationTrust200811" and
"noDerivativesTrust200811"
are similar to their "trust200902" counterparts, except that they use text
specified in <eref target="http://trustee.ietf.org/license-info/archive/IETF-Trust-License-Policy_11-10-08.pdf"/>.
</t>
</section>
<section title="Historic Values: '*3978'" anchor="attribute-ipr-3978">
<t>
The attribute values "full3978",
"noModification3978" and
"noDerivatives3978"
are similar to their counterparts above, except that they use text
specified in RFC 3978 (March 2005).
</t>
</section>
<section title="Historic Values: '*3667'" anchor="attribute-ipr-3667">
<t>
The attribute values "full3667",
"noModification3667" and
"noDerivatives3667"
are similar to their counterparts above, except that they use text
specified in RFC 3667 (February 2004).