The Power of XML

Imagine this: Two companies compete for a similar client base in a mid size town in the Midwest. The companies are similar in size and offer similar products; but they differ greatly in their use of technology. The first company relies on a standard method for information exchange-when a department manager in sales wants to know the status of a product in development, she sends the product development manager an e-mail message: 'Will product #2310 be available on the 15th as scheduled?'

Depending on how busy the product development manager is, he might or might not get right back to her. She waits for the information. Her potential customer waits for the information. She calls the manager but gets no answer. She walks down the hall (or across campus) to see whether she can find out more. Until the manager is able to respond to the question personally, everybody waits.

The other company uses XML as a data-exchange standard, allowing employees and managers to continuously update and draw information from databases and display it in user applications. All the information about the new product is stored in a database in XML format, so people with access to that information are able to pull it from the database as needed for use in reports, e-mails, tables, and spreadsheets. As a part of their sign-off process at the end of each business day, all department managers fill in a smart form based on InfoPath that enables them to enter quickly any status changes in the project. The information is saved in XML and deposited in a larger database. A combined status report is then generated automatically and delivered to each division supervisor for review. In this company, a sales manager wanting to know the status of the product (assuming she has access to this information in the database) has only to call up the product information in the database to answer the question-and pull together some real facts-for her waiting customer.

Note 

XML is about more than simple data storage-it's about the flexible way you can name your own data, save it independent of its form, and reuse and rebuild it in any number of different ways. The XML support built into Office 2003 allows users to work with the familiar Office interface and create and save documents as XML, without ever knowing they're actually working with XML. This means users need little or no additional training, can work with procedures similar to the ones they're familiar with, and ultimately save valuable data in a form that enables businesses to work smarter, faster, and more productively.

XML Basics

Even though you can use the XML features in Microsoft Office Word, Excel, and Access 2003 without knowing much about the technology or ever writing a single line of XML code, knowing the basics of XML can help you envision how it might be helpful in your own business. Toward that end, this section gives you some XML fundamentals and provides references for more information, in case you want to learn more or try a little coding yourself.

The Big Picture

Although it's hard to pin XML down to a concise definition, according to the easiest and broadest approach, XML is a highly flexible format for data exchange and application. In the big picture, users work with an Office 2003 document (Word, Excel, or Access) and attach an XML Schema (the set of rules determining the language elements used in the document). When they save the document, they can save it as an XML file and choose whether to save the data only or apply a transform (XSLT) to display the saved XML document in a specific view.

start sidebar
XML Glossary

Even though this chapter focuses on giving you an overview of XML and how it can be used to help streamline and extend the use of data in your organization, it's helpful to know the language. Here are some basic XML terms you're sure to see in this chapter and in other writings on XML:

  • DTD (document type definition).A set of rules that stores element names and attributes and defines how they can be combined and in which order.

  • Element.Any item defined in an XML document, enclosed with start and end tags: for example, <TITLE>First Look Microsoft Office 2003</TITLE>.

  • Style sheet.A collection of formatting instructions that control the display of the document. Style sheets can be in a separate file and linked to the document or housed in the document itself. (General recommendations are to store the data and style sheet separately, however, so the data can be used in its pure form in a variety of applications.)

  • XML data.Also called an XML document, the .xml file is the raw XML data stored independently of the way in which it is presented.

  • XML schema.A document that defines the elements, entities, and content allowed in the document.

  • XSL (Extensible Stylesheet Language).A language used to create style sheets that can be attached to XML documents to present the data in various forms.

  • XSLT (XSL Transformations).Transforms the structure of an XML document to create different views.

end sidebar

More Than Markup

Some people refer to XML as a markup language because, after all, that's what its name (Extensible Markup Language) implies. But XML is more than a language of tags; it actually allows users to create their own markup languages specific to their data needs, based on a collection of set standards. With XML, you use specific rules to create your own tags and style sheets; the individual tags describe the content and meaning of the data rather than the display format of the data (which is what HTML controls). XML is generally reader-friendly, meaning that humans can easily read and follow the basic logic in the code. The following is a simple example of an XML document containing information about a series of workshops offered by a sporting goods company:

\********************************************************************* <TRAINING>   <CLASS>        <TITLE>Mountain Biking</TITLE>
<INSTRUCTOR>Lee</INSTRUCTOR>
<DATE>August 8, 2003</DATE>
<DURATION>6 weeks</DURATION>
<COST>$240</COST> </CLASS> <CLASS> <TITLE>Rappelling</TITLE>
<INSTRUCTOR>Jack</INSTRUCTOR>
<DATE>June 24, 2003</DATE>
<DURATION>4 weeks</DURATION>
<COST>$160</COST> </CLASS>
<CLASS> <TITLE>Kayaking</TITLE>
<INSTRUCTOR>Jason</INSTRUCTOR>
<DATE>July 10, 2003</DATE>
<DURATION>6 weeks</DURATION>
<COST>$240</COST> </CLASS> </TRAINING> *********************************************************************/

