[Zope-CMF] Re: [dev] Dublin Core Creator(s): a small proposal
tseaver at zope.com
Tue Dec 16 10:03:37 EST 2003
On Mon, 2003-12-15 at 18:13, Yuppie wrote:
> Tres Seaver wrote:
> > On Mon, 2003-12-15 at 16:42, Yuppie wrote:
> >>Listing more than one creator in a Creator element violates the
> >>standard. You are right that 'Creators' isn't a Dublin Core element, but
> >>the proposed method represents an ordered list of 'Creator' elements.
> > Strictly speaking, *any* DC element is repeatable.
> Yes. But the CMF DublinCore interface doesn't define all elements as
> > Let's stick with the
> > pattern used by the "*Date" elements: reserve the "initial caps" name
> > for the string version, and use a more natural method name for the one
> > which delivers a more natural representation. E.g., call the new method
> > 'creators'; have the 'Creator' method return the
> > equivalent of '"; ".join( self.creators() )'.
> created() is the DateTime representation of CreationDate(). And
> CreationDate() is a Dublin Core Date element.
> You propose defining creators() as the list representation of Creator().
> Creator() would be a string representation of a sequence of Dublin Core
> Creator elements. That doesn't convince me.
> If we reserve the "initial caps" names for string versions
> - Subject() and Contributors() violate this rule
> - this is no reason for using Creator() instead of Creators()
> It might make sense to reserve "initial caps" names for DC elements.
> In this case only Contributors() violates the rule. Sequences of
> elements could be called listContributors() and listCreators().
> Regarding backwards compatibility your proposal might be useful in cases
> where the semicolon separated string can replace the old string. But it
> breaks e.g. code where the Creator id is converted to a full name.
> If we use a new method name for the sequence (represented as string or
> tuple), people have time to update their code.
> Would you like this more than my original proposal:
> listCreators() returns a sequence of Dublin Core Creator elements.
> Creators() returns a string "; ".join( self.listCreators() )
> Creator() returns the old value and is deprecated
I don't like the notion of deprecating the DCMI-supplied name. I
wouldn't mind having it be just an alias for 'Creators', if that name
> The problem is that Contributors() works different. We could add an
> alias listContributors(), but if Contributors() returns a string instead
> of a tuple that breaks backwards compatibility.
> There might be other solutions, but I'd really like to have consistent
> patterns without changing all existing method names.
I don't mind rationalizing CMF-internal names, but I think we should
continue to publish the DCMI-originated ones.
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope-CMF