OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

plcs-tog message

[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]
Sendt: 12. september 2012 17:58
Til: Tor Arne
Emne: RE: [plcs-tog] FW: XML elements vs. XML attributes (Release Authorised)

 

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
Sent: Tuesday, 11 September 2012 08:01
To: 'Rob Bodington'; plcs-tog@lists.oasis-open.org
Subject: SV: [plcs-tog] FW: XML elements vs. XML attributes

 

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

 

Principle of

put it in an element

use attributes

core content:

If you consider the information in question to be part of the essential material that is being expressed or communicated in the XML,

If you consider the information to be peripheral or incidental to the main communication, or purely intended to help applications process the main communication,

data goes in elements

metadata in attributes

structured information:

If the information is expressed in a structured form, especially if the structure may be extensible,

If the information is expressed as an atomic token

readability

If the information is intended to be read and understood by a person,

If the information is most readily understood and digested by a machine,

element/ attribute binding

if you need its value to be modified by another attribute

 

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
Sendt: 11. september 2012 08:06
Til: (
plcs-tog@lists.oasis-open.org)
Emne: [plcs-tog] FW: XML elements vs. XML attributes
Viktighet: Høy

 

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
Rob

--------------------------------------------------------------------------------
Dr Rob Bodington
Eurostep Limited
Web Page:
http://www.eurostep.com
Email: Rob.Bodington@eurostep.com
Phone: +44 (0)1452 810 960
Mobile: +44 (0)7796 176 401
Skype: rbodington

Eurostep Limited. Registered in England and Wales No.03049099

Registered Office: Cwttir Lane, St. Asaph, Denbighshire LL17 0LQ.

 

Description: Description: cid:image001.jpg@01CD3826.F242CFF0

 

From: Günter Staub [mailto:staub@pdtec.de]
Sent: 10 September 2012 21:28
To: Rob Bodington
Subject: RE: XML elements vs. XML attributes
Importance: High

 

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]
Sent: Friday, August 10, 2012 5:32 PM
To: Rob Bodington (rob.bodington@eurostep.com)
Subject: RE: XML elements vs. XML attributes

 

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]
Sent: Friday, August 10, 2012 5:24 PM
To: Rob Bodington (rob.bodington@eurostep.com)
Subject: XML elements vs. XML attributes

 

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

 

This communication is intended only for the individual or entity to which it is addressed and may contain proprietary or confidential information. If you have received this communication in error, please notify us immediately by telephone and destroy this original communication without reading, copying or distributing any copies of it.
-----------------------------------------------------------------------------------------
Boeing Defence UK Limited is registered in England and Wales (registered number 01290439).
Registered office 25 Victoria Street, London SW1H 0EX
Phone: +44-20-7930-5000

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]