multiple parents

Ray Waldin rwaldin at
Wed Dec 15 10:58:58 GMT 1999

dubolc jean wrote:
> I am translating a UML chart into Xml with the IBM
> parser XML4j and I've got a probleme:
> How can a Child Element have two Parents?
> To make an element inheritate from another, is the
> solution to put an attribute "inheritance" in the
> Child with the value "yes" or "no".

If you're looking for XML Element type inheritance, there is not yet any
such mechanism, except for architype refinement as (not yet really) defined
in XML Schemas (  

If you're just trying to represent abstract parent-child relationships in
your xml you can use the NMTOKENS (or IDREFS) attribute type as in:

  <element name="element1">...</element>
  <element name="element2">...</element>
  <element name="element3" parents="element1 element2">...</element>

or you can use seperate elements, as in:

  <element name="element1">...</element>
  <element name="element2">...</element>
  <element name="element3>
      <parent name="element1"/>
      <parent name="element2"/>

Good luck...


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as: and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list