Download - Chapter 2.2-Multimedia Storage Techniques
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
1/47
XML (Extensible Markup Language
XML is a markup language.
XML stands for eXtensible Markup Language.
The XML standard was created by W3C to provide an
easy to use and standardized way to store self-describing
data (self-describing data is data that describes both itscontent and its structure).
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
2/47
Communication Between Application
XML is nothing by itself. XML is more of a "common ground"
standard. The main benefit of XML is that you can use it to take datafrom a program like MSSQL (Microsoft SQL), convert it into XML,
then share that XML with a slough of other programs and platforms
What makes XML truly powerful is the international acceptance it
has received.
Many individuals and corporations have put forth their hard work
to make XML interfaces for databases, programming, office
application, mobile phones and more.
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
3/47
Applications of XML
* Cell Phones - XML data is sent to some cellphones. The data is then formatted by the specificationof the cell phone software designer to display text or
images, and even to play sounds!
* File Converters - Many applications have beenwritten to convert existing documents into the XMLstandard. An example is a PDF to XML converter.
* VoiceXML - Converts XML documents into an
audio format so that you can listen to an XMLdocument.
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
4/47
Internet Explorer 6.0 supports viewing XML files.
You can download IE 6.0 from Microsoft's Website. InternetExplorer 6.0 has special color coding the make XML documents
easier to read.
Firefox XML Viewer: Firefox has some of the same features as
Internet Explorer. You can download Mozilla's Firefox fromMozilla.com.
Free XML Editors:
There are many free XML editors available for download on the
internet. Here are a few we have found useful:* XML Cooktop
* XML Mind Standard Edition
* Pete's XML Editor
Free XML Viewer
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
5/47
XML Syntax:
XML Code:
RobertA+
LenardA-
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
6/47
XML code.
This line with special symbols and attributes is what isreferred to as the XML declaration. It simply stateswhat version of XML you are using and the type ofencoding you are using
XML Tag
The XML tag is very similar to that of the HTML tag.Each element is marked with an opening tag and a
closing tag.RobertA+
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
7/47
XML Elements
They contain the opening and closing tags, child
elements, and data.
Robert
A+
XML Attribute
An attribute appears within the opening tag of
an element.
Robert
A+
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
8/47
XML Attribute Quotation Usage
The types of quotes that you use around your
attribute values is entirely up to you. Both thesingle quote (') and the double quote (") are
perfectly fine to use in your XML documents.
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
9/47
XML Comment Syntax
Robert
A+
Lenard
A-
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
10/47
XML Commenting out XML
To temporarily remove some XML code from your XML document.
Robert
A+
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
11/47
XML PrologThe prolog is an optional component of the XML
document. If included, the prolog must be appearbefore the root element. A prolog consists of two parts:
the XML declaration and the Document TypeDeclaration (DTD). Depending on your needs, you can
choose to include both, either, or neither of these itemsin your XML document.
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
12/47
* !DOCTYPE - Tell the XML processor that this
piece of code defines the Document Type Definition* html - Specifies the root element of the XMLdocument. Here our example is an HTML file, which has
as the root element.
* PUBLIC - Specifies that this a publicly availableDTD.
* "-//W3C//D..." - The definition of the publicdocument. Describing this is beyond the scope of this
tutorial.* "http://www.w3.org/..." - The physical location of
the DTD. Notice how this DTD resides on w3's servers.
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
13/47
When an element appears within another element, it issaid that the inner element is "nested". The term nestedcan be related directly to the word "nest". If an element
is nested within another element, then it is surrounded,
protected, or encapsulated by the outer elementExample A
XML Nesting
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
14/47
Example B
All elements are closed in the order that they wereopened. Those elements which were opened first are
closed last.Example B is what example A must look like to be awell-formed XML document.
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
15/47
XML was designed to be a very robust markup language that could be used in many different
applications. However, with XML being able to communicate between so many different
platforms, there is one problem that tends to occur.
Welcome to my Health Resource
6ft
155 lbs
Two very different elements that want to use the same name: body. The solution to this problem is
to create XML Namespaces,
XML Namespaces
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
16/47
XML Documents: Valid Versus Well-Formed
In XML, there are three ways to measure a
document's validity: valid, well-formed, and broken.* One Root Element - The XML document mayonly have one root element. See our Root ElementLesson for more information.
* Proper Nesting - XML elements must be closedin the order they are opened. See our Nesting Lessonfor more information.
* Well-Formed Entities - Any entities that are
referenced in the document must also be well-formed.See our Entity Lesson for more information.
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
17/47
Broken XML Code:
Mr. GarciaHello there! How are we today?
Well-Formed XML Code:
Mr. Garcia
Hello there! How are we today?
The error in the first example was:The document suffers from improper
nesting. The body element was opened inside the to element, yet body was
not closed before the to element was closed!
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
18/47
XML Tree: The great benefit about XMLis that the document itself describes the
structure of data.
inventory is the root element.
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
19/47
XML - The Tree Structure
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
20/47
Structure of an XML Document
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
21/47
Tree Structure
.....
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
22/47
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
23/47
E tit R f
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
24/47
Entity References
If you place a character like "
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
25/47
XML(Table)
XP th Fi di I f ti
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
26/47
XPath - Finding Information
XPath is the solution to finding information in an XMLdocument. XPath uses expressions to find elements,attributes, and other information in your XML. If you
have an XML document that contained a bunch of yourfavorite books, each with author children elements, youcan use a one line XPath expression to find all theauthors of your favorite books!
The most common place people might see XPathexpressions are in XSLT (Extensible StylesheetLanguage Transformation).
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
27/47
Structure of an XML Document
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
28/47
Structure of an XML Document
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
29/47
Structure of an XML Document
f
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
30/47
Structure of an XML Document
S f XML D
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
31/47
Structure of an XML Document
S f XML D
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
32/47
Structure of an XML Document
St t f XML D t
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
33/47
Structure of an XML Document
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
34/47
XML is Used to Create New Internet Languages
A lot of new Internet languages are created with XML.
Here are some examples:
* XHTML the latest version of HTML
* WSDL for describing available web services
* WAP and WML as markup languages for handheld devices
* RSS languages for news feeds* RDF and OWL for describing resources and ontology
* SMIL for describing multimedia for the web
SMIL 2 0 XML for Web Multimedia
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
35/47
SMIL 2.0 XML for Web MultimediaSMIL stands for Synchronized MultimediaIntegration Language
SMIL is pronounced "smile"
SMIL is a language for describing audiovisual
presentations
SMIL is easy to learn and understand
SMIL is an HTML-like language
SMIL is written in XML
SMIL presentations can be written using a text-
editor
SMIL is a W3C standard
What Can SMIL Do?
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
36/47
What Can SMIL Do?
Although plug-ins and media players have the ability to
show many different types of media with varyingsupport for interaction, only SMIL offers the ability to
define the presentation in the form of text as a script.This feature could be called media composition.
Also, SMIL offers accessibility options and powerfulfeatures not present in other media players.
Implementing SMIL
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
37/47
Implementing SMILCommon SMIL implementations
* Internet or Intranet presentations.
* Slide show presentations.
* Presentations which link to other SMIL files.
* Presentations which have Control buttons (stop, start, next, ...)
* Defining sequences and duration of multimedia elements.
* Defining position and visibility of multimedia elements.
* Displaying multiple media types such as audio, video, text
* Displaying multiple files at the same time.
* Displaying files from multiple web servers.
Currently, SMIL's most widespread usage is with MMS. MMS (Multimedia
Messaging System) is a mobile device technology
Guidelines and Rules
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
38/47
SMIL documents look a lot like HTML. SMIL files need to be written according to
the following rules:
* SMIL documents must follow the XML rules of well-formedness.
* SMIL tags are case sensitive.
* All SMIL tags are written with lowercase letters.* SMIL documents must start with a tag and end with a closing
tag.
* SMIL documents must contain a tag for storing the contents of the
presentation.
* SMIL documents can have a element (like HTML) for storing
metadata information about the document itself, as well as presentation layout
information.
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
39/47
...
...
Image to our presentation
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
40/47
Copy and paste this URL
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
41/47
Copy and paste this URL,"http://html.tucows.com/designer/basictut/example1.s
mil" into your SMIL parser, i.e., RealPlayer,
QuickTime, for an example of the SMIL presentationcreated
Multiple Regions
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
42/47
p g
We placed the new region, "text", 200 pixels from the top and 50 pixels from the left so that
it's centered in our presentation.
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
43/47
Below is a table with the possible values we can give tothe fit attribute.
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
44/47
We want to make the tucows.gif image fit perfectly
within the region, so we would add fit="fill" to the textregion. Below is an example.
Time ControlY l t l h l t t i i f di t b di l f b
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
45/47
You can also control how long you want a certain piece of media to be display for by
using the "dur" attribute. This attribute takes a numerical value in seconds with the letter
"s" after the number. For example, lets say we want the cows to be displayed for 10
seconds and the rest of the images for only 5. We would add "dur="10s"" to the cow's img
tag and "dur="5s"" to the rest of the img tags. Below is what our code would look like.
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
46/47
This should display the TUCOWS text image, then the
HTML text image during a span of 10 seconds.
SMIL for phones
-
8/9/2019 Chapter 2.2-Multimedia Storage Techniques
47/47
MMS uses SMIL to define the layout of multimedia
content.SMIL was adopted because it was a well-defined,standard language to describe the layout and timing of
the content inside MMS messages.