1 / 40

Authoring Web Sites in XHTML

Internet Librarian International. Birmingham, UK. Authoring Web Sites in XHTML . Darlene Fichter darlene.fichter@usask.ca University of Saskatchewan Library Canada . 26 March, 2003. Overview. Frameworks Portlets Why use XHTML? XHTML syntax How XHTML differs from HTML XHTML and CSS

khanh
Download Presentation

Authoring Web Sites in XHTML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Internet Librarian International Birmingham, UK Authoring Web Sites in XHTML Darlene Fichter darlene.fichter@usask.ca University of Saskatchewan Library Canada 26 March, 2003

  2. Overview • Frameworks • Portlets • Why use XHTML? • XHTML syntax • How XHTML differs from HTML • XHTML and CSS • XHTML tools

  3. Yesterday

  4. Today

  5. Computer - Device

  6. Static HTML hand coding HTML Web Page Tag Editors HTML, Forms, Client Side Scripts Web Services Portals & Personalization “My Library” Objects - XML WSIWYG & Management Tools Distributed Authoring Portals & Portlets Web Services XML, SOAP Web Site Dynamic / Database SQL & Perl/PHP/ASP CMS Authoring & workflow

  7. Content Challenges in 2003: Document Collections • Storage & Management • Content • Structure • Work • Ease of use • Ease of creation • Good retrieval

  8. Service Challenges • Just in Time • Repackaging • Over the Long Term • Preservation • Migration

  9. HTML • Simple, general-purpose document markup language • Simple hyperlinking • Designed for collaborative authoring • Combined authoring and viewing roles

  10. HTML Strengths • Open standard • Lots of tools and applications • Easy and cheap • Rapidly adopted

  11. HTML Weaknesses • Not extensible • Supports only “simple” document types • Mixes presentation and structure • Cross-browser wars

  12. XML • More meaningful searches • Flexible web applications • data from disparate sources/applications • client processing • multiple views • granular updates • Open standard • Unicode • Hope --> good for web delivery

  13. What is XHTML? • Called “Next generation” HTML • HTML that conforms to XML standards • Will eventually support integration with other XML applications • Device independent web access

  14. Why use XHTML? • Most documents on the Internet are in HTML – this is the logical next step • Simpler than XML for most authors • XHTML documents are XML compliant, which allows you to use XML tools such as XSL • Future -- XHTML easier than HTML with the next generation of browsers

  15. Why do We Need XHTML? • Both HTML and SGML have major drawbacks. • XML’s use for encoding web documents is still at early stages of adoption

  16. Benefits of Adoption • Easier to develop software • handle specialized information distributed over the Web • Process data using inexpensive software • Allows greater end-user control of information display • stylesheets • Metadata for resource discovery

  17. XHTML - What does it take? • All documents must have a doctype declaration • The transitional doctype declaration-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd"> • Head and body • Syntax

  18. XHTML – 3 Variations • Strict • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/strict.dtd"> • Used when CSS is used for all your formatting • Transitional • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd"> • Frameset • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/frameset.dtd">

  19. Syntax: Lower case • Case matters • HTML: <Title> or <TITLE> or <title> • XHTML: <title>

  20. Syntax: Attributes • Attributes must be quoted • HTML <p class=quotes> • XHTML <p class=“quotes”>

  21. Syntax: Close Elements • All tags must be closed • HTML: <p>Le chien dort. <p>La chat joue. • XHTML: <p>Le chien dort. </p><p>La chat joue.</p>

  22. Syntax: Empty Elements • Empty elements must be terminated • HTML: <br> • XHTML: <br />

  23. Elements Must Be Nested <bigdoll> <mediumdoll> <littledoll> <littlestdoll/> </littledoll> <mediumdoll> </bigdoll>

  24. Scripts • <script> and <style> tags must be marked as CDATA <script> <!-- <![CDATA] (script) ]]> - -> </script> Tip: Place your scripts in a external file.

  25. Use entities for all ampersands • <a href="http://www.lights.ca/cgi-bin/script.cgi?what=chien&id=9"> • <a href="http://www.lights.ca/cgi-bin/script.cgi?what=chien&amp; id=9">

  26. Style Sheets & XHTML • The use of external style sheets is recommended <link rel="stylesheet" type="text/css" href=“lib.css" /> • The type attribute is mandatory for <style> tag – text/css • Enclose inline styles with <![CDATA[ and the ending tag ]]>

  27. Find Out More: XHTML syntax • W3C http://www.w3.org/TR/xhtml1/ • XHTML: le web devient coopératif • http://www.xhtml.net/ • XHTML.org • http://www.xhtml.org • Darlene Fichter. “Web Authoring in XHTML”. ONLINE Magazine November/December 2002 • www.findarticles.com

  28. What about conversion? • HTMLTidy • http://www.w3.org/People/Raggett/tidy/

  29. Resources for Conversion • Converting HTML documents to XHTML by Bejoy Alex Jaisonhttp://www22.brinkster.com/beeandnee/techzone/articles/htmltoxhtml.asp • Roy Tennant. XML for Libraries. Neal-Schuman Publishers, 2002.

  30. XHTML Validators • Validator • http://validator.w3.org/

  31. Typical Web Author XHTML is available in standard tools • Macromedia Dreamweaver • HTML-Kit • Macromedia HomeSite 5 • NoteTab Pro

  32. Content Provider • Usually authoring in Word • Import in Dreamweaver • Run it through a program like HTML TIDY

  33. New York Public Library www.nypl.org/styleguide/

  34. Major Project • Consider the value of the content over the long term • Likelihood of delivery to “appliances” • If there is an XML “dialect”, use it • If not, use XHTML (ideally XML rendered as XHTML)

  35. Example: Law Cases • 1994 • 527 law cases edited, and formatted as HTML • rigourous coding rules, poor validation • Cost: $150,000 • 2001 • converted to XML, DTD creation, enhanced, rendered as XHTML • Cost: $15,000 • Future • Cost < $300 Canadian Native Law Cases http;// library.usask.ca/native/cnlch.html

  36. Developers • Repackaging, reuse, migration, archiving • Code • How long will this content be around? • Always wise to separate presentation from content • Decision/Balance • Short term pain/effort vs. long term gain?

  37. XHTML &amp; You • XHTML will make your life a little more challenging • XHTML will make your computer happier (eventually)

  38. Silver Bullets? XHTML / XML • No! In fact, these new choices just raise some interesting challenges • Only certainty is change Content will outlive devices!

  39. Thank you! • Darlene Fichter darlene.fichter@usask.ca University of Saskatchewan Library

More Related