SlideShare ist ein Scribd-Unternehmen logo
1 von 20
XML For Dummies
        http://it-
        slideshares.blogspot.com

Book Author : Lucinda Dykes & Ed Tittle
Lecture 4 : Adding XTHML for the Web
http://it-
              slideshares.blogspot.com
Contents
1.   HTML, XML, and XHTML


2.   Comparing XML and HTML


3.   XHTML Makes the Move to XML Syntax


4.   Convert a document from HTML to XHTML


5.   The Role of DOCTYPE Declarations
4.1. HTML, XML, and
XHTML
 HTML, XHTML, and XML represent
 stages in the development of markup
 languages.

 ◦ HTML, designed to display content in
   Web browsers, came first.

 ◦ XML, intended for data exchange, came
   next.

 ◦ XHTML — which uses the markup tags of
   HTML and the strict syntax of XML.
http://it-
4.1.1 What HTML does
          slideshares.blogspot.com


best
   HTML makes our Web world look
    pretty.
    ◦ Such as a personal site that you create
      for your family.
   Most Web sites use straight HTML to
    display data
http://it-
 1.2 The limits of
4.             slideshares.blogspot.com


HTML
   HTML was enlisted to perform some pretty specify tasks.
    ◦ Allow tight control over document display.
    ◦ Provide the flexibility to describe different, specific types of
      information and data.
    ◦ Convey information from a variety of media and in a
      various formats.
    ◦ Define complex linking relationships between document.
    ◦ Publish a single set of information cross a variety of media.
   Two overarching problems prevent Web designers from
    achieving this control with HTML:
    ◦ HTML lacks fine controls.
       Not include mechanisms for the control.
       …
    ◦ Display vary.
       Problems with browsers that users view web pages (IE,
        Firefox…)
       …
4.2. Comparing XML and
HTMLHTML are not the same kind of markup
XML and
    language.
   But XML and HTML both derive from the same
    parent SGML.
    ◦ So they must be similar, right ?
 HTML and XML both use tags and attributes.
 XML and HTML look similar.
 HTML defines basic text elements and includes
  defaults (and more explicit controls) for how text
  may be displayed in a browser window
 XML tells us only what each element means.
 XML says nothing about how elements should or
  must be displayed — XML separates content and
  the presentation of that content.
4.2.1 Using XML to describe
            data
                XML is not limited to any fixed set of tags or
                 element types.
                 ◦ You can define your own sets of elements
                   and even your own attributes that you
                   may then Document
                        HTML use within your documents.
                                                 XML Document


                                                       <Cover>
<html>                                                 <Abstract>
<p>                                                    This book is about the foundations of the
Blah blah blah blah blah blah blah blah blah blah      Extensible Markup Language (XML)
blah blah blah blah blah (XML)                         and how to use it for your own applications.
blobbity blobbity blobitty blah blah blah blah. blah   </Abstract>
blah blah                                              <AuthorInfo>
</p>                                                   The authors are <Author>Lucinda
<p>                                                    Dykes</Author> and
Blah blah blah Lucinda Dykes blah Ed Tittel.           <Author>Ed Tittel</Author>.
</p>                                                   </AuthorInfo>
</html>                                                </Cover>
4. 2.2 The benefits of using
HTML
   It’s quick, easy, and cheap.

   HTML is way easier than the alternative.

   Anyone can create an HTML document by
    using a text editor and a little knowledge.

    ◦ Even if you don’t know HTML, you can use an
      HTML editor — a What You See Is What You
      Get-style (that is, WYSIWYG-style) editor
      such as FrontPage or Dreamweaver — to
      produce readable Web pages in minutes.
4.2.3 The benefits of
using XML
XML seems to be brimming with benefits.
    ◦   Unlimited element
    ◦   Structured data
    ◦   Data exchange
    ◦   XML complements HTML
    ◦   XML documents are well formed
    ◦   Self-describing
    ◦   Search engines
    ◦   Updates
    ◦   User-selected view of data
 Intelligent XML-based pages that contain human-
  readable data offer exciting potential for users.
 A Web designer/developer reaps several benefits
  from XML as well.
 The benefits of XML are endless.