As you can see, each element has an opening tag and a closing tag (for example, the cost of a class is enclosed with a beginning <COST> and ending </COST> tag. The tagged elements are nested inside other tags; for example, each class record begins and ends with a <CLASS> tag; inside those tags, additional tags are nested for each of the individual data items stored for that particular class.

Because XML allows you to describe the content of the data, you can use that class information as easily in a database as you can in a spreadsheet, a word-processing document, a report, or an e-mail. Using an XML schema, which tells the document it's attached to how to read and apply the XML data, you can make XML data usable in many different forms in all sorts of different areas, from one end of your organization to the other.

On the other hand, HTML, the primary markup language used on the Web, is a tagging system that controls the way information is displayed. Headings, for example, might have an <H1> or <H2> tag to designate the size of the heading; the <FONT> tag might be used to specify the type family, size, color, and style of the text. But the HTML tags don't have any way of describing the content of the heading, and it's the content-the actual data itself-that can be used in other documents (databases, spreadsheets, reports, and so forth). That's what XML data does.

Data Here, Format There

XML keeps data stored separately from the format in which it is displayed. What applies the format to the data is the style sheet you use. Cascading style sheets (CSS) and XSL (Extensible Style Language) are two common methods of applying formatting to an XML document. Because the style sheet and the data are housed separately, you can switch style sheets according to your project objectives and audience and never have to recode or reformat the data.

start sidebar
A Public, International Standard

XML was developed by the World Wide Web Consortium (W3C) with the intention of creating an easy-to-use, easy-to-read open standard that would allow information exchange across platforms all over the world. The W3C is a public organization with the sole purpose of creating standards and new technologies for the Internet. You can find out more about the W3C and its various activities (including in depth information on the development and application of XML for businesses and individuals) by going to www.w3.org.

Note 

What is an open standard? A technology based on an open standard is open for use and development by the public; there are no licensing fees or proprietary standards owned by a specific company or organization.

end sidebar

Reusable Data

When you separate form from function in this way, it's a simple thing to put the function in another form. In other words, because XML data is stored independently of the form in which it's displayed, you can easily fit it into other formats. XML data that started out as part of a college textbook, for example, could be reused as a series of Web articles, a brochure, a syllabus, a Microsoft PowerPoint presentation, or a blurb in a bookstore catalog.

Wholesale catalogs for specific audiences can be generated on the fly if you've used XML as your data-storage standard. Suppose, for example, that your business sells computer equipment. In the past, you've sent out full-size catalogs (which is a costly endeavor and often provides a low rate of return). If all your catalog data is saved in XML format, you can query the database for a subset of clients (perhaps all customers who purchased equipment from you 24 months previously, customers who bought PCs, customers who bought laptops, and so on) and produce a targeted catalog specifically for that subgroup of all customers on your list. Similarly, you can use this same approach to develop customized solutions for specific clients, departments, industries, and more. The data is the valuable entity, and with XML, you can use that data smarter and more efficiently, and give it a farther reach than it has ever had before.

XSLT (Extensible Stylesheet Language for Transformations) allows you to transform documents into a new form. This is especially important for bringing legacy data into an XML format and transforming it to fit your XML standards.

Write Your Own Schema

Although XML was supported in a limited fashion in Microsoft Word version 2002 (you could save Word documents as XML files), there was no flexibility in terms of the schema used (you had to use Word's built in schema) or the creation of industry or business-specific applications.

The XML support in Office 2003 gives users the option of attaching customized XSDs (XML Schema Definitions). You can choose to save your documents in Word's default schema (WordML) and attach your own customized (called arbitrary) schema that describes the language and functionality you need in your business everyday.

Note 

The development of custom XML schemas for business applications-as well as the creation and enhancement of XML applications using tools such as smart documents, smart tags, and InfoPath technology-provide a huge opportunity for solutions developers. We are just now beginning to see how XML can streamline the use of data and communications in business, and solutions developers will be key in expanding our understanding of what's possible and providing the means to fully apply the power of XML in our daily tasks.

XML: A Common Denominator

Because XML stores data independently of the format used to display the data, it provides a common denominator for information storage and exchange. Businesses that are equipped to work with XML have a key to unlocking the supply of out-of-reach data stored in antiquated systems and software formats. If they can convert the data to XML, they can put the data to use in any number of other applications and resources.

XML is supported in the new versions of Word, Excel, and Access in an unprecedented way. Although Microsoft Excel version 2002 previously offered some support for XML, and Word 2002 users were able to save their files in XML format if they wanted to, the level of XML support now built into Office 2003 enables users to do all kinds of tasks previously unavailable in the program:

  • Use XML for data analysis. In Excel you can use the XML features to work with structured, tabular data for calculations and analyses.

  • Author, edit, and manage content. You can use the XML features in Word to work with large areas of text or mixed content, creating flexible layouts and formatting with XML markup.

  • Store and report on data. The XML features in Access enable you to store data in relational database tables and create reports based on that data. You can also use Access to transform files from other formats into XML and Access-supported forms.

  • Gather information. Not only can you create documents based on XML that prompt users for specific input, you can also use the new Microsoft Office InfoPath 2003 technology to put XML to work in highly structured, dynamic forms for data gathering.




First Look Microsoft Office 2003
First Look Microsoft Office 2003
ISBN: 0735619514
EAN: 2147483647
Year: 2003
Pages: 101

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net