• XML—Changing the Nature of Documents
  • Microsoft Word Applied xml a toolkit for Programmers Wiley doc




    Download 2,96 Mb.
    Pdf ko'rish
    bet33/131
    Sana14.05.2024
    Hajmi2,96 Mb.
    #232039
    1   ...   29   30   31   32   33   34   35   36   ...   131
    Bog'liq
    Ceponkus, Hoodbhoy - Applied XML - Toolkit for Programmers

    In Short
    In slightly more abstract terms, by treating the user interface separately from structured 
    data (as is otherwise done in Word Processors/WYSIWIG editors), XML allows you to 
    easily integrate data from diverse sources. In doing so, you can compile information from 
    purchase orders, invoices, research data, billing information, medical records, catalog 
    data, or anywhere else by converting it to XML in the middle tier of a three-tier system. 
    Because XML is exchanged the same way that HTML is, you can exchange all this 
    information in a virtually ubiquitous manner over the Web to any Web client (desktop PC, 
    workstation, PDA, WebTV unit). Your existing data can stay in its current database 
    without your having to retrofit it.
    Once the data is sent to clients, they can perform manipulation, editing, and rendering at 
    their end without having to request the server to regenerate a new view for them. This 
    frees up the server a great deal and immediately increases its availability and per-capita 
    performance.
    Similarly, because this exchange medium is multidirectional, information can travel 
    backward the same way, that is, encoded in XML. Therefore, you can collect data from a 
    huge variety of sources (for example, all the Web clients) and perform infinitely more 
    interesting data processing.
    We talk about all of these benefits and more in greater detail later in this chapter as we go 


    - 30 -
    through more examples of applications of XML.
    XML—Changing the Nature of Documents
    In 
    Chapter 1
    , we briefly mentioned how XML changes our basic concept of what a 
    document is. Now’s the time to go into more detail about this.
    Ever since human beings began recording information, we’ve been forced to create 
    records that were independent, cohesive entities that were entirely self-describing—
    content, data, and structure are all thought of as being melded into a single document. 
    Cave dwellers painted images in caves that recorded the story of the hunt. In this case, 
    the cave wall itself was the document. The medium was the cave wall, the content 
    consisted of the actual characters, and each author defined his or her format 
    independently.
    As we made the move to papyrus, paper, the codex, the printing press, and recently, 
    electronic word processing, we’ve tried to keep all facets of information (content and 
    format) together, in complete packages, that is, in complete documents.
    When we made the move to electronic media, we continued this philosophy. Today’s 
    word processors are reflections of the paper printing industry and require you to 
    concentrate on the content, format, and structure of the document all at the same time.
    Some would argue that in the good old days when all we had was text editors, report 
    writing hardly took any time. If you don’t believe this, ask yourself how much time you 
    spend writing an e-mail update versus the time you spend writing a proper memo that 
    does the same. Transmission time aside, when you write the e-mail update, you don’t 
    spend a lot of time worrying about spelling or grammar mistakes. All you care about is 
    getting your point through. Once written, a spell checker checks spellings in a batch 
    process and—poof—your e-mail is sent to its destination.
    When you write the memo, you invariably spend time worrying about formatting and 
    spelling and grammar checking of your document 
    as you write it
    . This cumulative, all-at-
    once approach, though seemingly powerful, inevitably slows you down. Sure, we humans 
    are multiprocessing entities—there’s no denying that—but when it comes to outputting 
    your thoughts, sometimes it is better to get everything that’s in your mind out before you 
    start worrying about what it looks like. Certainly this is arguable, and a strong case can 
    be made either way, but a common theme emerges: Breaking things into more 
    manageable chunks is a smarter way of doing things. Cognitive science tends to suggest 
    the same thing.
    Breaking documents into more manageable chunks that can be processed separately 
    and more efficiently is what XML is all about. In an XML document, a document can go 
    through several stages of processing by different processors. For example, if we treated 
    this book with an XML approach the following steps would occur:

    As authors, we would worry about writing meaningful and accurate content.

    Our editors would ensure that the content is grammatically correct.

    Layout experts would focus on making sure that the document is stylistically 
    appealing.

    Publishing experts would focus on ensuring the document is printed correctly.

    Marketing experts would make sure that the book is marketed properly.

    Distribution experts would focus on making sure that the book is distributed to the right 
    retailers.


    - 31 -

    Retailers would focus on placing the book in the right spot so it sells.
    But wait a minute! That’s exactly how this book is being treated in any case! Now you’ve 
    picked it up: an XML approach mimics the real world better. XML ensures that the data 
    being exchanged between each pair of processors is in a common language so that 
    everyone can focus on what they have best.
    In XML, the document is broken into three generic parts:

    Content

    Structure

    Format
    We talk about how you can create and work with these separate parts throughout this 
    book.

    Download 2,96 Mb.
    1   ...   29   30   31   32   33   34   35   36   ...   131




    Download 2,96 Mb.
    Pdf ko'rish

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Microsoft Word Applied xml a toolkit for Programmers Wiley doc

    Download 2,96 Mb.
    Pdf ko'rish