XML Examples Dublin Core/SVG Fall 2001 by D3548qku

VIEWS: 30 PAGES: 20

									    .opennet Technologies
  XML Examples: Dublin Core
          and SVG
    Fall Semester 2001 MW 5:00 pm - 6:20 pm CENTRAL (not Indiana) Time

      Geoffrey Fox and Bryan Carpenter
    PTLIU Laboratory for Community Grids
                                               Computer Science,
                                               Informatics, Physics
                                               Indiana University
                                               Bloomington IN 47404
                                               gcf@indiana.edu
8/31/2012                     xmlexamplesdcsvgfall01                     1
                    Where are we going?
• We have learnt how to specify XML Instances (files) and their
  class structure (DTD and Schema)
• We will go into more detail later but now we give two examples –
  SVG and Dublin Core – covering graphics and documents.
• Next we discuss how to interface XML with Java.



                    Servlet                                       XML File
                                        Java at
                                        Server
                    Or JSP                                        Database

 We do NOT discuss in detail Java on the client (GUI, applets) or Java for
 distributed computing (RMI) or “large scale” server applications based on Enterprise
 Javabeans

 8/31/2012                         xmlexamplesdcsvgfall01                               2
                               SVG I
• http://www.w3.org/Graphics/SVG/Overview.htm8
• http://www.w3.org/TR/2001/REC-SVG-20010904/ released
  September 4 2001
• Download viewer from http://www.adobe.com/svg/
• SVG is a language for describing two-dimensional graphics in
  XML
• SVG allows for three types of graphic objects: vector graphic
  shapes (e.g., paths consisting of straight lines and curves), images
  and text.
• Graphical objects can be grouped, styled, transformed and
  composited into previously rendered objects. The feature set
  includes nested transformations, clipping paths, alpha masks,
  filter effects and template objects.
 8/31/2012                   xmlexamplesdcsvgfall01                      3
                            SVG II
• SVG drawings can be interactive and dynamic. Animations can
  be defined and triggered either declaratively (i.e., by embedding
  SVG animation elements in SVG content) or via scripting.
• Sophisticated applications of SVG are possible by use of a
  supplemental scripting language which accesses SVG Document
  Object Model (DOM), which provides complete access to all
  elements, attributes and properties. We will do DOM later
• A rich set of event handlers such as onmouseover and onclick can
  be assigned to any SVG graphical object. Because of its
  compatibility and leveraging of other Web standards, features
  like scripting can be done on XHTML and SVG elements
  simultaneously within the same Web page.
• WMF (Windows Metafile) Photoshop, Illustrator, Flash,
  PowerPoint all can/should be expressible in SVG – universal 2D
  graphics
 8/31/2012                 xmlexamplesdcsvgfall01                     4
             Overview of Metadata
• An important application of XML is to specify Metadata
  – data about data
• Metadata can also be thought of as “overall properties”
  of an entity
• Example: Author is part of Metadata for Books or
  Computer Programs
• Example: Capacity of Football stadium could be key
  part of metadata for universities
• Later we will describe a general framework -- RDF
  (Resource Description Framework) for making
  assertions about metadata
• Here we describe a particular example – DC (Dublin
  Core) of metadata about bibliographic material – books,
  web pages etc.
 8/31/2012             xmlexamplesdcsvgfall01           5
    References on Dublin Core and RDF
• There are two W3C documents about RDF which are quite hard
  to read
• RDF Model and Syntax: http://www.w3.org/TR/REC-rdf-syntax/
   – Defines basic ideas for any metadata vocabulary
• RDF Schema http://www.w3.org/TR/2000/CR-rdf-schema-
  20000327/
   – Describes general structure of a metadata vocabulary
• We may do RDF later – we give a very brief example here
• The Dublin Core is defined at http://dublincore.org/ and defines
  two important Schema
   – DC Element Set
   – DC Qualifers
• Here we will discuss both

 8/31/2012                 xmlexamplesdcsvgfall01                    6
    An Example of RDF and Dublin Core
