Subject: Re: [core] #197: Upgrade to RFC5234 ABNF (lose LWS issue)

From: Cullen Jennings <[email-masked]>
Date: Wed, 16 May 2012 07:23:18 -0600

uh - I agree we don't want the old LWS issues, but I don't think we want LWS at all. Can we just get rid of this all together?

On Mar 25, 2012, at 7:12 AM, core issue tracker wrote:

> #197: Upgrade to RFC5234 ABNF (lose LWS issue)
> 
> Julian Reschke and Jari Arkko suggested that we fix the ABNF, which is
> currently inheriting old RFC2616 ABNF.
> 
> This ticket is to upgrade to RFC5234 by repeating the ABNF from RFC5988 in
> the correct RFC5234 form, at the same time thus losing the problem of
> implied linear white space.
> 
> -- 
> ----------------------------------+--------------------
> Reporter:  zach@…                |      Owner:  zach@…
>     Type:  protocol enhancement  |     Status:  new
> Priority:  trivial               |  Milestone:
> Component:  link-format           |    Version:
> Severity:  -                     |   Keywords:
> ----------------------------------+--------------------
> 
> Ticket URL: <http://trac.tools.ietf.org/wg/core/trac/ticket/197>
> core <http://tools.ietf.org/core/>
> 
> _______________________________________________
> core mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/core

---

From: Carsten Bormann <[email-masked]>
Date: Wed, 16 May 2012 15:33:58 +0200

> uh - I agree we don't want the old LWS issues, but I don't think we want LWS at all. Can we just get rid of this all together?

We can (we already did).
Since the ABNF does not have any LWS by itself, and after the switch to 5234 the LWS no longer sneaks in through the back door, we simply don't have LWS in link-format.

Grüße, Carsten

---

From: "core issue tracker" <[email-masked]>
Date: Fri, 18 May 2012 06:51:35 -0000

Changes (by zach@…):

 * status:  new => assigned

Comment:

 Proposed new ABNF upgraded to RFC5234. Note that this also takes care of
 Ticket #199, but means that we can't fix Ticket #198 as we are now doing
 relation type style values for if= and rt= due to the registries.

 Running this through ABNF validation (http://www.apps.ietf.org/content
 /chris-newmans-abnf-validator) results in:

 {{{
 undefined rule: ext-value
 undefined rule: quoted-string
 undefined rule: subtype-name
 undefined rule: LOALPHA
 undefined rule: URI
 undefined rule: URI-Reference
 undefined rule: parmname
 undefined rule: Language-Tag
 unreferenced rule: Link
 undefined rule: type-name
 undefined rule: MediaDesc
 ABNF validation (version 1.0) completed
 }}}

 Not sure how many of those undefined rules we are already bringing in
 through references, or should some of these be explicitly added to this
 definition? Any suggestions on improved ABNF are welcome.

 {{{
   Link           = "<" URI-Reference ">" *( ";" link-param )
   link-param     = ( ( "rel" "=" relation-types )
                  / ( "anchor" "=" <"> URI-Reference <"> )
                  / ( "rev" "=" relation-types )
                  / ( "hreflang" "=" Language-Tag )
                  / ( "media" "=" ( MediaDesc / ( <"> MediaDesc <"> ) ) )
                  / ( "title" "=" quoted-string )
                  / ( "title*" "=" ext-value )
                  / ( "type" "=" ( media-type / quoted-mt ) )
                  / ( "rt" "=" relation-types )
                  / ( "if" "=" relation-types )
                  / ( "sz" "=" cardinal )
                  / ( link-extension ) )
   link-extension = ( parmname [ "=" ( ptoken / quoted-string ) ] )
                  / ( ext-name-star "=" ext-value )
   ext-name-star  = parmname "*" ; reserved for RFC2231-profiled
                                 ; extensions.  Whitespace NOT
                                 ; allowed in between.
   ptoken         = 1*ptokenchar
   ptokenchar     = "!" / "#" / "$" / "%" / "&" / "'" / "("
                  / ")" / "*" / "+" / "-" / "." / "/" / DIGIT
                  / ":" / "<" / "=" / ">" / "?" / "@" / ALPHA
                  / "[" / "]" / "^" / "_" / "`" / "{" / "|"
                  / "}" / "~"
   media-type     = type-name "/" subtype-name
   quoted-mt      = <"> media-type <">
   relation-types = relation-type
                  / <"> relation-type *( 1*SP relation-type ) <">
   relation-type  = reg-rel-type / ext-rel-type
   reg-rel-type   = LOALPHA *( LOALPHA / DIGIT / "." / "-" )
   ext-rel-type   = URI
   cardinal       = "0" / %x31-39 *DIGIT
 }}}

