Brian Ingerson [mailto:ingy@...] wrote:
> Sent: Thu, August 01, 2002 12:34
> To: Oren Ben-Kiki
> Cc: yaml-core@...
> Subject: Re: [Yaml-core] odds&ends
> On 01/08/02 12:33 +0300, Oren Ben-Kiki wrote:
> > Clark C . Evans [mailto:cce@...] wrote:
> > > | I think this
> > [unique keys]
> > > | belongs to YQUERY/YPATH. Something like XSLT's
> > > | key declarations
> > > | would be very useful. Forcing it to be a single key with a
> > > | single name for
> > > | all applications is counter-productive, IMO.
> > >
> > > Ok. So we do it as a function, and the function isn't in
> YPATH, but
> > > is rather defined by YQUERY; just as keys() is defined by
> > > XSLT and not XPATH?
> > Right.
> > > | - The scheme thing. Brian's response was less than
> > > | enthusiastic about using
> > > | 'tag:', and even if we do use it, the exact shorthand list
> > > | is still somewhat
> > >
> > > Well, he was completely uninterested in the topic during an IRC
> > > chat yesterday. It's definately an eyes-glaze-over kinda thing.
> > >
> > > Anyway, let's finish the exact shorthand:
> > >
> > > !<word>:<whatever> => !<word>:<whatever>
> > > !!<whatever> => !x-private:<whatever>
> > > !<D>/<whatever> => !tag:core.yaml.org,<D>:<whatever>
> > > !<word>,<D>/<whatever> => !tag:<word>.yaml.org,<D>:<whatever>
> > > !<word>/<whatever> => !tag:<word>.yaml.org,<F>:<whatever>
> > > + !<single> => !tag:core.yaml.org,<F>:<single>
> > >
> > > Where <word> can't look like a date, <F> is 2001-01-05,
> > > and <single> does not contain '-', '/', nor '.'
> > >
> > > - !/<whatever> => !tag:core.yaml.org,<F>:<single>
> > >
> > > This proposal is identical to oren's previous proposal, less
> > > the - line is replaced with + so that !str can be maintained.
> > Too complex and too restrictive. You should just say that
> <single> can't
> > contain any ':' or '/' characters and be done. This would
> allow us things
> > like !foo.bar if we wish it later.
> > Although I still think !/str is a better choice. It is cleaner, more
> > consistent with the other shortcuts, the cost is just one
> character, it
> > looks pretty good, it is intuitive ("absolute path"
> starting from "the root"
> > type URI). Plus, the use of explicit core types is rather
> rate. Examine your
> > files - my bet is that this change would break none of them
> (test files
> > excluded :-)
> > I won't - quite - insist on it, but please reconsider this.
> Brian, any
> > opinion about this (syntactical) issue?
> I think I need a tutorial. On irc perhaps. I'm a little lost here.
It is all rather simple, once one ignores the tortured path we've taken and
just examines the end result.
- YAML core types are defined under the 'tag:' scheme.
- This is the recommended scheme for all type family URIs.
- This is Clark's pet peeve; using 'tag:' we don't get newbies asking "what
should I get when I paste the type family to a browser" because he woldn't
be able to do so in the first place. I'm less convinced of this; I think it
would be "nice" to be able to do such a pasting and get a human-readable
HTML document saying "Welcome to <type-family>, _the_ type family for
serializing duck soup!". But I don't feel strongly about it, and if I
understand correctly, neither do you. So we are going with Clark's strong
feelings here. Right?
- The general format of the 'tag:' scheme is tag:<domain>,<date>:<whatever>.
The meaning is "<whatever>" as defined by whoever owned <domain> at <date>
(this allows old domain owners to keep on defining <whatever>s after they
have given up ownership, and new domain owners to define their own
<whatever>s). Nothing stops a domain owner from using two separate dates as
long as he owned the domain at that times. The resulting URIs are
"different" - how exactly is up to the domain owner.
- We'll provide shortcuts (instead of the current ones). The set Clark and I
agree on is:
Generic URI (not a shortcut):
Private URI. x-private is a ball
of mud, no uniqueness, etc.:
Language-specific (2001-01-05 is the
date yaml.org was registered):
Language-specific with a date (suppose
that the language is taken over by someone
and they want to issue a whole new set):
(assuming Microsoft takes over Java in 2010
and changed Integer to be a fixed-point float :-)
Core types with a date (again, assume the
above unlikely scenario):
(While at it, the W3C re-defined strings to use
the new "MicroCode" Unicode extensions to support
the 2^73 characters of the first Alien language :-)
- The last two shortcuts are of dubious usefulness but are required to be
"complete" in terms of the functionality offered/required by the 'tag:'
- At any rate, given the above shortcuts, Clark and I disagree about the
form of the final, most "core" shortcut. I think that for consistency, we
Core types, new way:
Clark thinks we should stick with:
Core types, old way. <whatever> isn't,
really; it must not contain ':' and '/'
(and maybe other things):
So, the question is, do you have an opinion about all this, and in
particular about the last (syntactical) issue?