2007年11月26日 星期一

Introduction to XML

Take a look at islandwide temperatures of Taiwan.

What happens if you just want Taoyuan's temperature?

If you want to include Taoyuan's temperature in your Theme
Park homepage, is there any solution?

XML examples:


the need of XML

  • Separation of data from data processor
  • Seperation of data from presentation
    • HTML for machine-human interaction
    • XML can be formatted to HTML according to formartting rules called XSLT. To see it, do Lab XSLT.

  • Automation of data flow across various business systems
    • XML for machine-machine interaction
    • Without human involvement, automation of business systems can be accelerated.
    What kind of language is XSLT?
    • An XSLT style sheet is an XML document.
    • The basic processing paradigm is pattern matching.


    Operation of an XSLT Processor

    Homework 11-26-2007

    1. Problem 1 & Problem 3 of Textbook on Page 55.
    2. What does a CGI output contain in the HTTP header? Hint: Such as Content-type
    3. If you want to upload an mp3 file, should you use the GET or POST method? Why?
    4. Reading Assignments:XML (Page 187-188 on the Textbook)

    Static, Dynamic Webpages and Common Gateway Interface

    CGI, Common Gateway Interface
    (pages 41~46, 188~193 of Textbook)

    static page
    Ex:
    http://www.google.com/

    dynamic page
    Ex:
    http://www.cna.com.tw/

    URL that sends a request by CGI
    Ex:
    http://maps.google.com/maps?q=24.9586,+121.2411

    Lab 17: Form and Action, Part II

    Hand code a HTML or use Nvu to edit an HTML so that the webpage can send a request to Google like
    http://maps.google.com/maps?q=24.9586,+121.24114

    Use Form CGI that includes action, input, and submit.
    Try a few different coordinates.

    Lab 16: Form and Action

    "logic will get you from A to B - imagination will take you anywhere"

    How to use Form to invoke a remote service through CGI.

    1. Copy the search box of this search page,
    inlcuding radio buttons, text input, and submit button.
    2. Open your Nvu HTML editor.
    3. Open a new empty HTML file.
    4. Paste the search box into this new file.

    5. Use Nvu to add a Form to this search box. Do not hand code the HTML. Just fill the blank in the Form dialog.

    6. In the form dialog, set Action="http://google.com/search" and name of Form as "f" and method as "get"
    (See Hint if it does not work.)
    7. Run your HTML by Firefox. What do you get?

    8. Set method as "post"
    9. Run your HTML by Firefox. What do you get?

    2007年11月12日 星期一

    Homework 11-12-2007

    根據無障礙網頁設計原則

    1. 為什麼不要開出新視窗?
    2. 為什麼要使用貼切的網頁標頭? 而不是留白?
    3. 定義快速鍵有什麼好處?

    預告: 11/19 期中考週不上課

    ps. Lab 15 特優作品

    Lab 15 Webpage Accessibility

    Use Nvu to edit the following homepage
    at http://www.epa.gov.tw

    1. You can copy and paste the content to your Nvu.

    2. Take a look at the HTML 標籤, HTML 原始碼

    3. Save your editings and preview your webpage using Firefox

    4. Make the webpage accessible by
    adding ALT text to the images.

    Lab 14: Accessibility by GreaseMonkey

    1. Google Search Keys Numbers the results in a Google search page and you can type the corresponding number to follow the link. Updated: 2005-04-26. more
    2. Google Access Keys Enables navigation through Google search results.

    3. AccessBar: displays defined accesskeys in a fixed-position bar along the bottom of the window. Added 2005-04-01 (not a joke). Find how many access keys have been defined at www.ocac.gov.tw www.epa.gov.tw
    4. Continued from 3, use google to find 3 more government sites in Taiwan that enable access keys.
    Reference: Dive into Greasemonkey by Mark Pilgrim (free download)
    http://dia.z6i.org/ (中文)