Workshop on XMLBased Library Applications 4 XML Standards

Workshop on XML-Based Library Applications 4. XML Standards and Tools Hong Kong University of Science & Technology Library updated 2003. 11. 21 10: 02

Outline XML and Related Standards n XSLT n OAI-PMH n ZING n XML Tools and Software n XML Database Systems n Hong Kong University of Science & Technology Library

XML and Related Standards (1) Categories of XML and Related Standards: n Family of standards that facilitate the use of XML documents e. g. DOM, XPath, XSLT, XML Schema, XML Query, XPointer, XLink, XML Encryption, XML Signature, etc. n Protocols that allow interchange of data and messages in XML format. e. g. SOAP, OAI-PMH, ZING’s SRW, etc. Hong Kong University of Science & Technology Library

XML and Related Standards (2) n Standards that specify data and metadata in XML format e. g. EAD, RDF, MARC XML, METS, EAC XML, TEI, Math. ML, News. ML, etc. Hong Kong University of Science & Technology Library

XSLT, OAI and ZING n XSLT (for Transformation) XSL (e. Xtensible Stylesheet Language) Transformation n OAI-PMH (for Harvesting) Open Archives Initiative Protocol for Metadata Harvesting n ZING (for Searching) Z 39. 50 International : Next Generation Hong Kong University of Science & Technology Library

What is XSLT? XSL (e. Xtensible Stylesheet Language) Transformation. n Developed by W 3 C for transforming XML documents into other XML documents, using one or more XSLT stylesheets. n XSLT stylesheet is itself an XML document. n It instructs an XSLT Processor on how to transform the XML document. n Hong Kong University of Science & Technology Library

XSLT Example (1) Given an XML document: <? xml version="1. 0" encoding="UTF-8"? > <name> <surname>Smith</surname> <firstname>John</firstname> </name> Hong Kong University of Science & Technology Library

XSLT Example (2) And you want to transform it to the following XML document: <? xml version="1. 0" encoding="UTF-8"? > <person>John Smith</person> Hong Kong University of Science & Technology Library

XSLT Example (3) Fragment of an XSLT Stylesheet showing how this transformation can be achieved: <xsl: template match="/"> <person> <xsl: value-of select="//firstname"/> <xsl: text> </xsl: text> <xsl: value-of select="//surname"/> </person> </xsl: template> Hong Kong University of Science & Technology Library

XPath To address parts of an XML document n Used heavily in XSLT n Example (assume you have a book marked up as an XML document): n //chapter /book/chapter/section[title = 'Conclusion'] following-sibling: : chapter[position()=1] count(//figure) Hong Kong University of Science & Technology Library

XSLT and Web (1) Use XSLT to transform an XML document to HTML (Web page). n Unlike HTML documents, which mix content and page layout in the same document, with XML and XSLT, you can separate content from layout (presentation). Different views of the same content can be presented through the Web via XSLT transformation. n Hong Kong University of Science & Technology Library

XSLT and Web (2) n By applying different XSLT stylesheets to the same <name> XML file, completely different output can be generated: Most Wanted Person n My Dearest Father n Hong Kong University of Science & Technology Library

Client/Server Side XSLT n Client-side Transformation Perform the transformation on the client, e. g. via the web browser, or through client-side scripts. n Platform dependent. n n Server-side Transformation Perform the transformation on the server and transmit the resulting document to the client. n No need to predict a heterogeneous client platform. n Hong Kong University of Science & Technology Library

XSLT Processor Software program to perform transformation based on an XSLT stylesheet. n Many such programs are available for free download from the Internet. See: n http: //xml. coverpages. org/xsl. Software. html n HKUST Library uses Xsltproc of Libxslt (http: //xmlsoft. org/XSLT/) Hong Kong University of Science & Technology Library

OAI-PMH Open Archives Initiative Protocol for Metadata Harvesting n An interoperability standard for exposing and harvesting XML-formatted metadata. n http: //www. openarchives. org/ n Why OAI? n n Once OAI-enabled, metadata can be readily harvested Hong Kong University of Science & Technology Library

OAI Data and Service Providers (1) n Data Provider exposes metadata about its content n e. g. HKUST’s Institutional Repository, XML Name Access Control Repository, DOAJ, etc. n n Service Provider harvest metadata from data provider n e. g. OAIster – collects (harvests) freely available, difficult-to-access, academically-oriented digital resources. n Hong Kong University of Science & Technology Library

OAI Data and Service Providers (2) Service Provider XML-Formatted Metadata Data Provider OAI Framework Hong Kong University of Science & Technology Library

OAI Data and Service Providers (3) Data Provider (e. g. HKUST Institutional Repository) (e. g. HKU Theses Online) Data Provider (e. g. LC American Memory) XML-Formatted Metadata Service Provider (e. g. OAIster) OAI Framework Hong Kong University of Science & Technology Library

