[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Standard way to express object, not resource, rels in XML?
Mike Brown [SMTP:mbrown@c...] wrote: > I want to use XML to express relationships between instances of the > conceptual/abstract objects that are each modeled by separate XML documents > (or separate collections of documents). Do you always have a separate XML document to model each object? Isn't it more common to have several different object classes in your model, and typically many object instances per document, with relationships both within and across documents? Expressing relationships (UML: associations) between objects even within one XML document is not that simple, because XML gives you so many ways to do it. XML can express a relationship between two object instances in any of the following ways: - as an idref/id pair - by shared values of attributes or elements (just as relational databases express relations by 'foreign keys') - by nesting of elements (element representing object A inside element representing object B) - by 'denormalisation', attaching the attributes of both objects to the same element - separately, outside the elements representing each object There are many variants on these and they are not just academic; you can find all of them in commonly used XML languages. So there are lots of 'standard' ways to express object relations; although I believe initiatives like ebXML would like to encourage some rather than others (shutting the stable door after the horse has bolted...?). So did the BizTalk 'canonical form', before BizTalk started accepting everybody's schemas. This plethora of ways to express relations is what makes XML translation hard - preserving the relationships while translating them from one representation to another. We have built a tool that can understand and translate all the known relation representations within a document, but not yet relations across documents. Robert Worden http://www.charteris.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|