abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garrett Rooney" <roo...@electricjellyfish.net>
Subject Re: API simplifications
Date Mon, 10 Jul 2006 17:43:00 GMT
On 7/10/06, James M Snell <jasnell@gmail.com> wrote:
> I'm working on a number of API simplifications.  Specifically,
> eliminating the StringElement and ExtensionElement interfaces.
>
> I have moved the ExtensionElement.getQName() method to Element.
> I have moved the StringElement.getValue()/setValue() methods to Element
> and renamed them to getText()/setText()
>
> This means that things like Generator.getValue() is now Generator.getText()
>
> It also means that for Content and Text (when type is XHTML or XML) we
> now have the option of retrieving the text content stripped of any
> markup.  Content.getText() returns just the text, with no markup.
> Content.getValue() returns the text with markup.
>
> This change eliminates four classes that, strictly speaking, were not
> necessary and served only to make the API a bit more complicated.
>
> If there are no objections, I'll check in the change.

This seems reasonable to me.  Anything we can do to simplify the API
without losing functionality seems like a win to me.

-garrett

Mime
View raw message