From: Clark C. E. <cc...@cl...> - 2004-08-31 19:24:43
|
On Tue, Aug 31, 2004 at 10:36:48AM -0700, Brian Ingerson wrote: | I am not disputing that tags need to be globally unique. Ok. | What I am doing is trying to find a way to keep resolution outside of | the YAML document. I want to keep the option of having resolution stay in the YAML document. | I think these 'handles' must become globally unique at some point before | the documented in "consumed" by an application, but the hints for | resolution don't need to pollute the YAML syntax. Right, I updated the proposal with the following wording: If a prefix is used in a document, and not associated with a taggingEntity in a directive, then the application must provide to the parser a valid taggingEntity for each prefix. Prefixes used in a document that have neither been defined by a directive, nor explicitly provided to the parser are errors. | So why do you/we keep on insisting on putting all the global info | inside the document? Beacuse in some cases (a canonical form) it makes a ton of sense, and I should be able to directly serialize what is in the information model, with all types explicit; with _no_ ambiguity. | > You can see the beginnings of a nightmare cross-referencing problem | > here. How do I know that !bing in schema X is the same as !wibble | > in schema Y? The rules in the proposal I posted above resolve this. | | Rules. Rules. You want to disambiguate at the pure document level. (You | always have, Clark :P). We keep getting you to let go, and you do. | Slowly. You're sliding down the rope reluctantly. I'm _not_ happy with the plain scalar hack flag. However, that can be avoided if one wishes. I'm only asking that people who _want_ to fully-qualify their data types be allowed to do so in a clear way. It's not like people who only use double-quoted strings are going to have readable documents either. ;) | --- | thing: March 25th, 1964 | | is a string or a date object or something else? You don't until schema time. | | And how do you know that: | | --- | thing: !clark/date March 25th, 1964 --- %ns:yaml.org,2002 %ns:yks=yikes.clarkevans.com,2004-08 !str "thing": !yks^date "March 25th, 1964" Is the ugly way to write it so that the tags are fully qualified and their is no ambiguity. I'm not saying it is pretty, but in some cases, this may be just what the doctor ordered. | Agreed. But global uniqueness at the document level _isn't_ necessary. But, it shouldn't be forbidden. ;) Clark |