4. 3. XHTML Makes the Move to
XML Syntax
 XHTML is the successor to HTML 4.01; in effect,
  it’s the final version of HTML.
 XHTML is a clever reformulation of HTML 4 as an
  application of XML 1.0.
 Why do we like XHTML?
    ◦ XHTML documents can be viewed, edited, and validated
      using XML tools.
    ◦ Well-formed XHTML documents mean better-structured
      documents.
    ◦ XHTML documents can be delivered using different
      Internet media types and output devices.
    ◦ Using valid XHTML gives you the best chance of having
      your document displayed the way you intend.
4.    3.1 Making the switch
   Making the switch from HTML to XHTML means
    mastering the rules of XHTML — in particular, XML
    syntax and structure.
   You have only a few major rules to get under your
    belt, but you have to follow them if you want to
    create a valid XHTML document. 
    ◦ Every tag in an XHTML document must be closed.
    ◦ Empty elements (elements without content, such as a br
      tag) must be correctly formatted with a closing slash.
    ◦ All tags must be nested correctly — the tag you open last
      must be the tag you close first
    ◦ All XHTML tags must be written using only lowercase.
    ◦ All attribute values must be put in quotation marks.
   An acceptable XML document must be well
    formed.
4. 3.2 Every element must be
   closed
     That all nonempty elements (that is,
      those that contain actual text) must
      have a start tag and an end tag.
     In the case of HTML

                    Is the same as
<p>text text text                    <p>text text text</p>
       Doing without an end tag just doesn’t
        fly in XHTML.
        ◦ You have to add closing paragraph tags
          where they belong if you want the
          resulting lines to work right.
4. 3.3 Empty elements must be
formatted correctly
 All nonempty XML elements must use
  both a start tag and an end tag to be
  correct.
 An empty element is a singleton tag
  (also called an empty tag) that hangs
  around by itself.
  ◦ Empty tags in HTML include the <br>, <hr>,
<hr>and <img> tags.


  ◦ The
<hr />    hr element looks like this in HTML:

    ◦ In XHTML, it looks like this:
4. 3.4 Tags must be properly
    nested
      The rules of XHTML syntax say that
       tags must be nested in the correct
       order.
      The rule is always to close first what
       you opened last, working your way
                                      Ill formed
       from the inside to the outside tags.
<p>This book was written by <i><b>Dan Brown</i></b>.


                                                       Well-formed


<p>This book was written by <i><b>Dan Brown</b></i>.</p>
4.3.5 Case makes a
difference
    HTML is not case sensitive; XHTML is.
     ◦ When you use HTML, it doesn’t matter what case
       you use for elements and attributes.
     ◦ For example, for the opening body tag, you can
       use <BODY>, <body>, or even <Body> they all
       work fine.
    XHTML, on the other hand, is a bit more
     finicky about case.
     ◦ All XHTML elements and attribute names must
       be in lowercase or your page won’t validate.
     ◦ Use any case for the value of an attribute
4. 3.6 Attribute values are in
  quotation marks
      In XHTML, all attribute values must be in quotation marks.
        ◦ The following markup works just fine on an HTML page:

        ◦ You have to add quotation marks around the attribute value
<tr align=right>
         to create valid XHTML.


<tr align=”right”> highlights the major rules for XHTML syntax and
     Table 4-1
       shows how markup looks in HTML and XHTML.
4. 4. Converting a document
from HTML to XHTML
4. 4. Converting a document
from HTML to XHTML
4. 5. The Role of DOCTYPE
Declarations
   The DOCTYPE declaration serves several
    purposes:
    ◦ It allows your page to be validated as
      XHTML.
    ◦ It tells the browser which version of which
      markup language you used to create the
      page and references the specific DTD for
      that language.
    ◦ It enables your page to be displayed
      properly in Web-standards-compliant
      browsers.
   You have three different DOCTYPES to choose
    among for an XHTML 1.0 document: strict,
    transitional, and frames.
