Previous Table of Contents Next


Now that we have a framework, it’s time to show how to use it. Our order document calls only the book DTD directly. The order DTD is treated as a part of the book DTD and doesn’t need to be called directly.

  <?xml version="1.0" standalone="no" encoding="UTF-8"?>
  <!DOCTYPE ORDER SYSTEM "book.dtd">
  <ORDER>
  <BILLTO>
  <REFERENCE>8345A</REFERENCE>
  </BILLTO>
  <SHIPTO>
  <REFERENCE>8345A</REFERENCE>
  <SHIPVIA><REFERENCE>2A</REFERENCE></SHIPVIA>
  </SHIPTO>
  <CONTACT>Burnie Orange</CONTACT>
  <PRIORITY>Normal</PRIORITY>
  <ITEM>
  <BOOK><ISBN>155828592x</ISBN><BOOKTITLE>XML:A
  Primer</BOOKTITLE><PRICE>$24.95</PRICE></BOOK>
  <QUANTITY
  SHIPCQ="ROUNDDOWN"><NUMBER>100</NUMBER><CARTON>
  20</CARTON></QUANTITY>
  <DISCOUNT>.42</DISCOUNT>
  <EXTENDEDCOST>$1447.10</EXTENDEDCOST>
  </ITEM>
  <ITEM>
  <BOOK><ISBN>1558285288</ISBN><BOOKTITLE>MIME,
  UUNENCODE, &amp;
  ZIP</BOOKTITLE><PRICE>$24.95</PRICE></BOOK>
  <QUANTITY
  SHIPCQ="ROUNDDOWN"><NUMBER>100</NUMBER><CARTON>
  20</CARTON></QUANTITY>
  <DISCOUNT>.42</DISCOUNT>
  <EXTENDEDCOST>$1447.10</EXTENDEDCOST>
  </ITEM>
  <ITEM>
  <BOOK><ISBN>1558514716</ISBN><BOOKTITLE>Graphical
  Applications with Tcl &amp;
  Tk</BOOKTITLE><PRICE>$39.95</PRICE></BOOK>
  <QUANTITY><NUMBER>16</NUMBER><CARTON>16</CARTON>
  </QUANTITY>
  <DISCOUNT>.42</DISCOUNT>
  <EXTENDEDCOST>$370.74</EXTENDEDCOST>
  </ITEM>
  <ITEM>
  <BOOK><ISBN>155828480X</ISBN><BOOKTITLE>World Wide Web
  Bible</BOOKTITLE><PRICE>$29.95</PRICE></BOOK>
  <QUANTITY><NUMBER>10</NUMBER><CARTON>10</CARTON>
  </QUANTITY>
  <DISCOUNT>.42</DISCOUNT>
  <EXTENDEDCOST>173.71</EXTENDEDCOST>
  </ITEM>
  <ITEM>
  <BOOK><ISBN>1558284783</ISBN><BOOKTITLE>Introduction to
  CGI/Perl</BOOKTITLE><PRICE>$19.95</PRICE></BOOK>
  <QUANTITY
  SHIPCQ="ROUNDDOWN"><NUMBER>24</NUMBER><CARTON>2
  4</CARTON></QUANTITY>
  <DISCOUNT>.42</DISCOUNT>
  <EXTENDEDCOST>277.70</EXTENDEDCOST>
  </ITEM>
  <TOTALS><TOTALITEMS>5</TOTALITEMS><TOTALQUANTITY>
  320</TOTALQUANTITY>
  <TOTALCOST>$3716.35</TOTALCOST>
  </TOTALS>
  </ORDER>

Although this may not be as compact as the previous fixed-length or the more flexible delimited files, it’s certainly more readable by humans. Its extra flexibility also gives it a significant advantage because it doesn’t require that all information be present all the time. The spread of networks has lowered the costs of transmission, making this kind of verbosity acceptable. Building a processing application around this DTD and connecting it to the order system will take some effort, but hopefully the extra work will pay off in added flexibility, allowing customers to use any variety of XML processor they choose.

Direct Connections: Information Interchange

Even though orders are often the most important form of information exchanged between companies, other forms of information that aren’t directly revenue-generating may also need to be shared, even among competitors. Situations where multiple firms must organize multiple parts provide fertile ground for information interchange systems. Establishing this interchange may be difficult because some companies may feel that they have much to lose by revealing their proprietary information, but often there is more to be gained than lost by sharing. Even though much of the work involved in creating these interchange systems is similar to that put into the documents described in the previous chapter, sharing documents between multiple companies creates additional challenges. This section of the chapter won’t build any DTDs, which are likely to be even more industry-bound than the ordering processes already described. Instead, we’ll explore some of the data-sharing applications that have already appeared in SGML, pointing out resources that may be useful to XML developers.

To see a more comprehensive list of government, military, and heavy industry SGML projects, visit http://www.sil.org/sgml/gov-apps.html.

One of the most widely cited successes of SGML’s commercial use is the Pinnacles Electronic Component Information Exchange (ECIX) Group. Begun as a consortium of Hitachi, Intel, National Semiconductor, Phillips Semiconductors, and Texas Instruments, it is now part of CFI (http://www.cfi.org). ECIX began as a standard for electronic databooks, the documentation that accompanies electronic components. As the integration of multiple components on to chips progressed, the size of the average component grew rapidly, and documentation for electronic components exploded. Engineers trying to build new components were spending their time searching through documentation and recreating components in their CAD (computer-assisted design) software instead of building new chips. The semiconductor companies united to make exchanging electronic information about components easier. They built two separate pieces of the standard: the Pinnacles Component Information Standard (PCIS) and the Component Information Dictionary Standard (CIDS). PCIS provides component information in electronic format that can be read by engineers or imported easily into a CAD system. CIDS provides a dictionary of component terms and definitions for easy lookup and standardization.


Previous Table of Contents Next