2012年12月17日 星期一

Lab 35 XML (2)


1. Register and Download Xray, an XML, XSLT editor and processor.

2. Given the 
Listing 1. An XML document representing the results of a soccer tournament

Listing 2. A basic style sheet for the soccer results

use the XSLT as in the Listing 2 to transform the XML file as in the Listing 1.
(archive)

3. View the formatted HTML file.

Results of Group A

Brazil versus Scotland

Played on 10-Jun-1998
Result: Brazil2, Scotland1

Morocco versus Norway

Played on 10-Jun-1998
Result: Morocco2, Norway2

Scotland versus Norway

Played on 16-Jun-1998
Result: Scotland1, Norway1

Brazil versus Morocco

Played on 16-Jun-1998
Result: Brazil3, Morocco0

Brazil versus Norway

Played on 23-Jun-1998
Result: Brazil1, Norway2

Scotland versus Morocco

Played on 23-Jun-1998
Result: Scotland0, Morocco3


4. Given the
Listing 1. An XML document representing the results of a soccer tournament
Listing 3. A style sheet that computes team standings


compute the team standings in a table.

5. View the formatted HTML file.

Results of Group A

TeamPlayedWonDrawnLostForAgainst
Brazil320163
Scotland301226
Morocco311155
Norway312054



Q:請描述至少一個你做這個lab所遇到的問題,並且你是如何解決這個問題的。

DEBUG程式碼花了一點時間

Lab 36 Syndication with RSS 2.0


Lab 34 XML


1. Register and Download Xray, an XML, XSLT editor and processor.
    (安裝X-Ray需要權限)

    (助教碎碎念:若無法順利安裝在點)

2. Before you do this lab,all the first you must know is 
   

XML-可延伸標記式語言英語eXtensible Markup Language,簡稱:XML),是一種標記式語言。標記指電腦所能理解的訊息符號,透過此種標記,電腦之間可以處理包含各種訊息的文章等。如何定義這些標記,既可以選擇國際通用的標記式語言,比如HTML,也可以使用像XML這樣由相關人士自由決定的標記式語言,這就是語言的可延伸性。XML是從標準通用標記式語言(SGML)中簡化修改出來的。它主要用到的有可延伸標記式語言、可延伸樣式語言(XSL)、XBRLXPath等。



