BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


Schemas, xsd, xdr
Getting the value of an element with optional subelements
XML Code Generator: Generating Wrapper Classes from an XML Schema
What is WDDX?
XSLT Stylesheet for summarizing the structure of an XML document
Validating XML with Schemas
Punctuated Changes In XML Documents
XMLStarlet Command Line XML Toolkit
W2XML v2.0 SR1
Free DTD for Academic Publishers
Arquemie for XML Schemas
XMLStarlet Command Line XML/XSLT Toolkit
XSD Merger


 
 

<< reBloggerSEO >>


By Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First Posted 03/14/2002
Times viewed 198

Tips for Designing a DTD- Part 4 of 4 : Object Oriented Data


Summary For object-oriented data, the relationship between parts and subassemblies is best described using the element approach.

Elements vs. Attributes with Object Oriented Data

Besides relational database data, we should also consider object-oriented data, which describes a physical object, such as a car or a wooden barrel. Like the student record, the data is highly structured. Every part and subassembly relate to the others.

For object-oriented data, the relationship between parts and subassemblies is best described using the element approach. For example,

<automobile modelno=OCC96 class=midsize>
    <name>Cutlass Ciera</name>
    <engine size=3.0l>
        <cylinders count=4 />
    </engine>
    <wheels count=4 />
    <doors>
        <door>driver
            <mirror />
            <lock type=4 button combination />
            <window />
        </door>
        <door>front passenger
            <mirror>OBJECTS IN MIRROR ARE CLOSER THAN THEY APPEAR</mirror>
            <lock type=key />
            <window />
        <door />
        <door>left rear
            <lock type=child safety />
            <window openable=no />
        </door>
    </doors>
</automobile>

Example of an object-oriented approach for a 10 gallon wooden barrel:

<barrel capacity=10g material=wood>
    <hoops width=2in dia=2.5ft material=iron />
</barrel>

As you can see, both database-oriented and object-oriented data have little text. The data is highly structured and can be easily expressed in a tabular or hierarchical format. However, these highly structured examples would become semi-structured if the student record included teachers' comments or the automobile object included part descriptions and assembly instructions.

Excepts from XML Unlocks Information: How XML Accommodates Human-Authored Content

Additional information

Further additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< reBloggerSEO >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML