[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: VS: [plcs-tog] FW: XML elements vs. XML attributes (Release Authorised)
All, This input from Des did not seem to make it to the PLCS-TOG exploder. Best regards Tor Arne Fra: Willans, Richard [mailto:Richard.Willans@boeingdefence.co.uk] All, My 10p worth from personal experience and Tor Arne’s reply is for these 2 examples in isolation I think attributes are the correct solution as follows: 1. A requirement is to reduce file size where possible. Engineering data may include a large number of these coordinates so the saving may be significant. 2. Core Content: This is not so obvious but an argument could be made that the core information is a “Co-ordinate” or “Direction” and the attributes merely describe the element fully – It would not be true to refer to them as “peripheral or incidental” though! 3. This data structure is not extensible – Cartesian co-ordinate system is defined with 3 and only 3 axes. 4. Readability – Judgement call but if the atts are specified in the same order for each use of the element I think this is fine for human readability although I don’t believe in general this is a significant use case. Taking these 2 examples in the wider context of the schema though, this may contravene a general principle to use elements only which I am generally in favour of for the extensibility argument. That I believe is the key difference here though – A Cartesian co-ordinate will “not“ evolve and if the co-ordinate system is changed then a new parent element would be used instead such as <PolarCoordinate>. A further suggestion may therefore be to define the element as <CartesianCoordinate> rather than simply <Coordinate>. Hope this is of some use in the debate Regards Des Des Willans Solutions Architect (Applications) Boeing Defence UK Ltd - A subsidiary of The Boeing Company T: +44 (0)1173 170452 (Direct) M: +44 (0)7780 484097 E: richard.willans@boeingdefence.co.uk Dakota House Building 630 Bristol Business Park Coldharbour Lane Bristol BS16 1EJ UK From: plcs-tog@lists.oasis-open.org [mailto:plcs-tog@lists.oasis-open.org] On Behalf Of Tor Arne Hi, Input based on reading “When to use elements versus attributes -Exploring the oldest question in XML design” http://www.ibm.com/developerworks/xml/library/x-eleatt/index.html
sometimes the principles will lead to conflicting conclusions where you'll have to use your own judgment to decide on each specific matter. So, if the issue at hand is <essential> <data> that may be <extensible> meant <to be understood by a person> - this suggests ELEMENT. Best regards Tor Arne Fra: plcs-tog@lists.oasis-open.org [mailto:plcs-tog@lists.oasis-open.org] På vegne av Rob Bodington Hi We have been asked for our view on this by the AP242 team who are at a workshop finalizing the AP242 model My initial reaction is that we should avoid xml attributes at all costs. We have them for id and uris – on the basis of file size – the same argument is being used here. Any thoughts? Regards -------------------------------------------------------------------------------- Eurostep Limited. Registered in England and Wales No.03049099 Registered Office: Cwttir Lane, St. Asaph, Denbighshire LL17 0LQ. From: Günter Staub [mailto:staub@pdtec.de] Hi Rob, can you please give your opinion, or even better Feedback from PLCS to the proposal from Dassault for using attributes instead of elements for some geometric entities (see below). Regards, Gunter From: Günter Staub [mailto:staub@pdtec.de] Hi Rob, one (early) comment for the AP242 Prototyping project (from Dassault I believe, but not sure): But the file size ratio (1:2,x) is not too bad from my point of view (but p21 = AIM level, XML file = BO Model level). Regards, Gunter From: Günter Staub [mailto:staub@pdtec.de] Hi Rob, Some time ago you mentioned a (kind of) recommendation about when to use XML elements vs. XML attributes. Can you please provide this document (or a link where to find this document) to me? Regards, Gunter
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]