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

El mar, 29-10-2002 a las 18:51, Carlos Perelló Marín escribió:
> El mar, 29-10-2002 a las 18:35, Santi Camps escribió:
> > El lun, 28-10-2002 a las 20:23, Rodrigo Moya escribió:
> > > 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.
> > >
> > 
> > That's right, but I see that GdaXmlDocument has not a private structure,
> > but some public xmlDocPtr, xmlDtdPtr, etc.  I also see that nobody else
> > inside gnome-db is using GdaXmlDocument, so I am thinking to make some
> > changes in it, like put data in a private structure and try to implement
> > some validations against a DTD.  Is there any inconvenience ?
> > 
> Ok, then if I understand you right you are proposing to use the own .xml
> file as the way to manage the report (the file format is also the work
> format). right?
> It's ok for me.
> If it's possible to do some DTD validation directly to be able to fill
> the xml document only with valid data, it will be perfect.
> Thanks!!
> P.S.: I will restart my report work soon, please tell me any progress
> about this issue so we can work together.

Hello Carlos,

I have made some probes using libxml2, and now I'm sure we can store
working data in a xmlDoc and validate most of things against the DTD. 
Other validations, like numeric values and so on, should be made writing
some C code, until XML Schema works on libxml.

So, I will begin to write some code.  When you can restart to work,
please, e-mail me.

To everybody:  Anybody knows if ./data/gda-xml-query.dtd is valid?  I
think so, but I'm not sure.  I see that it is not installed with a 'make
install'.  It probably will be needed to perform DTD validations over an
existing xml gda-report file, because xml queries will be included in a
report definition.  


Santi Camps

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