Note: this page replaces XriCd02/CompactSyntax, XriCd02/GlobalSubsegments, XriCd02/GlobalXrefs, XriCd02/NormalizationPrinciplesAndPolicies.

Introduction

This page introduces direct concatenation syntax, a key proposed feature of XRI Syntax 2.1. It explains the technical proposal, "grammar" rules, parsing rules, and XRI resolution rules. It then lists links to other wiki pages discussing the open issues.

The concept of direct concatenation is that single-segment global XRIs like =drummond, @cordance, +employee, and \$v*2.0 that begin with one of the four XRI global context symbols (GCS) =, @, +, \$ would be able to be conjoined directly to express context without requiring parenthetical encapsulation. This would enable XRIs that express the context for other XRIs such as the following:

        @cordance=drummond
        @cordance+employees=drummond
        =drummond@cordance
        =drummond+blog
        =drummond+blog+personal
        =drummond+resume$date*2007-05-07

Direct concatenation syntax could be used not just in the authority segment of an XRI but also in the path. This solves the problem of allowing XRIs used for HXRI forwarding or service selection to use simpler, more intuitive "tags" in the path that do not require parentheses or local context symbols (LCS).

        REQUIRED UNDER 2.0              ALLOWED UNDER 2.1
        =drummond/(+openid)             =drummond/+openid
        =drummond/(+blog)               =drummond/+blog
        =drummond/(+blog)*(+work)       =drummond/+openid+work

Background

XRI syntax has always had two key concepts:

XRI syntax has always treated a cross-reference as a special type of subsegment. In XRI 1.0 and 2.0 syntax, this type of subsegment required putting the cross-reference in parentheses. Except at the start of an absolute XRI, these parentheses needed to be preceeded by one of the XRI 2.0 segment or subsegment delimiters (/, *, or !). Examples:

        =drummond*(@cordance)
        @cordance*(=drummond)
        @1000.1234.5678.a1b2!(=!1000.2222.3333.4444)
        @xdi.org*(http://example.com)/path
        @xdi.org*(+volunteers)/(=drummond)

XRI 2.0 syntax has the following additional issues:

        =example
        =*example

Normalization rules recommended that optional stars be omitted, but this was not required.

Technical Details of Direct Concatenation

The proposed ABNF for XRI 2.1 that supports direct concatenation is posted on the XriCd02/XriAbnf2dot1 page. The four differences from XRI 2.0 syntax are:

Grammatical Rules for Cross-References

XRI 2.0 supported only parenthetical cross-references. XRI 2.1 would support both parenthetical cross-references and direct concatenated cross-references that do not require parentheses. This section proposes the "grammatical rules" when to use each form.

Cross-References Without Parentheses: Crossing Two Contexts

With direct concatenation, a cross-reference that does not use parentheses is a reference in the context of a parent resource to a child resource whose identifier was assigned in a different XRI global context.

For example, in @cordance=drummond, the parent authority @cordance is making a reference to the resource whose identifier drummond was assigned in a different XRI global context, =. Likewise, in =drummond+seattle, the parent authority =drummond is making a reference to the resource whose identifier seattle was assigned in a different XRI global context, +.

This form of a cross-reference simply means that the parent resource is referring to the child resource by a globally-known identifier for the child resource.

In the English language, this is identical to using:

  1. The proper name of a person or organization, e.g., Drummond Reed or Cordance Corporation. Regardless of the parent context in which such an identifier is used, such as Cordance's Drummond Reed or Drummond Reed's Cordance Corporation, the referenced identifier is interpreted as the same identifier that would be used for the resource independently of the parent context.

  2. The generic word for a concept, e.g., blog or office. Again, regardless of the parent context in which such an identifier is used, such as Drummond's blog or Cordance Corporation's office, the referenced identifier is interpreted as the same identifier that would be used for the resource independently of the parent context.

Cross-References With Parentheses: Crossing Three Contexts

The purpose of parentheses in XRI syntax has always been to syntactically encapsulate an identifier assigned in one context so it can be reused in another context. As explained above, the key innovation of direct concatenation is that with global XRIs, parentheses are not required because XRI global context symbols themselves unambiguously delimit each context.

Therefore, when a global XRI is instead used as a parenthetical cross-reference, it unambigously means that:

  1. Consistent with the meaning of direct concatenation, the global XRI is still an identifier for the target resource that can be used independently of the parent context, AND

  2. In the context of the parent resource, the target resource is being identified in a third context. This third context is unambiguously identified by the context symbol used before the parentheses.

Examples are given in the table below:

First Context

Second Context

Third Context

=drummond

*(=drummond)

@cordance*(=drummond)

@cordance

!(@cordance)

@identity.commons!(@cordance)

http://example.com

\$(http://example.com)

=drummond+blog\$(http://example.com)

mailto:user@example.com

=(mailto:user@example.com)

@cordance=(mailto:user@example.com)

XRI Resolution

This section discusses how XRI Syntax 2.1 will work with XRI resolution.

Parse Trees

An XRI parser parses the hierarchical part of an XRI into a sequence of segments and subsegments. All subsegments are one of two fundamental types: literals (i.e., containing a string of XRI path characters), or xrefs (i.e., containing an XRI or absolute URI in parentheses).

With XRI Syntax 2.1, each subsegment in an XRI authority segment has one of six context types: =, @, +, \$, *, !. Note that an XRI path segment may begin with a seventh option: an untyped subsegment value, i.e., a literal or xref that is not preceeded by a GCS or LCS char.

Community Root Subsegments

The first subsegment, called the community root subsegment, MUST be a global subsegment. This is the only subsegment to which special processing rules apply. Once these rules are applied to determine the HTTP(S) URI of the initial XRI authority resolution service endpoint, XRI resolution proceeds by resolving each subsegment in order from left-to-right.

Rules for all Global Community Root Subsegments Except \$

The XRI resolution rule for all XRI authority segments that begin with GCS characters except \$ is that an XRI resolver must be preconfigured with the XRD corresponding to the GCS symbol =, @, +.

The following examples provide the parse tree and community root authority resolution service URI for an example XRI authority segment:

#1

XRI authority segment

@example

literal

@example

Community root authority resolution service URI

configured for @

#2

XRI authority segment

@example*foo

literal

@example

literal

*foo

Community root authority resolution service URI

configured for @

#3

XRI authority segment

@example*foo=baz

literal

@example

literal

*foo

literal

=baz

Community root authority resolution service URI

configured for @

#4

XRI authority segment

@*foo=baz

literal

@

literal

*foo

literal

=baz

Community root authority resolution service URI

configured for @

#5

XRI authority segment

@!1234*foo

literal

@

literal

!1234

literal

*foo

Community root authority resolution service URI

configured for @

#6

XRI authority segment

@=baz

literal

@

literal

=baz

Community root authority resolution service URI

configured for @

#7

XRI authority segment

@example*foo@!1234!5678=baz

literal

@example

literal

*foo

literal

@

literal

!1234

literal

!5678

literal

=baz

Community root authority resolution service URI

configured for @

#8

XRI authority segment

=example*(=foo)@!1234!5678=baz

literal

=example

xref

*(=foo)

literal

@

literal

!1234

literal

!5678

literal

=baz

Community root authority resolution service URI

configured for =

#9

XRI authority segment

=example*(=foo)@!1234!5678!(=!a1b2)

literal

=example

xref

*(=foo)

literal

@

literal

!1234

literal

!5678

xref

!(=!a1b2)

Community root authority resolution service URI

configured for =

#10

XRI authority segment

=!!1000

literal

=

literal

!

literal

!1000

Community root authority resolution service URI

configured for =

#11

XRI authority segment

=\$date*2006-11-04@example.name

literal

=

literal

\$date

literal

*2006-11-04

literal

@example.name

Community root authority resolution service URI

configured for =

\$ip Rules

If the community root authority is \$ip, the next local subsegment MUST be a IP address in the format defined by RFC 3986. In this case resolution proceeds as defined for an iri-authority in XRI Resolution 2.0 WD 10.

Examples:

#1

XRI authority segment

\$ip*124.173.14.2

literal

\$ip

literal

*124.173.14.2

Community root authority resolution service URI

http://124.173.14.2

#2

XRI authority segment

\$ip*124.173.14.2*bar

literal

\$ip

literal

*124.173.14.2

literal

*bar

Community root authority resolution service URI

http://124.173.14.2

#3

XRI authority segment

\$ip*124.173.14.2!1234

literal

\$ip

literal

*124.173.14.2

literal

!1234

Community root authority resolution service URI

http://124.173.14.2

#4

XRI authority segment

\$ip*124.173.14.2=example

literal

\$ip

literal

*124.173.14.2

literal

=example

Community root authority resolution service URI

http://124.173.14.2

#4

XRI authority segment

\$ip*124.173.14.2=(http://example.com)

literal

\$ip

literal

*124.173.14.2

xref

=(http://example.com)

Community root authority resolution service URI

http://124.173.14.2

\$dns Rules

If the community root authority is \$dns, the next local subsegment MUST be a fully-qualified DNS name. In this case resolution proceeds as defined for an iri-authority in XRI Resolution 2.0 WD 10.

Examples:

#1

XRI authority segment

\$dns*example.com

literal

\$dns

literal

*example.com

Community root authority resolution service URI

http://example.com

#2

XRI authority segment

\$dns*www.example.com

literal

\$dns

literal

*www.example.com

Community root authority resolution service URI

http://example.com

#3

XRI authority segment

\$dns*www.example.com*bar

literal

\$dns

literal

*www.example.com

literal

*bar

Community root authority resolution service URI

http://www.example.com

#4

XRI authority segment

\$dns*www.example.com=example

literal

\$dns

literal

*www.example.com

literal

=example

Community root authority resolution service URI

http://www.example.com

#4

XRI authority segment

\$dns*www.example.com=(http://example.com)

literal

\$dns

literal

*www.example.com

xref

=(http://example.com)

Community root authority resolution service URI

http://www.example.com

Xref Rules

If the community root authority is a global subsegment containing an xref and the value of this xref is an HTTP or HTTPS URI, the rule is that this URI is treated as the community root authority resolution service URI.

XRI resolution rules for other URI schemes are undefined XRI Resolution 2.0, however they may be defined in future revisions to the XRI Resolution specification, or by other specifications.

Examples:

Note: the following examples show http(s) URIs in XRI-normal form. In XRI resolution these would be escaped to URI-normal form.

#1

XRI authority segment

\$(http://example.com/user/)

xref

\$(http://example.com/user/)

Community root authority resolution service URI

http://example.com/user/

#2

XRI authority segment

\$(https://example.com/user/)

xref

\$(https://example.com/user/)

Community root authority resolution service URI

https://example.com/user/

#3

XRI authority segment

\=(http://example.com/user/)*foo

xref

\$(http://example.com/user/)

literal

*foo

Community root authority resolution service URI

http://example.com/user/

#4

XRI authority segment

\$(http://example.com/user/)!1234

xref

\$(http://example.com/user/)

literal

!1234

Community root authority resolution service URI

http://example.com/user/

#5

XRI authority segment

\$(http://example.com/user/)=example*sub

xref

\$(http://example.com/user/)

literal

=example

literal

*sub

Community root authority resolution service URI

http://example.com/user/

Open Issues

#1: Social Vulnerability of =/@ Concatenation

This issue involves potential semantic attacks or other abuse of direct concatenation with = and @ names. See XriCd02/EqualsAtSocialVulnerability.

#2: Uniform Treatment of Xrefs as Community Root Authorities

The issue is whether the resolution rule for community root authority xrefs that contain HTTP(S) value should apply only to \$ xrefs, or if it should apply to all GCS symbols (i.e., =, @, +, \$. This is still under discussion.

XriCd02/DirectConcatenation (last edited 2009-08-12 18:07:15 by localhost)