/[storm]/storm/doc/pegboard/simple_storm--benja/peg.rst
ViewVC logotype

Diff of /storm/doc/pegboard/simple_storm--benja/peg.rst

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by benja, Thu Apr 3 08:20:18 2003 UTC revision 1.4 by benja, Sun Apr 6 20:46:22 2003 UTC
# Line 106  Issues Line 106  Issues
106    (How long are the IDs going to be and whether    (How long are the IDs going to be and whether
107    this will be a problem.)    this will be a problem.)
108    
109     RESOLVED: Here's an example URI, 102 characters long:     RESOLVED: Here's an example URI, 106 characters long:
110    
111       urn:urn-?:application/rdf+xml,QLFYWY2RI5WZCTEP6MJKR       urn:urn-?:1.0:application/rdf+xml,QLFYWY2RI5WZCTEP6MJ
112       5CAFGP7FQ5X.VEKXTRSJPTZJLY2IKG5FQ2TCXK26SECFPP4DX7I       KR5CAFGP7FQ5X.VEKXTRSJPTZJLY2IKG5FQ2TCXK26SECFPP4DX7I
113        
114     This is long, but IMO not 'too long.'     This is long, but IMO not 'too long.'
115    
116    - Why the ``1.0``?
117    
118       RESOLVED: To have some kind of versioning information,
119       e.g. if we have to change the hash functions because
120       something is broken.
121    
122    - Are the rules for escaping too complex? What's with all this
123      escape this, don't escape that, quote this, don't quote that?
124    
125       RESOLVED: The important things to notice are that
126       the common cases are simple (just a type, type plus charset),
127       and that canonicalization is *really* easy. The other
128       rules aren't that difficult, either, and they only
129       apply in uncommon cases. It should be ok.
130    
131  - Why this syntax? Why not another?  - Why this syntax? Why not another?
132    
133     RESOLVED: For similarity to ``data`` URLs.     RESOLVED: For similarity to ``data`` URLs.
# Line 122  Changes Line 137  Changes
137  =======  =======
138    
139  Storm blocks do not have headers any more; the hash in their URN  Storm blocks do not have headers any more; the hash in their URN
140  is only of the body. Storm URNs have the following form:  is only of the body. Block URNs have the following form::
   
     <namespace>:block:[<mediatype>],<data>  
   
 ``<namespace>`` is an informal URN namespace to be registered,  
 like ``urn:urn-5``. ``<bitprint>`` is a Bitzi bitprint as defined  
 by <http://bitzi.com/developer/bitprint>. ``<mediatype>`` is  
 the token defined in [RFC2397]--  
141    
142        blockurn   := namespace "1.0:" [ mediatype ] "," bitprint
143      mediatype  := [ type "/" subtype ] *( ";" parameter )      mediatype  := [ type "/" subtype ] *( ";" parameter )
144      parameter  := attribute "=" value      parameter  := attribute "=" value
145    
146  "where [...] 'type', 'subtype', 'attribute' and 'value' are  ``namespace`` is an informal URN namespace to be registered,
147  the corresponding tokens from [RFC2045], represented using  like ``urn:urn-5``. Before it is registered, ``urn:storm:``
148  URL escaped encoding of [RFC2396] as necessary" [RFC2397].  is used. ``bitprint`` is a Bitzi bitprint as defined
149  (Escaping is necessary when a character isn't in the set  by <http://bitzi.com/developer/bitprint>; this means it's
150  of allowed URN characters.)  32 characters, a dot, plus 39 more characters.
151    
152    The ``type``, ``subtype``, ``attribute`` and ``value``
153    tokens are specified by [RFC2045]. All characters not
154    in ``<URN chars>`` as defined by [RFC2141] MUST be
155    percent escaped [RFC1630], with one special exception:
156    The slash separating type from subtype MUST NOT be escaped.
157    This is for easier readability, and is consistent with
158    the use in ``data`` URLs [RFC2397] (it's also the thing
159    most likely to be struck down in the namespace
160    application process... but we can see whether it
161    gets through or not).
162    
163    Block URNs are completely case-insensitive; they are
164    canonicalized by lower-casing them, character by character.
165    Two block URNs are thus considered equal when compared
166    ignoring case.
167    
168    To make this work, in case-sensitive ``values``, upper-case
169    characters MUST be percent escaped, since they are not allowed
170    in the canonical form. This is admittedly ugly, but
171    case-sensitive ``values`` are rare. For parameters whose ``value``
172    is always a ``token`` as defined by [RFC2045] (for example
173    ``charset``), ``value`` SHOULD NOT be enclosed in quotation marks
174    (prior to percent escaping). For parameters whose value may
175    contain characters not allowed in ``token``, ``value`` SHOULD
176    be enclosed in quotation marks. Quoting [RFC2045], ::
177    
178         token := 1*<any (US-ASCII) CHAR except SPACE, CTLs,
179                     or tspecials>
180    
181  "X-" types aren't allowed, as they work against the persistence  "X-" types aren't allowed, as they work against the persistence
182  of Storm blocks; ``application/octet-stream`` or similar  of Storm blocks; ``application/octet-stream`` or similar
183  must be used instead.  must be used instead. There is an internet-draft
184    [draft-eastlake-cturi-04] on the use of URIs as MIME types;
185    if this becomes standard, it should be used for extension.
186    
187  Unlike in [RFC2397], if no ``<mediatype>`` is given,  Unlike in [RFC2397], if no ``<mediatype>`` is given,
188  ``application/octet-stream`` is assumed (not ``text/plain``).  ``application/octet-stream`` is assumed (not ``text/plain``).

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26