<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.31 (Ruby 3.2.3) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-tao-sml-structured-quoted-content-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.31.0 -->
  <front>
    <title>Structured Quoted Content</title>
    <seriesInfo name="Internet-Draft" value="draft-tao-sml-structured-quoted-content-00"/>
    <author fullname="Phillip Tao">
      <organization>Apple Inc.</organization>
      <address>
        <email>ptao@apple.com</email>
      </address>
    </author>
    <date year="2026" month="March" day="02"/>
    <area>Applications and Real-Time</area>
    <workgroup>Structured Email</workgroup>
    <keyword>quoted content</keyword>
    <keyword>reply</keyword>
    <keyword>forward</keyword>
    <abstract>
      <?line 37?>

<t>This document describes a machine-readable format for conveying quoted content in email messages. This can be used when replying to or forwarding an email message.</t>
      <t>Structured quoted content is expected to be used in conjunction with conventional, human-readable quote formatting. They are based on the forthcoming "structured email" specification defined in [I-D.ietf-sml-structured-email-03] and related drafts.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://ptao.github.io/id-structured-quoted-content/draft-tao-sml-structured-quoted-content.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-tao-sml-structured-quoted-content/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Structured Email Working Group mailing list (<eref target="mailto:sml@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/sml/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/sml/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/ptao/id-structured-quoted-content"/>.</t>
    </note>
  </front>
  <middle>
    <?line 43?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>Email messages often content quoted sections of earlier email messages, typically as part of a reply or a forwarded message. The presentation is entirely determined by the sending MUA. Though various conventions have evolved around this quoting, the behavior is still largely unstandardized, and behavior differs widely between MUAs.</t>
      <t>Some notable differences include:</t>
      <ul spacing="normal">
        <li>
          <t>Where newly authored content may be inserted relative to the quoted content.
          </t>
          <ul spacing="normal">
            <li>
              <t>Some MUAs allow inserting new content only above the quoted message, while some allow inserting new content inline between blocks of quoted text.</t>
            </li>
          </ul>
        </li>
        <li>
          <t>The formatting used, whether HTML or plaintext, to denote the quoted section.</t>
        </li>
        <li>
          <t>Whether some set of headers are also quoted, or whether an attribution line or preamble is inserted.
          </t>
          <ul spacing="normal">
            <li>
              <t>Whether the headers, attribution line, or preamble are localized into the sender's device language.</t>
            </li>
          </ul>
        </li>
        <li>
          <t>Whether attachments are included in the quoted content.</t>
        </li>
      </ul>
      <t>Due to the above, an email chain in a user's inbox may involve a wide mix of differing quoting styles, which can be visually disorienting.</t>
      <t>The goal of this draft is to introduce a standardized way to structure quoted content in message replies and forwarded messages. This allows the sending MUA to annotate the various components of the quoted content in such a way that the receiving MUA can then apply a consistent presentation across all messages.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="structured-email-format">
      <name>Structured Email Format</name>
      <section anchor="structured-data-type">
        <name>Structured Data Type</name>
        <t>All quoted content will be transmitted as "Partial representation" as defined by https://datatracker.ietf.org/doc/html/draft-ietf-sml-structured-email-05#name-partial-representation.</t>
      </section>
      <section anchor="vocabularies">
        <name>Vocabularies</name>
        <t>Structured Quoted Content uses the SchemaOrg vocabulary, as well as a custom vocabulary to be defined at <strong>INSERT LINK</strong>.</t>
      </section>
    </section>
    <section anchor="json-ld-objects">
      <name>JSON-LD Objects</name>
      <t>Structured Quoted Content uses the following object types.</t>
      <t><strong>EmailMessage</strong></t>
      <artwork><![CDATA[
* vocabulary: schema.org and sml.draft.iana.org
* id format: "mid:<message-id header>"
* The following properties can be set: sender, toRecipient, dateSent, dateReceived, about (subject)
    * Each property should have its own id
]]></artwork>
      <t><strong>QuotedContent</strong></t>
      <artwork><![CDATA[
* vocabulary: sml.draft.iana.org
* id format: "quoted-content:<UUID>"
* Properties:
    * message
        * References EmailMessage which this item is quoting
    * headerBlock
        * References QuotedHeaderBlock
        * optional
    * attribution
        * References QuoteAttribution
        * optional
    * content
        * References one or more TextContent or QuotedContent
]]></artwork>
      <t><strong>QuotedHeaderBlock</strong></t>
      <artwork><![CDATA[
* vocabulary: sml.draft.iana.org
* id format: "quoted-header-block:<UUID>"
* Properties:
    * header
        * References one or more QuotedHeader
]]></artwork>
      <t><strong>QuotedHeader</strong></t>
      <artwork><![CDATA[
* vocabulary: sml.draft.iana.org
* id format: "quoted-header:<UUID>"
* Properties:
    * label
        * Text label for the header
    * value
        * References one of the properties of an EmailMessage
]]></artwork>
      <t><strong>QuoteAttribution</strong></t>
      <artwork><![CDATA[
* vocabulary: sml.draft.iana.org
* id format: "quote-attribution:<UUID>"
* Properties:
    * date
        * References either the dateSent or dateReceived property of an EmailMessage
    * from
        * References the sender property of an Emailmessage
]]></artwork>
      <t><strong>TextContent</strong></t>
      <artwork><![CDATA[
* vocabulary: sml.draft.iana.org
* id format: "text-content:<UUID>"
* Properties:
]]></artwork>
      <t>Note, TextContent has no properties.</t>
      <t>TODO: There should be a type for a preamble for forwarding.</t>
    </section>
    <section anchor="html-format">
      <name>HTML Format</name>
      <t>Each quoted block will be wrapped in an HTML element (typically <tt>div</tt> or <tt>span</tt>) with a <tt>data-source-id</tt> and a <tt>data-id</tt> property. The <tt>data-source-id</tt> is a <tt>cid:</tt> URI referencing the MIME part which contains the structured data definitions. The <tt>data-id</tt> is the <tt>id</tt> of the matching element.</t>
    </section>
    <section anchor="plaintext-format">
      <name>Plaintext Format</name>
      <t>TODO Plaintext</t>
    </section>
    <section anchor="backwards-compatibility">
      <name>Backwards Compatibility</name>
      <t>In a long reply chain, not all MUAs involved may be SML-aware. This results in two types of mixed content:
