--- In xpl-dev@y..., "Alexander E. Gutman" <gutman@m...> wrote:
At this moment, I am thinking about how classes
will be declared in XPL. And I encountered a problem.
As soon as XPL is closely related to XML, the structure
of its classes should be as flexible as XML structures.
Should we regard classes as XML element types
(and, probably, declare them via schema element type definitions)
or should we employ a standard approach of some kind?
Consider me as an example of an XPL object.
First of all, I am a human.
As a human, I have a name (Alexander Gutman)
and birthdate (01.07.1966).
On the other hand, I am a mathematician.
As a mathematician, I have a name (Alex Goodman)
and workplace (Blahblah Institute).
Furthermore, I am also a programmer.
As a programmer, I have a name (Alex Softman)
and workplace (FoobarSoft).
In XML, the above information can be easily structured,
for instance, as follows:
<me>
<human>
<name>Alexander Gutman</name>
<birthdate>01.07.1966</birthdate>
</human>
<mathematician>
<name>Alex Goodman</name>
<workplace>Blahblah Institute</workplace>
</mathematician>
<programmer>
<name>Alex Softman</name>
<workplace>FoobarSoft</workplace>
</programmer>
</me>
The question is:
How such a structure can be modeled via "usual" classes?
Of course, there are many different solutions, but I wonder
if there is a solution close (in flexibility) to that of XML.
(You may use any concepts, including multiple inheritance.)
--
Alexander E. Gutman
--- End forwarded message ---
|