2007年12月3日 星期一

lab 20: XSLT Part III

1. Given the RSS of Yam News, write an XSLT file
and use Xray to generate an HTML that contains the titles of items in the RSS.

2. View the formatted HTML file.

reference: Lab XML & XSLT




































Lab XML & XSLT

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

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

3. View the formatted HTML file.

Step1. 開啟新檔


















Step2.打入XML資料


















Step3.和 Step1. 相同打上XSLT程式



















Step4.


















Step5.轉換


















Step6.


















Step7.顯示結果

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)

1.
(1).解釋 Web 技術演進是要解決什麼樣的問題?

Web 技術的演進主要是增進使用者(用戶端)的便利性、多樣性。

舉例來說,起先時期的網頁為靜態網頁,但由於靜態網頁的變化性太小,無法提供像現今即時新聞、線上交易等功能。
因此,才有動態網頁的技術出現。但最初的動態網頁技術主要是以程序(Process)為主體,所以當同一個伺服器(Server)同時處理過多使用者的要求,就會導致網路速度變慢。
目前 Web技術就以執行緒(Thread) 來代替程序(Process)解決速度上的問題。

(2).程序(Process) 和執行緒(Thread) 對網站性能有什麼不同的影響?

以程序為主體的動態網頁,在處理每一位用戶端的要求時,就要重新執行一次程式,結束後就關閉,因此當網站的使用者變多的時候,網站的速度就會變慢。

以執行緒(Thread)為主的動態網頁,因為當使用者連到該網站的伺服器(Server)時,程式已經開啟(常駐程式),每一個動作皆以執行緒來執行,因此網站的速度會大大的提升。

2.
以GoogleMap為例:
















http://maps.google.com.tw/?f=s&utm_campaign=zh_TW&
utm_source=zh_TW-ha-apac-TW-google-gm
&utm_medium=ha&utm_term=google%20maps

(1) ?
(2) =: (參數1) = (參數1內容) (把參數1資料內容給參數1)。
ex f = s, utm_campaign=zh_TW....。

(3) &: 用以區隔兩參數。
(4) +: value 的值中含有空字元,會以"+"取代。
(5) %: 中文及ASCII碼為128以上的字元,會被編成16進位的ASCII碼,前面再加上"%"。
(6) 參數名稱 ex: f, utm_source, utm_campaign.......。
(7) zh_TW: 繁體中文。

......等。

3.
POST 方法是將資料包裝在 HTTP 標頭內傳送給 Web server;而 GET 方法則是將資料直接加在 URI 之後。  
使用 GET method 所能傳遞的資料有限(連同 URI 共 255 字元),在需要上傳大量資料或檔案時,要使用 POST method。

所以 上傳一個mp3檔案 method 要用 "post"。

reference:PHP程式設計研習

4.Reading Assignments:XML (Page 187-188 on the Textbook)