Library Web Site Applications
Using XML
Karen A. Coombs, SUNY Cortland
View this presentation at:
http://www.librarywebchic.net/presentations/internetlibrarian2004
Agenda
- Introduction to XML
- Why use XML On My Library's Web Site
- Using XML Your Library has Created
- Using Static XML from an External Source
- Using Dynamic XML from an External Source
- Integrating XML and Database-driven web pages
- Lessons Learned
- Further Resources
Introduction to XML
- What is XML
- `metalanguage' —a language for describing other languages
- lets you design your own customized markup languages for limitless different types of documents
- used to store any kind of structured information
- used to enclose or encapsulate information in order to pass it between different computing systems
- What do I need to start using XML on my library website
- XML file
- XSL file to transform XML (typically into HTML)
- XML parser
- MSXML
- Cocoon
- Sablotron
- Server-side scripting language
- PHP
- Perl
- ASP
Why Use XML on Your Library's Web Site
- You want to display content on your web site that you cannot access via database-driven web pages
- You want to display content on your web site that is dynamic and updated
by another institution
- RSS
- XML Servers
- You want to share your content with other people or let them incorporate
into their site
- Weblog and RSS feed
Using XML Your Library has Created
- Creating an XML file
- by hand
- use a program
- Save As XML
- build a web application to create XML file
- Displaying the XML you created
- create an XSL file to display the contents of the XML file
- Use server-side scripting to send XML and XSL files to XML parser
- An XML-based Blogging Tool
- Uses ASP and the DOM to create and update XML
- creates both an XML archive and an RSS feed
- RSS file is displayed several places on the library web page
- Demo
- Uses ASP and the DOM to create and update XML
Using Static XML from an External Source
- Reports from other source
- come in a variety of formats
- CSV
- Excel
- has to be imported into a database to be used with database-driven web pages
- come in a variety of formats
- Using an XML report to drive the pages can simplify the process
- it doesn't have to be imported in a database
- Save XML file on server
- Create an XSL file to transform the XML file into a format for display
- Use a server-side scripting language to send the XML and XSL file to the XML parser
- XML-based list of Periodical Holdings
- XML from Serial Solutions
- several stylesheets for searching and displaying XML
- ASP to combine XML with desired XSL file
- Demo
Using Dynamic XML from an External Source
- XML is available from many different sources on the web
- RSS
- XML servers
- Create an XSL to transform the XML file
- Retrieve XML from the remote server
- Send XML from remote server and XSL file to XML parser
- RSS feed of items checked out to a user
- Components of code
- ASP
- XML
- XSL
- What happens
- Authenticate User
- Retrieve XML of checked out items from our web catalog
- Formats XML as valid RSS 2.0 using XSL
- Demo
- Components of code
Integrating XML and Database-driven web pages
- Course and Research Guides
- Content Management System
- Part of the Library Intranet
- How it works
- Retrieve information via XML from and external source
- Display information as part of web based form
- Add information to database via database-driven form
- Demo
Lessons Learned
- Decide where you are going to get your XML from
- Create your own
- Static External Source - export from a database
- Dynamic External Source - XML Server
- Decide what platform you want to create your pages in
- ASP
- PHP
- Perl
- Not all parsers are created equal
- MSXML parser is very particular about the XML files it receives
- Start with a small project
- XML projects involving just simple display are a good place to start
- Control your own XML when possible
- vendors still make mistakes in creating valid XML
Further Resources
ALEPH Architecture Document from ExLibris Web Site - http://www.exlibrisgroup.com/aleph_architecture.htm Accessed 11/10/2004
Baartse, Mark. Professional ASP XML. Birmingham, UK: Wrox Press, 2000.
Extensible Markup Language (XML) - http://www.w3.org/XML/ Accessed: 10/30/2003
Feed Validator: RSS 2.0 Specification - http://feedvalidator.org/docs/rss2.html Accessed 11/10/2004
Kay, Michael. XSLT Programmer’s Reference. 2nd ed. Birmingham, UK: Wrox Press, 2001.
Martin, Didier et al. Professional XML. 2nd ed. Birmingham, UK: Wrox Press, 2001.
MSXML - http://www.perfectxml.com/msxml.asp Accessed: 10/30/2003
The Extensible Stylesheet Language Family (XSL)- http://www.w3.org/Style/XSL/ Accessed: 10/30/2003
XML DOM Tutorial - http://www.w3schools.com/dom/default.asp
Accessed: 11/10/2004