XSL-可擴展樣式語言(extensible stylesheet language,簡稱XSL),是一種為[可擴展置標語言](XML)提供表達形式而設計的語言。
由於可擴展置標語言的擴展性使之沒有關於顯示格式的標識,可擴展樣式語言可以選擇和過濾可擴展置標語言中的數據,並將其轉換為HTML或者PDF等其他格式文件。
資料來源:維基百科


  
3. Given the the XML file and XSLT file ,
use Xray to do the transformation of the XML into HTML.
You have to replace [ with <.

4. View the formatted HTML file.

Current conditions

  • Temperature 76°F
  • Wind 5mph
  • Lab 33 Speed Test


    測試中原大學與中央大學對外頻寬速度。

    Tool: Speedtest
    cycu proxy: proxy.cycu.edu.tw:3128
    ncu proxy.csie.ncu.edu.tw:3128
    no proxy







    Lab 32 Programming in DOM (II)

    1. Open KompoZer
    2. Based on the code as in

    http://www.scottandrew.com/weblog/articles/dom_4 ,
    write a code so that when you push a button, you generate the table of 9*9 products. (九九乘法表)

    Hint: The javascript code should be enclosed by script tags.

    Q:請描述至少一個你做這個lab所遇到的問題,並且你是如何解決這個問題的。




    2012年12月3日 星期一

    Lab 31 Programming in DOM

    1. Open KompoZer
    2. Based on the code as in

    http://www.scottandrew.com/weblog/articles/dom_4 ,
    write a code to generate the table of 9*9 products. (九九乘法表)

    Hint: The javascript code should be enclosed by script tags.

    Q:請描述至少一個你做這個lab所遇到的問題,並且你是如何解決這個問題的。




    Lab 30 Create Image using DOM

    1. Open KompoZer
    2. Hand code a javascript that loads an image from Internet based on
    the DOM model.
    3. Take a look at the sample code that shows how window.onload to load the image.
    4. Use a button to load the image. Try how onclick works.





    Q:請描述至少一個你做這個lab所遇到的問題,並且你是如何解決這個問題的。
    A:程式碼輸入錯誤

    Lab 29 Hand code a form

    Before you do this lab, you must understand what is CGI(Common Gateway Interface)  and Form.

    1. So please search the answer and post your opinion in your blog.
    2. Hand code a HTML or use KompoZer 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.




    通用網關介面Common Gateway Interface/CGI)是一種重要的網際網路技術,可以讓一個客戶端,從網頁瀏覽器向執行在網路伺服器上的程序,請求數據。CGI 描述了客戶端和伺服器程序之間傳輸數據的一種標準。 (source:http://zh.wikipedia.org/wiki/%E9%80%9A%E7%94%A8%E7%BD%91%E5%85%B3%E6%8E%A5%E5%8F%A3)







    Q:請描述至少一個你做這個lab所遇到的問題,並且你是如何解決這個問題的。

    A:操作不流暢 

    Lab 28 Lab Form and Action




    • Dynamic pages, content generated by server-side programs.
    • CGI, Common Gateway Interface, for sending requests to server-side programs.



    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
    "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 KompoZer HTML editor.
    3. Open a new empty HTML file.
    4. Paste the search box into this new file.

    5. Use KompoZer 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. Save your file on your computer. Run your HTML by Firefox. What do you get?

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









    Q:請描述至少一個你做這個lab所遇到的問題,並且你是如何解決這個問題的。

    A:無法了解題意。 請教助教。



    2012年11月26日 星期一

    Lab 27 Mash-Up 2 (Calendars)

    建立你的行事曆,並與學校行事曆合併 

    Google日曆-中原大學服務學習活動行事曆-html版本
    進入後按右下角+Google日曆即可訂閱








    Q:請描述至少一個你做這個lab所遇到的問題,並且你是如何解決這個問題的。
    A:沒有遇到問題。

    Lab 26 Mash-Up, Part 1 (Maps)

    For housing services, compare the following two websites
    http://www.housingmaps.com

    http://yungching.housefun.com.tw/

    List the differences in the user interface design and usability. Make comments
    by your use experiences.


    比較: 美感,直覺性,流暢,預期反應



    項目                   housingmaps                     永慶房屋 

    美感                  有整體性與設計感              熱鬧但雜亂

    直覺性               直覺性強且一目瞭然          直覺性低需要較久時間了解

    流暢性               按部就班且簡單流暢          過多的雜項與廣告降低了流暢性

    預期反應            順利的買屋或租屋             無法了解網站的內容而取消計畫




    Q:請描述至少一個你做這個lab所遇到的問題,並且你是如何解決這個問題的。
    A:沒有遇到問題

    Lab 25 navigation bar


    1. 進入你的部落格,登入,選擇設計
    2. 新增小工具
    3. 選取
    HTML/JavaScript
    4. 撰寫或貼上所需連結(範例)

    Q:請描述至少一個你做這個lab所遇到的問題,並且你是如何解決這個問題的。
    A:尋找小工具。




    2012年11月12日 星期一

    Lab 24 使用HTML 4 和HTML 5的影音播放

     測試以下HTML 4 和HTML 5的影音播放功能


    比較兩者有何差異。

     

    HTML5 與HTML 4的不同之處

    以下為大略的不同之處,與例子:
    • 檔案類型聲明(<!DOCTYPE>)僅有一型:<!DOCTYPE HTML>
    • 新的解析順序:不再基於SGML
    • 新的元素:section, video, progress, nav, meter, time, aside, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, mark, output, rp, rt, ruby, source, summary, wbr
    • input元素的新類型:date, email, url 等等。
    • 新的屬性:ping(用於aarea), charset(用於meta), async(用於script)。
    • 全域屬性:id, tabindex, repeat
    • 新的全域屬性:contenteditable, contextmenu, draggable, dropzone, hidden, spellcheck
    • 移除元素:acronym, applet, basefont, big, center, dir, font, frame, frameset, isindex, noframes, strike, tt
    資料來源: WIKIPEDIA



    Lab 23 Making images accessible

    1. Study what an ALT tag is.
    2. Use KompoZer to edit the following homepage
    at http://bloggercamp.blogspot.com/2007/01/2007.html

    You can copy and paste the content to your KompoZer.

    3. Save your editings and preview your webpage using Firefox

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

    5. Go to the Firefox Add-ons site for Firefox Accessibility Extension

    6. Click the "Install now" button on the add-ons website

    7. Check whether you can see the ALT text for the images by selecting the "Show Text Equivalent" function.



    2012年11月5日 星期一

    Homework 11/5/2012

    1. 觀看
    場域應用與服務設計: "科技人如何做通俗演講" (4分鐘)
    撰寫200演講摘要

     無法使用一般民眾可以理解通俗的話語傳達專業知識的概念是很多科技人所面臨共同的問題。無法簡單的表達概念通常來自於對專業知識了解的不足、缺少練習的機會、使用過度深奧的學術名詞及錯誤的呈現方式(such as bullet point) 。若能將所要表達的知識以圖像的方式並去除艱深的術語,在多闡述與一般民眾相關的部分,便能得到很好的溝通效果。






    2. 你覺得以後上台作簡報,會做些什麼樣改變?


    1.要直視聽眾,而不能只看手邊的電腦或小抄

    2.講話速度需放慢 聲音放大  咬字清楚

    Lab 22 Firefox Accessibility Extension

    Lab 22 Firefox Accessibility Extension

    Use Firefox Accessibility Extension to check the accessibility of three sites that you visit most.
    Report the summary of all the errors and warnings for each site.


    1.雅虎奇摩 
    Accessibility Extension

    List of Accessibility Issues Summary

    FAE RuleViolationsMessageClass
    Warn The words contained in each h1 element should match a subset of the words contained in the title element. Words (%1) in h1 elements should also be in the title element. Title 
    Fail Each heading element (h1..h6) must have text content. Headings 
    Check Heading content should be concise (usually 65 or fewer characters in length). Headings 
    Fail Every frame element must have a title attribute with content that describes the purpose of the frame. Frames 
    Warn If the content of the alt attribute is not empty it should contain at least 7 characters and less than 90 characters. The text should provide people who cannot see the image orientation to the content and purpose of the image in the website. Images 
    Warn Each map, ul or ol element that precedes the last h1 element and appears to be a navigation bar should be immediately preceded by a heading element, preferably an h2. Menu and Navigation Bars 
    Warn Every onClick event handler should be on a focusable element. Events 
    Warn The content of the headings of the same level within the same section should be unique. Headings 
    Fail 20 Each img element should have alt text. Images 
    Fail 22 Heading elements that follow the last h1 should be properly nested. Headings 
    Warn 35 Ensure that links that point to the same HREF use the same link text. Links 
    Warn 56 Ensure that links that point to different HREFs use different link text. Links 
    Warn 105 Avoid using text links that are shorter than four 4 characters in length. Links 

    Date: 11/5/2012 20:11 PM
    URL: http://tw.yahoo.com/













    2.PCHOME線上購物

    Accessibility Extension

    List of Accessibility Issues Summary

    FAE RuleViolationsMessageClass
    Check Most web pages should contain at least one navigation bar. Menu and Navigation Bars 
    Warn Avoid using images that are smaller than 16 pixels by 16 pixels as links. Links 
    Fail Each page must have a lang attribute on its html element whose value or initial subtag is a valid two-character language code. Language Changes 
    Warn If the content of the alt attribute is not empty it should contain at least 7 characters and less than 90 characters. The text should provide people who cannot see the image orientation to the content and purpose of the image in the website. Images 
    Warn The content of the headings of the same level within the same section should be unique. Headings 
    Fail Each img element should have alt text. Images 
    Fail The b element must not be used to bold text content, instead use heading (h1-h6) elements for heading text or the strong element for emphasizing words, phrases or sentences. Text Styling 
    Fail 12 The font and center elements must not be used for text styling, instead use structural markup should be used with CSS for styling. Text Styling 
    Fail 33 The i element must not be used to italicize text content, instead use heading (h1-h6) elements for heading text or the em element for emphasizing words, phrases or sentences. Text Styling 
    Fail 44 Heading elements that follow the last h1 should be properly nested. Headings 
    Warn 71 Avoid using text links that are shorter than four 4 characters in length. Links 
    Warn 105 Ensure that links that point to different HREFs use different link text. Links 
    Warn 202 Ensure that links that point to the same HREF use the same link text. Links 

    Date: 11/5/2012 20:12 PM
    URL: http://shopping.pchome.com.tw/index/







    3.GOOGLE NEWS

    Accessibility Extension

    List of Accessibility Issues Summary

    FAE RuleViolationsMessageClass
    Fail The page should contain at least one and no more than two h1 elements. Headings 
    Fail Every frame element must have a title attribute with content that describes the purpose of the frame. Frames 
    Warn Hidden or empty frames should not be used. Frames 
    Warn Every onClick event handler should be on a focusable element. Events 
    Fail Each page must have a lang attribute on its html element whose value or initial subtag is a valid two-character language code. Language Changes 
    Warn Every img element that is less than 8 pixels high or 8 pixels wide OR has an empty alt attribute value should be removed and CSS techniques should be used for styling content. Images 
    Warn 34 Ensure that links that point to the same HREF use the same link text. Links 
    Warn 35 Ensure that links that point to different HREFs use different link text. Links 
    Fail 36 The b element must not be used to bold text content, instead use heading (h1-h6) elements for heading text or the strong element for emphasizing words, phrases or sentences. Text Styling 
    Warn 43 Avoid using text links that are shorter than four 4 characters in length. Links 
    Fail 44 Heading elements that follow the last h1 should be properly nested. Headings 
    Warn 58 One level of nesting. Use CSS properties instead of tables and nested tables to visually layout blocks of related content for graphical renderings. Tables 
    Fail 77 Two or more levels of nesting. Use CSS properties instead of tables and nested tables to visually layout blocks of related content for graphical renderings. Tables 

    Date: 11/5/2012 20:12 PM
    URL: https://news.google.com/









    Q:請描述至少一個你做這個lab所遇到的問題,並且你是如何解決這個問題的。

    A:沒有遇到問題。