note 39951 added to ref.xml

From: Date: Mon, 16 Feb 2004 22:26:17 +0000
Subject: note 39951 added to ref.xml
Groups: php.notes 
Request: Send a blank email to php-notes+get-65235@lists.php.net to get a copy of this message
XML zealots.. XML is a structure data format, not a structured object format. Microsoft heads up in the development of the standard in the interest of people never adopting an object standard.. Objects are defined programatically as containing data and methods.. The methods maintain the completeness of the data.. Microsoft doesn't want this because it means that objects can contain open source code.. Imagine a document that can interpret itself.. If your code interfaces with a document that can interpret itself, then all that is needed is interface conformance, not datatype parsing polymorphism.. See with a static data type vendors can change the formats every year, making it improbable that you will remain coformant, so they can overcomplicate the format year after year, and worse yet you will not be able to tell its happening, or how conformant you are.. If using methods, code existing in your data.. The data will be self parsing and capable of self maintaining, and capable of being correct.. Even if the code is not written right the first time, you can always write converter code that parses out the object and rewrites it.. However you can do this all with XML, its just a small tweak int he semantics.. Everyone knows in teh computer memory data and code are the same, its just dependent on where you want to start.. So if you put code in your XML, its the same as adding methods.. Now just as a test, watch while Microsoft tries to fudge the standard to obliterate the inclusion of code in data.. IT would produce all sorts of commercial chaos, not to mention data formats would no longer be leverageable, it would be impossible to leverage a format obsolete, to use data formats to leverage upgrades.. It would make things compatible by mechanism.. And all that would be needed is DTD's to uphold interface conformance, of objects.. Another thing to mention, XML doesn't allow overlapping tags.. Its possible in phases to handle non-overlapping content and the overlapping content, its just a matter of parsing semantics.. Which tags are for structure, which are for style.. For instance in XML <i>this<b>is totally</i> incorrect</b> <i>but <b>this</b></i> <b>is</b> This is precisely the problem with nested cases, no room for STYLE!! Its only a part of the standard, I feel, because there is a preference for recursive parsers.. PHP now uses a non-recursive parser, if used well with stacks, it can be more capable than XML is.. Don't let the big wigs standards committees drive you into data formats and protocols that don't make sense. Say no to methodless data formats with no style!! ---- Manual Page -- http://www.php.net/manual/en/ref.xml.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39951 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39951&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39951&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#65235) next »