1 CEAL Preconference Worksho p: XML Wooseob Jeong Assistant Professor School of Information Studies University of Wisconsin – Milwaukee March 2, 2004 San Diego, CA Sponsored by School of Information Studies, University of Wisc onsin – Milwaukee University of California – San Diego Library
30
Embed
1 CEAL Preconference Workshop: XML Wooseob Jeong Assistant Professor School of Information Studies University of Wisconsin – Milwaukee March 2, 2004 San.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1
CEAL Preconference Workshop: XML
Wooseob JeongAssistant Professor
School of Information StudiesUniversity of Wisconsin – Milwaukee
March 2, 2004 San Diego, CA
Sponsored by School of Information Studies, University of Wisconsin – Milwaukee
University of California – San Diego Library
2
Why XML?
Simply because it’s already everywhere. MS Office XHTML - WYSIWYG PDF RDF - Dublin Core, RSS MARC in XML E-books
3
What is XML?
Extensible Markup Language XML is a concept, not an application.
Meta Language Linguistics for individual languages XHTML is an application of XML.
Brief history of XML SGML – HTML Not enough … why?
4
Learning XML
No technical experience needed. Even no HTML experience is welcome. HTML vs. XHTML (different families) Again, XML is a concept.
Good starts on XML http://www.infomotions.com
/musings/getting-started/
5
XML is simple but very strict. You can make your own mark up set as you like wi
th minimal requirement. Every tag should be paired. Tags should be in a hierarchy.
However, once you establish the set, you have to follow it. It’s the law! No exception. Otherwise, your document won’t be displayed at all. “Well-formedness” – minimum requirement DTD (Document Type Definition)
6
Philosophy of XML Separation of presentation information from its co
ntent. No decorating information allowed in contents. Presentation should be rendered by methods outside th
e document, currently either CSS or XSLT CSS has been used in HTML as well as in XML.
Ex) http://www.uwm.edu/~dhedberg/MENU.xml XSLT is more powerful.
Ex) http://web.utk.edu/~rgilmou1/xml4lita/ More Examples
7
Markup information Presentational Markup: Describe Appearance
<blockquote>1234 N. Oakland Ave.Milwaukee, WI 53201</blockquote>
Semantic Markup: Indicates Meaning<address><street>1234 N. Oakland Ave.</street><city>Milwaukee</city><state>WI</state><zip>53201</zip></address>
8
Your First XML Document
Using NotePad, please follow the instruction at http://supervoca.com/xml/first.htm
The result should look like http://supervoca.com/xml/first.xml
9
Restaurant Menu Exercise
Well-formedness CSS (Cascading Style Sheet)
Simple but not flexible XSLT (Extensible Stylesheet Language Tran
sformations) It is an xml document itself. Complex but really powerful
Online Exercises
10
Menu CSS Exercise
Use NotePad and type yourself, please! Watch out “save as” option. Modify “menu.xml” with your favorite foods,
adding CSS info. Modify “menu.css” with your prefences. Comprehensive CSS reference
http://www.w3schools.com/css/default.asp
11
Menu XSLT Exercise Modify “menu2.xml” by adding XSLT info. Modify “menu2.xsl” with your preference. It is like a limited programming language.
Selective displays with the same data. Examples
You may use HTML tags freely, but every attribute’s value should be quoted.
Watch out typos!
12
Unicode in XML Unicode is the default character set in XML. What’s Unicode?
http://unicode.org/ Why is it so important? Where is ASCII? Multilingual vs. Multiscript
WordPad or MS Word should be used for Unicode documents. Save as “Unicode Text”