• <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/metadata/dublin_core#">
• <rdf:Description about="http://www.dlib.org">
• <dc:Title>D-Lib Program - Research in Digital Libraries</dc:Title>
  <dc:Description>The D-Lib program supports the community of people with
  research interests in digital libraries and electronic publishing.
  </dc:Description>
  <dc:Publisher>Corporation For National Research Initiatives</dc:Publisher>
  <dc:Date>1995-01-07</dc:Date>
• <dc:Subject>
   – <rdf:Bag> <rdf:li>Research; statistical methods</rdf:li>
      <rdf:li>Education, research, related topics</rdf:li>
      <rdf:li>Library use Studies</rdf:li> </rdf:Bag>
• </dc:Subject> <dc:Type>World Wide Web Home Page</dc:Type>
• <dc:Format>text/html</dc:Format>
• <dc:Language>en</dc:Language>
• </rdf:Description> </rdf:RDF>
 8/31/2012                     xmlexamplesdcsvgfall01                      7
                  RDF Basic Concepts
• Resource: Any identifiable object – must have a URI of style
  begin://rootlabel/nextlabel/…./lastlabel
   – This URI could be a Web address but anything of “approved
     format” is allowed – each person could start their own
     personal://Country/SSNorEquivalent/Classify/How/you/want/item
   – URI syntax is http://www.isi.edu/in-notes/rfc2396.txt
• Property: A special resource of “type” property
• Object: Either a resource or a literal – a literal is something like a
  text or even XML string.
• Example: take a case with a particular Property --Name. This
  Name could have a URI coming from Dublin Core Schema URI
  and Name’s definition therein. So Name is indeed a Resource
• Then the object could either be literal “Geoffrey Fox” or resource
  given by my home page http://www.new-
  npac.org/users/fox/homepage/
• Resources have properties defined as Objects
 8/31/2012                   xmlexamplesdcsvgfall01                    8
              Comments on Example
• We define the RDF and DC (Dublin Core) Namespaces
• We define resource http://www.dlib.org with <rdf:Description
  about=“. We want to add DC metadata describing this web page
• We see Dublin Core metadata Title, Description, Publisher, Date,
  Subject, Type, format, Language
• We see use of RDF Bag syntax to specify 3 separate “subject”
  values
