| draft-iab-rfcv3-preptool-02.txt | draft-iab-rfcv3-preptool-latest.txt | |||
|---|---|---|---|---|
| Network Working Group P. Hoffman | Network Working Group P. Hoffman | |||
| Internet-Draft ICANN | Internet-Draft ICANN | |||
| Intended status: Informational J. Hildebrand | Intended status: Informational J. Hildebrand | |||
| Expires: January 1, 2017 Cisco | Expires: April 29, 2023 Cisco | |||
| June 30, 2016 | October 26, 2022 | |||
| RFC v3 Prep Tool Description | RFC v3 Prep Tool Description | |||
| draft-iab-rfcv3-preptool-02 | draft-iab-rfcv3-preptool-03 | |||
| Abstract | Abstract | |||
| This document describes some aspects of the "prep tool" that is | This document describes some aspects of the "prep tool" that is | |||
| expected to be created when the new RFC v3 specification is deployed. | expected to be created when the new RFC v3 specification is deployed. | |||
| Status of this Memo | Status of This Memo | |||
| This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
| provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at http://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on January 1, 2017. | This Internet-Draft will expire on April 29, 2023. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2016 IETF Trust and the persons identified as the | Copyright (c) 2022 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (http://trustee.ietf.org/license-info) in effect on the date of | (https://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| carefully, as they describe your rights and restrictions with respect | carefully, as they describe your rights and restrictions with respect | |||
| to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
| include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
| the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
| described in the Simplified BSD License. | described in the Simplified BSD License. | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
| 2. v3 Prep Tool Usage Scenarios . . . . . . . . . . . . . . . . . 5 | 2. v3 Prep Tool Usage Scenarios . . . . . . . . . . . . . . . . 4 | |||
| 3. Internet-Draft Submission . . . . . . . . . . . . . . . . . . 6 | 3. Internet-Draft Submission . . . . . . . . . . . . . . . . . . 4 | |||
| 4. Canonical RFC Preparation . . . . . . . . . . . . . . . . . . 7 | 4. Canonical RFC Preparation . . . . . . . . . . . . . . . . . . 5 | |||
| 5. What the v3 Prep Tool Does . . . . . . . . . . . . . . . . . . 8 | 5. What the v3 Prep Tool Does . . . . . . . . . . . . . . . . . 5 | |||
| 5.1. XML Sanitization . . . . . . . . . . . . . . . . . . . . . 8 | 5.1. XML Sanitization . . . . . . . . . . . . . . . . . . . . 5 | |||
| 5.1.1. XInclude Processing . . . . . . . . . . . . . . . . . 8 | 5.1.1. XInclude Processing . . . . . . . . . . . . . . . . . 6 | |||
| 5.1.2. DTD Removal . . . . . . . . . . . . . . . . . . . . . 8 | 5.1.2. DTD Removal . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 5.1.3. Processing Instruction Removal . . . . . . . . . . . . 8 | 5.1.3. Processing Instruction Removal . . . . . . . . . . . 6 | |||
| 5.1.4. Validity Check . . . . . . . . . . . . . . . . . . . . 8 | 5.1.4. Validity Check . . . . . . . . . . . . . . . . . . . 6 | |||
| 5.1.5. Check "anchor" . . . . . . . . . . . . . . . . . . . . 9 | 5.1.5. Check "anchor" . . . . . . . . . . . . . . . . . . . 6 | |||
| 5.2. Defaults . . . . . . . . . . . . . . . . . . . . . . . . . 9 | 5.2. Defaults . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 5.2.1. "version" Insertion . . . . . . . . . . . . . . . . . 9 | 5.2.1. "version" Insertion . . . . . . . . . . . . . . . . . 6 | |||
| 5.2.2. "seriesInfo" Insertion . . . . . . . . . . . . . . . . 9 | 5.2.2. "seriesInfo" Insertion . . . . . . . . . . . . . . . 6 | |||
| 5.2.3. <date> Insertion . . . . . . . . . . . . . . . . . . . 9 | 5.2.3. <date> Insertion . . . . . . . . . . . . . . . . . . 7 | |||
| 5.2.4. "prepTime" Insertion . . . . . . . . . . . . . . . . . 9 | 5.2.4. "prepTime" Insertion . . . . . . . . . . . . . . . . 7 | |||
| 5.2.5. <ol> Group "start" Insertion . . . . . . . . . . . . . 10 | 5.2.5. <ol> Group "start" Insertion . . . . . . . . . . . . 7 | |||
| 5.2.6. Attribute Default Value Insertion . . . . . . . . . . 10 | 5.2.6. Attribute Default Value Insertion . . . . . . . . . . 7 | |||
| 5.2.7. Section "toc" attribute . . . . . . . . . . . . . . . 10 | 5.2.7. Section "toc" attribute . . . . . . . . . . . . . . . 7 | |||
| 5.2.8. "removeInRFC" Warning Paragraph . . . . . . . . . . . 10 | 5.2.8. "removeInRFC" Warning Paragraph . . . . . . . . . . . 8 | |||
| 5.3. Normalization . . . . . . . . . . . . . . . . . . . . . . 10 | 5.3. Normalization . . . . . . . . . . . . . . . . . . . . . . 8 | |||
| 5.3.1. "month" Attribute . . . . . . . . . . . . . . . . . . 11 | 5.3.1. "month" Attribute . . . . . . . . . . . . . . . . . . 8 | |||
| 5.3.2. ASCII Attribute Processing . . . . . . . . . . . . . . 11 | 5.3.2. ASCII Attribute Processing . . . . . . . . . . . . . 8 | |||
| 5.3.3. "title" Conversion . . . . . . . . . . . . . . . . . . 11 | 5.3.3. "title" Conversion . . . . . . . . . . . . . . . . . 8 | |||
| 5.4. Generation . . . . . . . . . . . . . . . . . . . . . . . . 11 | 5.4. Generation . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
| 5.4.1. "expiresDate" Insertion . . . . . . . . . . . . . . . 11 | 5.4.1. "expiresDate" Insertion . . . . . . . . . . . . . . . 9 | |||
| 5.4.2. <boilerplate> Insertion . . . . . . . . . . . . . . . 11 | 5.4.2. <boilerplate> Insertion . . . . . . . . . . . . . . . 9 | |||
| 5.4.2.1. Compare <rfc> "submissionType" and | 5.4.2.1. Compare <rfc> "submissionType" and <seriesInfo> | |||
| <seriesInfo> "stream" . . . . . . . . . . . . . . 12 | "stream" . . . . . . . . . . . . . . . . . . . . 9 | |||
| 5.4.2.2. 'Status of this Memo' Insertion . . . . . . . . . 12 | 5.4.2.2. 'Status of this Memo' Insertion . . . . . . . . . 9 | |||
| 5.4.2.3. Copyright Insertion . . . . . . . . . . . . . . . 12 | 5.4.2.3. Copyright Insertion . . . . . . . . . . . . . . . 9 | |||
| 5.4.3. <reference> "target" Insertion . . . . . . . . . . . . 12 | 5.4.3. <reference> "target" Insertion . . . . . . . . . . . 9 | |||
| 5.4.4. <name> Slugification . . . . . . . . . . . . . . . . . 12 | 5.4.4. <name> Slugification . . . . . . . . . . . . . . . . 10 | |||
| 5.4.5. <reference> Sorting . . . . . . . . . . . . . . . . . 12 | 5.4.5. <reference> Sorting . . . . . . . . . . . . . . . . . 10 | |||
| 5.4.6. "pn" Numbering . . . . . . . . . . . . . . . . . . . . 13 | 5.4.6. "pn" Numbering . . . . . . . . . . . . . . . . . . . 10 | |||
| 5.4.7. <iref> Numbering . . . . . . . . . . . . . . . . . . . 13 | 5.4.7. <iref> Numbering . . . . . . . . . . . . . . . . . . 10 | |||
| 5.4.8. <xref> processing . . . . . . . . . . . . . . . . . . 13 | 5.4.8. <xref> processing . . . . . . . . . . . . . . . . . . 11 | |||
| 5.4.8.1. "derivedContent" Insertion (With Content) . . . . 13 | 5.4.8.1. "derivedContent" Insertion (With Content) . . . . 11 | |||
| 5.4.8.2. "derivedContent" Insertion (Without Content) . . . 13 | 5.4.8.2. "derivedContent" Insertion (Without Content) . . 11 | |||
| 5.4.9. <relref> Processing . . . . . . . . . . . . . . . . . 14 | 5.4.9. <relref> Processing . . . . . . . . . . . . . . . . . 12 | |||
| 5.5. Inclusion . . . . . . . . . . . . . . . . . . . . . . . . 14 | 5.5. Inclusion . . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
| 5.5.1. <artwork> Processing . . . . . . . . . . . . . . . . . 14 | 5.5.1. <artwork> Processing . . . . . . . . . . . . . . . . 12 | |||
| 5.5.2. <sourcecode> Processing . . . . . . . . . . . . . . . 16 | 5.5.2. <sourcecode> Processing . . . . . . . . . . . . . . . 13 | |||
| 5.6. RFC Production Mode Cleanup . . . . . . . . . . . . . . . 16 | 5.6. RFC Production Mode Cleanup . . . . . . . . . . . . . . . 14 | |||
| 5.6.1. <note> Removal . . . . . . . . . . . . . . . . . . . . 17 | 5.6.1. <note> Removal . . . . . . . . . . . . . . . . . . . 14 | |||
| 5.6.2. <cref> Removal . . . . . . . . . . . . . . . . . . . . 17 | 5.6.2. <cref> Removal . . . . . . . . . . . . . . . . . . . 14 | |||
| 5.6.3. <link> Processing . . . . . . . . . . . . . . . . . . 17 | 5.6.3. <link> Processing . . . . . . . . . . . . . . . . . . 14 | |||
| 5.6.4. XML Comment Removal . . . . . . . . . . . . . . . . . 17 | 5.6.4. XML Comment Removal . . . . . . . . . . . . . . . . . 15 | |||
| 5.6.5. "xml:base" and "originalSrc" Removal . . . . . . . . . 17 | 5.6.5. "xml:base" and "originalSrc" Removal . . . . . . . . 15 | |||
| 5.6.6. Compliance Check . . . . . . . . . . . . . . . . . . . 17 | 5.6.6. Compliance Check . . . . . . . . . . . . . . . . . . 15 | |||
| 5.7. Finalization . . . . . . . . . . . . . . . . . . . . . . . 18 | 5.7. Finalization . . . . . . . . . . . . . . . . . . . . . . 15 | |||
| 5.7.1. "scripts" Insertion . . . . . . . . . . . . . . . . . 18 | 5.7.1. "scripts" Insertion . . . . . . . . . . . . . . . . . 15 | |||
| 5.7.2. Pretty-Format . . . . . . . . . . . . . . . . . . . . 18 | 5.7.2. Pretty-Format . . . . . . . . . . . . . . . . . . . . 15 | |||
| 6. Additional Uses for the Prep Tool . . . . . . . . . . . . . . 19 | 6. Additional Uses for the Prep Tool . . . . . . . . . . . . . . 15 | |||
| 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 | 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 | |||
| 8. Security Considerations . . . . . . . . . . . . . . . . . . . 21 | 8. Security Considerations . . . . . . . . . . . . . . . . . . . 16 | |||
| 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 22 | 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 16 | |||
| 10. Informative References . . . . . . . . . . . . . . . . . . . . 23 | 10. Informative References . . . . . . . . . . . . . . . . . . . 16 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 24 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17 | |||
| 1. Introduction | 1. Introduction | |||
| For the future of the RFC format, the RFC Editor has decided that XML | For the future of the RFC format, the RFC Editor has decided that XML | |||
| (using the XML2RFCv3 vocabulary [I-D.iab-xml2rfc]) is the canonical | (using the XML2RFCv3 vocabulary [I-D.iab-xml2rfc]) is the canonical | |||
| format, in the sense that it is the data that is the authorized, | format, in the sense that it is the data that is the authorized, | |||
| recognized, accepted, and archived version of the document. See | recognized, accepted, and archived version of the document. See | |||
| [RFC6949] for more detail on this. | [RFC6949] for more detail on this. | |||
| Most people will read other formats, such as HTML, PDF, ASCII text, | Most people will read other formats, such as HTML, PDF, ASCII text, | |||
| skipping to change at page 13, line 47 ¶ | skipping to change at page 11, line 20 ¶ | |||
| For each <xref> element that has content, fill the "derivedContent" | For each <xref> element that has content, fill the "derivedContent" | |||
| with the element content, having first trimmed the whitespace from | with the element content, having first trimmed the whitespace from | |||
| ends of content text. Issue a warning if the "derivedContent" | ends of content text. Issue a warning if the "derivedContent" | |||
| attribute already exists and has a different value from what was | attribute already exists and has a different value from what was | |||
| being filled in. | being filled in. | |||
| 5.4.8.2. "derivedContent" Insertion (Without Content) | 5.4.8.2. "derivedContent" Insertion (Without Content) | |||
| For each <xref> element that does not have content, fill the | For each <xref> element that does not have content, fill the | |||
| "derivedContent" based on the "format" attribute. * For | "derivedContent" based on the "format" attribute. | |||
| format='counter', the "derivedContent" is the section, figure, table, | ||||
| or ordered list number of the element with anchor equal to the xref | o For format='counter', the "derivedContent" is the section, figure, | |||
| target. * For format='default' and the "target" attribute points to a | table, or ordered list number of the element with anchor equal to | |||
| <reference> or <referencegroup> element, the "derivedContent" is the | the xref target. | |||
| value of the "target" attribute (or the "to" attribute of a | ||||
| <displayreference> element for the targeted <reference>). * For | o For format='default' and the "target" attribute points to a | |||
| format='default' and the "target" attribute points to a <section>, | <reference> or <referencegroup> element, the "derivedContent" is | |||
| <figure>, or <table>, the "derivedContent" is the name of the thing | the value of the "target" attribute (or the "to" attribute of a | |||
| pointed to, such as "Section 2.3", "Figure 12", or "Table 4". * For | <displayreference> element for the targeted <reference>). | |||
| format='title', if the target is a <reference> element, the | ||||
| "derivedContent" attribute is the name of the reference, extracted | o For format='default' and the "target" attribute points to a | |||
| from the <title> child of the <front> child of the reference. * For | <section>, <figure>, or <table>, the "derivedContent" is the name | |||
| format='title', if the target element has a <name> child element, the | of the thing pointed to, such as "Section 2.3", "Figure 12", or | |||
| "derivedContent" attribute is the text content of that <name> element | "Table 4". | |||
| concatenated with the text content of each descendant node of <name> | ||||
| (that is, stripping out all of the XML markup, leaving only the | o For format='title', if the target is a <reference> element, the | |||
| text). * For format='title', if the target element does not contain a | "derivedContent" attribute is the name of the reference, extracted | |||
| <name> child element, the "derivedContent" attribute is the value of | from the <title> child of the <front> child of the reference. | |||
| the "target" attribute with no other adornment. Issue a warning if | ||||
| the "derivedContent" attribute already exists and has a different | o For format='title', if the target element has a <name> child | |||
| value from what was being filled in. | element, the "derivedContent" attribute is the text content of | |||
| that <name> element concatenated with the text content of each | ||||
| descendant node of <name> (that is, stripping out all of the XML | ||||
| markup, leaving only the text). | ||||
| o For format='title', if the target element does not contain a | ||||
| <name> child element, the "derivedContent" attribute is the value | ||||
| of the "target" attribute with no other adornment. Issue a | ||||
| warning if the "derivedContent" attribute already exists and has a | ||||
| different value from what was being filled in. | ||||
| 5.4.9. <relref> Processing | 5.4.9. <relref> Processing | |||
| If any <relref> element's "target" attribute refers to anything but a | If any <relref> element's "target" attribute refers to anything but a | |||
| <reference> element, give an error. | <reference> element, give an error. | |||
| For each <relref> element, fill in the "derivedLink" attribute. | For each <relref> element, fill in the "derivedLink" attribute. | |||
| 5.5. Inclusion | 5.5. Inclusion | |||
| skipping to change at page 14, line 46 ¶ | skipping to change at page 12, line 30 ¶ | |||
| attribute, and replace the "src" value with a URI that uses the | attribute, and replace the "src" value with a URI that uses the | |||
| "file:" scheme in a path relative to the file being processed. | "file:" scheme in a path relative to the file being processed. | |||
| See Section 8 for warnings about this step. This will likely be | See Section 8 for warnings about this step. This will likely be | |||
| one of the most common authoring approaches. | one of the most common authoring approaches. | |||
| 2. If an <artwork> element has a "src" attribute with a "file:" | 2. If an <artwork> element has a "src" attribute with a "file:" | |||
| scheme, and if processing the URL would cause the processor to | scheme, and if processing the URL would cause the processor to | |||
| retrieve a file that is not in the same directory, or a | retrieve a file that is not in the same directory, or a | |||
| subdirectory, as the file being processed, give an error. If the | subdirectory, as the file being processed, give an error. If the | |||
| "src" has any shellmeta strings (such as "`", "$USER", and so on) | "src" has any shellmeta strings (such as "`", "$USER", and so on) | |||
| that would be processed , give an error. Replace the "src" | that would be processed, give an error. Replace the "src" | |||
| attribute with a URI that uses the "file:" scheme in a path | attribute with a URI that uses the "file:" scheme in a path | |||
| relative to the file being processed. This rule attempts to | relative to the file being processed. This rule attempts to | |||
| prevent <artwork src='file:///etc/passwd'> and similar security | prevent <artwork src='file:///etc/passwd'> and similar security | |||
| issues. See Section 8 for warnings about this step. | issues. See Section 8 for warnings about this step. | |||
| 3. If an <artwork> element has a "src" attribute, and the element | 3. If an <artwork> element has a "src" attribute, and the element | |||
| has content, give an error. | has content, give an error. | |||
| 4. If an <artwork> element has type='svg' and there is a "src" | 4. If an <artwork> element has type='svg' and there is a "src" | |||
| attribute, the data needs to be moved into the content of the | attribute, the data needs to be moved into the content of the | |||
| <artwork> element. | <artwork> element. * If the "src" URI scheme is "data:", fill the | |||
| content of the <artwork> element with that data and remove the | ||||
| * If the "src" URI scheme is "data:", fill the content of the | "src" attribute. * If the "src" URI scheme is "file:", "http:", | |||
| <artwork> element with that data and remove the "src" | or "https:", fill the content of the <artwork> element with the | |||
| attribute. | resolved XML from the URI in the "src" attribute. If there is no | |||
| "originalSrc" attribute, add an "originalSrc" attribute with the | ||||
| * If the "src" URI scheme is "file:", "http:", or "https:", fill | value of the URI and remove the "src" attribute. * If the | |||
| the content of the <artwork> element with the resolved XML | <artwork> element has an "alt" attribute, and the SVG does not | |||
| from the URI in the "src" attribute. If there is no | have a <desc> element, add the <desc> element with the contents | |||
| "originalSrc" attribute, add an "originalSrc" attribute with | of the "alt" attribute. | |||
| the value of the URI and remove the "src" attribute. | ||||
| * If the <artwork> element has an "alt" attribute, and the SVG | ||||
| does not have a <desc> element, add the <desc> element with | ||||
| the contents of the "alt" attribute. | ||||
| 5. If an <artwork> element has type='binary-art', the data needs to | 5. If an <artwork> element has type='binary-art', the data needs to | |||
| be in a "src" attribute with a URI scheme of "data:". If the | be in a "src" attribute with a URI scheme of "data:". If the | |||
| "src" URI scheme is "file:", "http:", or "https:", resolve the | "src" URI scheme is "file:", "http:", or "https:", resolve the | |||
| URL. Replace the "src" attribute with a "data:" URI, and add an | URL. Replace the "src" attribute with a "data:" URI, and add an | |||
| "originalSrc" attribute with the value of the URI. For the | "originalSrc" attribute with the value of the URI. For the | |||
| "http:" and "https:" URI schemes, the mediatype of the "data:" | "http:" and "https:" URI schemes, the mediatype of the "data:" | |||
| URI will be the Content-Type of the HTTP response. For the | URI will be the Content-Type of the HTTP response. For the | |||
| "file:" URI scheme, the mediatype of the "data:" URI needs to be | "file:" URI scheme, the mediatype of the "data:" URI needs to be | |||
| guessed with heuristics (this is possibly a bad idea). This also | guessed with heuristics (this is possibly a bad idea). This also | |||
| fails for content that includes binary images but uses a type | fails for content that includes binary images but uses a type | |||
| other than "binary-art". Note: since this feature can't be used | other than "binary-art". Note: since this feature can't be used | |||
| for RFCs at the moment, this entire feature might be de- | for RFCs at the moment, this entire feature might be de- | |||
| prioritized. | prioritized. | |||
| 6. If an <artwork> element does not have type='svg' or type='binary- | 6. If an <artwork> element does not have type='svg' or type='binary- | |||
| art' and there is a "src" attribute, the data needs to be moved | art' and there is a "src" attribute, the data needs to be moved | |||
| into the content of the <artwork> element. Note that this step | into the content of the <artwork> element. Note that this step | |||
| assumes that all of the preferred types other than "binary-art" | assumes that all of the preferred types other than "binary-art" | |||
| are text, which is possibly wrong. | are text, which is possibly wrong. * If the "src" URI scheme is | |||
| "data:", fill the content of the <artwork> element with the | ||||
| * If the "src" URI scheme is "data:", fill the content of the | correctly-escaped form of that data and remove the "src" | |||
| <artwork> element with the correctly-escaped form of that data | attribute. * If the "src" URI scheme is "file:", "http:", or | |||
| and remove the "src" attribute. | "https:", fill the content of the <artwork> element with the | |||
| correctly-escaped form of the resolved text from the URI in the | ||||
| * If the "src" URI scheme is "file:", "http:", or "https:", fill | "src" attribute. If there is no "originalSrc" attribute, add an | |||
| the content of the <artwork> element with the correctly- | "originalSrc" attribute with the value of the URI and remove the | |||
| escaped form of the resolved text from the URI in the "src" | "src" attribute. | |||
| attribute. If there is no "originalSrc" attribute, add an | ||||
| "originalSrc" attribute with the value of the URI and remove | ||||
| the "src" attribute. | ||||
| 5.5.2. <sourcecode> Processing | 5.5.2. <sourcecode> Processing | |||
| 1. If an <sourcecode> element has a "src" attribute where no scheme | 1. If a <sourcecode> element has a "src" attribute where no scheme | |||
| is specified, copy the "src" attribute value to the "originalSrc" | is specified, copy the "src" attribute value to the "originalSrc" | |||
| attribute, and replace the "src" value with a URI that uses the | attribute, and replace the "src" value with a URI that uses the | |||
| "file:" scheme in a path relative to the file being processed. | "file:" scheme in a path relative to the file being processed. | |||
| See Section 8 for warnings about this step. This will likely be | See Section 8 for warnings about this step. This will likely be | |||
| one of the most common authoring approaches. | one of the most common authoring approaches. | |||
| 2. If an <sourcecode> element has a "src" attribute with a "file:" | 2. If a <sourcecode> element has a "src" attribute with a "file:" | |||
| scheme, and if processing the URL would cause the processor to | scheme, and if processing the URL would cause the processor to | |||
| retrieve a file that is not in the same directory, or a | retrieve a file that is not in the same directory, or a | |||
| subdirectory, as the file being processed, give an error. If the | subdirectory, as the file being processed, give an error. If the | |||
| "src" has any shellmeta strings (such as "`", "$USER", and so on) | "src" has any shellmeta strings (such as "`", "$USER", and so on) | |||
| that would be processed , give an error. Replace the "src" | that would be processed , give an error. Replace the "src" | |||
| attribute with a URI that uses the "file:" scheme in a path | attribute with a URI that uses the "file:" scheme in a path | |||
| relative to the file being processed. This rule attempts to | relative to the file being processed. This rule attempts to | |||
| prevent <sourcecode src='file:///etc/passwd'> and similar | prevent <sourcecode src='file:///etc/passwd'> and similar | |||
| security issues. See Section 8 for warnings about this step. | security issues. See Section 8 for warnings about this step. | |||
| 3. If an <sourcecode> element has a "src" attribute, and the element | 3. If a <sourcecode> element has a "src" attribute, and the element | |||
| has content, give an error. | has content, give an error. | |||
| 4. If an <sourcecode> elementhas a "src" attribute, the data needs | 4. If a <sourcecode> element has a "src" attribute, the data needs | |||
| to be moved into the content of the <sourcecode> element. | to be moved into the content of the <sourcecode> element. * If | |||
| the "src" URI scheme is "data:", fill the content of the | ||||
| * If the "src" URI scheme is "data:", fill the content of the | <sourcecode> element with that data and remove the "src" | |||
| <sourcecode> element with that data and remove the "src" | attribute. * If the "src" URI scheme is "file:", "http:", or | |||
| attribute. | "https:", fill the content of the <sourcecode> element with the | |||
| resolved XML from the URI in the "src" attribute. If there is no | ||||
| * If the "src" URI scheme is "file:", "http:", or "https:", fill | "originalSrc" attribute, add an "originalSrc" attribute with the | |||
| the content of the <sourcecode> element with the resolved XML | value of the URI and remove the "src" attribute. | |||
| from the URI in the "src" attribute. If there is no | ||||
| "originalSrc" attribute, add an "originalSrc" attribute with | ||||
| the value of the URI and remove the "src" attribute. | ||||
| 5.6. RFC Production Mode Cleanup | 5.6. RFC Production Mode Cleanup | |||
| These steps provide extra cleanup of the output document in RFC | These steps provide extra cleanup of the output document in RFC | |||
| production mode. | production mode. | |||
| 5.6.1. <note> Removal | 5.6.1. <note> Removal | |||
| If in RFC production mode, if there is a <note> or <section> element | If in RFC production mode, if there is a <note> or <section> element | |||
| with a "removeInRFC" attribute that has the value "true", remove the | with a "removeInRFC" attribute that has the value "true", remove the | |||
| skipping to change at page 23, line 8 ¶ | skipping to change at page 16, line 41 ¶ | |||
| 9. Acknowledgements | 9. Acknowledgements | |||
| Many people contributed valuable ideas to this document. Special | Many people contributed valuable ideas to this document. Special | |||
| thanks go to Robert Sparks for his in-depth review and contributions | thanks go to Robert Sparks for his in-depth review and contributions | |||
| early in the development of this document, and to Julian Reschke for | early in the development of this document, and to Julian Reschke for | |||
| his help getting the document structured more clearly. | his help getting the document structured more clearly. | |||
| 10. Informative References | 10. Informative References | |||
| [I-D.iab-rfc5741bis] | [I-D.iab-rfc5741bis] | |||
| Halpern, J., Daigle, L., and O. Kolkman, "On RFC Streams, | Halpern, J., Daigle, L., Kolkman, O., and IAB, "RFC | |||
| Headers, and Boilerplates", draft-iab-rfc5741bis-02 (work | Streams, Headers, and Boilerplates", draft-iab- | |||
| in progress), February 2016. | rfc5741bis-02 (work in progress), February 2016. | |||
| [I-D.iab-xml2rfc] | [I-D.iab-xml2rfc] | |||
| Hoffman, P., "The "xml2rfc" version 3 Vocabulary", | Hoffman, P., "The "xml2rfc" Version 3 Vocabulary", draft- | |||
| draft-iab-xml2rfc-04 (work in progress), June 2016. | iab-xml2rfc-04 (work in progress), June 2016. | |||
| [RFC3470] Hollenbeck, S., Rose, M., and L. Masinter, "Guidelines for | [RFC3470] Hollenbeck, S., Rose, M., and L. Masinter, "Guidelines for | |||
| the Use of Extensible Markup Language (XML) within IETF | the Use of Extensible Markup Language (XML) within IETF | |||
| Protocols", BCP 70, RFC 3470, DOI 10.17487/RFC3470, | Protocols", BCP 70, RFC 3470, DOI 10.17487/RFC3470, | |||
| January 2003, <http://www.rfc-editor.org/info/rfc3470>. | January 2003, <https://www.rfc-editor.org/info/rfc3470>. | |||
| [RFC6949] Flanagan, H. and N. Brownlee, "RFC Series Format | [RFC6949] Flanagan, H. and N. Brownlee, "RFC Series Format | |||
| Requirements and Future Development", RFC 6949, | Requirements and Future Development", RFC 6949, | |||
| DOI 10.17487/RFC6949, May 2013, | DOI 10.17487/RFC6949, May 2013, | |||
| <http://www.rfc-editor.org/info/rfc6949>. | <https://www.rfc-editor.org/info/rfc6949>. | |||
| [RFC7669] Levine, J., "Assigning Digital Object Identifiers to | [RFC7669] Levine, J., "Assigning Digital Object Identifiers to | |||
| RFCs", RFC 7669, DOI 10.17487/RFC7669, October 2015, | RFCs", RFC 7669, DOI 10.17487/RFC7669, October 2015, | |||
| <http://www.rfc-editor.org/info/rfc7669>. | <https://www.rfc-editor.org/info/rfc7669>. | |||
| Authors' Addresses | Authors' Addresses | |||
| Paul Hoffman | Paul Hoffman | |||
| ICANN | ICANN | |||
| Email: paul.hoffman@icann.org | Email: paul.hoffman@icann.org | |||
| Joe Hildebrand | Joe Hildebrand | |||
| Cisco | Cisco | |||
| End of changes. 21 change blocks. | ||||
| 140 lines changed or deleted | 138 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||