From: Gavin Kistner Date: 2005-04-11T22:28:19+09:00 Subject: [OT] XML markup limitations [was Re: Free XML Databases (with Ruby!)?] On Apr 11, 2005, at 7:01 AM, Jonas Hartmann wrote: > Jonas Hartmann wrote: >> I found a confusion mapping OO to XML, are the element names roles or >> types? That problem dissapears with RDF because you specify both >> roles and types, e.g. the confusion in XML: >>
>> >> There seems to be a confusion between roles and types. Circle is a >> type right? and center is a role? > I am not familiar with "roles and types" in this regard - so I dont > know what you are talking about, but by your example I thought, do you > mean the distinction between datatypes/datacontainers and > data/dataelements? I suspect so. It is a common problem, using subordinate XML elements to describe their parent, while at the same time using subordinate elements to describe a parent/child relationship: Don 75 Don's Son32 or The former is 'bad' because it is so verbose; the latter is 'bad' because it requires an external processor (or smart xslt agent) to do meaningful processing on the individual values. Further, the latter requires the processing agent to know the order of the values in the space-delimited string. You can't even use the former solution in cases where an arbitrary number of points may exist, such as: This is certainly preferable (IMO) to something like: ... both in terms of verbosity as well as node encapsulation, but neither solution is good. (Though these examples are contrived, the problem is not. For example, look at the information crammed into the 'd' attribute for an SVG Path element: http://www.xml.com/pub/a/2000/03/15/deviant/ ) We now return you to your regularly-scheduled Ruby discussion. -- "When I am working on a problem I never think about beauty. I only think about how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." - R. Buckminster Fuller