Section 1 Internet Overview - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Section 1 Internet Overview

Description:

Derived from SGML (Standardized General Markup Language) ... MUST have quotation marks around attributes FONT SIZE=9 No quotes /FONT CaSE senSiTivE! ... – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 10
Provided by: MichelLe384
Category:

less

Transcript and Presenter's Notes

Title: Section 1 Internet Overview


1
WHAT THE HELL IS XML?
2
What the hell is XML?
  • Markup Language
  • Derived from SGML (Standardized General Markup
    Language)
  • Describes the CONTENT (stylesheet has to be
    applied to format content)
  • Structured documents, can be used like a database
    that you can send to your clients/suppliers
  • They can then use the data in any XML-supporting
    database/app

3
Like HTML?
  • Both based on SGML
  • Both use tags lt gt
  • In both, tags enclose content..
  • ltTAGNAMEgt..content..lt/TAGNAMEgt
  • In both, tags have attributes..
  • ltTAGNAME ATTRIBUTENAMEattributevaluegt

4
Like HTML?
  • XML MUST have closing tags
  • ltPgtThis is a paragraph
  • ltPgtThis is invalid in XML
  • MUST have quotation marks around attributes
  • ltFONT SIZE9gtNo quoteslt/FONTgt
  • CaSE senSiTivE!
  • ltCaSEgtThis will not closelt/CASEgt
  • XML has a strict syntax
  • Documents must be well-formed!
  • XML documents must start with an xml tag..
  • lt?xml version1.0 standaloneyes ?gt

5
Object Modelling
  • ltAPOGEEgt
  • ltEMPLOYEEgt
  • ltNAMEgtIrfanlt/NAMEgt
  • ltPHONEgt770-980-0099lt/PHONEgt
  • lt/EMPLOYEEgt
  • ltEMPLOYEEgt
  • ltNAMEgtMichellelt/NAMEgt
  • ltPHONEgt678-357-3661lt/PHONEgt
  • lt/EMPLOYEEgt
  • lt/APOGEEgt
  • In a database, Apogee would be the database name,
    Employee would be the Table, Name and Phone would
    be columns
  • In object models, Employee would be the object,
    Name and Phone would be Properties

6
Attributes
  • ltAPOGEEgt
  • ltEMPLOYEE roleprogrammergt
  • ltNAMEgtIrfanlt/NAMEgt
  • ltPHONE typehomegt678-981-0193lt/PHONEgt
  • ltPHONE typecellgt770-980-0099lt/PHONEgt
  • lt/EMPLOYEEgt
  • ltEMPLOYEE roledirectorgt
  • ltNAMEgtJoellt/NAMEgt
  • ltPHONE typecellgt678-357-3661lt/PHONEgt
  • lt/EMPLOYEEgt
  • lt/APOGEEgt
  • Debate over when to use attributes and when to
    use elements
  • MS XML tends to use attributes by default (faster
    to process?)
  • Standard XML used elements more

7
XML The Rules
  • Document Type Definitions (DTDs)
  • Give the rules for validating documents
  • A bit like a database schema/object model
  • Describes the rules of the structure
  • Relationships between elements (e.g. one to many)
  • Which elements contain which other elements
  • In Backus Naur Form (BNF) obscure?
  • XML Schemas
  • For a similar purpose to DTDs
  • Are taking over from DTDs
  • Are expressed in XML
  • ltxsdschemagtlt/xsdschemagt

8
XML The Rules
  • Referencing a DTD
  • lt!DOCTYPE DOCUMENT PUBLIC -//W3C//DTD HTML
    4.0//EN http//www.w3.org/TR/REC-html/strict.dtd
    gt
  • The above is the strict DTD for DHTML (HTML 4)

9
XML Editors
  • Schema Editors
  • Some allow you to turn a DTD into a schema
  • XML Spy
  • Turbo XML
  • Schema Verifiers
  • Only check the doc is well formed
  • Expat http//www.jclark.com/xml/expat.html
  • Schema Validator
  • World Wide Web Consortium
  • http//www.w3.org/2000/09/webdata/xsv
  • XML Parser
  • Xerces Java
  • http//xml.apache.org/xerces-j/
Write a Comment
User Comments (0)
About PowerShow.com