XHTML - PowerPoint PPT Presentation

About This Presentation
Title:

XHTML

Description:

XHTML Presentation by Kevin See June 16, 2000 XML in HTML Meeting Report May 11, 1998 http://www.oasis-open.org/cover/NOTE-xh-19980511.html How do we hide new ... – PowerPoint PPT presentation

Number of Views:60
Avg rating:3.0/5.0
Slides: 20
Provided by: LabU259
Learn more at: https://www.oocities.org
Category:

less

Transcript and Presenter's Notes

Title: XHTML


1
XHTML
  • Presentation by Kevin See
  • June 16, 2000

2
XML in HTML Meeting Report
  • May 11, 1998
  • http//www.oasis-open.org/cover/NOTE-xh-19980511.h
    tml
  • How do we hide new idioms from deployed
    software
  • How do we introduce new idioms with distinctive
    display characteristics, such as MathML?

3
What Is XHTML?
  • XHTML (Extensible Hypertext Markup Language) is
    a reformulation of HTML 4 as an application of
    the Extensible Markup Language (XML)
  • XHTML is a family of current and future document
    types and modules that reproduce, subset, and
    extend HTML 4.

4
Why Would You Want to Use XHTML?
  • Extensibility
  • Powerful machine
  • New tags / attributes
  • Lead to more complicated pages and larger programs
  • Portability
  • Small devices mobile devices and possibly
    household devices
  • Several levels of possible markup
  • Web pages can now be made simpler

5
Document Conformance
  • Strictly conforming documents
  • Must validate against proposed DTDs.
  • Root element must be lthtmlgt.
  • Root element must designate the XHTML namespace
    using the xmlns attribute. (see next slides for
    details)
  • There must be a DOCTYPE declaration in the
    document prior to the root element.

6
Document Conformance- Using XHTML With Other
Namespaces
  • lthtml xmlns"http//www.w3.org/1999/xhtml"
    xmllang"en" lang"en"gt
  • ltheadgt
  • lttitlegtA Math Examplelt/titlegt
  • lt/headgt
  • ltbodygt
  • ltpgtThe following is MathML
    markuplt/pgt
  • ltmath xmlns"http//www.w3.org/1
    998/Math/MathML"gt
  • ltapplygt ltlog/gt
  • ltlogbasegt
  • ltcngt 3 lt/cngt
  • lt/logbasegt
  • ltcigt x lt/cigt
  • lt/applygt
  • lt/mathgt
  • lt/bodygt
  • lt/htmlgt

7
Document Conformance- Using XHTML With Other
Namespaces
  • lt?xml version"1.0" encoding"UTF-8"?gt
  • lt!-- initially, the default
    namespace is "books" --gt
  • ltbook xmlns'urnloc.govbooks'
  • xmlnsisbn'urnISBN0-395-36341
    -6' xmllang"en" lang"en"gt
  • lttitlegtCheaper by the
    Dozenlt/titlegt
  • ltisbnnumbergt1568491379lt/isbnnumb
    ergt
  • ltnotesgt
  • lt!-- make HTML the default
    namespace for a hypertext commentary --gt
  • ltp xmlns'http//www.w3.org/1999
    /xhtml'gt
  • This is also available lta
    href"http//www.w3.org/"gtonlinelt/agt.
  • lt/pgt
  • lt/notesgt
  • lt/bookgt

8
User Agent Conformance
  • http//www.w3.org/TR/xhtml1/
  • Consistent with XML
  • Consistent with facilities definition
  • Recognize attributes of type ID
  • Unrecognized Items
  • Space, Tab, Carriage Return, Line Feed are
    considered as white space.

9
DTDs Document Type Definitions
  • XHTML 1.0 specifies three XML document types that
    correspond to the three HTML 4.0 DTDs
  • lt!DOCTYPE html PUBLIC
  • "-//W3C//DTD XHTML 1.0 Strict//EN"
  • "DTD/xhtml1-strict.dtd"gt ------
    XHTML 1.0 Strict
  • lt!DOCTYPE html PUBLIC
  • "-//W3C//DTD XHTML 1.0
    Transitional//EN"
  • "DTD/xhtml1-transitional.dtd"gt
    ------ XHTML 1.0 Transitional
  • lt!DOCTYPE html PUBLIC
  • "-//W3C//DTD XHTML 1.0
    Frameset//EN"
  • "DTD/xhtml1-frameset.dtd"gt ------
    XHTML 1.0 Frameset

10
Differences With HTML 4
  • Document must be well-formed
  • Tag and attribute names must be written in
    lower-case (see XHTML Case Poll)
  • For non-empty elements, end tags are required
  • Empty elements must be terminated (e.g. ltbr /gt )
  • Attribute values must always be quoted (e.g. ltimg
    border 0 /gt
  • Attribute value pairs cannot be minimized (e.g.
    ltul compact compact gt )
  • name attribute is formally deprecated (to be
    removed later), use id attribute instead

11
Differences With HTML 4
  • ltscriptgt and ltstylegt elements are declared as
    having PCDATA content.
  • e.g.
  • ltscript language"JavaScript type"text/javascrip
    t"gt
  • lt!CDATA
  • document.write("ltbgtHello
    World!lt/bgt")
  • gt
  • lt/scriptgt

12
Differences With HTML 4 SGML Exclusions
  • a
  • cannot contain other a elements.
  • pre
  • cannot contain the img, object, big, small, sub,
    or sup elements.
  • button
  • cannot contain the input, select, textarea,
    label, button, form, fieldset, iframe or isindex
    elements.
  • label
  • cannot contain other label elements.
  • form
  • cannot contain other form elements.

13
Compatibility Issues With Existing User Agent
  • Although there is no requirement for XHTML 1.0
    documents to be compatible with existing user
    agents, in practice this is easy to accomplish.
  • Appendix C summarizes design guidelines for
    authors who wish their XHTML documents to render
    on existing HTML user agents. http//www.w3.org/TR
    /xhtml1/

14
XHTML Document Structure
  • An XHTML document consists of three main parts
  • The DOCTYPE, The Head, and The Body
  • Here is a minimal XHTML document
  • 1 lt!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN "DTD/xhtml1-transitional.dtd"gt
  • 2 lthtml xmlns"http//www.w3.org/1999/xhtml"gt
  • 3 ltheadgt
  • 4 lttitlegtMinimal documentlt/titlegt
  • 5 lt/headgt
  • 6 ltbodygt
  • 7 ltpgt
  • 8 lta href"http//validator.w3.org/check/ref
    erer"gt validatelt/agt
  • 9 lt/pgt
  • 10lt/bodygt
  • 11lt/htmlgt

15
Future Directions
  • Modularizing XHTML (hand held device) The
    process of modularization breaks up XHTML up into
    a series of smaller element sets. These elements
    can then be recombined to meet the needs of
    different communities.

16
Future Directions
  • Document Profiles
  • A document profile specifies the syntax and
    semantics of a set of documents.
  • Conformance to a document profile provides a
    basis for interoperability guarantees.
  • The document profile specifies the
    facilities required to process documents of that
    type.

17
Conclusion
  • Example of site written in XHTML - Brian White
    Associates
  • XHTML 1.0 Combines the Familiarity of HTML with
    the Power of XML
  • XHTML 1.0 Provides a Foundation for
    Device-Independent Web Access
  • XHTML 1.0 allows authors to create Web documents
    that work with current HTML browsers and that may
    be processed by XML- enabled software as well.
  • With XHTML, we are well-prepared to move into the
    21st century web.

18
Interesting URLs
  • HTML conversion tool Tidy
  • HTML Writers Guild world largest international
    organization of web authors (over 110,000
    members, over 150 countries)
  • W3C HTML validation Service
  • HTML Validator Commercial Product
  • FOP formatter that produces PDF from XSL
    formatting objects

19
Interesting URLs
  • W3C's Amaya Browser - The latest release includes
    the support of HTML 4.0 and XHTML
  • Slide set on XHTML -This is a recent slide set
    for XHTML first presented at the W3LA
    event in Stockholm on 24th March 1999.
Write a Comment
User Comments (0)
About PowerShow.com