<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->


<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-soni-meta-uri-00"
  ipr="trust200902"
  submissionType="IETF"
  xml:lang="en"
  version="3">

  <front>
    <title abbrev="Meta-URIs">Meta URIs: Generic Syntax</title>

    <seriesInfo name="Internet-Draft" value="draft-soni-meta-uri-00"/>
   
    <author fullname="Soni Lasso Terense" initials="S." surname="Lasso">
      <address>
        <email>fakedme@gmail.com</email>
        <uri>https://soniex2.autistic.space/</uri>
      </address>
    </author>
   
    <date year="2024"/>

    <area>wit</area>
    <workgroup>Internet Engineering Task Force</workgroup>

    <abstract>
      <t>This document describes a format for embedding a URI inside a URI,
        as part of a URI scheme's syntax definition.</t>
    </abstract>
 
  </front>

  <middle>
    
    <section>
      <name>Introduction</name>
      <t>Sometimes, it is useful to encode application-specific metadata as part
      of a URI.  Traditionally, URIs provide very little support for
      application-specific metadata: <xref target="RFC3986" sectionFormat="parens" section="4.5" />
      defines URI fragments, but they are specified by "the media type of [the
      resource]", not the application.  In practice, some applications have
      alternatively made use of fragments for application-specific metadata, in conflict with
        its intended usage.  This document defines a generic syntax for encoding
    application-specific metadata in a URI.</t>
      
    <section>
      <name>Requirements Language</name>
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
        "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
        RECOMMENDED", "MAY", and "OPTIONAL" 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>
    </section>
    </section>
    
  <section>
    <name>The Meta-URI Syntax</name>
    <t>An URI scheme describes a meta-URI if the scheme's syntax conforms to the
      syntax described here in Augmented BNF <xref target="RFC5234"/>, borrrowing
        various terms from <xref target="RFC3986"/>.</t>
        <sourcecode type="abnf" markers="false">
          <![CDATA[
metaURI          = scheme ":" hier-part "?" meta-query
                   "&&" URI-reference
meta-query       = [ meta-qattr *("&" meta-qattr) ]
meta-q-res-avail = ":" / "@" / "!" / "$" /
                   "'" / "(" / ")" / "*" / "+" / "," / "="
meta-qchar       = unreserved / meta-q-res-avail / pct-encoded
meta-qattr       = 1*meta-qchar
          ]]>
        </sourcecode>
        <t>As per <xref target="RFC8820" section="2.1"/>, the meta-URI scheme MAY
        require support for specific embedded schemes, but SHOULD NOT restrict
          the allowed embedded schemes.</t>
        <section anchor="fragment-handling">
          <name>Fragment Handling</name>
          <t>The fragment identifier, if any, is not part of the
          embedded URI, but instead applies to the whole Meta-URI, as per
          <xref target="RFC3986" section="3.5"/>.  While the URI-reference term
          used above includes the fragment identifier, this approach merely
          enables future updates to <xref target="RFC3986"/> to also apply to
          this document automatically.</t>
        </section>
  </section>
    
    <section anchor="IANA">
      <name>IANA Considerations</name>
      <t>This document has no IANA considerations.</t>
    </section>
    
    <section anchor="Security">
      <name>Security Considerations</name>
      <t>It is up to the scheme authors to evaluate any security implications of
      using this syntax.</t>
    </section>

    <section anchor="Interoperability">
      <name>Interoperability Considerations</name>
      <t>IPv6 literals cannot be encoded in the embedded URI, as square brackets
        ("[" and "]") are not allowed in the query element.  A future update to
      <xref target="RFC3986"/> may change this.</t>
    </section>

    <section anchor="Encoding">
      <name>Encoding considerations</name>
      <t>No encoding considerations are known at this time.</t>
    </section>
  </middle>

  <back>
    <references>
      <name>References</name>

      <references>
        <name>Normative References</name>
        
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8820.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5234.xml"/>
        
      </references>
 
      <references>
        <name>Informative References</name>

        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7512.xml"/>
        
      </references>
    </references>

    <section anchor="Acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>Some of the ABNF rules in this document were adapted from
      <xref target="RFC7512"/>.</t>
    </section>
 </back>
</rfc>