http://it-
          slideshares.blogspot.com
4.6 Summary
   Understanding the limitations of HTML

   Comparing HTML with XML

   Getting the best of both worlds:
    XHTML

   Converting HTML to XHTML

Weitere ähnliche Inhalte

Was ist angesagt? (20)

HTML- Hyper Text Markup Language
HTML- Hyper Text Markup LanguageHTML- Hyper Text Markup Language
HTML- Hyper Text Markup Language
 
Design Tools Html Xhtml
Design Tools Html XhtmlDesign Tools Html Xhtml
Design Tools Html Xhtml
 
Xml 215-presentation
Xml 215-presentationXml 215-presentation
Xml 215-presentation
 
Xml
XmlXml
Xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
XML
XMLXML
XML
 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
 
Xhtml
XhtmlXhtml
Xhtml
 
The Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for BeginnersThe Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for Beginners
 
XML
XMLXML
XML
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
 
Xml
XmlXml
Xml
 
Xml
XmlXml
Xml
 
XML Introduction
XML IntroductionXML Introduction
XML Introduction
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
1. HTML
1. HTML1. HTML
1. HTML
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Xml ppt
Xml pptXml ppt
Xml ppt
 
Html
HtmlHtml
Html
 
WEB PAGE DESIGN USING HTML
WEB PAGE DESIGN USING HTMLWEB PAGE DESIGN USING HTML
WEB PAGE DESIGN USING HTML
 

Andere mochten auch

Lecture 1 - Getting to know XML
Lecture 1 - Getting to know XMLLecture 1 - Getting to know XML
Lecture 1 - Getting to know XMLphanleson
 
Lecture 07 - Executive Information Systems and the Data Warehouse
Lecture 07 - Executive Information Systems and the Data WarehouseLecture 07 - Executive Information Systems and the Data Warehouse
Lecture 07 - Executive Information Systems and the Data Warehousephanleson
 
Mobile Security - Wireless hacking
Mobile Security - Wireless hackingMobile Security - Wireless hacking
Mobile Security - Wireless hackingphanleson
 
Authentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless ProtocolsAuthentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless Protocolsphanleson
 
Learning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with SparkLearning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with Sparkphanleson
 
Firewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth FirewallsFirewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth Firewallsphanleson
 
Hacking web applications
Hacking web applicationsHacking web applications
Hacking web applicationsphanleson
 

Andere mochten auch (7)

Lecture 1 - Getting to know XML
Lecture 1 - Getting to know XMLLecture 1 - Getting to know XML
Lecture 1 - Getting to know XML
 
Lecture 07 - Executive Information Systems and the Data Warehouse
Lecture 07 - Executive Information Systems and the Data WarehouseLecture 07 - Executive Information Systems and the Data Warehouse
Lecture 07 - Executive Information Systems and the Data Warehouse
 
Mobile Security - Wireless hacking
Mobile Security - Wireless hackingMobile Security - Wireless hacking
Mobile Security - Wireless hacking
 
Authentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless ProtocolsAuthentication in wireless - Security in Wireless Protocols
Authentication in wireless - Security in Wireless Protocols
 
Learning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with SparkLearning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with Spark
 
Firewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth FirewallsFirewall - Network Defense in Depth Firewalls
Firewall - Network Defense in Depth Firewalls
 
Hacking web applications
Hacking web applicationsHacking web applications
Hacking web applications
 

Ähnlich wie Lecture 4 - Adding XTHML for the Web

Xml For Dummies Chapter 4 Adding Xhtml For The Web
Xml For Dummies   Chapter 4 Adding Xhtml For The WebXml For Dummies   Chapter 4 Adding Xhtml For The Web
Xml For Dummies Chapter 4 Adding Xhtml For The Webphanleson
 
Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01Niraj Bharambe
 
