including lists in XML?

Sam Gentile samg at fundtech.com
Fri Aug 7 19:18:08 BST 1998


Problem:
We need a way to represent lists of items.  That is, any item which will be
included in an XML buffer, where we don't know at compile time the size of
the list.

Proposal:
1. Include a field in the database, TMS_IPM_REPOSITORY_DETAIL, to indicate
to the factory to keep reading all items of a specific type untill there are
no more items of that type.  Or, to indicate to the factory to keep writing
all items of a specific type untill there are no more items of that type.
2. If this field is set, the Generator:
adds the "declare(RWGSlist, C<item>)" to the #include for class <item>
declares the type for C<item> as "RWGSlist(C<item>) m_lst<item>" wherever
the class <item> is used
3. If this the type of the item is a list, the factory has a get and put for
lists.  This class uses the RWGSlist member functions next() and at() to
access the items.

Copy of a XML buffer which has multiple instances
<XMLBuffer>
<Person><name>Henry Ford</name></Person>
<Person><name>Samuel Crowther</name></Person>
<Person><name>Harvey S. Firestone</name></Person>
<Book>
    <author>Henry Ford</author>
    <author>Samuel Crowther</author>
    <title>My Life and Work</title>
</Book>
<Book>
    <author>Harvey S. Firestone</author>
    <author>Samuel Crowther</author>
    <title>Men and Rubber</title>
</Book>
</XMLBuffer>


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list