Network Working Group                                            M. Rose
Request for Comments: 2629                        Invisible Worlds, Inc.
Category: Informational                                        June 1999
        
Network Working Group                                            M. Rose
Request for Comments: 2629                        Invisible Worlds, Inc.
Category: Informational                                        June 1999
        

Writing I-Ds and RFCs using XML

使用XML编写I-D和RFC

Status of this Memo

本备忘录的状况

This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.

本备忘录为互联网社区提供信息。它没有规定任何类型的互联网标准。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (1999). All Rights Reserved.

版权所有(C)互联网协会(1999年)。版权所有。

Abstract

摘要

This memo presents a technique for using XML (Extensible Markup Language) as a source format for documents in the Internet-Drafts (I-Ds) and Request for Comments (RFC) series.

本备忘录介绍了一种使用XML(可扩展标记语言)作为Internet草稿(I-Ds)和征求意见(RFC)系列文档源格式的技术。

Table of Contents

目录

   1.      Introduction . . . . . . . . . . . . . . . . . . . . . . .  3
   2.      Using the DTD to Write I-Ds and RFCs . . . . . . . . . . .  4
   2.1     XML basics . . . . . . . . . . . . . . . . . . . . . . . .  4
   2.2     Front matter . . . . . . . . . . . . . . . . . . . . . . .  6
   2.2.1   The title Element  . . . . . . . . . . . . . . . . . . . .  6
   2.2.2   The author Element . . . . . . . . . . . . . . . . . . . .  7
   2.2.3   The date Element . . . . . . . . . . . . . . . . . . . . .  8
   2.2.4   Meta Data Elements . . . . . . . . . . . . . . . . . . . .  8
   2.2.5   The abstract Element . . . . . . . . . . . . . . . . . . .  9
   2.2.6   The note Element . . . . . . . . . . . . . . . . . . . . .  9
   2.2.7   Status, Copyright Notice, Table of Contents  . . . . . . .  9
   2.2.7.1 Conformance with RFC 2026  . . . . . . . . . . . . . . . .  9
   2.2.8   Everything in the Front  . . . . . . . . . . . . . . . . . 10
   2.3     The Middle . . . . . . . . . . . . . . . . . . . . . . . . 11
   2.3.1   The section Element  . . . . . . . . . . . . . . . . . . . 11
   2.3.1.1 The t Element  . . . . . . . . . . . . . . . . . . . . . . 12
   2.3.1.2 The list Element . . . . . . . . . . . . . . . . . . . . . 12
   2.3.1.3 The figure Element . . . . . . . . . . . . . . . . . . . . 13
   2.3.1.4 The xref Element . . . . . . . . . . . . . . . . . . . . . 15
   2.3.1.5 The eref Element . . . . . . . . . . . . . . . . . . . . . 15
   2.3.1.6 The iref Element . . . . . . . . . . . . . . . . . . . . . 16
   2.3.1.7 The vspace Element . . . . . . . . . . . . . . . . . . . . 16
   2.4     Back matter  . . . . . . . . . . . . . . . . . . . . . . . 17
   2.4.1   The references Element . . . . . . . . . . . . . . . . . . 17
   2.4.2   Appendices . . . . . . . . . . . . . . . . . . . . . . . . 18
   2.4.3   Copyright Status . . . . . . . . . . . . . . . . . . . . . 18
   3.      Processing the XML Source File . . . . . . . . . . . . . . 19
   3.1     Editing  . . . . . . . . . . . . . . . . . . . . . . . . . 19
   3.1.1   Checking . . . . . . . . . . . . . . . . . . . . . . . . . 19
   3.2     Converting to Text Format  . . . . . . . . . . . . . . . . 20
   3.3     Converting to HTML Format  . . . . . . . . . . . . . . . . 20
   3.4     Viewing  . . . . . . . . . . . . . . . . . . . . . . . . . 20
   3.5     Searching  . . . . . . . . . . . . . . . . . . . . . . . . 20
   4.      Security Considerations  . . . . . . . . . . . . . . . . . 21
           References . . . . . . . . . . . . . . . . . . . . . . . . 22
           Author's Address . . . . . . . . . . . . . . . . . . . . . 22
   A.      The rfc Element  . . . . . . . . . . . . . . . . . . . . . 23
   B.      The RFC DTD  . . . . . . . . . . . . . . . . . . . . . . . 24
   C.      Acknowledgements . . . . . . . . . . . . . . . . . . . . . 29
   Index  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
   Full Copyright Statement . . . . . . . . . . . . . . . . . . . . . 31
        
   1.      Introduction . . . . . . . . . . . . . . . . . . . . . . .  3
   2.      Using the DTD to Write I-Ds and RFCs . . . . . . . . . . .  4
   2.1     XML basics . . . . . . . . . . . . . . . . . . . . . . . .  4
   2.2     Front matter . . . . . . . . . . . . . . . . . . . . . . .  6
   2.2.1   The title Element  . . . . . . . . . . . . . . . . . . . .  6
   2.2.2   The author Element . . . . . . . . . . . . . . . . . . . .  7
   2.2.3   The date Element . . . . . . . . . . . . . . . . . . . . .  8
   2.2.4   Meta Data Elements . . . . . . . . . . . . . . . . . . . .  8
   2.2.5   The abstract Element . . . . . . . . . . . . . . . . . . .  9
   2.2.6   The note Element . . . . . . . . . . . . . . . . . . . . .  9
   2.2.7   Status, Copyright Notice, Table of Contents  . . . . . . .  9
   2.2.7.1 Conformance with RFC 2026  . . . . . . . . . . . . . . . .  9
   2.2.8   Everything in the Front  . . . . . . . . . . . . . . . . . 10
   2.3     The Middle . . . . . . . . . . . . . . . . . . . . . . . . 11
   2.3.1   The section Element  . . . . . . . . . . . . . . . . . . . 11
   2.3.1.1 The t Element  . . . . . . . . . . . . . . . . . . . . . . 12
   2.3.1.2 The list Element . . . . . . . . . . . . . . . . . . . . . 12
   2.3.1.3 The figure Element . . . . . . . . . . . . . . . . . . . . 13
   2.3.1.4 The xref Element . . . . . . . . . . . . . . . . . . . . . 15
   2.3.1.5 The eref Element . . . . . . . . . . . . . . . . . . . . . 15
   2.3.1.6 The iref Element . . . . . . . . . . . . . . . . . . . . . 16
   2.3.1.7 The vspace Element . . . . . . . . . . . . . . . . . . . . 16
   2.4     Back matter  . . . . . . . . . . . . . . . . . . . . . . . 17
   2.4.1   The references Element . . . . . . . . . . . . . . . . . . 17
   2.4.2   Appendices . . . . . . . . . . . . . . . . . . . . . . . . 18
   2.4.3   Copyright Status . . . . . . . . . . . . . . . . . . . . . 18
   3.      Processing the XML Source File . . . . . . . . . . . . . . 19
   3.1     Editing  . . . . . . . . . . . . . . . . . . . . . . . . . 19
   3.1.1   Checking . . . . . . . . . . . . . . . . . . . . . . . . . 19
   3.2     Converting to Text Format  . . . . . . . . . . . . . . . . 20
   3.3     Converting to HTML Format  . . . . . . . . . . . . . . . . 20
   3.4     Viewing  . . . . . . . . . . . . . . . . . . . . . . . . . 20
   3.5     Searching  . . . . . . . . . . . . . . . . . . . . . . . . 20
   4.      Security Considerations  . . . . . . . . . . . . . . . . . 21
           References . . . . . . . . . . . . . . . . . . . . . . . . 22
           Author's Address . . . . . . . . . . . . . . . . . . . . . 22
   A.      The rfc Element  . . . . . . . . . . . . . . . . . . . . . 23
   B.      The RFC DTD  . . . . . . . . . . . . . . . . . . . . . . . 24
   C.      Acknowledgements . . . . . . . . . . . . . . . . . . . . . 29
   Index  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
   Full Copyright Statement . . . . . . . . . . . . . . . . . . . . . 31
        
1. Introduction
1. 介绍

This memo describes how to write a document for the I-D and RFC series using the Extensible Markup Language [1] (XML). This memo has three goals:

本备忘录描述了如何使用可扩展标记语言[1](XML)为I-D和RFC系列编写文档。这份备忘录有三个目标:

1. To describe a simple XML Document Type Definition (DTD) that is powerful enough to handle the simple formatting requirements of RFC-like documents whilst allowing for meaningful markup of descriptive qualities.

1. 描述一个简单的XML文档类型定义(DTD),该定义功能强大,足以处理RFC类文档的简单格式要求,同时允许有意义的描述性标记。

2. To describe software that processes XML source files, including a tool that produces documents conforming to RFC 2223 [2], HTML format, and so on.

2. 描述处理XML源文件的软件,包括生成符合RFC 2223[2]、HTML格式等的文档的工具。

3. To provide the proof-of-concept for the first two goals (this memo was written using this DTD and produced using that software).

3. 为前两个目标提供概念证明(本备忘录使用此DTD编写,并使用该软件制作)。

