XML
  Home arrow XML arrow Page 2 - XML Unlocks Information
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

XML Unlocks Information
By: Doug Domeny
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2002-05-13

    Table of Contents:
  • XML Unlocks Information
  • How XML Accommodates Human-Authored Content
  • Tips for Designing an XML DTD or Schema
  • Elements vs. Attributes with Database Oriented Data
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    XML Unlocks Information - How XML Accommodates Human-Authored Content


    (Page 2 of 5 )

    While highly structured data is independent of the style used to present it, unstructured data is full of style and format. Contrast plain text (no style) with rich text (full of style).

    Text documents meant for human authoring and reading have design needs that only XML can address. Examples of semi-structured documents include catalogs, press releases, news reports, and technical documentation. Even highly structured data becomes semi-structured if it includes comments, descriptions, or instructions meant to be read by people.

    XML supports the development of semi-structured documents that contain both relational meta data (the structure) and free-form (unstructured) formatted text. The meta data (that is, the XML tags) meets the programmatic need for structure. Without meta data, a computer program cannot understand the content. Formatted text meets the human and business need to express richly styled content. Without style, the content is dry and unattractive.

    The paragraph you are reading now is an example of formatted text. Most document editors display content (unstructured data) as WYSIWYG (what you see is what you get). For a business user to comfortably create semi-structured textual documents, a document editor must allow the author to add style to the text.

    Variations of Structured and Unstructured Data

    Two kinds of semi-structured data exist between highly structured and unstructured data:
    • highly structured data
    • structured data with unstructured elements
    • unstructured documents with tagged meta data
    • unstructured documents
    Structured data with unstructured elements is commonly used in web forms, where most fields are tightly constrained (for example, "State" must be selected from a list and "ZIP" must be all digits), yet a 'comment' field is available for human-readable content.

    For example,

    <product>
    <name>Deluxe Widget</name>
    <listprice units="usd">$19.95</listprice>
    <radius>6mm</radius>
    <description>
    This <em>deluxe <strong>gold</strong> plated</em> product fits most attachments.
    </description>
    </product>


    For this kind of document, use a DTD or schema to validate the structure, and include an unstructured element (for example, description) that allows both text and tags. In a DTD, this element would typically be defined as

    <!ELEMENT description ANY>

    Unstructured documents with tagged meta data are less common but offer the best promise for content that can be effectively searched. HTML provides some meta tags, like <ADDRESS> and <CODE>, but XML provides the flexibility to create custom tags.

    Examples,

    <owner studentid="2456">Jim Smith</owner> owns a <automobile model="OCC96">Cutlass Ciera</automobile>.
    <my:conditional value="birds">
    <my:reference>
    <my:author>Joe Kluck</my:author> in his article <my:title type="article">Why Chicken have Wings</my:title> <my:bibliography>(<my:source><my:periodical>Poultry Monthly</my:periodical> <my:issue>September 2001</my:issue></my:source>, page <my:page>9</my:page>)</my:bibliography> dispels the usual stereotypes of flightless birds."
    </my:reference>
    </my:conditional>


    This kind of document must be well formed to allow processing by an XML parser but is usually not validated against a DTD or schema. For such a document, XHTML is a natural choice because it is well formed, has extensive formatting capability, and custom XML tags can be added without causing display problems in browsers. Note the namespace "my" was used to distinguish the custom XML tags from standard HTML tags.

    More XML Articles
    More By Doug Domeny


     

    XML ARTICLES

    - Datatypes and More in RELAX NG
    - Providing Options in RELAX NG
    - An Introduction to RELAX NG
    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE
    - UI Design with Java and XML Toolkits
    - Displaying ADO Retrieved Data with XML Islan...
    - Widget Walkthrough
    - Introduction to Widgets
    - The Why and How of XML Data Islands







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway