XML Technology in ECommerce - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

XML Technology in ECommerce

Description:

a href='http://java.sun.com' Java Home /a sets up a source anchor. ... HTTP response headers: meta http-equiv='refresh' content='1000; http://www.foo.com' ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 25
Provided by: kur50
Category:

less

Transcript and Presenter's Notes

Title: XML Technology in ECommerce


1
XML Technology in E-Commerce
  • Lecture 1
  • WWW, HTML, CSS, XML, Meta-modeling

2
Lecture Outline
  • World Wide Web - facts, architecture
  • HTML
  • CSS
  • XML
  • Markups
  • Well-formedness
  • Meta-modeling

3
World Wide Web
  • WWW
  • Global hypertext project at CERN
  • Proposed by Tim Berners-Lee in 1989
  • Web Consortium (W3C) - www.w3.org
  • Founded in 1994
  • Three hosts - MIT, INRIA, Keio University
  • Leads the evolution of the Web
  • More than 20 web-related specifications

4
World Wide WebArchitecture
HTTP request for Web Resource
Web Browser
Web Server
HTTP response - usually a Web page
  • HTTP - Hypertext Transport Protocol
  • HTML - Hypertext Markup Language
  • URI - Uniform Resource Identifier - a naming
    scheme for resources on the Web

5
HTMLExample
lthtmlgt ltheadgt lttitlegt XML Technology in
E-Commercelt/titlegt lt/headgt ltbodygt
lth1gtLecture 1lt/h1gt ltpgt Example of HTMLlt/Pgt
ltpgt Resources lta hrefhttp//www.w3.orggt W3C
lt/agt Web Consortiumlt/pgt lt/bodygt lt/htmlgt
Other Examples - Deitel 2.4, page 26 3.2, page
47
6
HTMLForms
  • Enable development of web applications - user
    interface is presented by the browser
  • Web server handles form data through server
    extensions
  • Opens a possibility for dynamic web pages
  • CGI (Common Gateway Interface) - protocol for
    data exchange between the server and its
    extensions (CGI scripts)
  • Popular languages for CGI programming - Perl, C,
    Python, Java, VBScript, JavaScript

Examples - Deitel 3.4, page 52
7
HTMLLinks
Web Resource
Web page
  • Link has two ends (anchors) and direction
  • A element - sets up an anchor
  • lta hrefhttp//java.sun.comgtJava Homelt/agt sets
    up a source anchor. href attribute contains an
    URI
  • lta namedestgt TOC lt/agt - sets up a destination
    anchor
  • Link behavior - destination resource is retrieved
    and displayed

8
HTMLltmetagt tags usage
  • Meta data about the document
  • ltmeta nameauthor contentJohn Smithgt
  • ltmeta nameaddress contentan addressgt
  • HTTP response headers
  • ltmeta http-equivrefresh content1000
    http//www.foo.comgt
  • Data for search agents
  • ltmeta namekeywords contentXML, WEBgt

9
HTMLMultimedia, extra functionality, editors
  • Multimedia content - plug-in and ActiveX
    technology
  • Scripts - dynamic and interactive web pages on
    the client side
  • Java Applets - programs executed in the browser
    environment
  • HTML editors - FrontPage, Dreamweaver, NetObjects
    Fusion, Adobe GoLive
  • Demo Editing web pages with FrontPage

10
CSSCascading Style Sheets
  • Purpose - specify the layout of web pages
  • Benefits
  • Separate structure from presentation
  • Impose consistent look and feel to the entire
    site
  • Promotes reusability
  • Specifications
  • CSS level 1 and 2
  • CSS level 3 - work in progress

11
CSSDeclaration
  • Inline styles
  • ltp stylefont-size 20 pt color bluegt some
    text lt/pgt
  • style element
  • ltstyle typetext/cssgt
  • p font-size 20pt color blue
  • lt/stylegt
  • External style sheets
  • ltheadgt
  • ltlink relstylesheet typetext/css
    hrefaStyle.cssgt
  • lt/headgt

12
CSSCascading and Inheritance
  • Style origin
  • User agent (browser) default style sheet
  • User style
  • Author style
  • Cascading order - how to resolve conflicts
    between style rules
  • Inheritance - an element inherits style
    properties from its ancestors