It is beyond the scope of this memo to discuss the political ramifications of using XML as a source format for RFC-like documents. Rather, it is simply noted that adding minimal markup to plain text:

讨论使用XML作为RFC类文档的源格式的政治后果超出了本备忘录的范围。相反,只需注意向纯文本添加最小标记:

o allows the traditional production of textual RFC-like documents using familiar editors;

o 允许使用熟悉的编辑器传统地生成类似文本RFC的文档;

o requires some, albeit minimal, additions to existing software environments; and,

o 需要对现有软件环境进行一些(尽管是最小的)添加;和

o permits information to be organized, searched, and retrieved using both unstructured and structured mechanisms.

o 允许使用非结构化和结构化机制组织、搜索和检索信息。

2. Using the DTD to Write I-Ds and RFCs
2. 使用DTD写入I-D和RFC

We do not provide a formal or comprehensive description of XML. Rather, this section discusses just enough XML to use a Document Type Declaration (DTD) to write RFC-like documents.

我们不提供XML的正式或全面描述。相反,本节讨论的XML仅足以使用文档类型声明(DTD)编写类似RFC的文档。

If you're already familiar with XML, skip to Appendix B to look at the DTD.

如果您已经熟悉XML,请跳到附录B查看DTD。

2.1 XML basics
2.1 XML基础

There are very few rules when writing in XML, as the syntax is simple. There are five terms you'll need to know:

在用XML编写时,规则很少,因为语法很简单。您需要了解以下五个术语:

1. An "element" usually refers to a start tag, an end tag, and all the characters in between, e.g., "<example>text and/or nested elements</example>"

1. “元素”通常指开始标记、结束标记和中间的所有字符,例如“<example>文本和/或嵌套元素</example>”

2. An "empty element" combines the start tag and the end tag, e.g., "<empty/>". You don't find these in HTML.

2. “空元素”组合了开始标记和结束标记,例如“<empty/>”。在HTML中找不到这些。

3. An "attribute" is part of an element. If present, they occur in the start tag, e.g., "<example name='value'>". Of course, they can also appear in empty elements, e.g., "<empty name='value'/>".

3. “属性”是元素的一部分。如果存在,则它们出现在开始标记中,例如“<example name='value'>”。当然,它们也可以出现在空元素中,例如“<empty name='value'/>”。

4. An "entity" is a textual macro that starts with "&". Don't worry about these, you'll only use them whenever you want to put a "&" or a "<" in your text.

4. “实体”是以“&”开头的文本宏。不要担心这些,你只会在你想在文本中加“&”或“<”的时候使用它们。

5. A "token" is a string of characters. The first character is either a letter or an underscore ("_"). Any characters that follow are either letters, numbers, an underscore, or a period (".").

5. “令牌”是一个字符串。第一个字符是字母或下划线(“\”)。后面的任何字符都是字母、数字、下划线或句点(“.”)。

First, start your source file with an XML declaration, a reference to the DTD, and the "rfc" element:

首先,使用XML声明、DTD引用和“rfc”元素启动源文件:

       <?xml version="1.0"?>
       <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
       <rfc>
           ...
       </rfc>
        
       <?xml version="1.0"?>
       <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
       <rfc>
           ...
       </rfc>
        

Ignore the first two lines -- the declaration and the reference -- and simply treat them as opaque strings. Nothing else should be present after the "</rfc>" tag.

忽略前两行——声明和引用——并将它们简单地视为不透明字符串。“</rfc>”标记后不应出现其他内容。

Second, make sure that all elements are properly matched and nested.

其次,确保所有元素都正确匹配和嵌套。

A properly matched element that starts with "<example>" is eventually followed with "</example>". (Empty elements are always matched.) Elements are properly nested when they don't overlap.

正确匹配的元素以“<example>”开头,最后以“</example>”结尾。(空元素总是匹配的。)当元素不重叠时,它们会正确嵌套。

For example,

例如

       <outer>
           ...
           <inner>
               ...
           </inner>
           ...
       </outer>
        
       <outer>
           ...
           <inner>
               ...
           </inner>
           ...
       </outer>
        

is properly nested.

是正确嵌套的。

However,

然而

       <outer>
           ...
           <inner>
               ...
           </outer>
           ...
       </inner>
        
       <outer>
           ...
           <inner>
               ...
           </outer>
           ...
       </inner>
        

overlaps, so the elements aren't properly nested.

重叠,因此元素没有正确嵌套。

Third, never use "<" or "&" in your text. Instead, use either "&lt;" or "&amp;", respectively.

第三,不要在文本中使用“<”或“&”。相反,请分别使用“&lt;”或“&amp;”。

Fourth, there are two quoting characters in XML, 'apostrophe' and "quotation". Make sure that all attributes values are quoted, e.g., "<example name='value'>", If the value contains one of the quoting characters, then use the other to quote the value, e.g., "<example name='"'>", If the value contains both quoting characters, then use one of them to quote the value, and replace occurrances of that character in the attribute value with either '&apos;' (apostrophe) or "&quot;" (quotation), e.g., "<example name='"&apos;"'>".

第四,XML中有两个引用字符,“撇号”和“引号”。确保所有属性值都被引用,例如“<example name='value'>”,如果该值包含一个引用字符,则使用另一个引用该值,例如“<example name='value'>”>,如果该值包含两个引号字符,则使用其中一个引号字符引用该值,并将属性值中该字符的出现替换为“&apos;”(撇号)或“引号”,例如“<example name=”apos;"'>".

If you want to put a comment in your source file, here's the syntax:

如果要在源文件中添加注释,请使用以下语法:

           <!-- comments can be multiline,
            if you wish -->
        
           <!-- comments can be multiline,
            if you wish -->
        

Finally, XML is case sensitive.

最后,XML是区分大小写的。

2.2 Front matter
2.2 前沿问题

Immediately following the "<rfc>" tag is the "front" element:

紧跟在“<rfc>”标记之后的是“front”元素:

       <?xml version="1.0"?>
       <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
       <rfc>
           <front>
               <title ...>
               <author ...>
               <author ...>
               <date ...>
               <area ...>
               <workgroup ...>
               <keyword ...>
               <keyword ...>
               <abstract ...>
               <note ...>
           </front>
           ...
       </rfc>
        
       <?xml version="1.0"?>
       <!DOCTYPE rfc SYSTEM "rfc2629.dtd">
       <rfc>
           <front>
               <title ...>
               <author ...>
               <author ...>
               <date ...>
               <area ...>
               <workgroup ...>
               <keyword ...>
               <keyword ...>
               <abstract ...>
               <note ...>
           </front>
           ...
       </rfc>
        

(Note that in all examples, indentation is used only for expository purposes.)

(请注意,在所有示例中,缩进仅用于说明目的。)

The "front" element consists of a "title" element, one or more "author" elements, a "date" element, one or more optional "area" elements, one or more optional "workgroup" elements, one or more optional "keyword" elements, an optional "abstract" element. and, one or more optional "note" elements.

“front”元素由一个“title”元素、一个或多个“author”元素、一个“date”元素、一个或多个可选的“area”元素、一个或多个可选的“workgroup”元素、一个或多个可选的“keyword”元素、一个可选的“abstract”元素组成。以及,一个或多个可选的“note”元素。

2.2.1 The title Element
2.2.1 标题元素

The "title" element identifies the title of the document. Because the title will be used in the headers of the document when formatted according to [2], if the title is more than 42 characters, then an abbreviation should also be provided, e.g.,

“title”元素标识文档的标题。因为当按照[2]进行格式化时,标题将用于文件的标题中,如果标题超过42个字符,则还应提供缩写,例如。,

       <title abbrev="Much Ado about Nothing">
       The IETF's Discussion on "Source Format of RFC Documents"
       </title>
        
       <title abbrev="Much Ado about Nothing">
       The IETF's Discussion on "Source Format of RFC Documents"
       </title>
        
2.2.2 The author Element
2.2.2 作者元素

Each "author" element identifies a document author. Since a document may have more than one author, more than one "author" element may be present. If the author is a person, then three attributes must be present in the "<author>" tag, "initials", "surname", and "fullname", e.g.,

每个“author”元素标识一个文档作者。由于文档可能有多个作者,因此可能存在多个“作者”元素。如果作者是个人,则“<author>”标记中必须有三个属性,“缩写”、“姓氏”和“全名”,例如。,

       <author initials="M.T." surname="Rose"
               fullname="Marshall T. Rose">
        
       <author initials="M.T." surname="Rose"
               fullname="Marshall T. Rose">
        

The "author" element itself consists of an "organization" element, and, an optional "address" element.

“author”元素本身由一个“organization”元素和一个可选的“address”元素组成。

The "organization" element is similar to the "title" element, in that an abbreviation may be paired with a long organization name using the "abbrev" attribute, e.g.,

“organization”元素类似于“title”元素,因为缩写可以与使用“abbrev”属性的长组织名称配对,例如。,

       <organization abbrev="ISI">
           USC/Information Sciences Institute
       </organization>
        
       <organization abbrev="ISI">
           USC/Information Sciences Institute
       </organization>
        

