Contents
- Introduction
- Current Proposed ABNF for XRI Syntax 3.0 (Draft 19)
- Current ABNF for XRI Syntax 2.0
- Revision Log
- Draft 19 – 2008-12-18
- Draft 18 - 2008-11-06
- Draft 17 – 2007-06-14
- Draft 16 – 2007-06-04
- Draft 15 – 2007-05-29
- Draft 14 – 2007-05-06
- Draft 13 – 2007-05-02
- Draft 12 – 2007-04-08
- Draft 11 – 2007-04-03
- Draft 10 – 2007-04-02
- Draft 9 – 2007-04-01
- Draft 8 – 2007-03-27
- Draft 7 – 2007-03-22
- Draft 6 – 2007-03-21
- Draft 5 - 2007-03-17
- Draft 4 - 2007-03-07
- Draft 3 - 2007-03-05
- Draft 2 – 2007-02-26
- Draft 1 - 2007-02-20
Introduction
This page contains the proposed ABNF for XRI Syntax 3.0. The current XRI Syntax 2.0 ABNF is also provided for comparison. At the end of the page is a revision log in reverse chronological order.
Current Proposed ABNF for XRI Syntax 3.0 (Draft 19)
xri = xri-hier-part [ "?" iquery ] [ "#" ifragment ]
xri-reference = xri
/ relative-xri-ref
relative-xri-ref = relative-xri-part [ "?" iquery ] [ "#" ifragment ]
relative-xri-part = xri-path-abs
/ xri-path-noscheme
/ ipath-empty
xri-hier-part = xri-authority xri-path-abempty
xri-authority = global-subseg *subseg
subseg = global-subseg
/ local-subseg
/ xref
global-subseg = gcs-char [ local-subseg / xref / literal ]
local-subseg = lcs-char [ xref / literal ]
gcs-char = "=" / "@" / "+" / "$"
lcs-char = "*" / "!"
literal = 1*xri-pchar
literal-nc = 1*xri-pchar-nc
xref = "(" [ xref-value ] ")"
xref-value = xri-reference
/ iri
xri-path = xri-path-abempty
/ xri-path-abs
/ xri-path-noscheme
/ ipath-empty
xri-path-abempty = *( "/" xri-segment )
xri-path-abs = "/" [ xri-segment-nz *( "/" xri-segment ) ]
xri-path-noscheme = xri-segment-nc *( "/" xri-segment )
xri-segment = [ literal ] *subseg
xri-segment-nz = ( literal / subseg ) *subseg
xri-segment-nc = ( literal-nc / subseg ) *subseg
xri-pchar = iunreserved / pct-encoded / xri-sub-delims / ":"
xri-pchar-nc = iunreserved / pct-encoded / xri-sub-delims
xri-reserved = xri-gen-delims / xri-sub-delims
xri-gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "(" / ")"
/ gcs-char / lcs-char
xri-sub-delims = "&" / ";" / "," / "'"
Current ABNF for XRI Syntax 2.0
XRI ABNF
XRI = [ "xri://" ] xri-hier-part [ "?" iquery ]
[ "#" ifragment ]
xri-hier-part = ( xri-authority / iauthority ) xri-path-abempty
XRI-reference = XRI
/ relative-XRI-ref
absolute-XRI = [ "xri://" ] xri-hier-part [ "?" iquery ]
relative-XRI-ref = relative-XRI-part [ "?" iquery ] [ "#" ifragment ]
relative-XRI-part = xri-path-absolute
/ xri-path-noscheme
/ ipath-empty
xri-value = xri-no-scheme / relative-XRI-ref
xri-no-scheme = xri-hier-part [ "?" iquery ]
[ "#" ifragment ]
xri-authority = gcs-authority
/ xref-authority
gcs-authority = pgcs-authority / rgcs-authority
pgcs-authority = "!" xri-subseg-pt-nz *xri-subseg
rgcs-authority = rgcs-char xri-segment
rgcs-char = "=" / "@" / "+" / "$"
xref-authority = xref *xri-subseg
xref = "(" ( XRI-reference / IRI ) ")"
xri-path = xri-path-abempty
/ xri-path-absolute
/ xri-path-noscheme
/ ipath-empty
xri-path-abempty = *( "/" xri-segment )
xri-path-absolute = "/" [ xri-segment-nz *( "/" xri-segment ) ]
xri-path-noscheme = xri-subseg-od-nx *xri-subseg-nc *( "/" xri-segment )
xri-segment = xri-subseg-od *xri-subseg
xri-segment-nz = xri-subseg-od-nz *xri-subseg
xri-subseg = ( "*" / "!" ) (xref / *xri-pchar)
xri-subseg-nc = ( "*" / "!" ) (xref / *xri-pchar-nc)
xri-subseg-od = [ "*" / "!" ] (xref / *xri-pchar)
xri-subseg-od-nz = [ "*" / "!" ] (xref / 1*xri-pchar)
xri-subseg-od-nx = [ "*" / "!" ] 1*xri-pchar-nc
xri-subseg-pt-nz = "!" (xref / 1*xri-pchar)
xri-pchar = iunreserved / pct-encoded / xri-sub-delims / ":"
xri-pchar-nc = iunreserved / pct-encoded / xri-sub-delims
xri-reserved = xri-gen-delims / xri-sub-delims
xri-gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "(" / ")"
/ "*" / "!" / rgcs-char
xri-sub-delims = "&" / ";" / "," / "'"
IRI ABNF
Note: for reference only -- this is copied verbatim from the IRI specification, RFC 3987.
IRI = scheme ":" ihier-part [ "?" iquery ]
[ "#" ifragment ]
scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
ihier-part = "//" iauthority ipath-abempty
/ ipath-abs
/ ipath-rootless
/ ipath-empty
iauthority = [ iuserinfo "@" ] ihost [ ":" port ]
iuserinfo = *( iunreserved / pct-encoded / sub-delims / ":" )
ihost = IP-literal / IPv4address / ireg-name
IP-literal = "[" ( IPv6address / IPvFuture ) "]"
IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
IPv6address = 6( h16 ":" ) ls32
/ "::" 5( h16 ":" ) ls32
/ [ h16 ] "::" 4( h16 ":" ) ls32
/ [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
/ [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
/ [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
/ [ *4( h16 ":" ) h16 ] "::" ls32
/ [ *5( h16 ":" ) h16 ] "::" h16
/ [ *6( h16 ":" ) h16 ] "::"
ls32 = ( h16 ":" h16 ) / IPv4address
h16 = 1*4HEXDIG
IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
dec-octet = DIGIT ; 0-9
/ %x31-39 DIGIT ; 10-99
/ "1" 2DIGIT ; 100-199
/ "2" %x30-34 DIGIT ; 200-249
/ "25" %x30-35 ; 250-255
ireg-name = *( iunreserved / pct-encoded / sub-delims )
port = *DIGIT
ipath-abempty = *( "/" isegment )
ipath-abs = "/" [ isegment-nz *( "/" isegment ) ]
ipath-rootless = isegment-nz *( "/" isegment )
ipath-empty = 0<ipchar>
isegment = *ipchar
isegment-nz = 1*ipchar
iquery = *( ipchar / iprivate / "/" / "?" )
iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD
ifragment = *( ipchar / "/" / "?" )
ipchar = iunreserved / pct-encoded / sub-delims / ":" / "@"
iunreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" / ucschar
pct-encoded = "%" HEXDIG HEXDIG
ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
/ %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
/ %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
/ %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
/ %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
/ %xD0000-DFFFD / %xE1000-EFFFD
reserved = gen-delims / sub-delims
gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
Revision Log
Draft 19 – 2008-12-18
Added xref to the subseg rule per the XriThree/XrefDelimiter proposal.
Removed rel-subseg and rel-subseg-nc rules because, with xref now part of subseg, a rel-subseg is just a literal.
Replaced references to rel-subseg and rel-subseg-nc rules with references to literal and literal-nc respectively.
Draft 18 - 2008-11-06
Removed first three lines (shown below) to reflect the XriAsRelativeUri proposal for XRI 3.0.
xri = xri-scheme
/ xri-noscheme
xri-scheme = "xri:" xri-noscheme
- No other changes.
Draft 17 – 2007-06-14
- Revert to Draft 14 ABNF parse tree due to greater simplicity and new approach to solving the synonym-path problem.
Changed global-subseg to include the first rel-subseg or local-subseg that follows it to solve the synonym-path problem, i.e., the need to ensure that all "proper synonyms" for a resource (synonyms that traverse the same set of XRI authority nodes, such as reassignable and persistent synonyms for each authority) have the same number of subsegments.
Renamed subseg-value to rel-subseg to reflect its usage as a relative subsegment in path segments.
- Reordered rules so that similar rules are adjacent to each other in the ABNF (i.e., all path rules are grouped together, all subseg rules are grouped together, etc.)
Draft 16 – 2007-06-04
- No change to ABNF parse tree – update to rule names only.
Changed gcs-sequence and lcs-sequence to global-sequence and local-sequence for improved readability.
Draft 15 – 2007-05-29
- 1 change to ABNF parse tree:
- Replaced "integral" global-subsegs with gcs-sequence, which preserves distinction between GCS and LCS behavior. gcs-subsegs are now always a single GCS character, which may be followed by an optional rel-subseg (formerly "typeless-subseg"), whereas lcs-subseg always includes the LCS character.
- Rolled that change throughout path rules.
Draft 14 – 2007-05-06
- 1 change to ABNF parse tree:
- Removed typeless-subseg from xri-authority – this is now handled by treating the initial global-subseg as a single syntactic unit.
Refactored segment/subsegment rules to reflect this simplification, including replacing all "type-" based rule names with simpler rule names (subseg, subseg-value, global-subseg, and local-subseg). Note that subseg-value, which may be either 1*xri-pchar or an xref, and which now may only appear at the start of a path segment, is not formally treated as a type of subsegment.
Draft 13 – 2007-05-02
- 1 change to ABNF parse tree
- Removed multi-segment global-xrefs (also known as "sticky stars").
- Renamed global-delims and local-delims to global-type and local-type for consistency with typed-subseg.
Draft 12 – 2007-04-08
- No change to ABNF parse tree.
- Based on input from Marty and Wil, revised xri-scheme to use "xri:" instead of "xri://"
- Simplifies syntax and removes confusion over role of "//" in XRIs
- Eliminates restrictions of URI/IRI authority component ABNF
- Eliminates potential URI/IRI parser misinterpretations of URI/IRI host component when GCS "@" character is used
- Eliminates need to escape "@" when it is not the first character in an XRI authority component
- Eliminates need to deal with port rule
- Still supports hierarchical and relative XRIs
- Helps reinforce the role of GCS chars as XRI roots, especially p2p roots based on the \$ GCS character
Draft 11 – 2007-04-03
- No change to ABNF parse tree.
- Added global-delims rule to emphasize that GCS chars are both delimiters and literals.
- Renamed lcs-literal to lcs-delims to emphasize that LCS chars are only delimiters.
Renamed typed-literal to local-literal to emphasize conformity with Steve’s abstract syntax model where all subsegs are either literals or xrefs. See XriCd02/ParseTreeExamples.
Draft 10 – 2007-04-02
- No change to ABNF parse tree.
- Renamed gcs-type and lcs-type to gcs-literal and lcs-literal to reflect Wil's suggestion that GCS characters serve as literal subsegments.
Draft 9 – 2007-04-01
- No change to ABNF parse tree.
Refactored xri-segment for complete compatability with Steve’s proposed abstract syntax model (similar to draft 7, only this time ensuring that all rules that fall into Steve’s xref type are called *-xref).
Draft 8 – 2007-03-27
- No change to ABNF parse tree.
- Simplified xri-authority production to show subseg construction in a manner more intuitive for XRI resolution.
Draft 7 – 2007-03-22
- No change to ABNF parse tree.
- Per discussion among ABNF team, refactored segment structure to reflect Steve's proposed abstract syntax using the two key dimensions:
- Literals and xrefs
- Typed and typeless
Draft 6 – 2007-03-21
- No change to ABNF parse tree.
- Per proposal from Wil:
- Renamed gcs-char to gcs-subseg and lcs-char to lcs-subseg
- Spelled out structure of xri-authority so the necessary subseg order is explicit (i.e., starts with gcs-sugseg)
- Reordered –subseg rules to match the order in which they appear
Draft 5 - 2007-03-17
- No change to ABNF parse tree.
- Per input from Wil and Steve that subsegments are the core unit of their XRI parse trees, refactored all rules dealing with subsegments to use "-subseg". This meant the following global replacements:
global-ref ==> global-subseg
local-ref ==> local-subseg
encap-ref ==> paren-subseg
ref-value ==> simple-subseg
xri-subseg ==> complex-subseg
Added char-subseg as a rule name for 1*xri-pchar so the XRI 2.1 spec text can refer a character sequence as another type of subsegment.
- Added graphic of XRI 2.1 composition model to show the relationship between the different types of subsegments.
Draft 4 - 2007-03-07
- No change to ABNF parse tree
- Refactored global-subseg and local-subseg productions to global-ref and local-ref and refactored xref to encap-ref to eliminate potential confusion over the use of "xref" as a rule name (per feedback from Les, Laurie, and Marty).
- Refactored *xri-segment-nz and *xri-segment-nc per the above.
Draft 3 - 2007-03-05
- No change to the ABNF parse tree
Refactored the xri-authority rule to introduce the global-subseg rule so XRI resolution can cleanly refer to the difference in resolution between global and local subsegments. See XriCd02/GlobalSubsegments (which replaces XriCd02/CompactSyntax).
- Made subseg-value = 1*xri-pchar since subseg-value is already optional in all other rules that use it.
- Caught bug in xri-segment-nz and xri-segment-nc where the rule needed to state 1*xri-pchar.
Draft 2 – 2007-02-26
- Simplified xri-authority, xri-segment, and xri-subseg
- Moved ! to be purely a local context symbol along with *
- This solves a longstanding complexity of having ! serve both as a global context symbol (GCS) and what is now called a local context symbol (LCS).
- Allows the rules for using * and ! as local context symbols to be the same.
- The former use of ! as a GCS symbol would move under other GCS characters, i.e., what was !! in practice would become @!!.
Draft 1 - 2007-02-20
- Simplifies XRI segment and subsegment definitions
- Eliminates 5 rules from 2.0 ABNF
Supports global subsegments (see XriCd02/GlobalSubsegments)
XRI Wiki