HTML AND XML ppt.pptx
HTML AND XML ppt.pptxHTML AND XML ppt.pptx
HTML AND XML ppt.pptxSRIRAM763018
 
Computer fundamentals-internet p2
Computer fundamentals-internet p2Computer fundamentals-internet p2
Computer fundamentals-internet p2Leo Mark Villar
 
Web Services Part 1
Web Services Part 1Web Services Part 1
Web Services Part 1patinijava
 
WT Module-1.pdf
WT Module-1.pdfWT Module-1.pdf
WT Module-1.pdfRamyaH11
 
XML - Extensible Markup Language for Network Security.pptx
XML - Extensible Markup Language for Network Security.pptxXML - Extensible Markup Language for Network Security.pptx
XML - Extensible Markup Language for Network Security.pptxkalanamax
 
chapter 4 web authoring unit 4 xml.pptx
chapter 4 web authoring  unit 4 xml.pptxchapter 4 web authoring  unit 4 xml.pptx
chapter 4 web authoring unit 4 xml.pptxamare63
 
Grade 7_HTML.pptx
Grade 7_HTML.pptxGrade 7_HTML.pptx
Grade 7_HTML.pptxshilpak0307
 
CreatingWebPages-Part1.ppt
CreatingWebPages-Part1.pptCreatingWebPages-Part1.ppt
CreatingWebPages-Part1.pptHamzaAhmad861123
 

Ähnlich wie Lecture 4 - Adding XTHML for the Web (20)

Xml For Dummies Chapter 4 Adding Xhtml For The Web
Xml For Dummies   Chapter 4 Adding Xhtml For The WebXml For Dummies   Chapter 4 Adding Xhtml For The Web
Xml For Dummies Chapter 4 Adding Xhtml For The Web
 
Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01Xml 150323102007-conversion-gate01
Xml 150323102007-conversion-gate01
 
HTML Basics.pdf
HTML Basics.pdfHTML Basics.pdf
HTML Basics.pdf
 
Xml material
Xml materialXml material
Xml material
 
Xml material
Xml materialXml material
Xml material
 
Xml material
Xml materialXml material
Xml material
 
HTML AND XML ppt.pptx
HTML AND XML ppt.pptxHTML AND XML ppt.pptx
HTML AND XML ppt.pptx
 
Computer fundamentals-internet p2
Computer fundamentals-internet p2Computer fundamentals-internet p2
Computer fundamentals-internet p2
 
Xhtml
XhtmlXhtml
Xhtml
 
Web Services Part 1
Web Services Part 1Web Services Part 1
Web Services Part 1
 
Html - Tutorial
Html - TutorialHtml - Tutorial
Html - Tutorial
 
WT Module-1.pdf
WT Module-1.pdfWT Module-1.pdf
WT Module-1.pdf
 
WEB Module 1.pdf
WEB Module 1.pdfWEB Module 1.pdf
WEB Module 1.pdf
 
XML - Extensible Markup Language for Network Security.pptx
XML - Extensible Markup Language for Network Security.pptxXML - Extensible Markup Language for Network Security.pptx
XML - Extensible Markup Language for Network Security.pptx
 
chapter 4 web authoring unit 4 xml.pptx
chapter 4 web authoring  unit 4 xml.pptxchapter 4 web authoring  unit 4 xml.pptx
chapter 4 web authoring unit 4 xml.pptx
 
Html basics
Html basicsHtml basics
Html basics
 
Introduction to HTML.pptx
Introduction to HTML.pptxIntroduction to HTML.pptx
Introduction to HTML.pptx
 
Grade 7_HTML.pptx
Grade 7_HTML.pptxGrade 7_HTML.pptx
Grade 7_HTML.pptx
 
CreatingWebPages-Part1.ppt
CreatingWebPages-Part1.pptCreatingWebPages-Part1.ppt
CreatingWebPages-Part1.ppt
 
