A. Pagaltzis writes:

> * Smylers <[EMAIL PROTECTED]> [2007-03-02 22:55]:
> 
> > A. Pagaltzis writes:
> > 
> > > * Smylers <[EMAIL PROTECTED]> [2007-03-01 21:45]:
> > > 
> > > ... how do you tell whether `bastract` is a typo or extension
> > > field?
> > 
> > You can't.  But equally you can't tell if "hints:
> > test-reporter: cc_arthur" is a typo or not.  (Admittedly if
> > it's a typo for "abstract" then it's a particularly _bad_ typo
> > ...)
> 
> Yes, you can’t know anything about extension elements. That’s a
> given.
> 
> But if you contain them in an extension hook and disallow
> arbitrary placement of extension elements, then you can at least
> validate the rest of the document with strict rules.

Unless the mistake somebody makes is it forget whether a field is in the
'officially sanctioned' category or is an extension.

> > > I think adding a `hints` field which is a hash of hashes, where
> > > the key in `hints` acts as a namespace, is the best proposition so
> > > far.
> > 
> > ... I still think that the 'hints' level is unnecessary: for any key
> > in 'hints', can you imagine a situation where it's _also_ a key
> > top-level key?  Think how confusing it would be to have both
> > 'test-reporter' and 'hints: test-reporter'.
> 
> I’m not sure this would be particularly common problem?

Exactly my point!  If any 'hints: foo' field gets widespread use then
the spec would avoid defining a clashing 'foo' field, because that would
be far too confusing.  So in practice a given field is only going to
exist either at the top level or in 'hints'.

And from a user's point of view that distinction can look quite
arbitrary -- it's basically an artefact of which process somebody went
through to get the field added.  That doesn't seem like a useful
distinction to inflict on users.

> The point of `hints` is simply to contain extensions such that every
> part of the document other than what’s under `hints` is precisely
> specified.

There are other ways of achieving this, possibly even going further and
specifying which extension fields being used.  For example there could
be a field 'extension-fields' which lists them (with their types?).

Smylers

Reply via email to