OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xri message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: FW: Proposed BNF changes in the XRI Spec


Note to XRI TC Members:
 
I'm forwarding this mail from Editor's SC chair Dave McAlpin because
changes in Epok's domain name appear to be confusing the Kavi servers. I
want to thank Dave and the rest of the Epok team for their extremely
hard work boiling out every potential issue they could find in the BNF
(and Dave in particular for preparing the crystal-clean version of the
spec for the Committee Draft Revote.)
 
=Drummond 
 
-----Original Message-----
From: Dave McAlpin [mailto:dave.mcalpin@epok.net]
Sent: Thursday, January 08, 2004 4:11 PM
To: Drummond Reed
Subject: Proposed BNF changes in the XRI Spec
 
After the vote on the spec but before publication, a few minor problems
with the BNF surfaced. Since OASIS has asked us to vote again on the
spec, I'd like to incorporate these changes into the version we'll be
voting on rather than publish them as errata. These proposed changes
have been looked at pretty carefully by several people so I won't
include a whole lot of analysis in this mail, but I'll be happy to
discuss details if anyone is interested. Attached to this mail is the
original collected BNF, the proposed BNF and a slightly cleaned up diff
file between the two.
 
A summary of the seven problems and their fixes:
 
1) "domainlabel", "global-xri" and "xri-path" were never used and were
consequently removed.
 
2) idomainlabel was changed from
 
idomainlabel = 1*ucschar
 
to
 
idomainlabel = ( ALPHA / ucschar ) *( ucschar / alphanum / "-" )
 
The original was completely wrong in that it allowed _only_
international characters. For example, xri://www.example.com was illegal
under the original production. The new version isn't ideal because ABNF
isn't sufficient to capture all the constraints on idomainlabel. We
address this in the text when we say "A hostname, after the
transformation described in step 4 of section 2.2.4.3, MUST meet the
rules defined in section 3.2.2 of [RFC2396]. The productions for
idomainlabel, qualified, and hostname, therefore, have additional
restrictions not reflected in the ABNF." The new production is good
enough, I think, and is at least unambiguous with respect to
IPv4address.
 
3) The productions containing [query-frag] were edited because multiple
query-frags were possible because xri-value could contain a global-path
followed by a query-frag, and global-path itself could contain a query
frag. For example, the following was legal:
 
xri:@foo?bar=1#baz?fred=alice#bob
 
4) The local-path production was fixed so that / by itself is now a
legal local-path. (It was not before, or more accurately, it was legal
by accident and other proposed changes required that it be made
explicitly legal.)
 
5) The path productions were updated to fix the fact that dots and
colons could be repeated and can end an xri-segment. For example, the
following was legal.
 
xri:@foo/:::....:::bar:/baz.
 
6) The path productions were also updated to fix the fact that ../ and
./ were only legal at the beginning of a relative path. However, they
are legal throughout a URI. 2396bis has the example
 
eXAMPLE://a/./b/../b/c/%7a
 
 7) Another problem was that query-frag could be empty and was also
optional. If it's not in an XRI, it's ambiguous whether it's not there
or whether it's there and empty.
 
Problems 3 through 7 will be taken together because they affect the same
set of productions. Here are the ones that have changed, with the
original BNF followed by the proposed new BNF. (Note that these are only
the changed productions - any production that did not change does not
appear.)
 
Original
    global-path     = authority-path [ local-path ] [ query-frag ]
    query-frag      = [ "?" xri-query ] [ "#" xri-fragment ]
 
    relative-path   = *( [ "." ] "./" ) xri-segments
    relative-xri    = ( local-path / relative-path ) [ query-frag ] 
    sub-segment     = *xri-pchar / xref
    XRI-authority   = ( gcs-char xri-segment ) / xref-authority
    xri-segments    = xri-segment *( "/" xri-segment )
    xri-value       = [ global-path / local-path / relative-path ]
                    [ query-frag ]
 
Proposed
 
    global-path     = authority-path [ local-path ]
    relative-path   = [ xri-segments ] [ "?" xri-query ] [ "#"
xri-fragment ]
    relative-xri    = local-path / relative-path
    sub-segment     = 1*xri-pchar / xref
    XRI-authority   = ( gcs-char [ xri-segment ] ) / xref-authority
    xri-segments    = xri-segment-val *( "/" [ xri-segment-val ] )
    xri-segment-val = xri-segment / "." / ".."
    xri-value       = global-path / local-path / relative-path
 