The "address" element consists of an optional "postal" element, an optional "phone" element, an optional "facsimile" element, an optional "email" element, and, an optional "uri" element.

“address”元素由可选的“postal”元素、可选的“phone”元素、可选的“传真”元素、可选的“email”元素和可选的“uri”元素组成。

The "postal" element contains one or more "street" elements, followed by any combination of "city", "region" (state or province), "code" (zipcode or postal code), and "country" elements, e.g.,

“邮政”元素包含一个或多个“街道”元素,后跟“城市”、“地区”(州或省)、“代码”(邮政编码或邮政编码)和“国家”元素的任意组合,例如。,

       <postal>
           <street>660 York Street</street>
           <street>M/S 40</street>
           <city>San Francisco</city> <region>CA</region>
           <code>94110</code>
           <country>US</country>
       </postal>
        
       <postal>
           <street>660 York Street</street>
           <street>M/S 40</street>
           <city>San Francisco</city> <region>CA</region>
           <code>94110</code>
           <country>US</country>
       </postal>
        

This flexibility is provided to allow for different national formats for postal addresses. Note however, that although the order of the "city", "region", "code", and "country" elements isn't specified, at most one of each may be present. Regardless, these elements must not be re-ordered during processing by an XML application (e.g., display applications must preserve the ordering of the information contained in these elements). Finally, the value of the "country" element should be a two-letter code from ISO 3166.

提供这种灵活性是为了允许邮政地址采用不同的国家格式。但是,请注意,虽然没有指定“城市”、“地区”、“代码”和“国家”元素的顺序,但每个元素最多只能有一个。无论如何,这些元素在XML应用程序处理期间不得重新排序(例如,显示应用程序必须保留这些元素中包含的信息的顺序)。最后,“country”元素的值应该是来自ISO3166的两个字母的代码。

The "phone", "facsimile", "email", and "uri" elements are simple, e.g.,

“电话”、“传真”、“电子邮件”和“uri”元素很简单,例如。,

       <phone>+1 415 695 3975</phone>
       <email>mrose@not.invisible.net</email>
       <uri>http://invisible.net/</uri>
        
       <phone>+1 415 695 3975</phone>
       <email>mrose@not.invisible.net</email>
       <uri>http://invisible.net/</uri>
        
2.2.3 The date Element
2.2.3 日期元素

The "date" element identifies the publication date of the document. It consists of a month and a year, e.g.,

“date”元素标识文档的发布日期。它由一个月和一年组成,例如。,

       <date month="February" year="1999" />
        
       <date month="February" year="1999" />
        

The "date" element also has an optional day attribute.

“date”元素还有一个可选的day属性。

2.2.4 Meta Data Elements
2.2.4 元数据元素

The "front" element may contain meta data -- the content of these elements does not appear in printed versions of the document.

“front”元素可能包含元数据——这些元素的内容不会出现在文档的打印版本中。

A document has one or more optional "area", "workgroup" and "keyword" elements, e.g.,

文档有一个或多个可选的“区域”、“工作组”和“关键字”元素,例如。,

       <area>General</area>
       <workgroup>RFC Beautification Working Group</workgroup>
       <keyword>RFC</keyword>
       <keyword>Request for Comments</keyword>
       <keyword>I-D</keyword>
       <keyword>Internet-Draft</keyword>
       <keyword>XML</keyword>
       <keyword>Extensible Markup Language</keyword>
        
       <area>General</area>
       <workgroup>RFC Beautification Working Group</workgroup>
       <keyword>RFC</keyword>
       <keyword>Request for Comments</keyword>
       <keyword>I-D</keyword>
       <keyword>Internet-Draft</keyword>
       <keyword>XML</keyword>
       <keyword>Extensible Markup Language</keyword>
        

The "area" elements identify a general category for the document (e.g., one of "Applications", "General", "Internet", "Management", "Operations", "Routing", "Security", "Transport", or "User"), while the "workgroup" elements identify the IETF working groups that produced the document, and the "keyword" elements identify useful search terms.

“区域”元素标识文档的一般类别(例如,“应用”、“一般”、“互联网”、“管理”、“操作”、“路由”、“安全”、“传输”或“用户”)中的一个),而“工作组”元素标识生成文档的IETF工作组,“关键字”元素标识有用的搜索词。

2.2.5 The abstract Element
2.2.5 抽象元素

A document may have an "abstract" element, which contains one or more "t" elements (Section 2.3.1.1). In general, only a single "t" element is present, e.g.,

文件可能有一个“抽象”元素,其中包含一个或多个“t”元素(第2.3.1.1节)。通常,只有一个“t”元素存在,例如。,

       <abstract>
           <t>This memo presents a technique for using XML
           (Extensible Markup Language) as a source format
           for documents in the Internet-Drafts (I-Ds) and
           Request for Comments (RFC) series.</t>
       </abstract>
        
       <abstract>
           <t>This memo presents a technique for using XML
           (Extensible Markup Language) as a source format
           for documents in the Internet-Drafts (I-Ds) and
           Request for Comments (RFC) series.</t>
       </abstract>
        
2.2.6 The note Element
2.2.6 音符元素

A document may have one or more "note" elements, each of which contains one or more "t" elements (Section 2.3.1.1). There is a mandatory "title" attribute. In general, the "note" element contains text from the IESG, e.g.,

一份文件可能有一个或多个“注释”元素,每个元素包含一个或多个“t”元素(第2.3.1.1节)。有一个强制的“title”属性。通常,“note”元素包含来自IESG的文本,例如。,

       <note title="IESG Note">
           <t>The IESG has something to say.</t>
       </note>
        
       <note title="IESG Note">
           <t>The IESG has something to say.</t>
       </note>
        
2.2.7 Status, Copyright Notice, Table of Contents
2.2.7 状态、版权声明、目录

Note that text relating to the memo's status, copyright notice, or table of contents is not included in the document's markup -- this is automatically inserted by an XML application when it produces either a text or HTML version of the document.

请注意,与备忘录状态、版权声明或目录相关的文本不包括在文档的标记中——当XML应用程序生成文档的文本或HTML版本时,会自动插入标记。

2.2.7.1 Conformance with RFC 2026
2.2.7.1 与RFC 2026的一致性

If an Internet-Draft is being produced, then the "ipr" attribute should be present in the "<rfc>" tag at the beginning of the file. The value of the attribute should be one of:

如果正在生成Internet草稿,则“ipr”属性应出现在文件开头的“<rfc>”标记中。该属性的值应为以下值之一:

full2026: indicating that the document is in full conformance with all the provisions of Section 10 of RFC 2026;

full2026:表明文件完全符合RFC 2026第10节的所有规定;

noDerivativeWorks2026: indicating that the document is in full conformance with all the provisions of Section 10 of RFC 2026 except that the right to produce derivative works is not granted; or,

NODERIVATIVEWORKS 2026:表明该文件完全符合RFC 2026第10节的所有规定,但未授予制作衍生作品的权利;或

none: indicating that the document is NOT offered in accordance with Section 10 of RFC 2026, and the author does not provide the IETF with any rights other than to publish as an Internet-Draft.

无:表明本文件未按照RFC 2026第10节的规定提供,且作者未向IETF提供除作为互联网草稿发布之外的任何权利。

In the latter case, a copyright notice will not be automatically inserted during processing by an XML application.

在后一种情况下,在XML应用程序处理期间不会自动插入版权声明。

Consult [3] for further details.

有关更多详细信息,请参阅[3]。

Finally, if the Internet-Draft is being submitted to an automated process, then the "docName" attribute should be present in the "<rfc>" tag at the beginning of the file. The value of this attribute contains the document (not file) name associated with this Internet-Draft, e.g.,

最后,如果要将Internet草稿提交到自动流程,则“docName”属性应该出现在文件开头的“<rfc>”标记中。此属性的值包含与此Internet草稿关联的文档(非文件)名称,例如。,

       <rfc ipr="full" docName="draft-mrose-writing-rfcs-01">
           ...
       </rfc>
        
       <rfc ipr="full" docName="draft-mrose-writing-rfcs-01">
           ...
       </rfc>
        
2.2.8 Everything in the Front
2.2.8 前面的一切

So, putting it all together, we have, e.g.,