• Note that RDF provides the overall framework with the
  description tag mapping a resource (http://www.dlib.org) to a set
  of properties
• The properties are defined in a completely different namespace –
  the Dublin Core
• RDF provides useful expressivity with a “collection” syntax of
  which bag (unordered collection) is one example


 8/31/2012                 xmlexamplesdcsvgfall01                     9
                   Dublin Core Elements I
• Title: A name given to the resource.
   – Typically, a Title will be a name by which the resource is formally known.
• Creator: An entity primarily responsible for making the content of the
  resource.
   – Examples of a Creator include a person, an organization, or a service.
   – Typically, the name of a Creator should be used to indicate the entity.
• Subject: The topic of the content of the resource.
   – Typically, a Subject will be expressed as keywords, key phrases or classification
      codes that describe a topic of the resource.
   – Recommended best practice is to select a value from a controlled vocabulary or
      formal classification scheme.
• Description: An account of the content of the resource.
   – Description may include but is not limited to: an abstract, table of contents,
      reference to a graphical representation of content or a free-text account of the
      content.
• Publisher: An entity responsible for making the resource available
   – Examples of a Publisher include a person, an organization, or a service.
   – Typically, the name of a Publisher should be used to indicate the entity.
  8/31/2012                        xmlexamplesdcsvgfall01                           10
                  Dublin Core Elements II
• Contributor: An entity responsible for making contributions to the content of
  the resource.
   – Examples of a Contributor include a person, an organization, or a service.
   – Typically, the name of a Contributor should be used to indicate the entity.
• Date: A date associated with an event in the life cycle of the resource.
   – Typically, Date will be associated with the creation or availability of the
      resource. Recommended best practice for encoding the date value is defined in a
      profile of ISO 8601 and follows the YYYY-MM-DD format.
• Format: The physical or digital manifestation of the resource.
   – Typically, Format may include the media-type or dimensions of the resource.
   – Format may be used to determine the software, hardware or other equipment
      needed to display or operate the resource.
   – Examples of dimensions include size and duration.
   – Recommended best practice is to select a value from a controlled vocabulary
      (for example, the list of Internet Media Types MIME defining computer media
      formats).

  8/31/2012                       xmlexamplesdcsvgfall01                           11
                Dublin Core Elements III
• Type: The nature or genre of the content of the resource.
   – Type includes terms describing general categories, functions, genres, or
     aggregation levels for content.
   – Recommended best practice is to select a value from a controlled
     vocabulary (for example, the working draft list of Dublin Core Types
     given later).
   – To describe the physical or digital manifestation of the resource, use the
     FORMAT element.
• Identifier: An unambiguous reference to the resource within a given
  context.
   – Recommended best practice is to identify the resource by means of a
     string or number conforming to a formal identification system.
   – Example formal identification systems include the Uniform Resource
     Identifier (URI) (including the Uniform Resource Locator (URL)), the
     Digital Object Identifier (DOI) and the International Standard Book
     Number (ISBN).
  8/31/2012                     xmlexamplesdcsvgfall01                        12
                 Dublin Core Elements IV
• Source: A Reference to a resource from which the present resource is
  derived.
   – The present resource may be derived from the Source resource in whole
      or in part.
   – Recommended best practice is to reference the resource by means of a
      string or number conforming to a formal identification system.
• Language: A language of the intellectual content of the resource.
   – Recommended best practice for the values of the Language element is defined
      by RFC 1766, which includes a two-letter Language Code (taken from the ISO
      639 standard), followed optionally, by a two-letter Country Code (taken from
      the ISO 3166 standard).
   – For example, 'en' for English, 'fr' for French, or 'en-uk' for English used in the
      United Kingdom.
• Relation: A reference to a related resource.
   – Recommended best practice is to reference the resource by means of a string or
      number conforming to a formal identification system.

  8/31/2012                        xmlexamplesdcsvgfall01                            13
               Dublin Core Elements V
• Coverage: The extent or scope of the content of the resource.
   – Coverage will typically include spatial location (a place name or
     geographic coordinates), temporal period (a period label, date, or
     date range) or jurisdiction (such as a named administrative entity).
   – Recommended best practice is to select a value from a controlled
     vocabulary (for example, the Thesaurus of Geographic Names)
     and that, where appropriate, named places or time periods be
     used in preference to numeric identifiers such as sets of
     coordinates or date ranges.
• Rights: Information about rights held in and over the resource.
   – Typically, a Rights element will contain a rights management
     statement for the resource, or reference a service providing such
     information.
   – Rights information often encompasses Intellectual Property
     Rights (IPR), Copyright, and various Property Rights.
   – If the Rights element is absent, no assumptions can be made
     about the status of these and other rights with respect to the
     resource.
 8/31/2012                    xmlexamplesdcsvgfall01                   14
                   Dublin Core attributes
• Version (1.1) - The version of the data element
• Registration Authority (Dublin Core Metadata Initiative) - The entity
  authorised to register the data element
• Language (en) - The language in which the data element is specified
• Obligation (Optional) - Indicates if the data element is required to always or
  sometimes be present (contain a value)
• Datatype (Character String) - Indicates the type of data that can be
  represented in the value of the data element
• Maximum Occurrence (Unrestricted) - Indicates any limit to the repeatability
  of the data element
• The above 6 are same (value in green) for all elements. The next 4 are different
  and derived from information I just gave
• Name - The label assigned to the data element
• Identifier - The unique identifier assigned to the data element
• Definition - A statement that clearly represents the concept and essential nature
  of the data element
• Comment - A remark concerning the application of the data element
  8/31/2012                      xmlexamplesdcsvgfall01                          15
•
          Dublin Core Type Vocabulary I
   These are vocabulary for dc:type
• Collection: A collection is an aggregation of items.
    – The term collection means that the resource is described as a group; its parts
       may be separately described and navigated.
• Dataset: A dataset is information encoded in a defined structure (for example,
  lists, tables, and databases), intended to be useful for direct machine
  processing.
• Event: An event is a non-persistent, time-based occurrence.
    – Metadata for an event provides descriptive information that is the basis for
       discovery of the purpose, location, duration, responsible agents, and links to
       related events and resources.
    – The resource of type event may not be retrievable if the described instantiation
       has expired or is yet to occur. Examples - exhibition, web-cast, conference,
       workshop, open-day, performance, battle, trial, wedding, tea-party,
       conflagration.
• Image: An image is a primarily symbolic visual representation other than text.
    – For example - images and photographs of physical objects, paintings, prints,
       drawings, other images and graphics, animations and moving pictures, film,
       diagrams, maps, musical notation.
    – Note that image may include both electronic and physical representations.
  8/31/2012                        xmlexamplesdcsvgfall01                            16
              Dublin Core Type Vocabulary II
• Interactive Resource: An interactive resource is a resource which requires
  interaction from the user to be understood, executed, or experienced.
   – For example - forms on web pages, applets, multimedia learning objects, chat
      services, virtual reality.
• Service: A service is a system that provides one or more functions of value to
  the end-user.
   – Examples include: a photocopying service, a banking service, an authentication
      service, interlibrary loans, a Z39.50 or Web server.
• Software: Software is a computer program in source or compiled form which
  may be available for installation non-transiently on another machine.
   – For software which exists only to create an interactive environment, use
      interactive instead.
• Sound: A sound is a resource whose content is primarily intended to be
  rendered as audio.
   – For example - a music playback file format, an audio compact disc, and recorded
      speech or sounds.
• Text: A text is a resource whose content is primarily words for reading. For
  example - books, letters, dissertations, poems, newspapers, articles, archives of
  mailing lists. Note that facsimiles or images of texts are still of the genre text.
  8/31/2012                       xmlexamplesdcsvgfall01                           17
              Dublin Core Qualifiers I
• This is dcq namelist we saw earlier in our example using
  <dcq:RelationType
   – xmlns:dcq="http://purl.org/metadata/dublin_core_qualifiers#"
• The dcq schema specifies refinements of Dublin Core Elements
• The dcq document also specifies several possible control
  vocabularies to be used with each element.
• Each dcq element has 5 possible attributes:
• Name: The unique token assigned to the qualifier.
• Label: The human-readable label assigned to the qualifier.
• Definition: A statement that represents the concept and essential
  nature of the qualifier.
• Comment: Additional information associated with the qualifier (if
  available).
• See Also: A link to more information about the qualifier (if
  available).
 8/31/2012                 xmlexamplesdcsvgfall01                18
             Dublin Core Qualifiers II
• dc:Title has possible refinement dcq:Alternative
• dc:Description has refinements dcq:TableOfContents and
  dcq:Abstract
• dc:Date has refinements dcq:Created, dcq:Valid,
  dcq:Available, dcq:Issued, and dcq:Modified
• dc:Format has refinements dcq:Extent and dcq:Medium
• dc:Relation has refinements Is Version Of dcq:HasVersion,
  dcq:IsReplacedBy, dcq:Replaces, dcq:IsRequiredBy,
  dcq:Requires, dcq:IsPartOf, dcq:HasPart,
  dcq:IsReferencedBy, dcq:References, dcq:IsFormatOf and
  dcq:HasFormat
• dc:Coverage has refinements dcq:Spatial and dcq:Temporal

 8/31/2012              xmlexamplesdcsvgfall01            19
                          Homework 3
• Read Chapter 5 of Inside XML
   – Note Chapter 19 (VML is an early variant of SVG)
   – Chapter 18 has RDF but we have not discussed this and page 869
     is Dublin Core
• Download SVG viewer from Adobe http://www.adobe.com/svg/
• Explore http://www.svgspider.com/
• Come back to the library problem in problem set 1.
   – Revisit this problem – using either an “artificial” library or one you
     are familiar with
   – Produce a Schema for a library (not DTD) which incorporates the
     Dublin Core (but not RDF) in your design
   – Give two examples
   – Explain how you extend Dublin Core for additional features
     needed in a library

 8/31/2012                    xmlexamplesdcsvgfall01                     20

								
To top