Here are the highlights.
 
What was query-frag is now in one spot - inlined into relative-path.
This addresses problems 3 and 7, and accounts for the changes to
global-path, query-frag and relative-xri, and some of the changes to
relative-path and xri-value.
 
sub-segment can no longer be empty; it must contain at least one
character. This solves problem 5. 
 
xri-segment-val is introduced as an intermediate production that
contains either an xri-segment (i.e. a run of sub-segments which cannot
be empty), "." or "..", and xri-segments is redefined in terms of
xri-segment-val. This solves problem 6.
 
Because xri-segment can no longer be empty, XRI-authority makes it
explicitly optional.
 
relative-path is redefined to inline what was query-frag and to drop
support for ./ and ../, which is now handled in xri-segments. Because
xri-segments cannot be empty (since xri-segment-val cannot be empty),
xri-segments is made optional in relative-path. This makes relative-path
potentially empty, which is desired. This also solves problem 4 in an
explicit way.
 
Because relative-path can be empty, it isn't desirable to have xri-value
be potentially empty. Otherwise it would be ambiguous as to whether
xri-value was empty or whether it contained an empty relative-path.
xri-value is therefore changed to require either a global-path, a
local-path or a relative-path.
 
Please take a look at the attached files and provide feedback if you're
interested. Unless we hear otherwise, these changes will be incorporated
into the version of the spec that we'll be voting on in the next few
days.
 
