RFC - generic download protocol based on XLM

3rd party extensions (phpDivingLog, dive computer downloader,...)
James Connell
Posts: 103
Joined: Fri Dec 08, 2006 05:33
Location: Alaska, USA
Contact:

Post by James Connell » Thu Aug 02, 2007 06:29

OK, SI is understood.

I'm in favor of supporting all three unit types in dcdml, that way the dive log implementor has the option of choosing which units he wants. I've easily supported all three types in my downloader, with the selection set from a commandline switch.

To answer your question:
Is there any computer storing their values in imperial units
The older model Suuntos store depth as Ft * 128.

BTW I put that file on my site, under "free Stuff"
JConn Inv.
Software Tools for Suunto Dive Computers
http://LiquidImagePhoto.com

teemutin
Posts: 15
Joined: Sat Jun 23, 2007 11:49

Post by teemutin » Wed Sep 19, 2007 11:37

Uhh.. And Sorry.

I have been too busy for doing anything else than diving and work. I checked your XML writer and tried it now. It seems to filling the need that I have very well, thanks for that (I saved a lot of time not writing it myself.)

Ill try to post some small test output form my computer ASAP. The freediving propfiles are still out but otherwise major work has been done. Some error correcting stuff maybe but i think that i can try to post some beta quite soon..

- Teemu

EDIT: Returned these into here for future wondering.. Since the first post after edit tries to claim someting that cannot be claimed by the writer of the message

teemutin
Posts: 15
Joined: Sat Jun 23, 2007 11:49

Post by teemutin » Tue Sep 25, 2007 11:48

So. I have to write a reply to this forum.

To James:

Its quite hard for me to understand your inability to understand the rights that individuals have to their intellectual property. In this or in any case I have not transferrend any oh those rights to you or your company. Its also hard to understand the base of the copyright claim you (Or you company) added to the beginning of this thread. The copyright notice is false and could be considered as fraud.

But still, it is even more difficult to understand the manner how you share your output about this issue and me, on this forum and in mails that you have sent directly to me. Some of those could be considered as public humiliation and there are certain laws ( even in state of alaska ) to protect me agains it.

I don't know how you work, desingn or even what kind of person you are, actually I dont know anything about you. But that is not for me to quess then judge and share those opinnions in public, nor send those as email to anyone. I have now formed opinnion aabout you, thats for sure, but i still decided to keep it myself.

i shared my proposal of draft for dcdml and evolved it according to your questions, After doing this all publicly on this thread, you try to claim all rights to it. This does not make sense, and in generally sound like quite bad business.

What come to output of Irisreader, yes it is true that I have changed the draft quite much targeting to make it more general yet flexible. I didnt see what was the thing in newest candidate that hit you so hard ?
I have never ever stated in anyhere that the dcdml that is open for comment in this thread would be final. Neither I have produced a complete documentation anywhere. That is because I consider that dcdml ,in its current state, is still a draft. When all elements are documented and the documentation is open for public critsism for certain time the draft can be called final.

I do this for hobby and try to keep it that way. You may do you business anywy you want.

I wish you all the best on the path that you have chosen.

To All others: You may read the thread and make your own decisions. Thats your right.

- Teemu

divinglog
Site Admin
Posts: 4987
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog » Tue Sep 25, 2007 15:24

This is only a general comment and not to someone particular and not only regarding this special topic: Please be everyone polite, patient and don't make any personal attacks. Especially in this extensions forum most people doing these things in their free time, so no one can expect that any project will be developed in record time.

In this thread there are many edited postings which makes it difficult (especially for new visitors) to understand what was the original discussion and what happened. I want to keep the editing function open without time limit, but it should be clear and fair that no one edit his postings after weeks to obfuscate what was originally said or to change his opinion. If someone changed his opinion or wants to add something, please add a new posting to the thread and write what you want to write, but please keep the original postings. :)

teemutin
Posts: 15
Joined: Sat Jun 23, 2007 11:49

Post by teemutin » Wed Sep 26, 2007 06:39

I certainly could not agree more. I admit that removing my post did obfuscate this thread and thus that they are now restored with additional EDIT:.... comment in the end. Normally on other forums I use [edit:] comment in edited places of old posts, including also the original "changed line" unless it was just misspelling or typo.

Br.
- Teemu

James Connell
Posts: 103
Joined: Fri Dec 08, 2006 05:33
Location: Alaska, USA
Contact:

Post by James Connell » Fri Sep 28, 2007 21:59

The biggest problem with All of this is this quote from the W3 site:

Avoid using attributes?

Should you avoid using attributes?

Some of the problems with using attributes are:

* attributes cannot contain multiple values (child elements can)
* attributes are not easily expandable (for future changes)
* attributes cannot describe structures (child elements can)
* attributes are more difficult to manipulate by program code
* attribute values are not easy to test against a Document Type Definition (DTD) - which is used to define the legal elements of an XML document

If you use attributes as containers for data, you end up with documents that are difficult to read and maintain.

Try to use elements to describe data.

Use attributes only to provide information that is not relevant to the data.

Don't end up like this (this is not how XML should be used):

<note day="12" month="11" year="2002"
to="Tove" from="Jani" heading="Reminder"
body="Don't forget me this weekend!">
</note>
So as can be seen All this Attribute stuff is pretty darn Bogus!
JConn Inv.
Software Tools for Suunto Dive Computers
http://LiquidImagePhoto.com