-- 
----------------------------------+-----------------------
 Reporter:  zach@…                |       Owner:  zach@…
     Type:  protocol enhancement  |      Status:  assigned
 Priority:  trivial               |   Milestone:
Component:  link-format           |     Version:
 Severity:  -                     |  Resolution:
 Keywords:                        |
----------------------------------+-----------------------

Ticket URL: <http://trac.tools.ietf.org/wg/core/trac/ticket/197#comment:1>
core <http://tools.ietf.org/core/>

---

From: "core issue tracker" <[email-masked]>
Date: Fri, 18 May 2012 11:15:30 -0000

Comment (by zach@…):

 And after some more improvements and integrating the rest of the review
 comments we now have the following ABNF that passes validation:

 {{{
   Link            = link-value-list
   link-value-list = [ link-value *[ "," link-value ]]
   link-value     = "<" URI-Reference ">" *( ";" link-param )
   link-param     = ( ( "rel" "=" relation-types )
                  / ( "anchor" "=" <"> URI-Reference <"> )
                  / ( "rev" "=" relation-types )
                  / ( "hreflang" "=" Language-Tag )
                  / ( "media" "=" ( MediaDesc / ( <"> MediaDesc <"> ) ) )
                  / ( "title" "=" quoted-string )
                  / ( "title*" "=" ext-value )
                  / ( "type" "=" ( media-type / quoted-mt ) )
                  / ( "rt" "=" relation-types )
                  / ( "if" "=" relation-types )
                  / ( "sz" "=" cardinal )
                  / ( link-extension ) )
   link-extension = ( parmname [ "=" ( ptoken / quoted-string ) ] )
                  / ( ext-name-star "=" ext-value )
   ext-name-star  = parmname "*" ; reserved for RFC2231-profiled
                                 ; extensions.  Whitespace NOT
                                 ; allowed in between.
   ptoken         = 1*ptokenchar
   ptokenchar     = "!" / "#" / "$" / "%" / "&" / "'" / "("
                  / ")" / "*" / "+" / "-" / "." / "/" / DIGIT
                  / ":" / "<" / "=" / ">" / "?" / "@" / ALPHA
                  / "[" / "]" / "^" / "_" / "`" / "{" / "|"
                  / "}" / "~"
   media-type     = type-name "/" subtype-name
   quoted-mt      = <"> media-type <">
   relation-types = relation-type
                  / <"> relation-type *( 1*SP relation-type ) <">
   relation-type  = reg-rel-type / ext-rel-type
   reg-rel-type   = LOALPHA *( LOALPHA / DIGIT / "." / "-" )
   ext-rel-type   = URI
   cardinal       = "0" / ( %x31-39 *DIGIT )
   LOALPHA        = <defined in RFC2616>
   quoted-string  = <defined in RFC2616>
   URI            = <defined in RFC3986>
   URI-Reference  = <defined in RFC3986>
   type-name      = <defined in RFC4288>
   subtype-name   = <defined in RFC4288>
   MediaDesc      = <defined in W3C.REC-html401-19991224>
   Language-Tag   = <defined in RFC5646>
   ext-value      = <defined in RFC5987>
   parmname       = <defined in RFC5987>
 }}}

Ticket URL: <http://trac.tools.ietf.org/wg/core/trac/ticket/197#comment:2>
core <http://tools.ietf.org/core/>

---

From: "core issue tracker" <[email-masked]>
Date: Mon, 21 May 2012 11:02:38 -0000

Changes (by zach@…):

 * status:  assigned => closed
 * resolution:   => fixed

Comment:

 And with a final fix for <"> -> DQUOTE:

 {{{
     Link            = link-value-list
                    / ( "anchor" "=" DQUOTE URI-Reference DQUOTE )
                    / ( "media" "=" ( MediaDesc
                           / ( DQUOTE MediaDesc DQUOTE ) ) )
     quoted-mt      = DQUOTE media-type DQUOTE
                    / DQUOTE relation-type *( 1*SP relation-type ) DQUOTE

-- 
----------------------------------+---------------------
 Reporter:  zach@…                |       Owner:  zach@…
     Type:  protocol enhancement  |      Status:  closed
 Priority:  trivial               |   Milestone:
Component:  link-format           |     Version:
 Severity:  -                     |  Resolution:  fixed
 Keywords:                        |
----------------------------------+---------------------

Ticket URL: <http://trac.tools.ietf.org/wg/core/trac/ticket/197#comment:3>
core <http://tools.ietf.org/core/>