[silva-dev] Metadata and the Catalog
kitblake at gmail.com
Sat Apr 7 07:16:32 CEST 2007
2007/3/30, Andy Altepeter <aaltepet at bethel.edu>:
> > What I'd like to know, are there extension developers out there who
> > would be inconvenienced by this? In other words: would your code break
> > if getMetadataValue potentially raises KeyErrors?
> Hey Eric,
> I think this change "is a good thing". I suppose you'll be implementing it in
> the trunk or some other. Extension developers are already needing to do many
> adjustments to their code in order to upgrade extensions to recent versions,
> and each new version requires a bit more adjustment as more of Silva is
> converted to use Five. So, what's one more adjustment? As long as we're
> aware of this...
With the release of the updated Silva Find this has become an urgent problem.
> Since we're on the topic of SilvaMetadata, I do find one thing annoying:
> When the a value of a listfield is changed (say the value was a typo, or
> instead of an empty '' you decide to use the string ' none'), any silva
> object which has that metdata element set to that particular value is now
> broken. This is annoying, because there is no quick or easy way to fix these
> objects, short of an upgrade script.
Yes, we have this annoyance now with the change in the language field
in 1.5.10, where the country codes went from upper to lower case.
This seems overly fragile and I wonder how difficult it would be to
make the metadata system more tolerant. With code source parameters
the problem doesn't exist: if a matching value isn't found, the field
simply defaults. This makes them nicely backwards compatible in the
face of evolving requirements.
> But I digress...
Well, the title is pretty broad :-)
Thus.... would it be possible to make calls to the metadata system
work with path expressions? Right now page templates must use
hyper-punctuated Python which makes the TAL look complex, e.g.:
> tal:define="subject python: here.get_metadata_element('silva-extra', 'subject') or nothing"
More elegant would be:
> tal:define="subject here/get_metadata_element/silva-extra/subject or nothing"
What d'ya think, Mr. Metadata? ;-)
Kit BLAKE · Infrae · http://infrae.com/ + 31 10 243 7051
Hoevestraat 10 · 3033 GC · Rotterdam + The Netherlands
Contact = http://xri.net/=kitblake
More information about the silva-dev