XML.pptx
XML.pptxXML.pptx
XML.pptx
 

Mehr von phanleson

E-Commerce Security - Application attacks - Server Attacks
E-Commerce Security - Application attacks - Server AttacksE-Commerce Security - Application attacks - Server Attacks
E-Commerce Security - Application attacks - Server Attacksphanleson
 
HBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table designHBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table designphanleson
 
HBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - OperationsHBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - Operationsphanleson
 
Hbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBaseHbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBasephanleson
 
Learning spark ch11 - Machine Learning with MLlib
Learning spark ch11 - Machine Learning with MLlibLearning spark ch11 - Machine Learning with MLlib
Learning spark ch11 - Machine Learning with MLlibphanleson
 
Learning spark ch10 - Spark Streaming
Learning spark ch10 - Spark StreamingLearning spark ch10 - Spark Streaming
Learning spark ch10 - Spark Streamingphanleson
 
Learning spark ch09 - Spark SQL
Learning spark ch09 - Spark SQLLearning spark ch09 - Spark SQL
Learning spark ch09 - Spark SQLphanleson
 
Learning spark ch07 - Running on a Cluster
Learning spark ch07 - Running on a ClusterLearning spark ch07 - Running on a Cluster
Learning spark ch07 - Running on a Clusterphanleson
 
Learning spark ch06 - Advanced Spark Programming
Learning spark ch06 - Advanced Spark ProgrammingLearning spark ch06 - Advanced Spark Programming
Learning spark ch06 - Advanced Spark Programmingphanleson
 
Learning spark ch05 - Loading and Saving Your Data
Learning spark ch05 - Loading and Saving Your DataLearning spark ch05 - Loading and Saving Your Data
Learning spark ch05 - Loading and Saving Your Dataphanleson
 
Learning spark ch04 - Working with Key/Value Pairs
Learning spark ch04 - Working with Key/Value PairsLearning spark ch04 - Working with Key/Value Pairs
Learning spark ch04 - Working with Key/Value Pairsphanleson
 
Learning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with SparkLearning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with Sparkphanleson
 
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about LibertagiaHướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagiaphanleson
 
Lecture 2 - Using XML for Many Purposes
Lecture 2 - Using XML for Many PurposesLecture 2 - Using XML for Many Purposes
Lecture 2 - Using XML for Many Purposesphanleson
 
SOA Course - SOA governance - Lecture 19
SOA Course - SOA governance - Lecture 19SOA Course - SOA governance - Lecture 19
SOA Course - SOA governance - Lecture 19phanleson
 
Lecture 18 - Model-Driven Service Development
Lecture 18 - Model-Driven Service DevelopmentLecture 18 - Model-Driven Service Development
Lecture 18 - Model-Driven Service Developmentphanleson
 
Lecture 15 - Technical Details
Lecture 15 - Technical DetailsLecture 15 - Technical Details
Lecture 15 - Technical Detailsphanleson
 
Lecture 10 - Message Exchange Patterns
Lecture 10 - Message Exchange PatternsLecture 10 - Message Exchange Patterns
Lecture 10 - Message Exchange Patternsphanleson
 
Lecture 9 - SOA in Context
Lecture 9 - SOA in ContextLecture 9 - SOA in Context
Lecture 9 - SOA in Contextphanleson
 
Lecture 07 - Business Process Management
Lecture 07 - Business Process ManagementLecture 07 - Business Process Management
Lecture 07 - Business Process Managementphanleson
 

Mehr von phanleson (20)

E-Commerce Security - Application attacks - Server Attacks
E-Commerce Security - Application attacks - Server AttacksE-Commerce Security - Application attacks - Server Attacks
E-Commerce Security - Application attacks - Server Attacks
 
HBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table designHBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table design
 
HBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - OperationsHBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - Operations
 
Hbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBaseHbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBase
 
