[Dev] Fun with strings

Katie Capps Parlante capps at osafoundation.org
Thu Mar 4 17:09:45 PST 2004


Hi Jeffrey,

Brian and I are charged with prioritizing the list of 
what-gets-worked-on in the Content Model in the 0.4 time frame. This 
issue is on the list to consider, although I'd note that its not one of 
the critical path issues, so it might get put off for a while. I don't 
want to discourage discussion on this issue if folks are up for it -- 
just wanted to respond with a status update.

Cheers,
Katie

Jeffrey Harris wrote:

> Hi Folks,
> 
> Brian and I were talking this afternoon and we surfaced some questions 
> we're interested in input on about strings.
> 
> Currently, the StreetAddress Kind 
> <http://o11n.org/docs/current/model/parcels/OSAF/contentmodel/contacts/Kinds.html#StreetAddress> 
> has a streetAddress attribute which is a single String.  Many other 
> formats store street addresses in multiple fields (Street Address 1, 
> Street Address 2, etc.).  In our Content Model, we could replicate this 
> in a variety of ways.
> 
> 1) We could change the streetAddress cardinality to list.
> 2) We could embed newlines in the streetAddress string.
> 3) Same as 2), except we'd create a new String type, maybe called 
> MultiLineString. Doing this would provide a hint to the UI about layout.
> 
> Are there other ways people might try to deal with data like this?  Are 
> there other circumstances where it would be nice to have a 
> MultiLineString type?  Would it be problematic to have two Chandler 
> types that map to a single Python type?
> 
> If we embed newlines in strings, do we just use the newline code of the 
> OS the repository lives in?  Might this present a problem when data is 
> shared between \n and \r\n platforms?
> 
> Since we were in a masochistic mood, Brian and I noted that strings 
> might present problems in other subtle ways:  Plain text strings vs. 
> strings with embedded HTML markup, unicode, and internationalization, 
> all seem like areas that OSAF should think about and get on the same 
> page around.
> 
> Sincerely,
> Jeffrey
> 
> 
> ------------------------------------------------------------------------
> 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> 
> Open Source Applications Foundation "Dev" mailing list
> http://lists.osafoundation.org/mailman/listinfo/dev



More information about the Dev mailing list