teemutin
Posts: 15
Joined: Sat Jun 23, 2007 11:49

Post by teemutin » Sat Sep 29, 2007 13:34

Hi !

As long as that false copyright claim stand as first post in this thread I should not have written this. But here it is anyway.

Attributes are essential in XML. What ever W3Schools say about these in http://www.w3schools.com/xml/xml_attributes.asp, is quite much their opinion. Its not W3C thats says so. There's a lot, even quite recent, articles about this. Go google something like "w3c attributes vs elements", and you will find some quite interesting articles.

There are no simple answers in computing. I made the mapping one way, someone other might do it other way. I tried to follow some rules; balancing between attributes and elements

Code: Select all

 <setting computermode="1".. vs. <computermode>1</computermode> 

and specific element vs general one.

Code: Select all

 <event id="deepstop"/> vs. <deepstop/> 

Its not that easy make XML data mapping that has meaningfull element names and intelligent use of attributes. Decisions were made keeping mind the data that is downloaded from different dive computers. And still there are many things that have not found their place in dcdml.

When writing an XML data mapping you have to think quite a bit about the data you are mapping. The problems in text you quote are indeed the questions that must be kept in mind during language design. They are not problems, just the line that separates attributes from elements.

And yes its true, sometimes its quite thin red line that must be drawn when making decision between elements and attributes. And sometimes you found yourself in situation where attribute must contain an structured value and element must be used.

I don't want to use any more time in this issue. The example on w3schools page is bad, going from one extreme to another.

Lets analyze actually that example on w3schools page

Code: Select all

<note day="12" month="11" year="2002"
to="Tove" from="Jani" heading="Reminder"
body="Don't forget me this weekend!">
</note> 
According to the problems that writer of that document pointed out
* attribute day.
** multiple values - NO.
** need to expand - NO.
** need structural value - NO.
** difficult to manipulate - NO.
** had to check against dtd - NO but does net check the complete dates format.

* attribute month.
** multiple values - NO.
** need to expand - NO.
** need structural value - NO.
** difficult to manipulate - NO.
** had to check against dtd - NO but does net check the complete dates format.

* attribute year.
** multiple values - NO.
** need to expand - NO.
** need structural value - NO.
** difficult to manipulate - NO.
** had to check against dtd - NO but does net check the complete dates format.

How about using structured string value with attribute date in format DD/MM/YYYY, could that do the trick ? Do we need time also. You need a program here anyway to check the correctness of date. This is quite common in many W3 XML based language definitions.

* attribute to. Basic string type attribute that has hard times to be checked against dtd, it has no correct value.
* attribute from. Basic string type attribute that has hard times to be checked against dtd, it has no correct value.
* heading, CDATA that has no correct value
** multiple values - NO theres most probably only one heading in note.
** needs to expand - MAYBE, is string enough or not ?
** needs structural value - MAYBE, is string enough or not ?
* body, has no correct value
** multiple values - NO theres most probably only one heading in note.
** needs to expand - MAYBE, is string enough or not ?
** needs structural value - MAYBE, is string enough or not ?

Its all about the data you are mapping, and the decision must be base on it. Following the problems listed in 3wschools page, how would you put that example ?

I'm not going to give explanations for each decision between attribute vs element in dcdml but I tried to draw the line somewhere (multiple values, ...).
Like altitude setting. If we translate the setting in reader to some range or exact value we can go with attribute altitude inside settings element. If not we end into two options, either use exact attribute with value of setting like altitude="1" and the reader application must know what altitude that does mean in every different dive computer or we could go to element like <altitude program="1" value="0-700"/> where the actual value is also interpreted. The altitude="range or exact meters" approach was the combination of these two. But if the altitude is actually metered bu computer and not set by the user, should it still be inside settings. I made the decision yes, based on the assumption that the measured value "adjusted" the deco algorithm in similar manner as setting done by user. ( like setting that to simulator and it gives same output as the computer on that dive).

Some comments on the "problems":
* attributes cannot contain multiple values (child elements can)
* attributes are not easily expandable (for future changes)
* attributes cannot describe structures (child elements can)
his might be repetition, but all these are some kind of turning points where you should go to element, but if the data that you are mapping does not hit any of these criterias..
* attributes are more difficult to manipulate by program code
As far as I see; on code level attributes are as easy or event easier than elements. Of course if you have bad API this another thing but has nothing to do with attribute.
* attribute values are not easy to test against a Document Type Definition (DTD) - which is used to define the legal elements of an XML document
I don't see why they would be, but if more accurate checking is needed we always have schema.

There are multiple ways to change attribute into structured value if that becomes necessary in future versions of xml data mapping, like in <dcdml version="1.1/>. Thats actually the reason why the version attribute is in there.

Everything that is in internet is not actually true.

And i still don't know how to write clear posts.

- Teemu

James Connell
Posts: 103
Joined: Fri Dec 08, 2006 05:33
Location: Alaska, USA
Contact:

Post by James Connell » Sat Sep 29, 2007 23:25

teemutin wrote:Hi !

As long as that false copyright claim stand as first post in this thread I should not have written this.
Get over it.
JConn Inv.
Software Tools for Suunto Dive Computers
http://LiquidImagePhoto.com

Post Reply