I seem to have missed some messages so I'm replying to a reply!

Marcus Carr wrote, that Fredrik Lindgren wrote (!):

> > I can see that this is a way to build a tree, but how do you solve
> > ordering problem? If there are three PARA elements that all have the
> > same SECTION element as parent, how do you figure out which goes

All we do is allow our elements to contain some simple system attributes
that are used in the routine that converts the object to XML. For
example, we have a field called ysSYSXMLTagName which if present becomes
the name of the tag. This saves us having to have loads of objects
defined if they look similar, differing only by tag name. In answer to
your question, we have other fields - ysSYSLinkedListFirst and
ysSYSLinkedListNext - used if we ever need children to appear in a
particular order. Our routine is then very simple. We start at any node,
display the opening tag, display all fields, then recursively display
all children. If there is a linked-list first pointer present, we export
all children in order, otherwise we just loop through. Needless to say,
the XML export routine only exports elements that do not begin ysSYS.

> Another problem is handling mixed content like:
> <PARA>Just some text containing the company <COMPANY>Intra Extra
> Ltd.</COMPANY> and some more text.</PARA>

You're right on this - we've looked into this quite a lot and so far had
to fudge it. In our system, children of objects can be easily added, so:


is dead easy, as is:

                                        <NAME>Queen Elizabeth II</NAME>
                                        <ROLE>Head of State</ROLE>
                                        <NAME>John Fahey
                                        <ROLE>Finance Minister</ROLE>

i.e. repetition of object types within other objects.

The tricky bit comes, when we want to do this:

<TEXT>The consensus holds that the <COUNTRY NAME="US">US</COUNTRY> is
losing the leadership position it assumed when <PERSON NAME="Bill
Clinton">Clinton</PERSON> called the inaugural hemispheric summit in
Miami in 1994, but that's not such bad news in <COUNTRY

To be clear though, it's not tricky because of the database, because we
could store pre and post text on each object very easily. It's tricky
because the user-interface is very kludgy. No-one wants to type some
text, then select our 'add country' button to put in the two letters
'US'. It gets worse when they want to move it. At the moment we just
allow XML text to appear in text boxes, since when exported it will look
just like all the other XML.



Mark Birbeck
Managing Director
Intra Extra Digital Ltd.
39 Whitfield Street
t: 0171 681 4135
e: [log in to unmask]