Some ideas for XML-Query



Hi Vivien,

did you already start the new implementation of your Gda_XmlQuery class?

I would like to discus some suggestions:

In your old implementation you defined one very large and complex class.
Why not defining some simple, small and easy to maintain helper classes.
I suggest to define a helper class for most of the elements in the DTD.
Of course all binary operators can be represented by one BinOp class, because
they are all equal with respect to XML-Query, but select, insert, ....
should all have their own classes, because they have a very different structure.
All classes should by derived from one abstract base class, that defines some
virtual methods. These are overridden for the concrete, instantiated classes.

The DTD should be changed, to avoid elements with the structure

<!ELEMENT parent (child_1, child_2*, child3)>

by defining special list-tags:

<!ELEMENT parent (child_1, child_2_list?, child_3)>
<!ELENENT child_2_list (child_2+)>

Then all lists can be mapped to a ListCLass. It provides methods, that processes
all it's children.

Please tell me, what you think about these ideas.

-------
Gerhard






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