OAI-PMH Protocol Requests n The five OAI-PMH Protocol Request Commands: Identify n List. Metadata. Formats n List. Identifiers n Get. Record n List. Records n e. g. http: //repository. ust. hk/oai/? verb=Identify Hong Kong University of Science & Technology Library

OAI-PMH Demonstrations n HKUST’s Institutional Repository n n Identify, List. Metadata. Formats, List. Sets, List. Records, List. Identifiers, Get. Record XML Name Access Control Repository n Identify, List. Metadata. Formats, List. Sets, List. Records, List. Identifiers, Get. Record. MARC 21 A, Get. Record-MARC 21 B, Get. Record. EACXML. Hong Kong University of Science & Technology Library

ZING Z 39. 50 International: Next Generation n Covers a collection of initiatives by Z 39. 50 implementers. n http: //www. loc. gov/z 3950/agency/zing n Hong Kong University of Science & Technology Library

Why ZING? ZING is an effort to re-deploy Z 39. 50 in the modern computing environment using Weband XML-based technologies. n It retains the intellectual contents of Z 39. 50 and experience gained in the past 20 years of Z 39. 50 implementations. n � 胎換骨 n Hong Kong University of Science & Technology Library

What is Z 39. 50? Information retrieval protocol and service (NISO Z 39. 50 -1995 and ISO 23950) n Allows searching of heterogeneous databases by a common search client n Very popular in the library world and has a 2 decade history of implementation n But very little usage outside of the library world n Hong Kong University of Science & Technology Library

Problems of Z 39. 50 Uses uncommon syntaxes and protocols (OSIbased); incompatible with the modern Weband XML-based environment n High learning curve for implementers n High implementation cost n Not attractive to non-library applications n Bath Profile (http: //www. nlc-bnc. ca/bath/bp-current. htm) Hong Kong University of Science & Technology Library

ZING’s SRW - Search and Retrieval for the Web n Retain core functionality of Z 39. 50 in the form of a SOAP-based Web service n Major concepts in Z 39. 50 are retained n Communication mechanisms n by SOAP messages n by URL (also known as SRU – Search and Retrieval by URL) n n Search query by: CQL (Common Query Language) Hong Kong University of Science & Technology Library

SRW and SOAP SRW SOAP Request: SRW SOAP Response: <SOAP: Envelope> <SOAP: Body> <SRW: search. Retrieve. Request …> <SOAP: Envelope> <SOAP: Body> <SRW: search. Retrieve. Response …> Give me all titles by John Smith No problem, here you are… </SRW: search. Retrieve. Request> </SOAP: Body> </SOAP: Envelope> </SRW: search. Retrieve. Response> </SOAP: Body> </SOAP: Envelope> Request Client Web (HTTP) Server Response Hong Kong University of Science & Technology Library

SRU Demonstration n Search the XML Name Access Control Repository by SRU. n The following URL searches the Repository for exact name 'Ding Yi' : http: //lbxml. ust. hk/nac/srw. pl? query=bath. nam e+exact+ding+yi Hong Kong University of Science & Technology Library

XML Tools and Databases n n n Free XML Tools and Software http: //www. garshol. priv. no/download/xmltools/ XML and Databases by Ronald Bourret http: //www. rpbourret. com/xml/XMLAnd. Databases. ht m XML Databases Products http: //www. rpbourret. com/xml/XMLDatabase. Prods. ht m Hong Kong University of Science & Technology Library

XML Database Systems n Native XML Database Systems Designed to store XML documents n Fundamental unit of storage is XML document n Examples: Tamino, Berkeley DB XML n n XML-Enabled Database Systems Any database system that has a gateway to accept XML data, conduct XML-based query, and output XML formatted data. n Examples: Oracle, Microsoft SQL Server n Hong Kong University of Science & Technology Library

Native or not Native? n Native XML Databases are most suitable for applications that have: document-oriented data (e. g. full text of a book) n loosely-structured data with deep nesting (hierarchical) (e. g. bibliographic data) n data already in XML format (e. g. SOAP messages) Highly structured data fits best with Relational Database Systems (e. g. order record) n Hong Kong University of Science & Technology Library

Database System Evaluation (1) HKUST Library conducted an evaluation of Native XML Database Systems in March 2001, with an objective to build an XML document storage and retrieval infrastructure for the Library. n Tamino from Software AG was selected n Most mature and complete at that time n Supports a rich set of programming languages n Query by URL n Hong Kong University of Science & Technology Library

Database System Evaluation (2) Software AG is an active participant in XML standards n Unicode-based, and support major character encodings n Hong Kong University of Science & Technology Library
- Slides: 32