Download presentation
Presentation is loading. Please wait.
Published bySophie Pitts Modified over 9 years ago
1
1 Web-Based XML File Repository CS360 Project #3 2002. 5. 21 Dongjoon Hyun
2
2 Contents Web-Based XML File Repository –Functions XML –XML –DTD –XSL CGI / HTML Seeing is believing. http://eve.kaist.ac.kr/~cs360/
3
3 Web-Based XML File Repository Web-Based –Browser XML File Repository –HTTP Server –Manage User File Directory (XML, XSL, …) XML File XSL File
4
4 Web-Based XML File Repository Functions Create Empty File Remove File View File Name List View File Content Edit/Save File Content Upload File
5
5 XML(eXtensible Markup Language) A Language –designed to describe content, rather than presentation –consists of elements element = start tag + content + end tag start tag may have attributes Alan 42 agb@abc.com End Tag Start Tag trompette six trous 420.12 Attribute
6
6 DTD(Document Type Definition) Describe the structure of XML <!DOCTYPE db [ ]> Root element Any number of person element - e+: one or more - e?: zero or one - e|e’: alternation - e,e’: concatenation Person’s subelements Name,age,email (ordered!!) Character data db.dtd
7
7 sample.xml Alan 42 agb@abc.com Alan2 43 agc@abc.com
8
8 XSL(XML Stylesheet Language) XSL –a stylesheet language designed to be used with XML data and documents –transform XML into another Format XSL is a set of template rules How does XSL work? * Output : raw text (Mainly, HTML..)
9
조교 강의. 저녁 8 시, 오후 3 시. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> 메모 memo.xml memo.xsl 메모 조교 강의. 저녁 8 시, 오후 3 시.
10
10 CGI (Common Gateway Interface) A standard for running external programs from a World-Wide Web HTTP server. –specifies how to pass arguments to the executing program as part of the HTTP request. –defines a set of environment variables. Commonly, the program will generate some HTML which will be passed back to the. Web Browser HTTP Server Static File? Executable File? (.cgi ) Execute Program Execution Result Request
11
11 CGI Program Call Program Call –http://eve.kaist.ac.kr/~cs360/project3.cgi Arguments Passing –http://eve.kaist.ac.kr/~cs360/project3.cgi?help => project3.cgi help –http://eve.kaist.ac.kr/~cs360/project3.cgi?list => project3.cgi list –http://eve.kaist.ac.kr/~cs360/project3.cgi?create+test.xml => project3.cgi create test.xml
12
12 CGI Program Example … cout<< "Content-Type: text/html\n\n" \n" Sample CGI v1.0 Commands \n" list print filename list \n" create create file \n" remove remove file \n" edit display editable form of file contents \n" save save the modified file contents \n" upload upload file \n" \n" << endl; …
13
13 HTML ‘Form’ Tag <INPUT type=“text” maxlength=“20” name=input1 size=“20”> http://organ/~hyundong/test.pl?input1=test1&input2=t2 char str[100]; char* strPtr; strPtr = getenv("QUERY_STRING"); strcpy(str, strPtr); printf(“ %s ", str);
14
14 Reference http://www.w3.org/TR/REC-xml http://www.w3.org/TR/XSL http://www.w3.org/TR/XSLT
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.