所以,综合起来,我们有,例如。,

       <front>
           <title>Writing I-Ds and RFCs using XML</title>
        
       <front>
           <title>Writing I-Ds and RFCs using XML</title>
        
           <author initials="M.T." surname="Rose"
                   fullname="Marshall T. Rose">
               <organization>Invisible Worlds, Inc.</organization>
        
           <author initials="M.T." surname="Rose"
                   fullname="Marshall T. Rose">
               <organization>Invisible Worlds, Inc.</organization>
        
               <address>
                   <postal>
                       <street>660 York Street</street>
                       <street>M/S 40</street>
                       <city>San Francisco</city> <region>CA</region>
                       <code>94110</code>
                       <country>US</country>
                   </postal>
        
               <address>
                   <postal>
                       <street>660 York Street</street>
                       <street>M/S 40</street>
                       <city>San Francisco</city> <region>CA</region>
                       <code>94110</code>
                       <country>US</country>
                   </postal>
        
                   <phone>+1 415 695 3975</phone>
                   <email>mrose@not.invisible.net</email>
                   <uri>http://invisible.net/</uri>
               </address>
           </author>
        
                   <phone>+1 415 695 3975</phone>
                   <email>mrose@not.invisible.net</email>
                   <uri>http://invisible.net/</uri>
               </address>
           </author>
        
           <date month="February" year="1999" />
        
           <date month="February" year="1999" />
        
           <area>General</area>
           <workgroup>RFC Beautification Working Group</workgroup>
           <keyword>RFC</keyword>
           <keyword>Request for Comments</keyword>
           <keyword>I-D</keyword>
        
           <area>General</area>
           <workgroup>RFC Beautification Working Group</workgroup>
           <keyword>RFC</keyword>
           <keyword>Request for Comments</keyword>
           <keyword>I-D</keyword>
        
           <keyword>Internet-Draft</keyword>
           <keyword>XML</keyword>
           <keyword>Extensible Markup Language</keyword>
           <abstract>
               <t>This memo presents a technique for using XML
               (Extensible Markup Language) as a source format
               for documents in the Internet-Drafts (I-Ds) and
               Request for Comments (RFC) series.</t>
           </abstract>
       </front>
        
           <keyword>Internet-Draft</keyword>
           <keyword>XML</keyword>
           <keyword>Extensible Markup Language</keyword>
           <abstract>
               <t>This memo presents a technique for using XML
               (Extensible Markup Language) as a source format
               for documents in the Internet-Drafts (I-Ds) and
               Request for Comments (RFC) series.</t>
           </abstract>
       </front>
        
2.3 The Middle
2.3 中间

The "middle" element contains all the sections of the document except for the bibliography and appendices:

“中间”部分包含除参考书目和附录外的所有章节:

       ...
       </front>
       <middle>
           <section ...>
           <section ...>
           <section ...>
       </middle>
       <back>
       ...
        
       ...
       </front>
       <middle>
           <section ...>
           <section ...>
           <section ...>
       </middle>
       <back>
       ...
        

The "middle" element consists of one or more "section" elements.

“中间”元素由一个或多个“部分”元素组成。

2.3.1 The section Element
2.3.1 截面元素

Each "section" element contains a section of the document. There is a mandatory attribute, "title", that identifies the title of the section. There is also an optional attribute, "anchor", that is used for cross-referencing with the "xref" element (Section 2.3.1.4), e.g.,

每个“节”元素都包含文档的一节。有一个强制属性“title”,用于标识节的标题。还有一个可选属性“锚定”,用于与“外部参照”元素(第2.3.1.4节)交叉引用,例如。,

       <section anchor="intro" title="Introduction">
           ...
       </section>
        
       <section anchor="intro" title="Introduction">
           ...
       </section>
        

The "section" element is recursive -- each contains any number and combination of "t", "figure", and "section" elements, e.g.,

“section”元素是递归的——每个元素都包含任意数量的“t”、“figure”和“section”元素的组合,例如。,

       <section title="The Middle">
           ...
           <section title="The section Element">
               ...
               <section title="The t Element">...</section>
               <section title="The list Element">...</section>
               <section title="The figure Element">...</section>
               <section title="The xref Element">...</section>
               <section title="The eref Element">...</section>
               <section title="The iref Element">...</section>
           </section>
       </section>
        
       <section title="The Middle">
           ...
           <section title="The section Element">
               ...
               <section title="The t Element">...</section>
               <section title="The list Element">...</section>
               <section title="The figure Element">...</section>
               <section title="The xref Element">...</section>
               <section title="The eref Element">...</section>
               <section title="The iref Element">...</section>
           </section>
       </section>
        
2.3.1.1 The t Element
2.3.1.1 t元素

The "t" element contains any number and combination of paragraphs, lists, and figures. If a cross-reference is needed to a section, figure, or reference, the "xref" element (Section 2.3.1.4) is used; similarly, if an external-reference is needed, the "eref" element (Section 2.3.1.5) is used. Indexing of text is provided by the the "iref" element (Section 2.3.1.6).

“t”元素包含任意数量的段落、列表和数字的组合。如果截面、地物或参考需要交叉参考,则使用“外部参照”元素(第2.3.1.4节);同样,如果需要外部参考,则使用“eref”元素(第2.3.1.5节)。文本索引由“iref”元素提供(第2.3.1.6节)。

2.3.1.2 The list Element
2.3.1.2 列表元素

The "list" element contains one or more items. Each item is a "t" element, allowing for recursion, e.g.,

“list”元素包含一个或多个项。每个项目都是一个“t”元素,允许递归,例如。,

       <list style="numbers">
           <t>The pfirst item.</t>
           <t>The second item, which contains two bulleted sub-items:
               <list style="symbols">
                   <t>The first sub-item.</t>
                   <t>The second sub-item.</t>
               </list>
           </t>
       </list>
        
       <list style="numbers">
           <t>The pfirst item.</t>
           <t>The second item, which contains two bulleted sub-items:
               <list style="symbols">
                   <t>The first sub-item.</t>
                   <t>The second sub-item.</t>
               </list>
           </t>
       </list>
        

The "list" element has an optional attribute, "style", having the value "numbers" (for numeric lists), "symbols" (for bulleted lists), "hanging" (for hanging lists), or, "empty" (for indented text). If a "list" element is nested, the default value is taken from its closest parent; otherwise, the default value is "empty".

“list”元素有一个可选属性“style”,其值为“numbers”(用于数字列表)、“symbols”(用于项目符号列表)、“hanging”(用于挂起列表)或“empty”(用于缩进文本)。如果嵌套了“列表”元素,则默认值取自其最近的父元素;否则,默认值为“空”。

When nested within a "hanging list" element, the "t" element has an optional attribute, "hangText" that specifies the text to be inserted, e.g.,

当嵌套在“挂起列表”元素中时,“t”元素有一个可选属性“hangText”,用于指定要插入的文本,例如。,

       <list style="hanging">
           <t hangText="full2026:">indicating that the document is in
           full conformance with all the provisions of Section 10 of RFC
           2026;</t>
        
       <list style="hanging">
           <t hangText="full2026:">indicating that the document is in
           full conformance with all the provisions of Section 10 of RFC
           2026;</t>
        
           <t hangText="noDerivativeWorks2026:">indicating that the
           document is in full conformance with all the provisions of
           Section 10 of RFC 2026 except that the right to produce
           derivative works is not granted; or,</t>
        
           <t hangText="noDerivativeWorks2026:">indicating that the
           document is in full conformance with all the provisions of
           Section 10 of RFC 2026 except that the right to produce
           derivative works is not granted; or,</t>
        
           <t hangText="none:">indicating that the document is NOT
           offered in accordance with Section 10 of RFC 2026, and the
           author does not provide the IETF with any rights other than
           to publish as an Internet-Draft.</t>
       </list>
        
           <t hangText="none:">indicating that the document is NOT
           offered in accordance with Section 10 of RFC 2026, and the
           author does not provide the IETF with any rights other than
           to publish as an Internet-Draft.</t>
       </list>
        
2.3.1.3 The figure Element
2.3.1.3 图形元素

The "figure" element groups an optional "preamble" element, an "artwork" element, and an optional "postamble" element together. The "figure" element also has an optional "anchor" attribute that is used for cross-referencing with the "xref" element (Section 2.3.1.4). There is also an optional "title" attribute that identifies the title of the figure.

“figure”元素将可选的“preamble”元素、“artwork”元素和可选的“postmble”元素组合在一起。“figure”元素还有一个可选的“anchor”属性,用于与“xref”元素进行交叉引用(第2.3.1.4节)。还有一个可选的“title”属性,用于标识地物的标题。

The "preamble" and "postamble" elements, if present, are simply text. If a cross-reference is needed to a section, figure, or reference, the "xref" element (Section 2.3.1.4) is used; similarly, if an external-reference is needed, the "eref" element (Section 2.3.1.5) is used. Indexing of text is provided by the the "iref" element (Section 2.3.1.6).

“序言”和“后序言”元素(如果存在)只是文本。如果截面、地物或参考需要交叉参考,则使用“外部参照”元素(第2.3.1.4节);同样,如果需要外部参考,则使用“eref”元素(第2.3.1.5节)。文本索引由“iref”元素提供(第2.3.1.6节)。

The "artwork" element, which must be present, contains "ASCII artwork". Unlike text contained in the "t", "preamble", or "postamble" elements, both horizontal and vertical whitespace is significant in the "artwork" element.

必须存在的“artwork”元素包含“ASCII artwork”。与“t”、“序言”或“postamble”元素中包含的文本不同,“artwork”元素中的水平和垂直空白都很重要。

So, putting it all together, we have, e.g.,

所以,综合起来,我们有,例如。,

<figure anchor="figure_example"> <preamble>So, putting it all together, we have, e.g.,</preamble> <artwork> ascii artwork goes here...

