• If XML Is Only Concerned with Content and Structure, How Do I Display It
  • How Does XML Affect the Way We Think of Documents?




    Download 2,96 Mb.
    Pdf ko'rish
    bet20/131
    Sana14.05.2024
    Hajmi2,96 Mb.
    #232039
    1   ...   16   17   18   19   20   21   22   23   ...   131
    Bog'liq
    Ceponkus, Hoodbhoy - Applied XML - Toolkit for Programmers

    How Does XML Affect the Way We Think of Documents?
    Traditionally, we’ve thought of a document as a holistic entity in which elements such as 
    content, organization, and display are all merged into one unit. This model dates back to 
    the codex and papyrus scrolls and has persisted in most of today’s WYSIWYG (what you 
    see is what you get) word processors (for example, WordPerfect and Microsoft Word). 
    This model existed as a function of the technology we had available to us. With today’s 
    technology, it behooves us to start storing information in more natural and instinctive 
    ways (see “Vanevar Bush”).
    A new model for storing information entails a distinction between content, organization, 
    and display. Figure 1.5 illustrates these two models.
    Figure 1.5:
    Traditional and nontraditional document models.
    By separating base elements of a document, we can treat them independently and 
    perform more efficient and advanced manipulations. For instance, we can sort content 
    without worrying about how it looks. Once we’ve sorted the data the way we want it, we 
    can then focus on displaying it. Breaking systems into simpler pieces is what engineering 
    is all about. XML is continuing the same philosophy by extending it to the world of 
    information exchange.
    If XML Is Only Concerned with Content and Structure, How Do I Display It?


    - 18 -
    There are many ways to display XML. One of the major initiatives is the XML Stylesheet 
    Language (XSL). 
    Part III
    of this book goes into more details about XSL, but for now, 
    suffice it to say that XSL is another open standard under consideration by the W3C. It is 
    specifically devoted to displaying XML and, therefore, is simpler and more powerful than 
    other ways of displaying XML data. XSL gives you the ability to manipulate the data (for 
    example, sorting or selective display), at the same time letting you format it using syntax 
    similar to HTML.
    Other ways of displaying XML data include using somewhat traditional techniques 
    (anything that is more than two years old in the computer world is considered traditional) 
    like Dynamic HTML
     
    (DHTML) with Cascading Stylesheets
     
    (CSS) and many new 
    initiatives with even longer acronyms. XSL, however, is likely to emerge as the dominant 
    way to display XML content. 
    The key advantage to displaying data with XSL—or any other initiative—is that you can 
    display the same information in many ways without having to make a call to the server to 
    generate a view for you. If the data is in XML, clients can choose whether they want to 
    view it as a table, a bulleted list, a pie chart, or even in a different language! Figure 1.6 
    illustrates this feature.

    Download 2,96 Mb.
    1   ...   16   17   18   19   20   21   22   23   ...   131




    Download 2,96 Mb.
    Pdf ko'rish

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    How Does XML Affect the Way We Think of Documents?

    Download 2,96 Mb.
    Pdf ko'rish