Re: [gnome-db] gda-report-document



On Mon, 2002-10-28 at 19:41, Santi Camps wrote:
> Hi,
> 
> I have been viewing the code of gda-report.dtd and gda-report-document.*, in order to continue the development of gda-reports.  
> 
> I see that GdaReportDocument inherits from GdaXmlDocument, but it also have a private struct with a property for each attribute defined in the DTD.  I also see that there are enum's defined for some of these attributes.
> 
> I am asking myself, it could be better not to have these enum's and private struct, and store data directly in the xmlDoc ?  Attributes assignments could also be validated using the DTD and libxml, I think.   Thus, there would be no duplicated information in the data type, and maintaning the information could be easier (now, creating a GdaReportDocument from an file or using _set_ funcitons store the data in diferent places).
> 
> What do you thing about this?  
> 
the purpose of the private structure is to hide implementation details.
Internally, you can use whatever you want (a xmlDocPtr directly looks
fine to me), but always keep the private structure so that you store
there any internal data. Doing so prevents illegal accesses to the
struct's members.

cheers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]