02INT_XMLConcepts

  • Upload
    psiebel

  • View
    213

  • Download
    0

Embed Size (px)

Citation preview

  • 7/28/2019 02INT_XMLConcepts

    1/19

    2Copyright 2007, Oracle. All rights reserved.

    Module 2: XML Concepts

    Integrat ion Siebel Ap pl icat ions

  • 7/28/2019 02INT_XMLConcepts

    2/19

    2 of 20Copyright 2007, Oracle. All rights reserved.

    Module Objectives

    After completing this module you will be able to:

    Describe the role of XML in application integration

    Identify tags, elements, and attributes in an XML

    document

    Examine how structure of an XML documents can be

    specified Explain the purposes of namespaces

    Why you need to know:

    XML documents are used for the exchange of data for

    many integration solutions

  • 7/28/2019 02INT_XMLConcepts

    3/19

    3 of 20Copyright 2007, Oracle. All rights reserved.

    Integration Challenge

    Application integration involves exchanging data among multiple

    applications Choices for type:

    Binary

    Character-based

    Choices for content:

    Data values only Data values plus tags that describe the data items

    Siebel applications typically exchange data in the form of XML

    documents

  • 7/28/2019 02INT_XMLConcepts

    4/19

    4 of 20Copyright 2007, Oracle. All rights reserved.

    XML = Extensible Markup Language

    Is a text-based language syntax with user-definable tags

    Describe the nature and structure of information

    Do not describe the presentation of the data

    Is well suited for describing hierarchically related data

    Provides a universal syntax for exchanging data among

    applications

    Platform-independent

    Operating systemindependent

    Database-independent

    Vendor-neutral language

    Coordinated by the World Wide Web Consortium (W3C) Widely supported

  • 7/28/2019 02INT_XMLConcepts

    5/19

    5 of 20Copyright 2007, Oracle. All rights reserved.

    XML Documents

    Contains one or more elements

    Are delimited by start and end tags that enclose content Name in tag is known as an element type

    Might include one or more attribute specifications

    Is a name-value pair immediately following a start tag

    The value is a string in quotation marks

    Might include additional elements

    Start tag

    End tag

    Attribute

    Element

  • 7/28/2019 02INT_XMLConcepts

    6/19

    6 of 20Copyright 2007, Oracle. All rights reserved.

    XML Elements

    Types of elements

    Root: the element that contains all other elements

    Parent: an element that contains other elements

    Child: element contained within another element

    Root

    start tag

    Root

    end tag

    Is child element of

    contact

    Is parent of home

    and cell

  • 7/28/2019 02INT_XMLConcepts

    7/197 of 20Copyright 2007, Oracle. All rights reserved.

    Comparison of XML and HTML

    XML documents contain tags that specify the nature and

    relationship of content items

    Tags are extensible (additional tags can be defined by users)

    HTML documents contain tags that specify how the content is

    rendered in a browser

    Tags are predefined and not extensible

    John Smith

    ,

    member since 1998

    ,

    HTML Example

    John Smith

    member since 1998

  • 7/28/2019 02INT_XMLConcepts

    8/198 of 20Copyright 2007, Oracle. All rights reserved.

    Definition of XML Documents

    Applications receiving XML documents:

    Need to understand the structure of the document

    Might want to verify that the document is correctly constructed

    XML documents can be defined by:

    Document Type Definition (DTD)

    XML Schema Definition (XSD)

    And so forth

  • 7/28/2019 02INT_XMLConcepts

    9/199 of 20Copyright 2007, Oracle. All rights reserved.

    Document Type Definition (DTD)

    Defines the element names, parent/child relationships, and

    attributes in a class of XML documents

    Is not an XML document itself

  • 7/28/2019 02INT_XMLConcepts

    10/1910 of 20Copyright 2007, Oracle. All rights reserved.

    XML Schema Definition (XSD)

    Defines the element names, parent/child relationships, and

    attributes in a class of XML documents

    Is written in XML itself

    Does not require intermediate processing

    Can be used with other XML-based tools

    For instance some XML tools allow creating correct XML documents from

    an XSD

  • 7/28/2019 02INT_XMLConcepts

    11/1911 of 20Copyright 2007, Oracle. All rights reserved.

    Extensible Stylesheet Language (XSL)

    Is a language used to specify how an XML document should be

    displayed to a user

    Based on rules that specify how to display elements of a given

    element type

    XML

    document

    Result of an XSL

    transformations

  • 7/28/2019 02INT_XMLConcepts

    12/1912 of 20Copyright 2007, Oracle. All rights reserved.

    XSL Transformation (XSLT)

    Specifies how to transform an XML document into an XML

    document with a different structure

    Is based on XSL

    Source XML

    document

    Target XML

    document

  • 7/28/2019 02INT_XMLConcepts

    13/1913 of 20Copyright 2007, Oracle. All rights reserved.

    XSL Transformation (XSLT) Continued

    Is used in integration applications to map (transform) data from

    source to target applications

  • 7/28/2019 02INT_XMLConcepts

    14/1914 of 20Copyright 2007, Oracle. All rights reserved.

    Names in XML Documents

    Names of element types and attributes can be duplicated within

    a single XML document or across multiple XML documents

    Need to distinguish duplicate names with different meanings

    Both documents have

    element type of title

  • 7/28/2019 02INT_XMLConcepts

    15/1915 of 20Copyright 2007, Oracle. All rights reserved.

    XML Namespace

    Is a collection of element types and attribute names that are

    unique

    Has a name itself that is unique among all XML namespaces

    Recommended practice is to base namespace name on your

    organizations url

    Another namespace:

    http://www.abc.com/books

    One namespace:

    http://www.abc.com/contacts

  • 7/28/2019 02INT_XMLConcepts

    16/19

  • 7/28/2019 02INT_XMLConcepts

    17/1917 of 20Copyright 2007, Oracle. All rights reserved.

    Summary of XML

    XML: format for data exchanged among applications

    Used extensively in EAI and UAN XSD/DTD: specifies the structure of the data exchanged

    Used extensively in UAN; somewhat in EAI

    XSLT: specifies how to transform one data structure into

    another

    Used extensively in UAN

    XML namespace: defines the uniqueness of a set of element

    and attribute names

    Appear in most XSD documents

    Part of the configuration of Siebel Web services

  • 7/28/2019 02INT_XMLConcepts

    18/1918 of 20Copyright 2007, Oracle. All rights reserved.

    Summary

    This module showed you how to:

    Describe the role of XML in application integration

    Identify tags, elements, and attributes in an XML

    document

    Examine how structure of an XML documents can be

    specified Explain the purposes of namespaces

  • 7/28/2019 02INT_XMLConcepts

    19/19

    19 of 20Copyright 2007 Oracle All rights reserved

    Lab

    In the lab you will:

    Examine an XML document and the DTD/XSD that describes it Transform an XML document using XSLT