Learning spark ch11 - Machine Learning with MLlib
Learning spark ch11 - Machine Learning with MLlibLearning spark ch11 - Machine Learning with MLlib
Learning spark ch11 - Machine Learning with MLlib
 
Learning spark ch10 - Spark Streaming
Learning spark ch10 - Spark StreamingLearning spark ch10 - Spark Streaming
Learning spark ch10 - Spark Streaming
 
Learning spark ch09 - Spark SQL
Learning spark ch09 - Spark SQLLearning spark ch09 - Spark SQL
Learning spark ch09 - Spark SQL
 
Learning spark ch07 - Running on a Cluster
Learning spark ch07 - Running on a ClusterLearning spark ch07 - Running on a Cluster
Learning spark ch07 - Running on a Cluster
 
Learning spark ch06 - Advanced Spark Programming
Learning spark ch06 - Advanced Spark ProgrammingLearning spark ch06 - Advanced Spark Programming
Learning spark ch06 - Advanced Spark Programming
 
Learning spark ch05 - Loading and Saving Your Data
Learning spark ch05 - Loading and Saving Your DataLearning spark ch05 - Loading and Saving Your Data
Learning spark ch05 - Loading and Saving Your Data
 
Learning spark ch04 - Working with Key/Value Pairs
Learning spark ch04 - Working with Key/Value PairsLearning spark ch04 - Working with Key/Value Pairs
Learning spark ch04 - Working with Key/Value Pairs
 
Learning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with SparkLearning spark ch01 - Introduction to Data Analysis with Spark
Learning spark ch01 - Introduction to Data Analysis with Spark
 
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about LibertagiaHướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
Hướng Dẫn Đăng Ký LibertaGia - A guide and introduciton about Libertagia
 
Lecture 2 - Using XML for Many Purposes
Lecture 2 - Using XML for Many PurposesLecture 2 - Using XML for Many Purposes
Lecture 2 - Using XML for Many Purposes
 
SOA Course - SOA governance - Lecture 19
SOA Course - SOA governance - Lecture 19SOA Course - SOA governance - Lecture 19
SOA Course - SOA governance - Lecture 19
 
Lecture 18 - Model-Driven Service Development
Lecture 18 - Model-Driven Service DevelopmentLecture 18 - Model-Driven Service Development
Lecture 18 - Model-Driven Service Development
 
Lecture 15 - Technical Details
Lecture 15 - Technical DetailsLecture 15 - Technical Details
Lecture 15 - Technical Details
 
Lecture 10 - Message Exchange Patterns
Lecture 10 - Message Exchange PatternsLecture 10 - Message Exchange Patterns
Lecture 10 - Message Exchange Patterns
 
Lecture 9 - SOA in Context
Lecture 9 - SOA in ContextLecture 9 - SOA in Context
Lecture 9 - SOA in Context
 
Lecture 07 - Business Process Management
Lecture 07 - Business Process ManagementLecture 07 - Business Process Management
Lecture 07 - Business Process Management
 

Kürzlich hochgeladen

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 

Kürzlich hochgeladen (20)

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