Dave
    abs-path        = "/"  path-segments

    absolute-xri    = "xri:" global-path 

    alphanum        = ALPHA / DIGIT

    authority       = [ userinfo "@" ] host [ ":" port ]

    authority-path  = URI-authority / XRI-authority

    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

    delims          = "<" / ">" / "%" / DQUOTE

    domainlabel     = alphanum [ 0*61( alphanum / "-" ) alphanum ]

    escaped         = "%" HEXDIG HEXDIG

    excluded        = invisible / delims / unwise

    fragment        = *( pchar / "/" / "?" )

    gcs-char        = "+" / "=" / "@" / "$" / "*" / "!"

    global-path     = authority-path [ local-path ] [ query-frag ]

    global-xri      = global-path [ "?" xri-query ] [ "#" xri-fragment ]

    h4              = 1*4HEXDIG

    hier-part       = net-path / abs-path / rel-path

    host            = [ hostname / IPv4address / IPv6reference ]

    hostname        = idomainlabel qualified

  idomainlabel      = 1*ucschar

    invisible       = CTL / SP / %x80-FF

    IPv4address     = dec-octet "." dec-octet "." dec-octet "." dec-octet

    IPv6address     =    6( h4 ":" ) ls32
                    / "::" 5( h4 ":" )         ls32
                    / [              h4 ] "::" 4( h4 ":" )    ls32
                    / [ *1( h4 ":" ) h4 ] "::" 3( h4 ":" )    ls32
                    / [ *2( h4 ":" ) h4 ] "::" 2( h4 ":" )    ls32
                    / [ *3( h4 ":" ) h4 ] "::"    h4 ":"      ls32
                    / [ *4( h4 ":" ) h4 ] "::"                ls32
                    / [ *5( h4 ":" ) h4 ] "::"                h4
                    / [ *6( h4 ":" ) h4 ] "::"

    IPv6reference   = "[" IPv6address "]"

    local-path      = "/" relative-path

    ls32            = ( h4 ":" h4 ) / IPv4address
        ; least-significant 32 bits of address

    mark            = "-" / "_" / "." / "!" / "~" / "*" / "'" / "(" / ")"

    net-path        = "//" authority [ abs-path ]

    path-segments   = segment *( "/" segment )

    pchar           = unreserved / escaped / ";" /
                    ":" / "@" / "&" / "=" / "+" / "$" / ","

    port            = *DIGIT

    qualified       = *( "." idomainlabel ) [ "." ]

    query           = *( pchar / "/" / "?" )

    query-frag      = [ "?" xri-query ] [ "#" xri-fragment ]

    relative-path   = *( [ "." ] "./" ) xri-segments

    relative-xri    = ( local-path / relative-path ) [ query-frag ] 

    rel-path        = path-segments

    reserved        = "/" / "?" / "#" / "[" / "]" / ";" /
                    ":" / "@" / "&" / "=" / "+" / "$" / ","

    scheme          = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

    segment         = *pchar

    sub-segment     = *xri-pchar / xref

    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

    unreserved      = ALPHA / DIGIT / mark

    unwise          = "{" / "}" / "|" / "\" / "^" / "`"

    URI             = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

    URI-authority   = "//" [ userinfo "@" ] host [ ":" port ]

    uric            = reserved / unreserved / escaped

    userinfo        = *( unreserved / escaped / ";" /
                    ":" / "&" / "=" / "+" / "$" / "," )

    xref            = "(" ( xri-value / URI ) ")"

    xref-authority  = xref  ( "." sub-segment / ":" sub-segment) *( "."
                    sub-segment / ":" sub-segment)

    XRI             = absolute-xri / relative-xri

    XRI-authority   = ( gcs-char xri-segment ) / xref-authority

    xri-characters  = xri-reserved / xri-unreserved / escaped

    xri-fragment    = [ xref ] * ( xri-pchar / "." / ":" / "/" / "?" )

    xri-mark        = "-" / "_" / "~" / "'" 

    xri-path        = global-path / local-path / relative-path

    xri-pchar       = xri-unreserved / escaped / ";" / "!" / "*"
                    "@" / "&" / "=" / "+" / "$" / ","

    xri-query       = [ xref ] * ( xri-pchar / "." / ":" / "/" / "?" )

    xri-reserved    = "/" / "?" / "#" / "[" / "]" / "(" / ")" / ";" / ":" /
                    "," / "." / "&" / "@" / "=" / "+" / "*" / "$" / "!"

    xri-segment     = ( [ "." ] sub-segment / ":" sub-segment ) 
        *( "." sub-segment / ":" sub-segment )

    xri-segments    = xri-segment *( "/" xri-segment )

    xri-unreserved  = ALPHA / DIGIT / ucschar / xri-mark

    xri-value       = [ global-path / local-path / relative-path ]
                    [ query-frag ]

    abs-path        = "/"  path-segments

    absolute-xri    = "xri:" global-path 

    alphanum        = ALPHA / DIGIT

    authority       = [ userinfo "@" ] host [ ":" port ]

    authority-path  = URI-authority / XRI-authority

    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

    delims          = "<" / ">" / "%" / DQUOTE

    escaped         = "%" HEXDIG HEXDIG

    excluded        = invisible / delims / unwise

    fragment        = *( pchar / "/" / "?" )

    gcs-char        = "+" / "=" / "@" / "$" / "*" / "!"

    global-path     = authority-path [ local-path ]

    h4              = 1*4HEXDIG

    hier-part       = net-path / abs-path / rel-path

    host            = [ hostname / IPv4address / IPv6reference ]

    hostname        = idomainlabel qualified

    idomainlabel    = ( ALPHA / ucschar ) *( ucschar / alphanum / "-" )

    invisible       = CTL / SP / %x80-FF

    IPv4address     = dec-octet "." dec-octet "." dec-octet "." dec-octet

    IPv6address     =    6( h4 ":" ) ls32
                    / "::" 5( h4 ":" )         ls32
                    / [              h4 ] "::" 4( h4 ":" )    ls32
                    / [ *1( h4 ":" ) h4 ] "::" 3( h4 ":" )    ls32
                    / [ *2( h4 ":" ) h4 ] "::" 2( h4 ":" )    ls32
                    / [ *3( h4 ":" ) h4 ] "::"    h4 ":"      ls32
                    / [ *4( h4 ":" ) h4 ] "::"                ls32
                    / [ *5( h4 ":" ) h4 ] "::"                h4
                    / [ *6( h4 ":" ) h4 ] "::"

    IPv6reference   = "[" IPv6address "]"

    local-path      = "/" relative-path

    ls32            = ( h4 ":" h4 ) / IPv4address
                    ; least-significant 32 bits of address

    mark            = "-" / "_" / "." / "!" / "~" / "*" / "'" / "(" / ")"

    net-path        = "//" authority [ abs-path ]

    path-segments   = segment *( "/" segment )

    pchar           = unreserved / escaped / ";" /
                    ":" / "@" / "&" / "=" / "+" / "$" / ","

    port            = *DIGIT

    qualified       = *( "." idomainlabel ) [ "." ]

    query           = *( pchar / "/" / "?" )

    relative-path   = [ xri-segments ] [ "?" xri-query ] [ "#" xri-fragment ]

    relative-xri    = local-path / relative-path

    rel-path        = path-segments

    reserved        = "/" / "?" / "#" / "[" / "]" / ";" /
                    ":" / "@" / "&" / "=" / "+" / "$" / ","

    scheme          = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

    segment         = *pchar

    sub-segment     = 1*xri-pchar / xref

    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

    unreserved      = ALPHA / DIGIT / mark

    unwise          = "{" / "}" / "|" / "\" / "^" / "`"

    URI             = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

    URI-authority   = "//" [ userinfo "@" ] host [ ":" port ]

    uric            = reserved / unreserved / escaped

    userinfo        = *( unreserved / escaped / ";" /
                    ":" / "&" / "=" / "+" / "$" / "," )

    xref            = "(" ( xri-value / URI ) ")"

    xref-authority  = xref  ( "." sub-segment / ":" sub-segment ) *( "."
                    sub-segment / ":" sub-segment )

    XRI             = absolute-xri / relative-xri

    XRI-authority   = ( gcs-char [ xri-segment ] ) / xref-authority

    xri-characters  = xri-reserved / xri-unreserved / escaped

    xri-fragment    = [ xref ] * ( xri-pchar / "." / ":" / "/" / "?" )

    xri-mark        = "-" / "_" / "~" / "'" 

    xri-pchar       = xri-unreserved / escaped / ";" / "!" / "*"
                    "@" / "&" / "=" / "+" / "$" / ","

    xri-query       = [ xref ] * ( xri-pchar / "." / ":" / "/" / "?" )

    xri-reserved    = "/" / "?" / "#" / "[" / "]" / "(" / ")" / ";" / ":" /
                    "," / "." / "&" / "@" / "=" / "+" / "*" / "$" / "!"

    xri-segment     = ( [ "." ] sub-segment / ":" sub-segment ) 
                    *( "." sub-segment / ":" sub-segment )

    xri-segments    = xri-segment-val *( "/" [ xri-segment-val ] )

    xri-segment-val = xri-segment / "." / ".."

    xri-unreserved  = ALPHA / DIGIT / ucschar / xri-mark

    xri-value       = global-path / local-path / relative-path

