abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harris Boyce III" <harris.r.boyce....@gmail.com>
Subject Re: FOM Design Question
Date Tue, 20 Feb 2007 21:09:50 GMT
James,

Thanks for the clarification, this makes sense.

- Harris

On 2/20/07, James M Snell <jasnell@gmail.com> wrote:
> One of the purposes of the current design is to allow Abdera to parse
> other types of XML documents.  This is used currently, for instance, on
> the entry.setContentAsXtml(String) method where an XHTML string is
> passed in, parsed as an arbitrary XML document, and imported into the
> entry.  setContent(String, Content.Type.XML) works the same way.
>
> e.g., we can do things like:
>
> Document<Div> doc = parser.parse(xhtml_fragment);
> Div div = doc.getRoot();
>
> - James
>
>
> Harris Boyce III wrote:
> > All,
> >
> > I have started working on implementing Abdera in .NET and another
> > contributor to the project asked the following question regarding the
> > design of the FOMDocument object:
> >
> > "I haven't got my head around FOMDocument<Ielement>. There are only 4
> > types of document in Atom so why not create 4 concrete classes and also
> > why allow documents to be created on elements that are not of one of the
> > four types. IOW what is the benefit of being able to create a
> > FOMDocument based on IContent or IDateTime against the 'issue' of being
> > to create 'invalid' documents?"
> >
> > I really couldn't come up with a good answer other that "because Java
> > Abdera does it that way".  Any insight on this topic would be great.
> >
> > Thanks so much!
> >
> > Regards,
> >
> > Harris
> >
> > Note: Project is currently located at http://code.google.com/p/abderadotnet
> >
>

Mime
View raw message