idnits 2.17.1 draft-mrose-writing-rfcs-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. == There are 2 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (April 1999) is 9143 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. '1' ** Obsolete normative reference: RFC 2223 (ref. '2') (Obsoleted by RFC 7322) ** Obsolete normative reference: RFC 2396 (ref. '4') (Obsoleted by RFC 3986) -- Possible downref: Non-RFC (?) normative reference: ref. '5' -- Possible downref: Non-RFC (?) normative reference: ref. '6' -- Possible downref: Non-RFC (?) normative reference: ref. '7' -- Possible downref: Non-RFC (?) normative reference: ref. '8' -- Possible downref: Non-RFC (?) normative reference: ref. '9' -- Possible downref: Non-RFC (?) normative reference: ref. '10' -- Possible downref: Non-RFC (?) normative reference: ref. '11' Summary: 6 errors (**), 0 flaws (~~), 3 warnings (==), 11 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group M.T. Rose 2 Internet-Draft Invisible Worlds, Inc. 3 Expires: September 30, 1999 April 1999 5 Writing I-Ds and RFCs using XML 6 draft-mrose-writing-rfcs-02.txt 8 Status of this Memo 10 This document is an Internet-Draft and is in full conformance with 11 all provisions of Section 10 of RFC2026. 13 Internet-Drafts are working documents of the Internet Engineering 14 Task Force (IETF), its areas, and its working groups. Note that 15 other groups may also distribute working documents as 16 Internet-Drafts. 18 Internet-Drafts are draft documents valid for a maximum of six 19 months and may be updated, replaced, or obsoleted by other documents 20 at any time. It is inappropriate to use Internet-Drafts as reference 21 material or to cite them other than as "work in progress." 23 The list of current Internet-Drafts can be accessed at 24 http://www.ietf.org/ietf/1id-abstracts.txt 26 The list of Internet-Draft Shadow Directories can be accessed at 27 http://www.ietf.org/shadow.html. 29 This Internet-Draft will expire on September 30, 1999. 31 Abstract 33 This memo presents a technique for using XML as a source format for 34 documents in the Internet-Drafts and RFC series. 36 Copyright Notice 38 Copyright (C) The Internet Society (1999). All Rights Reserved. 40 Table of Contents 42 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 3 43 2. Using the DTD to Write I-Ds and RFCs . . . . . . . . . . . 4 44 2.1 XML basics . . . . . . . . . . . . . . . . . . . . . . . . 4 45 2.2 Front matter . . . . . . . . . . . . . . . . . . . . . . . 6 46 2.2.1 The title Element . . . . . . . . . . . . . . . . . . . . 6 47 2.2.2 The author Element . . . . . . . . . . . . . . . . . . . . 7 48 2.2.3 The date Element . . . . . . . . . . . . . . . . . . . . . 8 49 2.2.4 Meta Data Elements . . . . . . . . . . . . . . . . . . . . 8 50 2.2.5 The abstract Element . . . . . . . . . . . . . . . . . . . 9 51 2.2.6 The note Element . . . . . . . . . . . . . . . . . . . . . 9 52 2.2.7 Status, Copyright Notice, Table of Contents . . . . . . . 9 53 2.2.7.1 Conformance with RFC 2026 . . . . . . . . . . . . . . . . 9 54 2.2.8 Everything in the Front . . . . . . . . . . . . . . . . . 10 55 2.3 The Middle . . . . . . . . . . . . . . . . . . . . . . . . 11 56 2.3.1 The section Element . . . . . . . . . . . . . . . . . . . 11 57 2.3.1.1 The t Element . . . . . . . . . . . . . . . . . . . . . . 12 58 2.3.1.2 The list Element . . . . . . . . . . . . . . . . . . . . . 12 59 2.3.1.3 The figure Element . . . . . . . . . . . . . . . . . . . . 13 60 2.3.1.4 The xref Element . . . . . . . . . . . . . . . . . . . . . 15 61 2.3.1.5 The eref Element . . . . . . . . . . . . . . . . . . . . . 15 62 2.3.1.6 The iref Element . . . . . . . . . . . . . . . . . . . . . 16 63 2.3.1.7 The vspace Element . . . . . . . . . . . . . . . . . . . . 16 64 2.4 Back matter . . . . . . . . . . . . . . . . . . . . . . . 17 65 2.4.1 The references Element . . . . . . . . . . . . . . . . . . 17 66 2.4.2 Appendices . . . . . . . . . . . . . . . . . . . . . . . . 18 67 2.4.3 Copyright Status . . . . . . . . . . . . . . . . . . . . . 18 68 3. Processing the XML Source File . . . . . . . . . . . . . . 19 69 3.1 Editing . . . . . . . . . . . . . . . . . . . . . . . . . 19 70 3.1.1 Checking . . . . . . . . . . . . . . . . . . . . . . . . . 19 71 3.2 Converting to Text Format . . . . . . . . . . . . . . . . 20 72 3.3 Converting to HTML Format . . . . . . . . . . . . . . . . 20 73 3.4 Viewing . . . . . . . . . . . . . . . . . . . . . . . . . 20 74 3.5 Searching . . . . . . . . . . . . . . . . . . . . . . . . 20 75 4. Security Considerations . . . . . . . . . . . . . . . . . 21 76 References . . . . . . . . . . . . . . . . . . . . . . . . 22 77 Author's Address . . . . . . . . . . . . . . . . . . . . . 22 78 A. The rfc Element . . . . . . . . . . . . . . . . . . . . . 23 79 B. The RFC DTD . . . . . . . . . . . . . . . . . . . . . . . 24 80 C. Acknowledgements . . . . . . . . . . . . . . . . . . . . . 29 81 D. Revision History . . . . . . . . . . . . . . . . . . . . . 30 82 D.1 Changes since 01 . . . . . . . . . . . . . . . . . . . . . 30 83 D.2 Changes since 00 . . . . . . . . . . . . . . . . . . . . . 30 85 1. Introduction 87 This memo describes how to write a document for the I-D and RFC 88 series using the Extensible Markup Language[1] (XML). This memo has 89 three goals: 91 1. To describe a simple XML Document Type Definition (DTD) that is 92 powerful enough to handle the simple formatting requirements of 93 RFC-like documents whilst allowing for meaningful markup of 94 descriptive qualities. 96 2. To describe software that processes XML source files, including 97 a tool that produces documents conforming to RFC 2223[2], HTML 98 format, and so on. 100 3. To provide the proof-of-concept for the first two goals (this 101 memo was written using this DTD and produced using that 102 software). 104 It is beyond the scope of this memo to discuss the political 105 ramifications of using XML as a source format for RFC-like 106 documents. Rather, it is simply noted that adding minimal markup to 107 plain text: 109 o allows the traditional production of textual RFC-like documents 110 using familiar editors; 112 o requires some, albeit minimal, additions to existing software 113 environments; and, 115 o permits information to be organized, searched, and retrieved 116 using both unstructured and structured mechanisms. 118 2. Using the DTD to Write I-Ds and RFCs 120 We do not provide a formal or comprehensive description of XML. 121 Rather, this section discusses just enough XML to use a Document 122 Type Declaration (DTD) to write RFC-like documents. 124 If you're already familiar with XML, skip to Appendix B to look at 125 the DTD. 127 2.1 XML basics 129 There are very few rules when writing in XML, as the syntax is 130 simple. There are five terms you'll need to know: 132 1. An "element" usually refers to a start tag, an end tag, and all 133 the characters in between, e.g., "text and/or nested 134 elements" 136 2. An "empty element" combines the start tag and the end tag, e.g., 137 "". You don't find these in HTML. 139 3. An "attribute" is part of an element. If present, they occur in 140 the start tag, e.g., "". Of course, they 141 can also appear in empty elements, e.g., "". 143 4. An "entity" is a textual macro that starts with "&". Don't worry 144 about these, you'll only use them whenever you want to put a "&" 145 or a "<" in your text. 147 5. A "token" is a string of characters. The first character is 148 either a letter or an underscore ("_"). Any characters that 149 follow are either letters, numbers, an underscore, or a period 150 ("."). 152 First, start your source file with an XML declaration, a reference 153 to the DTD, and the "rfc" element: 155 156 157 158 ... 159 161 Ignore the first two lines -- the declaration and the reference -- 162 and simply treat them as opaque strings. Nothing else should be 163 present after the "" tag. 165 (NOTE TO READER: when this memo is published as an RFC, the "XXXX" 166 above will be replaced with the actual string to use in your source 167 file.) 169 Second, make sure that all elements are properly matched and nested. 170 A properly matched element that starts with "" is 171 eventually followed with "". (Empty elements are always 172 matched.) Elements are properly nested when they don't overlap. 174 For example, 176 177 ... 178 179 ... 180 181 ... 182 184 is properly nested. 186 However, 188 189 ... 190 191 ... 192 193 ... 194 196 overlaps, so the elements aren't properly nested. 198 Third, never use "<" or "&" in your text. Instead, use either "<" 199 or "&", respectively. 201 Fourth, there are two quoting characters in XML, 'apostrophe' and 202 "quotation". Make sure that all attributes values are quoted, e.g., 203 "", If the value contains one of the quoting 204 characters, then use the other to quote the value, e.g., "", If the value contains both quoting characters, then use 206 one of them to quote the value, and replace occurrances of that 207 character in the attribute value with either ''' (apostrophe) 208 or """ (quotation), e.g., "". 210 If you want to put a comment in your source file, here's the syntax: 212 215 Finally, XML is case sensitive. 217 2.2 Front matter 219 Immediately following the "" tag is the "front" element: 221 222 223 224 225 226 <author ...> 227 <author ...> 228 <date ...> 229 <area ...> 230 <workgroup ...> 231 <keyword ...> 232 <keyword ...> 233 <abstract ...> 234 <note ...> 235 </front> 236 ... 237 </rfc> 239 (Note that in all examples, indentation is used only for expository 240 purposes.) 242 The "front" element consists of a "title" element, one or more 243 "author" elements, a "date" element, one or more optional "area" 244 elements, one or more optional "workgroup" elements, one or more 245 optional "keyword" elements, an optional "abstract" element. and, 246 one or more optional "note" elements. 248 2.2.1 The title Element 250 The "title" element identifies the title of the document. Because 251 the title will be used in the headers of the document when formatted 252 according to [2], if the title is more than 42 characters, then an 253 abbreviation should also be provided, e.g., 255 <title abbrev="Much Ado about Nothing"> 256 The IETF's Discussion on "Source Format of RFC Documents" 257 259 2.2.2 The author Element 261 Each "author" element identifies a document author. Since a document 262 may have more than one author, more than one "author" element may be 263 present. If the author is a person, then three attributes must be 264 present in the "" tag, "initials", "surname", and 265 "fullname", e.g., 267 270 The "author" element itself consists of an "organization" element, 271 and, an optional "address" element. 273 The "organization" element is similar to the "title" element, in 274 that an abbreviation may be paired with a long organization name 275 using the "abbrev" attribute, e.g., 277 278 USC/Information Sciences Institute 279 281 The "address" element consists of an optional "postal" element, an 282 optional "phone" element, an optional "facsimile" element, an 283 optional "email" element, and, an optional "uri" element. 285 The "postal" element contains one or more "street" elements, 286 followed by any combination of "city", "region" (state or province), 287 "code" (zipcode or postal code), and "country" elements, e.g., 289 290 660 York Street 291 M/S 40 292 San Francisco CA 293 94110 294 US 295 297 This flexibility is provided to allow for different national formats 298 for postal addresses. Note however, that although the order of the 299 "city", "region", "code", and "country" elements isn't specified, at 300 most one of each may be present. Regardless, these elements must not 301 be re-ordered during processing by an XML application (e.g., display 302 applications must preserve the ordering of the information contained 303 in these elements). Finally, the value of the "country" element 304 should be a two-letter code from ISO 3166. 306 The "phone", "facsimile", "email", and "uri" elements are simple, 307 e.g., 309 +1 415 695 3975 310 mrose@not.invisible.net 311 http://invisible.net/ 313 2.2.3 The date Element 315 The "date" element identifies the publication date of the document. 316 It consists of a month and a year, e.g., 318 320 The "date" element also has an optional day attribute. 322 2.2.4 Meta Data Elements 324 The "front" element may contain meta data -- the content of these 325 elements does not appear in printed versions of the document. 327 A document has one or more optional "area", "workgroup" and 328 "keyword" elements, e.g., 330 General 331 RFC Beautification Working Group 332 RFC 333 Request for Comments 334 I-D 335 Internet-Draft 336 XML 337 Extensible Markup Language 339 The "area" elements identify a general category for the document 340 (e.g., one of "Applications", "General", "Internet", "Management", 341 "Operations", "Routing", "Security", "Transport", or "User"), while 342 the "workgroup" elements identify the IETF working groups that 343 produced the document, and the "keyword" elements identify useful 344 search terms. 346 2.2.5 The abstract Element 348 A document may have an "abstract" element, which contains one or 349 more "t" elements (Section 2.3.1.1). In general, only a single "t" 350 element is present, e.g., 352 353 This memo presents a technique for using XML as a 354 source format for documents in the Internet-Drafts and 355 RFC series. 356 358 2.2.6 The note Element 360 A document may have one or more "note" elements, each of which 361 contains one or more "t" elements (Section 2.3.1.1). There is a 362 mandatory "title" attribute. In general, the "note" element contains 363 text from the IESG, e.g., 365 366 The IESG has something to say. 367 369 2.2.7 Status, Copyright Notice, Table of Contents 371 Note that text relating to the memo's status, copyright notice, or 372 table of contents is not included in the document's markup -- this 373 is automatically inserted by an XML application when it produces 374 either a text or HTML version of the document. 376 2.2.7.1 Conformance with RFC 2026 378 If an Internet-Draft is being produced, then the "ipr" attribute 379 should be present in the "" tag at the beginning of the file. 380 The value of the attribute should be one of: 382 full2026: indicating that the document is in full conformance with 383 all the provisions of Section 10 of RFC 2026; 385 noDerivativeWorks2026: indicating that the document is in full 386 conformance with all the provisions of Section 10 of RFC 2026 387 except that the right to produce derivative works is not granted; 388 or, 390 none: indicating that the document is NOT offered in accordance with 391 Section 10 of RFC 2026, and the author does not provide the IETF 392 with any rights other than to publish as an Internet-Draft. 394 In the latter case, a copyright notice will not be automatically 395 inserted during processing by an XML application. 397 Consult [3] for further details. 399 Finally, if the Internet-Draft is being submitted to an automated 400 process, then the "docName" attribute should be present in the 401 "" tag at the beginning of the file. The value of this 402 attribute contains the document (not file) name associated with this 403 Internet-Draft, e.g., 405 406 ... 407 409 2.2.8 Everything in the Front 411 So, putting it all together, we have, e.g., 413 414 Writing I-Ds and RFCs using XML 416 418 Invisible Worlds, Inc. 420
421 422 660 York Street 423 M/S 40 424 San Francisco CA 425 94110 426 US 427 429 +1 415 695 3975 430 mrose@not.invisible.net 431 http://invisible.net/ 432
433
435 437 General 438 RFC Beautification Working Group 439 RFC 440 Request for Comments 441 I-D 442 Internet-Draft 443 XML 444 Extensible Markup Language 445 446 This memo presents a technique for using XML as a 447 source format for documents in the Internet-Drafts and 448 RFC series. 449 450
452 2.3 The Middle 454 The "middle" element contains all the sections of the document 455 except for the bibliography and appendices: 457 ... 458
459 460
461
462
463 464 465 ... 467 The "middle" element consists of one or more "section" elements. 469 2.3.1 The section Element 471 Each "section" element contains a section of the document. There is 472 a mandatory attribute, "title", that identifies the title of the 473 section. There is also an optional attribute, "anchor", that is used 474 for cross-referencing with the "xref" element (Section 2.3.1.4), 475 e.g., 477
478 ... 479
481 The "section" element is recursive -- each contains any number and 482 combination of "t", "figure", and "section" elements, e.g., 484
485 ... 486
487 ... 488
...
489
...
490
...
491
...
492
...
493
...
494
495
497 2.3.1.1 The t Element 499 The "t" element contains any number and combination of paragraphs, 500 lists, and figures. If a cross-reference is needed to a section, 501 figure, or reference, the "xref" element (Section 2.3.1.4) is used; 502 similarly, if an external-reference is needed, the "eref" element 503 (Section 2.3.1.5) is used. Indexing of text is provided by the the 504 "iref" element (Section 2.3.1.6). 506 2.3.1.2 The list Element 508 The "list" element contains one or more items. Each item is a "t" 509 element, allowing for recursion, e.g., 511 512 The first item. 513 The second item, which contains two bulleted sub-items: 514 515 The first sub-item. 516 The second sub-item. 517 518 519 521 The "list" element has an optional attribute, "style", having the 522 value "numbers" (for numeric lists), "symbols" (for bulleted lists), 523 "hanging" (for hanging lists), or, "empty" (for indented text). If a 524 "list" element is nested, the default value is taken from its 525 closest parent; otherwise, the default value is "empty". 527 When nested within a "hanging list" element, the "t" element has an 528 optional attribute, "hangText" that specifies the text to be 529 inserted, e.g., 531 532 indicating that the document is in 533 full conformance with all the provisions of Section 10 of 534 RFC 2026; 536 indicating that the 537 document is in full conformance with all the provisions of 538 Section 10 of RFC 2026 except that the right to produce 539 derivative works is not granted; or, 541 indicating that the document is NOT 542 offered in accordance with Section 10 of RFC 2026, and 543 the author does not provide the IETF with any rights other 544 than to publish as an Internet-Draft. 545 547 2.3.1.3 The figure Element 549 The "figure" element groups an optional "preamble" element, an 550 "artwork" element, and an optional "postamble" element together. The 551 "figure" element also has an optional "anchor" attribute that is 552 used for cross-referencing with the "xref" element (Section 553 2.3.1.4). There is also an optional "title" attribute that 554 identifies the title of the figure. 556 The "preamble" and "postamble" elements, if present, are simply 557 text. If a cross-reference is needed to a section, figure, or 558 reference, the "xref" element (Section 2.3.1.4) is used; similarly, 559 if an external-reference is needed, the "eref" element (Section 560 2.3.1.5) is used. Indexing of text is provided by the the "iref" 561 element (Section 2.3.1.6). 563 The "artwork" element, which must be present, contains "ASCII 564 artwork". Unlike text contained in the "t", "preamble", or 565 "postamble" elements, both horizontal and vertical whitespace is 566 significant in the "artwork" element. 568 So, putting it all together, we have, e.g., 570
571 So, 572 putting it all together, we have, e.g., 573 574 ascii artwork goes here... 576 be sure to use "<" or "&" instead of "<" and "&", 577 respectively! 578 579 which is a very simple example. 580
582 which is a very simple example. 584 If you have artwork with a lot of "<" characters, then there's an 585 XML trick you can use: 587
588 If you have artwork with a lot of "<" 589 characters, then there's an XML trick you can 590 use: 591 596 The "<![CDATA[ ... ]]>" construct is called 597 a CDATA block -- everything between the innermost brackets 598 is left alone by the XML application. 599
601 The "" construct is called a CDATA block -- 602 everything between the innermost brackets is left alone by the XML 603 application. 605 Because the "figure" element represents a logical grouping of text 606 and artwork, an XML application producing a text version of the 607 document should attempt to keep these elements on the same page. 608 Because RFC 2223[2] allows no more than 69 characters by 49 lines of 609 content on each page, XML applications should be prepared to 610 prematurely introduce page breaks to allow for better visual 611 grouping. 613 Finally, the "artwork" element has two optional attributes: "name" 614 and "type". The former is used to suggest a filename to use when 615 storing the content of the "artwork" element, whilst the latter 616 contains a suggestive data-typing for the content. 618 2.3.1.4 The xref Element 620 The "xref" element is used to cross-reference sections, figures, and 621 references. The mandatory "target" attribute is used to link back to 622 the "anchor" attribute of the "section", "figure", and "reference" 623 elements. The value of the "anchor" and "target" attributes should 624 be formatted according to the token syntax in Section 2.1. 626 If used as an empty element, e.g., 628 according to the token syntax in . 630 then the XML application inserts an appropriate phrase during 631 processing, such as "Section 2.1" or "XML 632 Basics". 634 If used with content, e.g., 636 conforming to RFC 2223. 638 then the XML application inserts an appropriate designation during 639 processing, such as "RFC 2223[2]" or "RFC 640 2223". Although the XML application decides what "an appropriate 641 designation" might be, its choice is consistent throughout the 642 processing of the document. 644 2.3.1.5 The eref Element 646 The "eref" element is used to reference external documents. The 647 mandatory "target" attribute is a URI[4], e.g., 649 Cafe con Leche 651 Note that while the "target" attribute is always present, the "eref" 652 element may be empty, e.g., 654 656 and the XML application inserts an appropriate designation during 657 processing such as "[9]" or "http://invisible.net/". 660 2.3.1.6 The iref Element 662 The "iref" element is used to add information to an index. The 663 mandatory "item" attribute is the primary key the information is 664 stored under, whilst the optional "subitem" attribute is the 665 secondary key, e.g., 667 669 Finally, note that the "iref" element is always empty -- it never 670 contains any text. 672 2.3.1.7 The vspace Element 674 The "vspace" element, which may occur only inside the "t" element, 675 is used by the author to provide formatting guidance to the XML 676 application. There is an attribute, "blankLines", that indicates the 677 number of blank lines that should be inserted. A physical linebreak 678 is specified by using the default value, "0". 680 In addition, the "vspace" element can be used to force a new 681 physical paragraph within a list item, e.g., 683 684 This is list item. 685 686 This is part of the same list item, 687 although when displayed, it appears 688 as a separate physical paragraph. 689 691 An XML application producing a text version of the document should 692 exercise care when encountering a value for "blankLines" that causes 693 a pagebreak -- in particular, if a "vspace" element causes a 694 pagebreak, then no further blank lines should be inserted. This 695 allows authors to "force" a pagebreak by using an arbitrarily large 696 value, e.g., "blankLines='100'". 698 Finally, note that the "vspace" element is always empty -- it never 699 contains any text. 701 2.4 Back matter 703 Finally, the "back" element is used for references and appendices: 705 ... 706 707 708 709 710 711 712
713
714 715 717 The "back" element consists of an optional "references" element, 718 and, one or more optional "section" elements. The "back" element 719 itself is optional, if your document doesn't have any references or 720 appendices, you don't have to include it. 722 2.4.1 The references Element 724 The "references" element contains the document's bibliography. It 725 contains one or more "reference" elements. 727 Each "reference" element contains a "front" element and one or more 728 optional "seriesInfo" elements. 730 We've already discussed the "front" element back in Section 2.2. 732 The "seriesInfo" element has two attributes, "name" and "value" that 733 identify the document series and series entry, respectively. 735 The "reference" element has an optional "anchor" attribute that is 736 used for cross-referencing with the "xref" element (Section 737 2.3.1.4), e.g., 739 740 741 Internet Official Protocol Standards 742 744 745 USC/Information Sciences Institute 746 747 749 750 751 752 753 755 The "reference" element also has an optional "target" attribute that 756 is used for external references (c.f., Section 2.3.1.5). The XML 757 application, if producing an HTML version of the document will use 758 the "target" attribute accordingly; however, if the "name" attribute 759 of the "seriesInfo" element has the value "RFC", then the XML 760 application should automatically provide an appropriate default for 761 the "target" attribute (e.g., "http://example.com/rfcs/rfc2200.txt"). 763 2.4.2 Appendices 765 To include appendices after the bibliography, simply add more 766 "section" elements. (For an example, look at the example at the 767 beginning of Section 2.4.) 769 2.4.3 Copyright Status 771 The copyright status for the document is not included in the 772 document's markup -- this is automatically inserted by an XML 773 application that produces either a text or HTML version of the 774 document. 776 3. Processing the XML Source File 778 This section concerns itself with applications that operate on an 779 XML source file. A lot of XML tools are available, as are many lists 780 of XML resources, e.g., Cafe con Leche[5]. 782 There are two kinds of XML tools: validating and non-validating. 783 Both check that the source file conforms to the rules given in 784 Section 2.1. However, in addition to making sure that the source 785 file is well-formed, a validating tool also reads the DTD referenced 786 by the source file to make sure that they match. There are a number 787 of both validating and non-validating tools available. 789 3.1 Editing 791 There are several XML editors available. Ideally, you want an editor 792 that validates. This has two advantages: 794 o the editor provides guidance in fleshing-out the document 795 structure; and, 797 o the editor validates that the source file matches the rules in 798 the DTD. 800 There are two major modes in Emacs that support XML: tdtd[6] and 801 psgml[7]. The latter mode allows you to validate the source file (by 802 calling an external program). If you visit the source file in Emacs 803 and the major mode isn't "SGML" or "XML", then usually all it takes 804 is adding these lines to your ".emacs" file: 806 (setq auto-mode-alist 807 (cons (cons "\\.xml$" 'sgml-mode) auto-mode-alist)) 809 and then restarting Emacs. If this doesn't work, try one of the 810 sources above. 812 The author uses both sgml-mode in Emacs, and a commercial validating 813 editor, Clip! version 1.5[8], when editing source files. 815 3.1.1 Checking 817 If your editor doesn't validate, then you should run a program to 818 validate the source file. 820 The author uses the AlphaWorks XML parser[9] for this purpose. It 821 requires that your system have a Java virtual machine. In addition 822 to Java, there are validating parsers written in C, Perl, Python, 823 and Tcl. 825 3.2 Converting to Text Format 827 The author has written the xml2rfc tool[10], which reads the source 828 file and produces both a text and HTML version of the document. 829 (This memo was produced using the xml2rfc tool.) Note that xml2rfc 830 isn't a validating tool, so it's a good idea to use either a 831 validating editor or run a stand-alone validating parser prior to 832 using the tool. 834 3.3 Converting to HTML Format 836 The XML Style Language (XSL) is used to describe transformations 837 from the source file into some other structured file. So, ideally 838 you should use an XSL-capable formatter to convert an XML source 839 file to HTML. 841 However, as of this writing XSL is still in considerable flux. 842 (Hence, no reference was included in this memo, as by the time you 843 read this section, the reference would be outdated.) So, in the 844 interim, the author uses the xml2rfc tool for this purpose, even 845 though this tool doesn't provide much flexibility in its HTML layout. 847 3.4 Viewing 849 Browsers that support either XSL or Cascading Style Sheets (CSS) are 850 able to view the source file directly. 852 At present, the author doesn't use any of these browsers, instead 853 converting source files to either text or HTML. 855 3.5 Searching 857 As with text editors, any text-oriented search tool (e.g., grep) can 858 be used on the source file. However, there are search tools 859 available that understand structured source. 861 The author uses sgrep version 1.9[11] for this purpose, e.g. 863 sgrep -g xml 'ELEMENTS("title") not in ELEMENTS("back")' \ 864 writing-rfcs.xml 866 which extracts the title element from the source file. 868 4. Security Considerations 870 This memo raises no security issues; however, according to [2], your 871 document should contain a section near the end that discusses the 872 security considerations of the protocol or procedures that are the 873 main topic of your document, e.g., 875 876 ... 877
878 This memo raises no security issues; 879 however, 880 according to , 881 your document should contain a section near the end 882 that discusses the security considerations of the 883 protocol or procedures that are the main topic of your 884 document. 885
886
888 References 890 [1] World Wide Web Consortium, "Extensible Markup Language (XML) 891 1.0", W3C XML, February 1998. 893 [2] Postel, J., Reynolds, J., "Instructions to RFC Authors", RFC 894 2223, October 1997. 896 [3] Bradner, S.O., "The Internet Standards Process -- Revision 3", 897 RFC 2026, BCP 9, October 1996. 899 [4] Berners-Lee, T., Fielding, R.T., Masinter, L., "Uniform 900 Resource Identifiers (URI): Generic Syntax", RFC 2396, August 901 1998. 903 [5] http://metalab.unc.edu/xml/ 905 [6] http://www.mulberrytech.com/tdtd/ 907 [7] http://www.inria.fr/koala/plh/sxml.html 909 [8] http://www.t2000-usa.com/ 911 [9] http://www.alphaworks.ibm.com/formula/xml/ 913 [10] http://memory.palace.org/authoring/ 915 [11] http://www.cs.helsinki.fi/~jjaakkol/sgrep.html 917 Author's Address 919 Marshall T. Rose 920 Invisible Worlds, Inc. 921 660 York Street 922 San Francisco, CA 94110 923 US 925 Phone: +1 415 695 3975 926 EMail: mrose@not.invisible.net 927 URI: http://invisible.net/ 929 Appendix A. The rfc Element 931 The "" tag at the beginning of the file, with only an "ipr" 932 attribute (Section 2.2.7.1), produces an Internet-Draft. However, 933 when other attributes are added to this tag by the RFC editor, an 934 RFC is produced, e.g., 936 941 At a minimum, the "number" attribute should be present. 943 The other attributes are: 945 o "obsoletes", having a comma-separated list of RFC numbers, that 946 the document obsoletes; 948 o "updates", having a comma-separated list of RFC numbers, that the 949 document updates; 951 o "category", having one of these values: 953 1. "std", for a Standards-Track document; 955 2. "bcp", "for a Best Current Practices document; 957 3. "exp", for an Experimental Protocol document; 959 4. "historic", for a historic document; or, 961 5. "info", the default, for an Informational document. 963 o "seriesNo", having the corresponding number in the STD (std), BCP 964 (bcp), or FYI (info) series. 966 Finally, a special entity, "&rfc.number;", is available. Authors 967 preparing an RFC should use this entity whenever they want to 968 reference the number of the RFC within the document itself. In 969 printed versions of the document, the appropriate substitution (or 970 "XXXX") will occur. 972 Appendix B. The RFC DTD 974 978 992 1011 1012 1014 1015 1016 1017 1019 1020 1022 1024 1026 1030 1036 1037 1048 1052 1055 1056 1057 1060 1061 1066 1068 1071 1073 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1086 1087 1092 1093 1094 1095 1097 1098 1099 1102 1106 1108 1109 1113 1114 1117 1119 1120 1124 1125 1129 1130 1133 1134 1138 1139 1142 1143 1147 1148 1149 1151 1153 1157 1158 1160 1161 1162 1165 1166 1170 Appendix C. Acknowledgements 1172 The author gratefully acknowledges the contributions of: Alan 1173 Barrett, Brad Burdick, Brian Carpenter, Steve Deering, Patrik 1174 Faltstrom, Jim Gettys, Carl Malamud, Chris Newman, Kurt Starsinic, 1175 and, Frank Strauss. 1177 Appendix D. Revision History 1179 RFC Editor: please remove this section prior to publication. 1181 D.1 Changes since 01 1183 addition: The "day" attribute (Section 2.2.3). 1185 change: The ipr2026 (Section 2.2.7.1) attribute is now called "ipr", 1186 and the values have changed. 1188 addition: The artwork (Section 2.3.1.3) element has two optional 1189 attributes: "name" and "type". 1191 change: The seriesInfo (Section 2.4.1) attribute is now an empty 1192 element and has two mandatory attributes: "name" and "value". 1194 D.2 Changes since 00 1196 clarification: Elements within the the "address" element (Section 1197 2.2.2) should not be re-ordered. 1199 addition: The "docName" attribute (Section 2.2.7.1). 1201 change: The the "figure" element (Section 2.3.1.3) may now nest 1202 within the "t" element. 1204 addition: The "iref" element (Section 2.3.1.6). 1206 Index 1208 I 1209 indexing 1210 how to 16 1212 Full Copyright Statement 1214 Copyright (C) The Internet Society (1999). All Rights Reserved. 1216 This document and translations of it may be copied and furnished to 1217 others, and derivative works that comment on or otherwise explain it 1218 or assist in its implmentation may be prepared, copied, published 1219 and distributed, in whole or in part, without restriction of any 1220 kind, provided that the above copyright notice and this paragraph 1221 are included on all such copies and derivative works. However, this 1222 document itself may not be modified in any way, such as by removing 1223 the copyright notice or references to the Internet Society or other 1224 Internet organizations, except as needed for the purpose of 1225 developing Internet standards in which case the procedures for 1226 copyrights defined in the Internet Standards process must be 1227 followed, or as required to translate it into languages other than 1228 English. 1230 The limited permissions granted above are perpetual and will not be 1231 revoked by the Internet Society or its successors or assigns. 1233 This document and the information contained herein is provided on an 1234 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 1235 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 1236 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 1237 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 1238 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.