<figure anchor=“figure_example”><preamble>因此,把所有这些放在一起,我们有,例如,</preamble><artwork>ascii artwork放在这里。。。

               be sure to use "&lt;" or "&amp;" instead of "<" and "&",
               respectively!
           </artwork>
           <postamble>which is a very simple example.</postamble>
       </figure>
        
               be sure to use "&lt;" or "&amp;" instead of "<" and "&",
               respectively!
           </artwork>
           <postamble>which is a very simple example.</postamble>
       </figure>
        

which is a very simple example.

这是一个非常简单的例子。

If you have artwork with a lot of "<" characters, then there's an XML trick you can use:

如果您的作品中有很多“<”字符,那么您可以使用以下XML技巧:

<figure> <preamble>If you have artwork with a lot of "&lt;" characters, then there's an XML trick you can use:</preamble> <artwork><![CDATA[ ascii artwork goes here...

<figure><Premission>如果您的作品中有很多“&lt;”字符,那么您可以使用一个XML技巧:</Premission><artwork><![CDATA[ascii艺术品在这里。。。

               just don't use "]]" in your artwork!
           ]]></artwork>
           <postamble>The "&lt;![CDATA[ ... ]]>" construct is called
           a CDATA block -- everything between the innermost brackets
           is left alone by the XML application.</postamble>
       </figure>
        
               just don't use "]]" in your artwork!
           ]]></artwork>
           <postamble>The "&lt;![CDATA[ ... ]]>" construct is called
           a CDATA block -- everything between the innermost brackets
           is left alone by the XML application.</postamble>
       </figure>
        

The "<![CDATA[ ... ]]>" construct is called a CDATA block -- everything between the innermost brackets is left alone by the XML application.

“<![CDATA[…]]>”构造称为CDATA块——最内层括号之间的所有内容都由XML应用程序单独保留。

Because the "figure" element represents a logical grouping of text and artwork, an XML application producing a text version of the document should attempt to keep these elements on the same page. Because RFC 2223 [2] allows no more than 69 characters by 49 lines of content on each page, XML applications should be prepared to prematurely introduce page breaks to allow for better visual grouping.

因为“figure”元素表示文本和艺术品的逻辑分组,所以生成文档文本版本的XML应用程序应该尝试将这些元素保持在同一页面上。因为RFC 2223[2]允许每页内容不超过69个字符,49行,所以XML应用程序应该准备好提前引入分页符,以便更好地进行可视化分组。

Finally, the "artwork" element has two optional attributes: "name" and "type". The former is used to suggest a filename to use when storing the content of the "artwork" element, whilst the latter contains a suggestive data-typing for the content.

最后,“artwork”元素有两个可选属性:“name”和“type”。前者用于建议在存储“artwork”元素的内容时使用的文件名,而后者包含内容的提示性数据键入。

2.3.1.4 The xref Element
2.3.1.4 外部参照元素

The "xref" element is used to cross-reference sections, figures, and references. The mandatory "target" attribute is used to link back to the "anchor" attribute of the "section", "figure", and "reference" elements. The value of the "anchor" and "target" attributes should be formatted according to the token syntax in Section 2.1.

“xref”元素用于交叉参照横断面、地物和参照。强制的“target”属性用于链接回“section”、“figure”和“reference”元素的“anchor”属性。“锚定”和“目标”属性的值应根据第2.1节中的令牌语法进行格式化。

If used as an empty element, e.g.,

如果用作空元素,例如。,

according to the token syntax in <xref target="xml_basics" />.

根据<xref target=“xml\u basics”/>中的标记语法。

then the XML application inserts an appropriate phrase during processing, such as "Section 2.1" or "<a href="#xml_basics">XML Basics</a>".

然后,XML应用程序在处理过程中插入适当的短语,例如“Section 2.1”或“<a href=“#XML_basics”>XML basics</a>”。

If used with content, e.g.,

如果与内容一起使用,例如。,

conforming to <xref target="refs.RFC2223">RFC 2223</xref>.

符合RFC 2223的要求。

then the XML application inserts an appropriate designation during processing, such as "RFC 2223 [2]" or "<a href="#refs.RFC2223">RFC 2223</a>". Although the XML application decides what "an appropriate designation" might be, its choice is consistent throughout the processing of the document.

然后,XML应用程序在处理过程中插入适当的指定,例如“RFC 2223[2]”或“<a href=“#refs.RFC2223”>RFC 2223</a>”。尽管XML应用程序决定“适当的名称”可能是什么,但它的选择在整个文档处理过程中是一致的。

2.3.1.5 The eref Element
2.3.1.5 eref元素

The "eref" element is used to reference external documents. The mandatory "target" attribute is a URI [4], e.g.,

“eref”元素用于引用外部文档。强制的“target”属性是URI[4],例如。,

       <eref target="http://metalab.unc.edu/xml/">Cafe con Leche</eref>
        
       <eref target="http://metalab.unc.edu/xml/">Cafe con Leche</eref>
        

Note that while the "target" attribute is always present, the "eref" element may be empty, e.g.,

请注意,虽然“target”属性始终存在,“eref”元素可能为空,例如。,

       <eref target="http://invisible.net/" />
        
       <eref target="http://invisible.net/" />
        

and the XML application inserts an appropriate designation during processing such as "[9]" or "<a href="http://invisible.net/">http://invisible.net/</a>".

并且XML应用程序在处理过程中插入适当的指定,例如“[9]”或“<a href=”http://invisible.net/">http://invisible.net/</a>”。

2.3.1.6 The iref Element
2.3.1.6 iref元素

The "iref" element is used to add information to an index. The mandatory "item" attribute is the primary key the information is stored under, whilst the optional "subitem" attribute is the secondary key, e.g.,

“iref”元素用于向索引添加信息。强制性的“项”属性是信息存储的主键,而可选的“子项”属性是辅助键,例如。,

       <iref item="indexing" subitem="how to" />
        
       <iref item="indexing" subitem="how to" />
        

Finally, note that the "iref" element is always empty -- it never contains any text.

最后,请注意,“iref”元素总是空的——它从不包含任何文本。

2.3.1.7 The vspace Element
2.3.1.7 vspace元素

The "vspace" element, which may occur only inside the "t" element, is used by the author to provide formatting guidance to the XML application. There is an attribute, "blankLines", that indicates the number of blank lines that should be inserted. A physical linebreak is specified by using the default value, "0".

“vspace”元素可能只出现在“t”元素内部,作者使用它为XML应用程序提供格式化指导。有一个属性“blankLines”,指示应插入的空行数。使用默认值“0”指定物理换行符。

In addition, the "vspace" element can be used to force a new physical paragraph within a list item, e.g.,

此外,“vspace”元素可用于强制列表项中的新物理段落,例如。,

       <list style="numbers">
           <t>This is list item.
              <vspace blankLines="1" />
              This is part of the same list item,
              although when displayed, it appears
              as a separate physical paragraph.</t>
       </list>
        
       <list style="numbers">
           <t>This is list item.
              <vspace blankLines="1" />
              This is part of the same list item,
              although when displayed, it appears
              as a separate physical paragraph.</t>
       </list>
        

An XML application producing a text version of the document should exercise care when encountering a value for "blankLines" that causes a pagebreak -- in particular, if a "vspace" element causes a pagebreak, then no further blank lines should be inserted. This allows authors to "force" a pagebreak by using an arbitrarily large value, e.g., "blankLines='100'".

生成文档文本版本的XML应用程序在遇到导致分页符的“空行”值时应特别小心——特别是,如果“vspace”元素导致分页符,则不应再插入更多的空行。这允许作者通过使用任意大的值“强制”换页,例如“blankLines='100'”。

Finally, note that the "vspace" element is always empty -- it never contains any text.

最后,请注意“vspace”元素总是空的——它从不包含任何文本。

2.4 Back matter
2.4 背景

Finally, the "back" element is used for references and appendices:

最后,“back”元素用于参考和附录:

           ...
           </middle>
           <back>
               <references>
                   <reference ...>
                   <reference ...>
               </references>
               <section ...>
               <section ...>
           </back>
       </rfc>
        
           ...
           </middle>
           <back>
               <references>
                   <reference ...>
                   <reference ...>
               </references>
               <section ...>
               <section ...>
           </back>
       </rfc>
        

The "back" element consists of an optional "references" element, and, one or more optional "section" elements. The "back" element itself is optional, if your document doesn't have any references or appendices, you don't have to include it.

“back”元素由一个可选的“references”元素和一个或多个可选的“section”元素组成。“back”元素本身是可选的,如果您的文档没有任何引用或附录,则不必包含它。

2.4.1 The references Element
2.4.1 引用元素

The "references" element contains the document's bibliography. It contains one or more "reference" elements.

“references”元素包含文档的参考书目。它包含一个或多个“引用”元素。

Each "reference" element contains a "front" element and one or more optional "seriesInfo" elements.

每个“reference”元素包含一个“front”元素和一个或多个可选的“serieinfo”元素。

We've already discussed the "front" element back in Section 2.2.

