[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: RE: An inquiry into the nature of XML and how it orients o
Hi Roger, It seems to me, that an XML document can never be (they usually don't) considered a true OO *program* (the way you have described, the book catalogue), observing the characteristics of XML based languages we have today (like say, XSLT which is not an object oriented language, but is a functional language). Though, an XML document (as you've described with the books example) can be considered a runtime OO state graph (i.e, objects having state at runtime). But interestingly, the runtime state of objects which is described as XML instance (in this case, it's the books XML example, you've given) doesn't have a corresponding OO *program* (which, if was executed could have produced the book XML instance document). The book XML instance which you shared, could have a corresponding Schema for example (e.g, an XSD description). But the XSD description for me, is not a OO program. XSD to me looks like, a set of validation constraints for XML documents (for XML elements, and attributes) using the notion of types. But the XSD types in XSD documents, do not make a OO program (Because an OO program has a description of, program state and methods. OO languages incidentally use the notion of types or classes. But OO types need to specify the data and methods). I guess, OO languages can be designed using an XML vocabulary (I can imagine, that something like java's syntax can be mimiced as a XML description. But that won't be java, because java has a well-defined defined syntax :). Though something like this, if it can exist, can be considered an XML port of java syntax, for example). On Mon, Nov 23, 2009 at 6:16 PM, Costello, Roger L. <costello@mitre.org> wrote: > Hi Folks, > > Excellent discussion! > > I'd like to try the following approach to exploring this subject. Below is an XML document in an Object Oriented (OO) form. Following it is an XML document in a relational database (DB) form. > > The OO form frames ones thoughts in this way: > > Â Book stores contain a collection of Book objects > Â and Magazine objects. The Book and Magazine types > Â inherit from an abstract Publication type. > > The DB form frames ones thoughts in this way: > > Â Book stores consist of a table composed of records > Â about Books and a table composed of records about > Â Magazines. > > "New methods of construction demand new forms" [1] > > Let us stipulate that neither the OO form nor the DB form orients ones thoughts properly, i.e. they frame, color, and categorize ones thoughts in a way that is not harmonious with XML. > > We desire an XML document that orients ones thoughts in a way that is harmonious with the construction methods provided by XML. What would such an XML document look like? Would you put forth a design, using the book and magazine data below, that properly orients ones thoughts? > > /Roger > > [1] "The Fountainhead" by Ayn Rand, p. 35. > > > ****************************************** > Â Â Â Â Â Â Â OO Form > ****************************************** > <?xml version="1.0"?> > <BookStore xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > Â Â Â Â <Publication xsi:type="Book"> > Â Â Â Â Â Â Â Â <Title>Amusing Ourselves to Death</Title> > Â Â Â Â Â Â Â Â <Author>Neil Postman</Author> > Â Â Â Â Â Â Â Â <Date>1985</Date> > Â Â Â Â Â Â Â Â <ISBN>978-0-14-303653-1</ISBN> > Â Â Â Â Â Â Â Â <Publisher>Penguin Books Ltd.</Publisher> > Â Â Â Â </Publication> > Â Â Â Â <Publication xsi:type="Magazine"> > Â Â Â Â Â Â Â Â <Title>New Scientist</Title> > Â Â Â Â Â Â Â Â <Week>September 19 - 25, 2009</Week> > Â Â Â Â Â Â Â Â <Cost>US$5.95</Cost> > Â Â Â Â </Publication> > Â Â Â Â <Publication xsi:type="Book"> > Â Â Â Â Â Â Â Â <Title>The Fountainhead</Title> > Â Â Â Â Â Â Â Â <Author>Ayn Rand</Author> > Â Â Â Â Â Â Â Â <Date>1943</Date> > Â Â Â Â Â Â Â Â <ISBN>978-0-452-28637-5</ISBN> > Â Â Â Â Â Â Â Â <Publisher>Penguin Books Ltd.</Publisher> > Â Â Â Â </Publication> > </BookStore> > > > ****************************************** > Â Â Â Â Â Â Â DB Form > ****************************************** > <?xml version="1.0"?> > <BookStore> > Â Â <Books> > Â Â Â Â <Book> > Â Â Â Â Â Â Â Â <Title>Amusing Ourselves to Death</Title> > Â Â Â Â Â Â Â Â <Author>Neil Postman</Author> > Â Â Â Â Â Â Â Â <Date>1985</Date> > Â Â Â Â Â Â Â Â <ISBN>978-0-14-303653-1</ISBN> > Â Â Â Â Â Â Â Â <Publisher>Penguin Books Ltd.</Publisher> > Â Â Â Â </Book> > Â Â Â Â <Book> > Â Â Â Â Â Â Â Â <Title>The Fountainhead</Title> > Â Â Â Â Â Â Â Â <Author>Ayn Rand</Author> > Â Â Â Â Â Â Â Â <Date>1943</Date> > Â Â Â Â Â Â Â Â <ISBN>978-0-452-28637-5</ISBN> > Â Â Â Â Â Â Â Â <Publisher>Penguin Books Ltd.</Publisher> > Â Â Â Â </Book> > Â Â </Books> > Â Â <Magazines> > Â Â Â Â <Magazine> > Â Â Â Â Â Â Â Â <Title>New Scientist</Title> > Â Â Â Â Â Â Â Â <Week>September 19 - 25, 2009</Week> > Â Â Â Â Â Â Â Â <Cost>US$5.95</Cost> > Â Â Â Â </Magazine> > Â Â </Magazines> > </BookStore> -- Regards, Mukul Gandhi
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|