19,20d18
<     domainlabel     = alphanum [ 0*61( alphanum / "-" ) alphanum ]
< 
29,31c27
<     global-path     = authority-path [ local-path ] [ query-frag ]
< 
<     global-xri      = global-path [ "?" xri-query ] [ "#" xri-fragment ]
---
>     global-path     = authority-path [ local-path ]
41c37
<     idomainlabel    = 1*ucschar
---
>     idomainlabel    = ( ALPHA / ucschar ) *( ucschar / alphanum / "-" )
79,81c75
<     query-frag      = [ "?" xri-query ] [ "#" xri-fragment ]
< 
<     relative-path   = *( [ "." ] "./" ) xri-segments
---
>     relative-path   = [ xri-segments ] [ "?" xri-query ] [ "#" xri-fragment ]
83c77
<     relative-xri    = ( local-path / relative-path ) [ query-frag ] 
---
>     relative-xri    = local-path / relative-path
94c88
<     sub-segment     = *xri-pchar / xref
---
>     sub-segment     = 1*xri-pchar / xref
118,119c112,113
<     xref-authority  = xref  ( "." sub-segment / ":" sub-segment) *( "."
<                     sub-segment / ":" sub-segment)
---
>     xref-authority  = xref  ( "." sub-segment / ":" sub-segment ) *( "."
>                     sub-segment / ":" sub-segment )
123c117
<     XRI-authority   = ( gcs-char xri-segment ) / xref-authority
---
>     XRI-authority   = ( gcs-char [ xri-segment ] ) / xref-authority
131,132d124
<     xri-path        = global-path / local-path / relative-path
< 
142c134,136
>     xri-segments    = xri-segment-val *( "/" [ xri-segment-val ] )
144c138
<     xri-segments    = xri-segment *( "/" xri-segment )
---
>     xri-segment-val = xri-segment / "." / ".."
148,149c142
<     xri-value       = [ global-path / local-path / relative-path ]
<                     [ query-frag ]
---
>     xri-value       = global-path / local-path / relative-path


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]