我们已经在第2.2节讨论了“前端”元素。

The "seriesInfo" element has two attributes, "name" and "value" that identify the document series and series entry, respectively.

“serieinfo”元素有两个属性,“name”和“value”,分别标识文档系列和系列条目。

The "reference" element has an optional "anchor" attribute that is used for cross-referencing with the "xref" element (Section 2.3.1.4), e.g.,

“reference”元素有一个可选的“anchor”属性,用于与“xref”元素(第2.3.1.4节)进行交叉引用,例如。,

       <reference anchor="refs.RFC2200">
           <front>
               <title>Internet Official Protocol Standards</title>
               <author initials="J." surname="Postel"
                       fullname="Jon Postel">
                   <organization abbrev="ISI">
                   USC/Information Sciences Institute
                   </organization>
               </author>
        
       <reference anchor="refs.RFC2200">
           <front>
               <title>Internet Official Protocol Standards</title>
               <author initials="J." surname="Postel"
                       fullname="Jon Postel">
                   <organization abbrev="ISI">
                   USC/Information Sciences Institute
                   </organization>
               </author>
        
               <date month="June" year="1997" />
           </front>
           <seriesInfo name="RFC" value="2200" />
           <seriesInfo name="STD" value="1" />
       </reference>
        
               <date month="June" year="1997" />
           </front>
           <seriesInfo name="RFC" value="2200" />
           <seriesInfo name="STD" value="1" />
       </reference>
        

The "reference" element also has an optional "target" attribute that is used for external references (c.f., Section 2.3.1.5). The XML application, if producing an HTML version of the document will use the "target" attribute accordingly; however, if the "name" attribute of the "seriesInfo" element has the value "RFC", then the XML application should automatically provide an appropriate default for the "target" attribute (e.g., "http://example.com/rfcs/rfc2200.txt").

