From: Clark C . E. <cc...@cl...> - 2002-08-01 20:26:29
|
On Thu, Aug 01, 2002 at 09:43:04AM -0700, Brian Ingerson wrote: | Proposal: > | Can we just use our current types, and simply drop the 'http://' | part altogether, and not put anything at the end of a rainbow, and | be done with it? Summary: > Ok. I agree to a certain extent. Let's keep it simple. Below is a non-URI proposal that is "forward-compatible" with URIs if we wish to do this in the future. I'd like to keep the formats to exactly our three use cases below... One of the traps we seem to fall into is creating N forms that are only slightly different. Below each of the three forms is very distinct and clearly not like the others. Suggestion: - case: > We need "quick&dirty" private type which need only be unique to a particular system. what: > We use !!private for these thingys, then it is up to the local system / language binding to determine the meaning, etc. template: | !!<whatever> examples: - !!willy-wanka:wobbly ~ - !!localhost/zoom ~ - !!file:c|/mydoc.yschema ~ - case: > We need globally unique and persistent identifiers for various types. what: > We use a DNS based system with a year; where you can only "mint" names in this space if you are the holder of the domain name on 00:01 of January, 1st of that year. We use !< template: | !<domain>,<year>:<whatever> examples: - !clarkevans.com,2000:mytype - !axista.com,2002:timesheet - case: > We need a local type for language specific bindings. what: > We use a pair of language/whatever, and for yaml specific types we use 'yaml' (or *) template: | !<language>/<whatever> examples: - !yaml/date # (or !*/date)? - !java/com.clarkevans.Timesheet - !perl/Foo::Bar Where: language: is alphanumeric union '_' and '-' year: is exactly 4 digits domain: is the hostname production from rfc2396 whatever: is the opaque_part production from rfc2396 Notes: - > If someone has the "urge" to map the above types to a URI they can do so as follows: !<language>/<whatever> => tag:<language>.yaml.org,2002-01-05:<whatever> !<domain>,<year>:<whatever> => tag:<domain>,<year>:<whatever> !!<whatever> => x-private:<whatever> However, the above are NOT NORMATIVE and not part of the specification. In particular, !<language>/<whatever> is not considered equal to !<language>.yaml.org,2002-01-05:<whatever> as tempting as it may be. - > The types above are "compatible" with the rfc2396 so that if for YAML 1.1 we *absolutely* have to have an mapping to URIs we can add one without a problem. Advantages: - > We avoid completely the URI mess, yet keep the door open for using them later on down the road. - > We have formats which exactly match our use cases. Clark -- Clark C. Evans Axista, Inc. http://www.axista.com 800.926.5525 XCOLLA Collaborative Project Management Software |