1. A MUA which is compliant with Structured Quoted Content quoting a message which does not have Structured Quoted Content.
1. A MUA which is not aware of Structured Quoted Content quoting a message which has Structured Quoted Content.</t>
      <t>In the first case, the MUA <bcp14>SHOULD NOT</bcp14> try to retroactively determine the quoted content structure of the email it is quoting. In other words, it <bcp14>SHOULD NOT</bcp14> attempt to parse the HTML or plain-text formatting of that message in order to build a structured representation. Instead, any structured quoted content that it generates should treat the quoted message as one having no quoted content itself.</t>
      <t>The MUA in the second situation is by definition not bound to any behavior specified in this draft. It may likely do one or both of the following:
1. Modify the HTML or plaintext in such a way that the existing structured content properties no longer behave as expected.
2. Modify the MIME structure in such a way that the structured quoted content is no longer valid. For example it may:
    * Change the MIME structure in such a way that the message is no longer classified as a "partial representation".
    * Remove or modify the <tt>application/ld+json</tt> part.</t>
      <t>In general, it can be assumed that for a message which contains Structured Quoted Content, the Structured Quoted Content represents the most recent contiguous set of messages. This set of messages may be a subset of all the messages which actually comprise the quoted reply chain. Such a case occurs when the oldest message represented in the Structured Quoted Content has quoted a message sent by a MUA which was not aware of Structured Quoted Content.</t>
      <t>When rendering such a message, only the first contiguous set of Structured Quoted Content should be treated as Structured Quoted Content. Any HTML or JSON-LD is found which hints at the presence of Structured Quoted Content further back in the reply chain, but which has not made it to the receiving MUA intact, should be ignored and that portion of HTML should be rendered as not containing Structured Quoted Content.</t>
    </section>
    <section anchor="mua-guidance">
      <name>MUA Guidance</name>
      <t>TODO: List potential usages/purposes/benefits</t>
      <t>Some examples:</t>
      <ul spacing="normal">
        <li>
          <t>More reliable quoted content parsing/recognition by all compliant MUAs</t>
        </li>
        <li>
          <t>Allow for consistent and localized quoting style (determined by receiver rather than sender)</t>
        </li>
        <li>
          <t>Better condensed display</t>
        </li>
        <li>
          <t>Clearer attribution of deeply nested content</t>
        </li>
        <li>
          <t>Clearer attribution for inline quoting</t>
        </li>
      </ul>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>TODO Security</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-normative-references">
      <name>Normative References</name>
      <reference anchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
    </references>
    <?line 220?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA61a63LjthX+z6dAlR9NXEmOk3SaarZJtLY3q9aXjS/NZDKZ
MUhCErIkwRCgtEom79Jn6ZP1OwfgTbY2zqR/1iIInMt3rjjcyWQSOe0yNROj
W1fViasrlYpvauPw59QUThVuFCXSqZWpdjNhXRpFqUkKmeNMWsmlmzhpJjbP
JrYlMPmJCUwST2Dy8ceRreNcW6uxsitxdHF+90qID4TMrAFzXaSqVPgH7MZi
pFLtTKVlRg+L+Uv8MRV+3dy9GkVFnceqmkUppJpF4GFVYWs7E+Cvos1MfBrJ
SklQnZdlpiE8uFohi1TcKJlN7nSuRtHWVG9XlanLoernudTZKHqrdtiQziIx
EV4ZEZShlUqV2Y5+LE21lVUabVRRQxYhDlMUwis++haMdbESX9NWWqf3WAeE
X2nlllNTrWhZVskay2vnSjs7PqZdtKQ3atpsO6aF47gyW6uOcf6Yzq20W9cx
TpYwzLFOD9uFdmcA0boeHzo19TSm+v3nj59p/+na5UAgkrVbm4owBWMhlnWW
eT8avVnrLNOluJNmxO+gnCz0z2y6YEglFkUy9a9VwIyE/UrSy2licrAoTJXj
0AbGiHSx7D1Np9MomkwmQsYQVCYuiu7W2go4c51DSJEqm1Q6VvAUmARAF2oC
N0plDNaeEv0hP9ioHVlw6BhCF14ukStr5UrZqWAOiSxErERtsXe7VoV3HyLg
DLl1cCJakHskIHLPk/b5WaHelSqhNVBqWEAM7PixLhICT2xhSi9zQc8yG4t1
ncui043JBg0dpCCx1Q7+p0QsiSKouDXvcGvATIKOOmN7iUfCQhS9DOEGNJcA
kKX5fjE5Y5fd9xI+OPn40x84NitFvpj6pGKDsXKdppmKog9gfFeZtGalouh8
ALQwSyDSAhNwsirxkW+WQskq06raM9CYYhISZxnUtaKUlaPN0luIbCMb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