“参考”元素还有一个可选的“目标”属性,用于外部参考(c.f.,第2.3.1.5节)。XML应用程序,如果生成文档的HTML版本,将相应地使用“target”属性;但是,如果“serieinfo”元素的“name”属性的值为“RFC”,那么XML应用程序应该自动为“target”属性提供适当的默认值(例如http://example.com/rfcs/rfc2200.txt").

2.4.2 Appendices
2.4.2 附录

To include appendices after the bibliography, simply add more "section" elements. (For an example, look at the example at the beginning of Section 2.4.)

要在参考书目之后包括附录,只需添加更多的“章节”元素。(例如,请参见第2.4节开头的示例。)

2.4.3 Copyright Status
2.4.3 版权状况

The copyright status for the document is not included in the document's markup -- this is automatically inserted by an XML application that produces either a text or HTML version of the document.

文档的版权状态不包括在文档的标记中——这由生成文档文本或HTML版本的XML应用程序自动插入。

3. Processing the XML Source File
3. 处理XML源文件

This section concerns itself with applications that operate on an XML source file. A lot of XML tools are available, as are many lists of XML resources, e.g., Cafe con Leche [5].

本节介绍在XML源文件上运行的应用程序。有很多XML工具可用,还有许多XML资源列表,例如Cafe con Leche[5]。

There are two kinds of XML tools: validating and non-validating. Both check that the source file conforms to the rules given in Section 2.1. However, in addition to making sure that the source file is well-formed, a validating tool also reads the DTD referenced by the source file to make sure that they match. There are a number of both validating and non-validating tools available.

有两种XML工具:验证和非验证。两者都检查源文件是否符合第2.1节中给出的规则。但是,除了确保源文件格式正确之外,验证工具还读取源文件引用的DTD,以确保它们匹配。有许多验证和非验证工具可用。

3.1 Editing
3.1 编辑

There are several XML editors available. Ideally, you want an editor that validates. This has two advantages:

有几个XML编辑器可用。理想情况下,您需要一个验证的编辑器。这有两个好处:

o the editor provides guidance in fleshing-out the document structure; and,

o 编辑人员在充实文档结构方面提供指导;和

o the editor validates that the source file matches the rules in the DTD.

o 编辑器验证源文件是否与DTD中的规则匹配。

There are two major modes in Emacs that support XML: tdtd [6] and psgml [7]. The latter mode allows you to validate the source file (by calling an external program). If you visit the source file in Emacs and the major mode isn't "SGML" or "XML", then usually all it takes is adding these lines to your ".emacs" file:

在支持XML的Emacs中有两种主要模式:tdtd[6]和psgml[7]。后一种模式允许您验证源文件(通过调用外部程序)。如果您在Emacs中访问源文件,并且主模式不是“SGML”或“XML”,那么通常只需将以下行添加到“.Emacs”文件:

(setq auto-mode-alist (cons (cons "\\.xml$" 'sgml-mode) auto-mode-alist))

(setq自动模式列表(cons(cons“\\.xml$”'sgml模式)自动模式列表))

and then restarting Emacs. If this doesn't work, try one of the sources above.

然后重新启动Emacs。如果这不起作用,请尝试上述来源之一。

The author uses both sgml-mode in Emacs, and a commercial validating editor, Clip! version 1.5 [8], when editing source files.

作者在Emacs中使用sgml模式,并使用商业验证编辑器Clip!编辑源文件时,版本1.5[8]。

3.1.1 Checking
3.1.1 检查

If your editor doesn't validate, then you should run a program to validate the source file.

如果编辑器没有验证,那么应该运行一个程序来验证源文件。

The author uses the AlphaWorks XML parser [9] for this purpose. It requires that your system have a Java virtual machine. In addition to Java, there are validating parsers written in C, Perl, Python, and Tcl.

为此,作者使用AlphaWorks XML解析器[9]。它要求您的系统具有Java虚拟机。除了Java之外,还有用C、Perl、Python和Tcl编写的验证解析器。

3.2 Converting to Text Format
3.2 转换为文本格式

The author has written the xml2rfc tool [10], which reads the source file and produces both a text and HTML version of the document. (This memo was produced using the xml2rfc tool.) Note that xml2rfc isn't a validating tool, so it's a good idea to use either a validating editor or run a stand-alone validating parser prior to using the tool.

作者编写了xml2rfc工具[10],它读取源文件并生成文档的文本和HTML版本。(此备忘录是使用xml2rfc工具生成的。)请注意,xml2rfc不是验证工具,因此最好在使用该工具之前使用验证编辑器或运行独立的验证解析器。

3.3 Converting to HTML Format
3.3 转换为HTML格式

The XML Style Language (XSL) is used to describe transformations from the source file into some other structured file. So, ideally you should use an XSL-capable formatter to convert an XML source file to HTML.

XML风格语言(XSL)用于描述从源文件到其他结构化文件的转换。因此,理想情况下,应该使用支持XSL的格式化程序将XML源文件转换为HTML。

However, as of this writing XSL is still in considerable flux. (Hence, no reference was included in this memo, as by the time you read this section, the reference would be outdated.) So, in the interim, the author uses the xml2rfc tool for this purpose, even though this tool doesn't provide much flexibility in its HTML layout.

然而,在撰写本文时,XSL仍处于相当大的变化之中。(因此,本备忘录中未包含任何引用,因为当您阅读本节时,该引用已过时。)因此,在此期间,作者使用xml2rfc工具实现此目的,尽管该工具在HTML布局中没有提供太多灵活性。

3.4 Viewing
3.4 观看

Browsers that support either XSL or Cascading Style Sheets (CSS) are able to view the source file directly.

支持XSL或级联样式表(CSS)的浏览器可以直接查看源文件。

At present, the author doesn't use any of these browsers, instead converting source files to either text or HTML.

目前,作者不使用这些浏览器,而是将源文件转换为文本或HTML。

3.5 Searching
3.5 搜索

As with text editors, any text-oriented search tool (e.g., grep) can be used on the source file. However, there are search tools available that understand structured source.

与文本编辑器一样,可以在源文件上使用任何面向文本的搜索工具(如grep)。然而,有一些搜索工具可以理解结构化源代码。

The author uses sgrep version 1.9 [11] for this purpose, e.g.

作者为此使用了sgrep版本1.9[11],例如:。

sgrep -g xml 'ELEMENTS("title") not in ELEMENTS("back")' \ writing-rfcs.xml

sgrep-g xml“元素(“标题”)不在元素(“背面”)”\writing-rfcs.xml

which extracts the title element from the source file.

它从源文件中提取title元素。

4. Security Considerations
4. 安全考虑

This memo raises no security issues; however, according to [2], your document should contain a section near the end that discusses the security considerations of the protocol or procedures that are the main topic of your document, e.g.,

这份备忘录没有提出任何安全问题;但是,根据[2],您的文档应在末尾附近包含一节,讨论协议或过程的安全注意事项,这些是您文档的主要主题,例如。,

       <middle>
           ...
           <section title="Security Considerations">
               <t>This memo raises no security issues;
               however,
               according to <xref target="refs.RFC2223" />,
               your document should contain a section near the end
               that discusses the security considerations of the
               protocol or procedures that are the main topic of your
               document.</t>
           </section>
       </middle>
        
       <middle>
           ...
           <section title="Security Considerations">
               <t>This memo raises no security issues;
               however,
               according to <xref target="refs.RFC2223" />,
               your document should contain a section near the end
               that discusses the security considerations of the
               protocol or procedures that are the main topic of your
               document.</t>
           </section>
       </middle>
        

References

工具书类

[1] World Wide Web Consortium, "Extensible Markup Language (XML) 1.0", W3C XML, February 1998.

[1] 万维网联盟,“可扩展标记语言(XML)1.0”,W3C XML,1998年2月。

[2] Postel, J. and J. Reynolds, "Instructions to RFC Authors", RFC 2223, October 1997.

[2] Postel,J.和J.Reynolds,“RFC作者须知”,RFC 2223,1997年10月。

[3] Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, October 1996.

[3] Bradner,S.,“互联网标准过程——第3版”,BCP 9,RFC 2026,1996年10月。

[4] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998.

[4] Berners Lee,T.,Fielding,R.和L.Masinter,“统一资源标识符(URI):通用语法”,RFC 2396,1998年8月。

   [5]  http://metalab.unc.edu/xml/
        
   [5]  http://metalab.unc.edu/xml/
        
   [6]  http://www.mulberrytech.com/tdtd/
        
   [6]  http://www.mulberrytech.com/tdtd/
        
   [7]  http://www.inria.fr/koala/plh/sxml.html
        
   [7]  http://www.inria.fr/koala/plh/sxml.html
        
   [8]  http://www.t2000-usa.com/
        
   [8]  http://www.t2000-usa.com/
        
   [9]  http://www.alphaworks.ibm.com/formula/xml/
        
   [9]  http://www.alphaworks.ibm.com/formula/xml/
        
   [10]  http://memory.palace.org/authoring/
        
   [10]  http://memory.palace.org/authoring/
        
   [11]  http://www.cs.helsinki.fi/~jjaakkol/sgrep.html
        
   [11]  http://www.cs.helsinki.fi/~jjaakkol/sgrep.html
        

Author's Address

作者地址

Marshall T. Rose Invisible Worlds, Inc. 660 York Street San Francisco, CA 94110 US

马歇尔·T·罗斯隐形世界,公司660约克街旧金山,CA 94110美国

   Phone: +1 415 695 3975
   EMail: mrose@not.invisible.net
   URI:   http://invisible.net/
        
   Phone: +1 415 695 3975
   EMail: mrose@not.invisible.net
   URI:   http://invisible.net/
        
Appendix A. The rfc Element
附录A.rfc要素

The "<rfc>" tag at the beginning of the file, with only an "ipr" attribute (Section 2.2.7.1), produces an Internet-Draft. However, when other attributes are added to this tag by the RFC editor, an RFC is produced, e.g.,

文件开头的“<rfc>”标记仅具有“ipr”属性(第2.2.7.1节),生成Internet草稿。但是,当RFC编辑器将其他属性添加到此标记时,将生成RFC,例如。,

       <rfc number="2200"
            obsoletes="2000, 1920, 1880, 1800, ..."
            category="std"
            seriesNo="1">
        
       <rfc number="2200"
            obsoletes="2000, 1920, 1880, 1800, ..."
            category="std"
            seriesNo="1">
        

At a minimum, the "number" attribute should be present.

至少应存在“number”属性。

The other attributes are:

其他属性包括:

o "obsoletes", having a comma-separated list of RFC numbers, that the document obsoletes;

o “作废”,有一个逗号分隔的RFC编号列表,文件作废;

o "updates", having a comma-separated list of RFC numbers, that the document updates;

o “更新”,具有文档更新的RFC编号的逗号分隔列表;

o "category", having one of these values:

o “类别”,具有以下值之一:

1. "std", for a Standards-Track document;

1. “std”,用于标准跟踪文件;

2. "bcp", "for a Best Current Practices document;

2. “bcp”,用于当前最佳实践文件;

3. "exp", for an Experimental Protocol document;

3. “exp”,用于实验协议文件;

4. "historic", for a historic document; or,

4. “历史性”,指历史性文件;或

5. "info", the default, for an Informational document.

5. 信息文档的默认值为“info”。

o "seriesNo", having the corresponding number in the STD (std), BCP (bcp), or FYI (info) series.

o “序列号”,在STD(标准)、BCP(BCP)或FYI(信息)系列中具有相应的编号。

Finally, a special entity, "&rfc.number;", is available. Authors preparing an RFC should use this entity whenever they want to reference the number of the RFC within the document itself. In printed versions of the document, the appropriate substitution (or "XXXX") will occur.

最后,还有一个特殊的实体&rfc.number。当准备RFC的作者希望引用文档本身中RFC的编号时,他们应该使用此实体。在文件的印刷版本中,将进行适当的替换(或“XXXX”)。

Appendix B. The RFC DTD
附录B.RFC DTD

<!-- DTD for the RFC document series, draft of 99-01-30 -->

<!-- RFC文件系列的DTD,草案99-01-30-->

<!-- Contents

<!-- 目录

DTD data types

DTD数据类型

The top-level

高层

Front matter

前沿问题

The Body

身体

Back matter -->

背景-->

<!-- DTD data types:

<!-- DTD数据类型:

           entity        description
           ======        ===============================================
           NUMBER        [0-9]+
           NUMBERS       a comma-separated list of NUMBER
        
           entity        description
           ======        ===============================================
           NUMBER        [0-9]+
           NUMBERS       a comma-separated list of NUMBER
        

DAY the day of the month, e.g., "1" MONTH the month of the year, e.g., "January" YEAR a four-digit year, e.g., "1999"

一个月中的一天,例如“1”个月一年中的一个月,例如“一月”年一个四位数的年,例如“1999”

           URI           e.g., "http://invisible.net/"
        
           URI           e.g., "http://invisible.net/"
        

ATEXT/CTEXT printable ASCII text (no line-terminators)

ATEXT/CTEXT可打印ASCII文本(无行终止符)

TEXT character data -->

文本字符数据-->

   <!ENTITY % NUMBER     "CDATA">
   <!ENTITY % NUMBERS    "CDATA">
        
   <!ENTITY % NUMBER     "CDATA">
   <!ENTITY % NUMBERS    "CDATA">
        
   <!ENTITY % DAY        "CDATA">
   <!ENTITY % MONTH      "CDATA">
   <!ENTITY % YEAR       "CDATA">
        
   <!ENTITY % DAY        "CDATA">
   <!ENTITY % MONTH      "CDATA">
   <!ENTITY % YEAR       "CDATA">
        
   <!ENTITY % URI        "CDATA">
        
   <!ENTITY % URI        "CDATA">
        
   <!ENTITY % ATEXT      "CDATA">
   <!ENTITY % CTEXT      "#PCDATA">
        
   <!ENTITY % ATEXT      "CDATA">
   <!ENTITY % CTEXT      "#PCDATA">
        
   <!ENTITY % TEXT       "#PCDATA">
        
   <!ENTITY % TEXT       "#PCDATA">
        
   <!ENTITY   rfc.number "2629">
        
   <!ENTITY   rfc.number "2629">
        

<!-- The top-level -->

<!-- 顶级-->

<!-- attributes for the "rfc" element are supplied by the RFC editor. when preparing drafts, authors should leave them blank.

<!-- “rfc”元素的属性由rfc编辑器提供。在准备草稿时,作者应将其留白。

     the "seriesNo" attribute is used if the category is, e.g., BCP.
     -->
   <!ELEMENT rfc         (front,middle,back?)>
   <!ATTLIST rfc
             number      %NUMBER;           #IMPLIED
             obsoletes   %NUMBERS;          ""
             updates     %NUMBERS;          ""
             category    (std|bcp|info|exp|historic)
                                            "info"
             seriesNo    %NUMBER;           #IMPLIED
             ipr         (full2026|noDerivativeWorks2026|none)
                                            #IMPLIED
             docName     %ATEXT;            #IMPLIED>
        
     the "seriesNo" attribute is used if the category is, e.g., BCP.
     -->
   <!ELEMENT rfc         (front,middle,back?)>
   <!ATTLIST rfc
             number      %NUMBER;           #IMPLIED
             obsoletes   %NUMBERS;          ""
             updates     %NUMBERS;          ""
             category    (std|bcp|info|exp|historic)
                                            "info"
             seriesNo    %NUMBER;           #IMPLIED
             ipr         (full2026|noDerivativeWorks2026|none)
                                            #IMPLIED
             docName     %ATEXT;            #IMPLIED>
        

<!-- Front matter -->

<!-- 前沿问题-->

   <!ELEMENT front       (title,author+,date,area*,workgroup*,keyword*,
                          abstract?,note*)>
        
   <!ELEMENT front       (title,author+,date,area*,workgroup*,keyword*,
                          abstract?,note*)>
        
   <!-- the "abbrev" attribute is used for headers, etc. -->
   <!ELEMENT title       (%CTEXT;)>
   <!ATTLIST title
             abbrev      %ATEXT;            #IMPLIED>
        
   <!-- the "abbrev" attribute is used for headers, etc. -->
   <!ELEMENT title       (%CTEXT;)>
   <!ATTLIST title
             abbrev      %ATEXT;            #IMPLIED>
        
   <!ELEMENT author      (organization,address?)>
   <!ATTLIST author
        
   <!ELEMENT author      (organization,address?)>
   <!ATTLIST author
        
             initials    %ATEXT;            #IMPLIED
             surname     %ATEXT;            #IMPLIED
             fullname    %ATEXT;            #IMPLIED>
        
             initials    %ATEXT;            #IMPLIED
             surname     %ATEXT;            #IMPLIED
             fullname    %ATEXT;            #IMPLIED>
        
   <!ELEMENT organization
                         (%CTEXT;)>
   <!ATTLIST organization
             abbrev      %ATEXT;            #IMPLIED>
        
   <!ELEMENT organization
                         (%CTEXT;)>
   <!ATTLIST organization
             abbrev      %ATEXT;            #IMPLIED>
        
   <!ELEMENT address     (postal?,phone?,facsimile?,email?,uri?)>
        
   <!ELEMENT address     (postal?,phone?,facsimile?,email?,uri?)>
        
   <!-- at most one of each the city, region, code, and country
        elements may be present -->
   <!ELEMENT postal      (street+,(city|region|code|country)*)>
   <!ELEMENT street      (%CTEXT;)>
   <!ELEMENT city        (%CTEXT;)>
   <!ELEMENT region      (%CTEXT;)>
   <!ELEMENT code        (%CTEXT;)>
   <!ELEMENT country     (%CTEXT;)>
   <!ELEMENT phone       (%CTEXT;)>
   <!ELEMENT facsimile   (%CTEXT;)>
   <!ELEMENT email       (%CTEXT;)>
   <!ELEMENT uri         (%CTEXT;)>
        
   <!-- at most one of each the city, region, code, and country
        elements may be present -->
   <!ELEMENT postal      (street+,(city|region|code|country)*)>
   <!ELEMENT street      (%CTEXT;)>
   <!ELEMENT city        (%CTEXT;)>
   <!ELEMENT region      (%CTEXT;)>
   <!ELEMENT code        (%CTEXT;)>
   <!ELEMENT country     (%CTEXT;)>
   <!ELEMENT phone       (%CTEXT;)>
   <!ELEMENT facsimile   (%CTEXT;)>
   <!ELEMENT email       (%CTEXT;)>
   <!ELEMENT uri         (%CTEXT;)>
        
   <!ELEMENT date        EMPTY>
   <!ATTLIST date
             day         %DAY;              #IMPLIED
             month       %MONTH;            #REQUIRED
             year        %YEAR;             #REQUIRED>
        
   <!ELEMENT date        EMPTY>
   <!ATTLIST date
             day         %DAY;              #IMPLIED
             month       %MONTH;            #REQUIRED
             year        %YEAR;             #REQUIRED>
        
   <!-- meta-data... -->
   <!ELEMENT area        (%CTEXT;)>
   <!ELEMENT workgroup   (%CTEXT;)>
   <!ELEMENT keyword     (%CTEXT;)>
        
   <!-- meta-data... -->
   <!ELEMENT area        (%CTEXT;)>
   <!ELEMENT workgroup   (%CTEXT;)>
   <!ELEMENT keyword     (%CTEXT;)>
        
   <!ELEMENT abstract    (t)+>
   <!ELEMENT note        (t)+>
   <!ATTLIST note
             title       %ATEXT;            #REQUIRED>
        
   <!ELEMENT abstract    (t)+>
   <!ELEMENT note        (t)+>
   <!ATTLIST note
             title       %ATEXT;            #REQUIRED>
        

<!-- The body -->

<!-- 身体-->

   <!ELEMENT middle      (section)+>
        
   <!ELEMENT middle      (section)+>
        
   <!ELEMENT section     (t|figure|section)*>
   <!ATTLIST section
             anchor      ID                 #IMPLIED
             title       %ATEXT;            #REQUIRED>
        
   <!ELEMENT section     (t|figure|section)*>
   <!ATTLIST section
             anchor      ID                 #IMPLIED
             title       %ATEXT;            #REQUIRED>
        
   <!ELEMENT t           (%TEXT;|list|figure|xref|eref|iref|vspace)*>
   <!ATTLIST t
             hangText    %ATEXT;            #IMPLIED>
        
   <!ELEMENT t           (%TEXT;|list|figure|xref|eref|iref|vspace)*>
   <!ATTLIST t
             hangText    %ATEXT;            #IMPLIED>
        
   <!-- the value of the style attribute is inherited from the closest
        parent -->
   <!ELEMENT list        (t+)>
   <!ATTLIST list
             style       (numbers|symbols|hanging|empty)
                                            "empty">
        
   <!-- the value of the style attribute is inherited from the closest
        parent -->
   <!ELEMENT list        (t+)>
   <!ATTLIST list
             style       (numbers|symbols|hanging|empty)
                                            "empty">
        
   <!ELEMENT xref        (%CTEXT;)>
   <!ATTLIST xref
             target      IDREF              #REQUIRED
             pageno      (true|false)       "false">
        
   <!ELEMENT xref        (%CTEXT;)>
   <!ATTLIST xref
             target      IDREF              #REQUIRED
             pageno      (true|false)       "false">
        
   <!ELEMENT eref        (%CTEXT;)>
   <!ATTLIST eref
             target      %URI;              #REQUIRED>
        
   <!ELEMENT eref        (%CTEXT;)>
   <!ATTLIST eref
             target      %URI;              #REQUIRED>
        
   <!ELEMENT iref        EMPTY>
   <!ATTLIST iref
             item        %ATEXT;            #REQUIRED
             subitem     %ATEXT;            "">
        
   <!ELEMENT iref        EMPTY>
   <!ATTLIST iref
             item        %ATEXT;            #REQUIRED
             subitem     %ATEXT;            "">
        
   <!ELEMENT vspace      EMPTY>
   <!ATTLIST vspace
             blankLines  %NUMBER;           "0">
        
   <!ELEMENT vspace      EMPTY>
   <!ATTLIST vspace
             blankLines  %NUMBER;           "0">
        
   <!ELEMENT figure      (preamble?,artwork,postamble?)>
   <!ATTLIST figure
             anchor      ID                 #IMPLIED
             title       %ATEXT;            "">
        
   <!ELEMENT figure      (preamble?,artwork,postamble?)>
   <!ATTLIST figure
             anchor      ID                 #IMPLIED
             title       %ATEXT;            "">
        
   <!ELEMENT preamble    (%TEXT;|xref|eref|iref)*>
   <!ELEMENT artwork     (%TEXT;)*>
   <!ATTLIST artwork
             xml:space   (default|preserve) "preserve">
   <!ELEMENT postamble   (%TEXT;|xref|eref|iref)*>
        
   <!ELEMENT preamble    (%TEXT;|xref|eref|iref)*>
   <!ELEMENT artwork     (%TEXT;)*>
   <!ATTLIST artwork
             xml:space   (default|preserve) "preserve">
   <!ELEMENT postamble   (%TEXT;|xref|eref|iref)*>
        

<!-- Back matter

<!-- 背景

-->

-->

   <!-- sections, if present, are appendices -->
   <!ELEMENT back        (references?,section*)>
        
   <!-- sections, if present, are appendices -->
   <!ELEMENT back        (references?,section*)>
        
   <!ELEMENT references  (reference+)>
   <!ELEMENT reference   (front,seriesInfo*)>
   <!ATTLIST reference
             anchor      ID                 #IMPLIED
             target      %URI;              #IMPLIED>
   <!ELEMENT seriesInfo  EMPTY>
   <!ATTLIST seriesInfo
             name        %ATEXT;            #REQUIRED
             value       %ATEXT;            #REQUIRED>
        
   <!ELEMENT references  (reference+)>
   <!ELEMENT reference   (front,seriesInfo*)>
   <!ATTLIST reference
             anchor      ID                 #IMPLIED
             target      %URI;              #IMPLIED>
   <!ELEMENT seriesInfo  EMPTY>
   <!ATTLIST seriesInfo
             name        %ATEXT;            #REQUIRED
             value       %ATEXT;            #REQUIRED>
        
Appendix C. Acknowledgements
附录C.确认书

The author gratefully acknowledges the contributions of: Alan Barrett, Brad Burdick, Brian Carpenter, Steve Deering, Patrik Faltstrom, Jim Gettys, Carl Malamud, Chris Newman, Kurt Starsinic, and, Frank Strauss.

作者衷心感谢以下人士的贡献:艾伦·巴雷特、布拉德·伯迪克、布莱恩·卡彭特、史蒂夫·迪林、帕特里克·法尔茨特罗姆、吉姆·盖蒂、卡尔·马拉默德、克里斯·纽曼、库尔特·斯塔西尼奇和弗兰克·施特劳斯。

Index

指数

I indexing how to 16

我知道怎么做

Full Copyright Statement

完整版权声明

Copyright (C) The Internet Society (1999). All Rights Reserved.

版权所有(C)互联网协会(1999年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。