xml bradsher 4-30-03

Upload: veena-wagle

Post on 07-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/4/2019 XML Bradsher 4-30-03

    1/30

    XMLeXtensible Markup Language

    Charles A. Bradsher

    Defense Technical Information Center

  • 8/4/2019 XML Bradsher 4-30-03

    2/30

    eXtensible Markup Language

    World Wide Web Consortium (W3C)

    I.E. Legal XML QueryXML, Voice XML

    Promotes business to business exchange (B2B)

    Does not describe Formatting -Its about content

    Uses any kind of information any kind of content

  • 8/4/2019 XML Bradsher 4-30-03

    3/30

  • 8/4/2019 XML Bradsher 4-30-03

    4/30

    What is XML?

    eXtensible - By applying Identifiers for

    elements of information in a neutral way,

    stored in a neutral form, independent ofsystems, devices and applications.

    Markup - For adding information to adocument relating to its structure and/or

    content.

  • 8/4/2019 XML Bradsher 4-30-03

    5/30

    What is XML?

    Language - A standard methodology with

    formal syntax..However

    XML is not a language but a toolkit fordeveloping or defining languages

    A common syntax for expressing structure

    in data

  • 8/4/2019 XML Bradsher 4-30-03

    6/30

    How are SGML, HTML & XML

    Related? Standard Generalized Markup Language

    HTML is an application of SGML

    XML is a subset of SGML

  • 8/4/2019 XML Bradsher 4-30-03

    7/30

    Tags

    Mrs. Air

    Documents

    1234 Concord Street Anytown

    VA

    45678

  • 8/4/2019 XML Bradsher 4-30-03

    8/30

    Content

    Mrs. Air

    Documents

    1234 Concord Street Anytown

    VA

    45678

  • 8/4/2019 XML Bradsher 4-30-03

    9/30

    XML is Tags and Content

    A Hierarchical Data RepresentationA Tree Structure Data

    Representation

  • 8/4/2019 XML Bradsher 4-30-03

    10/30

    Why Do We Need XML?

    Interoperability

    Info can be separated from the way it is

    presented

    Information can be presented in a variety of

    ways depending on the device the end user

    has.

  • 8/4/2019 XML Bradsher 4-30-03

    11/30

    Why Do We Need XML?

    Future Web developments hinge on the use

    of XML W3C

    Dependence on a single, inflexible document type

    (HTML) which was being abused for task for which it

    was never designed

    SGML was too complex to fill the gap

  • 8/4/2019 XML Bradsher 4-30-03

    12/30

    HTML vs. XML

    Mrs. Air Documents


    1234 Concord Street


    Anytown, VA 45678

    Mrs. Air Documents

    1234 Concord Street Anytown, VA 45678

  • 8/4/2019 XML Bradsher 4-30-03

    13/30

    HTML vs. XML

    Mrs.

    Air

    Documents

    1234 Concord Street Anytown

    VA

    45678

  • 8/4/2019 XML Bradsher 4-30-03

    14/30

    HTML vs. XML

    Mrs. Air Documents

    1234 Concord Street

    Anytown, VA 45678

  • 8/4/2019 XML Bradsher 4-30-03

    15/30

    Mrs Air Documents

    1234 Concord Street

    Anytown, VA 45678

    Mrs AirDocuments1234 Concord Street

    Anytown, VA 45678

    OMB 24 t

  • 8/4/2019 XML Bradsher 4-30-03

    16/30

    OMBs 24 e-governmentInitiatives

  • 8/4/2019 XML Bradsher 4-30-03

    17/30

    Why is XML Important?

    Does not need a specific application

    Perpetual preservation of Information

    Could be future standardized mechanism forthe exchange of data

  • 8/4/2019 XML Bradsher 4-30-03

    18/30

    How Does It Work?

    XML Parser

    XML Processor

    XML does not provide an application

    programming interface (API). ( Just passes

    data to the application)

  • 8/4/2019 XML Bradsher 4-30-03

    19/30

    What is a DTD?

    DTD - Document Type Definition

    A set of syntax rules for tags

    What tags you can use in a document

    Where the tags appear

    Which tags can appear inside other tags

    A set of constraints for documents

  • 8/4/2019 XML Bradsher 4-30-03

    20/30

    DTD vs. Schema

    DTD content models are closed and cant reflect the

    openness XML supports.

    DTD doesnt support data types beyond the 10primitive types.

    It cant express rich data types allowed in XML

    Schema

  • 8/4/2019 XML Bradsher 4-30-03

    21/30

    Schema

    Microsoft proposed an alternative approachto DTDs called schema

    Like DTDs, schema provide the rules of adocument and indicate what tags areused.

    Unlike DTDs, schema can define datatypes.

    Designed to replace and amplify DTDs

  • 8/4/2019 XML Bradsher 4-30-03

    22/30

    Schema

    date)>

    quantity CDATA #REQUIRED>

    month CDATA #REQUIRED

    year CDATA #REQUIRED >

  • 8/4/2019 XML Bradsher 4-30-03

    23/30

    Schema

  • 8/4/2019 XML Bradsher 4-30-03

    24/30

  • 8/4/2019 XML Bradsher 4-30-03

    25/30

  • 8/4/2019 XML Bradsher 4-30-03

    26/30

    Schema

  • 8/4/2019 XML Bradsher 4-30-03

    27/30

    Schema

    Example

    A DTD might have a tag designated as

    , but the content contained within thattag could be a number or a character string. A

    schema would force you to enter a number.

    DTD Schema

  • 8/4/2019 XML Bradsher 4-30-03

    28/30

    Stylesheets

    Provides hints and algorithms for rendering or

    transforming the data in the XML document.

    XSLT Extensible Stylesheet Language cantransform from one XML format to another

    including HTML or plain text.

  • 8/4/2019 XML Bradsher 4-30-03

    29/30

    For More XML Information:

    For basic Information on XML:

    http://www.xml.org/xml/resources_focus_b

    eginnerguide.shtml W3C: http://www.w3.org/

    Robin Cover's extensive list of online

    reference material and links to software:http://xml.coverpages.org/

  • 8/4/2019 XML Bradsher 4-30-03

    30/30

    QUESTIONS?