2010-03-30

syntax designed around url

3.20: adda/cstr/syntax:
. if adda is supposed to follow url syntax
how would you explain # as a multiplicity?
. I was concerned that book#2 is confused with
book having a chapter#2 .
. an url is about an address,
and when a file is being adressed,
it usually means enter the files beginning
-- so the file represents one address
rather than a number of them .
. there's no denying that adda's #-sign
has a meaning similar to url's;
the problem is when extending that
to english names:
what english really does with book names
is make the enumeration part of the name .
. books might use a colon to separate the series.name
from the issue.name .

2 comments:

  1. 8.17: web.adda/syntax/more ideas from url's:
    Url's Syntax and
    Extensible_Resource_Identifier:

    . URL's most basic syntax is this:
    (Scheme) : (ResourceLocator)
    . ResourceLocator's syntax depends upon Scheme:
    -- I thought scheme was called protocol
    because it determined what app was to be used;
    [11.8: Marek Nov 9 '10:
    The correct name is "scheme" (see RFC 2616 and 2396).
    Even if many URL schemes are named after protocols,
    this does not imply that the
    only way to access the resource is via the protocol . ]
    . consider the use of the "(file) scheme
    to indicate the resource is local;
    the scheme is for use by the client's browser
    not the server .

    eg, this is a valid url:
    mailto:bob@example.com
    -- it's part of the full syntax:
    scheme://username:password@domain:port/
    path?query_string#fragment_id

    . notice that having top-domain on the right
    is the same as normal english address syntax:
    unit.city.state.country .
    . states can reserve domains from their country
    and cities can reserve from their state .

    CURIE syntax: [isbn:0393315703]
    CURIE (short for Compact URI)
    defines a generic, abbreviated syntax for expressing URIs.
    It is an abbreviated URI expressed in CURIE syntax,
    and may be found in both XML and non-XML grammars.
    A CURIE may be considered a datatype.

    ReplyDelete
  2. 8.17: web.adda/syntax/allowed characters:

    . there are 3 classes of url characters
    # allowed Unreserved:
    # allowed Reserved(Have to be encoded sometimes)
    # restricted (need to be encoded always).

    BNF of generic URI syntax

    This is a BNF-like description of the URI syntax.
    at the level at which specific schemes are not considered.
    A vertical line "|" indicates alternatives,
    and [brackets] indicate optional parts.
    Spaces are represented by the word "space",
    and the vertical line character by "vline".
    The "nationals" { } | [ ] \ ^ ~
    and "punctuations" < >
    do not appear in any productions
    and therefore may not appear in URIs.
    . URI is defined without the fragmentaddress;
    instead, fragmentaddress is defined in terms of URI:
    uri [ # xalphas ]

    uri
    ialpha : path [ ? xalpha ]
    ialpha : [ ? xalpha ]
    path
    xalpha | +
    path / path
    reserved
    = ; / # ? : space
    safe
    $ - _ @ . &
    extra
    ! * " ' ( ) ,
    xalpha
    alphanums | safe | extra | %hh -- escape by hex encoding
    ialpha
    alpha [ xalpha ]

    BNF for specific URL schemes

    hostport
    host [ : port ]
    host
    digits . digits . digits . digits
    hostname
    hostname -- aka cellname
    ialpha [ . hostname ]
    port
    digits
    path
    void | segment [ / path ]
    segment
    xpalphas
    search
    xalphas [ + search ]
    user
    alphanum2 [ user ]
    alphanum2
    alpha | digit | - | _ | . | +
    xpalpha
    xalpha | +
    safe -- adds + - to generic's safe
    $ - _ @ . & + -

    httpaddress
    h t t p : / / hostport [ / path ] [ ? search ]
    afsaddress
    a f s : / / cellname / path
    midaddress
    m i d : addr-spec
    cidaddress
    c i d : content-identifier
    mailtoaddress
    m a i l t o : xalphas @ hostname

    waisaddress (waisindex)
    w a i s : / / hostport / database [ ? search ]
    waisaddress (waisdoc)
    w a i s : / / hostport / database / wtype / wpath
    wpath
    digits = path ; [ wpath ]
    database
    xalphas
    wtype
    xalphas

    newsaddress
    n e w s : groupart
    nntpaddress
    n n t p : group / digits
    groupart
    * | group | article
    group
    ialpha [ . group ]
    article
    xalphas @ host


    prosperoaddress
    prosperolink
    prosperolink
    p r o s p e r o : / / hostport / hsoname [ % 0 0 version [ attributes ] ]
    hsoname
    path
    version
    digits
    attributes
    alphanums [ attributes ]

    ftpaddress
    f t p : / / login / path [ ftptype ]
    ftptype
    A formcode | E formcode | I | L digits
    formcode
    N | T | C
    telnetaddress
    t e l n e t : / / login
    login
    [ user [ : password ] @ ] hostport
    password
    alphanum2 [ password ]

    gopheraddress
    g o p h e r : / / hostport [/ gtype [ gcommand ] ]
    gtype
    xalpha
    gcommand
    path

    ReplyDelete