More info - Deitel 4.4, page 84
13
XMLXML, HTML, SGML
  • HTML Drawbacks
  • Fixed Tags Set
  • Poor Linking
  • Does not support validation
  • Simple structures
  • Specifies only presentation

Relations between SGML, HTML and XML
14
XMLIdea
ltaddressgt
Sherlock Holmes
ltnamegt
lt/namegt
Baker Street 221b
ltstreetgt
lt/streetgt
London
ltcitygt
lt/citygt
England
ltcountrygt
lt/countrygt
lt/addressgt
15
XMLBasic terms
Annotated XML Specification http//www.xml.com/ax
ml/testaxml.htm
16
XMLCharacters and Markups
  • Characters in the XML document form markups and
    character data
  • Markups
  • start, end and empty element tags
  • entity and character references
  • comments
  • CDATA delimiters
  • Document type declarations
  • Processing Instructions
  • All other characters form character data

17
XMLElements and elements content
  • ltname attr1value1 gt..Content..lt/namegt

Elements content
Attribute specification
End tag
Start tag
ltimg srcanImage.gif /gt - Empty element
  • Elements content
  • Only elements
  • Empty
  • Mixed (character data and other elements)

18
XMLExample
  • ltperson age45gt
  • ltnamegtSherlock Holmeslt/namegt
  • ltaddressgt
  • ltstreetgtBaker Street 221blt/streetgt
  • ltzipgt1111lt/zipgt
  • ltcitygtLondonlt/citygt
  • ltcountrygtEnglandlt/countrygt
  • lt/addressgt
  • lthomepage hrefhttp//www.sherlock-holmes.co.u
    k//gt
  • ltnotegtltemgtSherlock Holmeslt/emgt and ltemgtDoctor
    Watsonlt/emgt lived at 221b Baker Street between
    1881-1904, according to the stories written by
    ltemgtSir Arthur Conan Doylelt/emgt.lt/notegt
  • lt/persongt

19
XMLProcessing Instructions and CDATA Sections
  • Processing Instructions
  • lt?xmlstylesheet type"text/css"
    href"bach.css"?gt
  • lt?cocoon-process type"xslt"?gt
  • CDATA Sections
  • lt!CDATA ltH1gt Hello World! lt/H1gt gt
  • lt!CDATA
  • if((x0) (y lt2)) System.out.print
    ln(Ok!)
  • gt

20
XMLNamespaces
  • Purpose - resolve name collisions in a single XML
    document
  • Definition - Set of names uniquely identified by
    URI, used for element types and attribute names
  • Namespace declaration
  • lthtmlhtml xmlnshtmlhttp//www.w3.org/TR/REC-ht
    ml40gt
  • lthtmlheadgt.lt/htmlheadgt
  • lthtmlbodygt.lt/htmlbodygt
  • lt/htmlhtmlgt

Examples - Deitel 5.8, page 123
21
XML Meta-modelling - well-formedness
EBNF
EBNF
Defines
Defines
Pascal Grammar
XML Grammar
WF Constraints
Defines
Defines
a Pascal Program
an XML Document
22
XML Meta-modelling - validity
23
XML Tool Support
  • Browser support
  • Netscape - XML, CSS1, CSS2 (partly)
  • IE 5 - XML, CSS1, CSS2 (partly), XSLT
  • Opera - XML, CSS1, CSS2(partly)
  • XML Editors
  • XML Spy 3.5
  • XMetal
  • Epic
  • FrameMaker
  • Demo Visualizing XML files in IE5, editing with
    XML Spy

24
Summary
  • Todays Web - HTTP, URI, HTML, CSS
  • XML is a technology for creating markup
    languages
  • XML documents contain character data and markups
  • Elements are the main building blocks for the
    document structure
  • Document well-formedness means conformance to the
    XML grammar and constraints

Read Deitel 1..5, Well-formedness and Validity
of XML Documents Skip Deitel 3.3, 3.5, 3.7, 3.9,
3.10, 4.6 .. 4.10 Assignment Deitel Ex 5.4 and
Ex 5.7, pages 132, 133
Write a Comment
User Comments (0)
About PowerShow.com