Lecture 4 - Adding XTHML for the Web

  • 1. XML For Dummies http://it- slideshares.blogspot.com Book Author : Lucinda Dykes & Ed Tittle Lecture 4 : Adding XTHML for the Web
  • 2. http://it- slideshares.blogspot.com Contents 1. HTML, XML, and XHTML 2. Comparing XML and HTML 3. XHTML Makes the Move to XML Syntax 4. Convert a document from HTML to XHTML 5. The Role of DOCTYPE Declarations
  • 3. 4.1. HTML, XML, and XHTML  HTML, XHTML, and XML represent stages in the development of markup languages. ◦ HTML, designed to display content in Web browsers, came first. ◦ XML, intended for data exchange, came next. ◦ XHTML — which uses the markup tags of HTML and the strict syntax of XML.
  • 4. http://it- 4.1.1 What HTML does slideshares.blogspot.com best  HTML makes our Web world look pretty. ◦ Such as a personal site that you create for your family.  Most Web sites use straight HTML to display data
  • 5. http://it- 1.2 The limits of 4. slideshares.blogspot.com HTML  HTML was enlisted to perform some pretty specify tasks. ◦ Allow tight control over document display. ◦ Provide the flexibility to describe different, specific types of information and data. ◦ Convey information from a variety of media and in a various formats. ◦ Define complex linking relationships between document. ◦ Publish a single set of information cross a variety of media.  Two overarching problems prevent Web designers from achieving this control with HTML: ◦ HTML lacks fine controls.  Not include mechanisms for the control.  … ◦ Display vary.  Problems with browsers that users view web pages (IE, Firefox…)  …
  • 6. 4.2. Comparing XML and HTMLHTML are not the same kind of markup XML and language.  But XML and HTML both derive from the same parent SGML. ◦ So they must be similar, right ?  HTML and XML both use tags and attributes.  XML and HTML look similar.  HTML defines basic text elements and includes defaults (and more explicit controls) for how text may be displayed in a browser window  XML tells us only what each element means.  XML says nothing about how elements should or must be displayed — XML separates content and the presentation of that content.
  • 7. 4.2.1 Using XML to describe data  XML is not limited to any fixed set of tags or element types. ◦ You can define your own sets of elements and even your own attributes that you may then Document HTML use within your documents. XML Document <Cover> <html> <Abstract> <p> This book is about the foundations of the Blah blah blah blah blah blah blah blah blah blah Extensible Markup Language (XML) blah blah blah blah blah (XML) and how to use it for your own applications. blobbity blobbity blobitty blah blah blah blah. blah </Abstract> blah blah <AuthorInfo> </p> The authors are <Author>Lucinda <p> Dykes</Author> and Blah blah blah Lucinda Dykes blah Ed Tittel. <Author>Ed Tittel</Author>. </p> </AuthorInfo> </html> </Cover>
  • 8. 4. 2.2 The benefits of using HTML  It’s quick, easy, and cheap.  HTML is way easier than the alternative.  Anyone can create an HTML document by using a text editor and a little knowledge. ◦ Even if you don’t know HTML, you can use an HTML editor — a What You See Is What You Get-style (that is, WYSIWYG-style) editor such as FrontPage or Dreamweaver — to produce readable Web pages in minutes.
  • 9. 4.2.3 The benefits of using XML XML seems to be brimming with benefits. ◦ Unlimited element ◦ Structured data ◦ Data exchange ◦ XML complements HTML ◦ XML documents are well formed ◦ Self-describing ◦ Search engines ◦ Updates ◦ User-selected view of data  Intelligent XML-based pages that contain human- readable data offer exciting potential for users.  A Web designer/developer reaps several benefits from XML as well.  The benefits of XML are endless.
  • 10. 4. 3. XHTML Makes the Move to XML Syntax  XHTML is the successor to HTML 4.01; in effect, it’s the final version of HTML.  XHTML is a clever reformulation of HTML 4 as an application of XML 1.0.  Why do we like XHTML? ◦ XHTML documents can be viewed, edited, and validated using XML tools. ◦ Well-formed XHTML documents mean better-structured documents. ◦ XHTML documents can be delivered using different Internet media types and output devices. ◦ Using valid XHTML gives you the best chance of having your document displayed the way you intend.
  • 11. 4. 3.1 Making the switch  Making the switch from HTML to XHTML means mastering the rules of XHTML — in particular, XML syntax and structure.  You have only a few major rules to get under your belt, but you have to follow them if you want to create a valid XHTML document.  ◦ Every tag in an XHTML document must be closed. ◦ Empty elements (elements without content, such as a br tag) must be correctly formatted with a closing slash. ◦ All tags must be nested correctly — the tag you open last must be the tag you close first ◦ All XHTML tags must be written using only lowercase. ◦ All attribute values must be put in quotation marks.  An acceptable XML document must be well formed.
  • 12. 4. 3.2 Every element must be closed  That all nonempty elements (that is, those that contain actual text) must have a start tag and an end tag.  In the case of HTML Is the same as <p>text text text <p>text text text</p>  Doing without an end tag just doesn’t fly in XHTML. ◦ You have to add closing paragraph tags where they belong if you want the resulting lines to work right.
  • 13. 4. 3.3 Empty elements must be formatted correctly  All nonempty XML elements must use both a start tag and an end tag to be correct.  An empty element is a singleton tag (also called an empty tag) that hangs around by itself. ◦ Empty tags in HTML include the <br>, <hr>, <hr>and <img> tags. ◦ The <hr /> hr element looks like this in HTML: ◦ In XHTML, it looks like this:
  • 14. 4. 3.4 Tags must be properly nested  The rules of XHTML syntax say that tags must be nested in the correct order.  The rule is always to close first what you opened last, working your way Ill formed from the inside to the outside tags. <p>This book was written by <i><b>Dan Brown</i></b>. Well-formed <p>This book was written by <i><b>Dan Brown</b></i>.</p>
  • 15. 4.3.5 Case makes a difference  HTML is not case sensitive; XHTML is. ◦ When you use HTML, it doesn’t matter what case you use for elements and attributes. ◦ For example, for the opening body tag, you can use <BODY>, <body>, or even <Body> they all work fine.  XHTML, on the other hand, is a bit more finicky about case. ◦ All XHTML elements and attribute names must be in lowercase or your page won’t validate. ◦ Use any case for the value of an attribute
  • 16. 4. 3.6 Attribute values are in quotation marks  In XHTML, all attribute values must be in quotation marks. ◦ The following markup works just fine on an HTML page: ◦ You have to add quotation marks around the attribute value <tr align=right> to create valid XHTML. <tr align=”right”> highlights the major rules for XHTML syntax and  Table 4-1 shows how markup looks in HTML and XHTML.
  • 17. 4. 4. Converting a document from HTML to XHTML
  • 18. 4. 4. Converting a document from HTML to XHTML
  • 19. 4. 5. The Role of DOCTYPE Declarations  The DOCTYPE declaration serves several purposes: ◦ It allows your page to be validated as XHTML. ◦ It tells the browser which version of which markup language you used to create the page and references the specific DTD for that language. ◦ It enables your page to be displayed properly in Web-standards-compliant browsers.  You have three different DOCTYPES to choose among for an XHTML 1.0 document: strict, transitional, and frames.
  • 20. http://it- slideshares.blogspot.com 4.6 Summary  Understanding the limitations of HTML  Comparing HTML with XML  Getting the best of both worlds: XHTML  Converting HTML to XHTML

Hinweis der Redaktion

  1. Tip Although it might seem that the terms tag and element are interchangeable, they’re not.An element includes the opening and closing tags for a tag pair — and everything in between.A tag is just a tag, all by itself.Example : One example of a tag is the opening &lt;p&gt; tag , an example of an element is &lt;p&gt;text&lt;/p&gt;.XML also provides numerous ways to translate this information so it looks the way you want it to on-screen.RememberHTML is used to describe the display of data as seen through a Web browser.XML enables you to define and use your own elements and attributes
  2. Note If you validate your XHTML document, you’ll find that you can either include the space before the closing slash or not — your document will validate in either case. The extra space is a browser issue, not a validation issue.
  3. Tip : Both single quotation marks (‘) and double quotation marks (“) are legal in XML and XHTML.
  4. You can convert your HTML to XHTML with ease by using Dave Raggett’s free open-source program, HTML Tidy. The maintenance of HTML Tidy is now provided by Source Forge. Check it out at http://tidy.sourceforge.net/. For a version that’s even easier to use than the original, see the HTML-Kit at www.chami.com/html-kit/.