User Tools

Site Tools


xml2rfc_examples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
xml2rfc_examples [2020/10/27 16:37]
arusso
xml2rfc_examples [2020/10/28 14:29]
arusso
Line 1: Line 1:
 ===== xml2rfc examples ===== ===== xml2rfc examples =====
 +
 +Considering "Is there a better way to do this?"
  
 ==== Summary ==== ==== Summary ====
   - xref to a section in another RFC and the authors want to include the section title   - xref to a section in another RFC and the authors want to include the section title
-  - xref to a section in another RFC when it's not desired to have the RFC number immediately afterwards. 
   - xref with format="title" doesn't work as expected   - xref with format="title" doesn't work as expected
   - <contact> inside <t> when providing more information than fullname    - <contact> inside <t> when providing more information than fullname 
Line 10: Line 11:
 ==== Details ==== ==== Details ====
  
-=== 1) xref to a section in another RFC and the authors want to include the section title ===+==== 1) xref to a section in another RFC and the authors want to include the section title ====
  
 It requires 2 xrefs to get the desired output (using sectionFormat="bare" for the first one). It requires 2 xrefs to get the desired output (using sectionFormat="bare" for the first one).
  
-See two examples at end of page+Note: As discussed with Henrik Nov. 2019.
  
-=== 2) xref to a section in another RFC when it's not desired to have the RFC number immediately afterwards===+Example A (from rfc8658.notprepped.xml)
  
-workaroundrephrase to avoid using sectionFormat="bare"+XML: 
 +<code> 
 +described in Section <xref target="RFC3575" section="2"  
 +sectionFormat="bare">IANA Considerations</xref> of <xref target="RFC3575"/> 
 +</code>
  
 +TEXT output:
 +<code>
 +described in Section 2 (IANA Considerations) of [RFC3575]
 +</code>
  
 +HTML output:
 +<html>
 +<p>defined in Section <a href="https://www.rfc-editor.org/rfc/rfc3575#section-2">2</a> (<a href="https://www.rfc-editor.org/rfc/rfc3575#section-2">IANA Considerations</a>) of [<a href="#RFC3575">RFC3575</a>]</p>
 +</html>
  
-=== 3) xref with format="title" doesn't work as expected === +-------------- 
 +Example B (from rfc8731.notprepped.xml) 
 + 
 +XML: 
 +<code> 
 +defined in Section <xref target="RFC5656" section="7.1"  
 +sectionFormat="bare">ECDH Message Numbers</xref> of <xref target="RFC5656"/> 
 +</code> 
 + 
 +TEXT output: 
 +<code> 
 +defined in Section 7.1 (ECDH Message Numbers) of [RFC5656] 
 +</code> 
 + 
 +HTML output: 
 +<html> 
 +<p>defined in Section <a href="https://www.rfc-editor.org/rfc/rfc5656#section-7.1">7.1</a> (<a href="https://www.rfc-editor.org/rfc/rfc5656#section-7.1">ECDH Message Numbers</a>) of [<a href="#RFC5656">RFC5656</a>]</p> 
 +</html> 
 + 
 + 
 +==== 2) xref with format="title" doesn't work as expected ====
  
 bc it includes square brackets around the title in the text file bc it includes square brackets around the title in the text file
Line 38: Line 71:
 <code> <code>
    This document obsoletes "["Dissemination of Flow Specification    This document obsoletes "["Dissemination of Flow Specification
-   Rules"]" [RFC5575] (see Appendix B for the differences).+   Rules"]" [RFC5575]
 </code> </code>
  
Line 46: Line 79:
 <code> <code>
   This document obsoletes ["Dissemination of Flow Specification Rules"]   This document obsoletes ["Dissemination of Flow Specification Rules"]
-   [RFC5575] (see Appendix B for the differences).+   [RFC5575]
 </code> </code>
  
  
-=== 4) use <contact> inside <t> when providing more information than fullname ===+==== 3) use <contact> inside <t> when providing more information than fullname ====
  
 The functionality exists when <contact> is outside <t>  (e.g., a contributor listed in the style of an address block), but when the <contact> is in <t> in a list, it's not possible. So we end up putting data about the individual outside the <contact> element. The functionality exists when <contact> is outside <t>  (e.g., a contributor listed in the style of an address block), but when the <contact> is in <t> in a list, it's not possible. So we end up putting data about the individual outside the <contact> element.
Line 67: Line 100:
  
  
-=== 5) get a <dl> with a blank line between <dt> and <dd> ===+==== 4) get a <dl> with a blank line between <dt> and <dd> ====
  
 Mail sent 2020-10-15 with details. Mail sent 2020-10-15 with details.
Line 77: Line 110:
 file: rfc8940.xml (draft-ietf-emu-eap-session-id-07) in AUTH48 currently file: rfc8940.xml (draft-ietf-emu-eap-session-id-07) in AUTH48 currently
  
-=== More on #1 === 
  
-=== xref to published RFC with section number and section title === 
  
-Note: As discussed with Henrik Nov. 2019. 
- 
-Example 1 (from rfc8658.notprepped.xml) 
- 
-XML: 
-<code> 
-described in Section <xref target="RFC3575" section="2"  
-sectionFormat="bare">IANA Considerations</xref> of <xref target="RFC3575"/> 
-</code> 
- 
-TEXT output: 
-<code> 
-described in Section 2 (IANA Considerations) of [RFC3575] 
-</code> 
- 
-HTML output: 
-<html> 
-<p>defined in Section <a href="https://www.rfc-editor.org/rfc/rfc3575#section-2">2</a> (<a href="https://www.rfc-editor.org/rfc/rfc3575#section-2">IANA Considerations</a>) of [<a href="#RFC3575">RFC3575</a>]</p> 
-</html> 
- 
-Example 2 (from rfc8731.notprepped.xml) 
- 
-XML: 
-<code> 
-defined in Section <xref target="RFC5656" section="7.1"  
-sectionFormat="bare">ECDH Message Numbers</xref> of <xref target="RFC5656"/> 
-</code> 
- 
-TEXT output: 
-<code> 
-defined in Section 7.1 (ECDH Message Numbers) of [RFC5656] 
-</code> 
- 
-HTML output: 
-<html> 
-<p>defined in Section <a href="https://www.rfc-editor.org/rfc/rfc5656#section-7.1">7.1</a> (<a href="https://www.rfc-editor.org/rfc/rfc5656#section-7.1">ECDH Message Numbers</a>) of [<a href="#RFC5656">RFC5656</a>]</p> 
-</html> 
xml2rfc_examples.txt · Last modified: 2020/10/28 15:14 by arusso