|
First Words
Welcome to “First Words” – the VoiceXML
Review’s column to teach you about VoiceXML and how
you can use it. We hope you enjoy the lesson.
Metadata
Overview
By the time you read this, VoiceXML 2.0 will have been published
as a Proposed Recommendation by the W3C. Congratulations to
all those who have enabled this to happen!
First, we’ll cover a little history. VoiceXML 1.0 included
the <meta> tag, allowing the attachment of ‘meta’
information to a VoiceXML document. Metadata provides information
about the document itself, rather than the content of the
document.
The <meta> tag allowed the application developer to
associate information with the document itself, in the form
of a name-value pair. Some typical examples of use of the
<meta> tag included:
<meta name=”author” content=”Rob Marchand”/>
<meta name=”maintainer” content=rob@example.com/>
The former usage would specify (obviously) the author of
the document, and would likely not have any other purpose.
The latter usage specifies the maintainer of the document;
typically an e-mail address to which errors and warnings related
to processing of the document would be reported.
VoiceXML 1.0 further supported the ‘http-equiv’
form of <meta>, allowing the document author to provide
an HTTP header in the returned document. For example, to control
document expiration, one might use the following <meta>
tags (this example is drawn from the VoiceXML 2.0 specification):
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/vxml
http://www.w3.org/TR/voicexml20/vxml.xsd">
<meta http-equiv="Expires" content="0"/>
<meta http-equiv="Date" content="Thu, 12
Dec 2000 23:27:21 GMT"/>
<form>
<block>
<prompt>Hello</prompt>
</block>
</form>
</vxml>
|
In this example, the document itself specifically requests
that it not be cached. Note that only one of http-equiv or
name can be specified. Otherwise the interpreter platform
must throw an error.badfetch event.
VoiceXML 2.0 continues to support <meta> - however,
it is recommended that the document authors use the <metadata>
element in it’s place. The <metadata> element
allows authoring of a structured set of document metadata,
as defined by an XML schema. The <metadata> element
allows for much richer structured data to be attached to the
document.
The <meta> and <metadata> tags are valid as a
child of the top-level <vxml> document element.
It is recommended that the <metadata> element contain
information specified in the syntax defined by the Resource
Description Framework (RDF). The VoiceXML specification further
recommends that the actual information represented in RDF
reflect that required by the so-called “Dublin Core”
metadata initiative. Dublin Core defines a set of recommended
metadata that should be used in web documents.
The following Dublin Core metadata properties are recommended
in <metadata>:
·
Creator - An entity primarily responsible for making
the content of the resource (a company or individual)
· Rights - Information about rights
held in and over the resource (for example, a copyright
statement)
· Subject - The topic of the content
of the resource.
Here is an example from the VoiceXML 2.0 specification, showing
how <metadata> can be used to include RDF format document
metadata in a VoiceXML document:
|
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/vxml
http://www.w3.org/TR/voicexml20/vxml.xsd">
<metadata>
<rdf:RDF
xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs = "http://www.w3.org/TR/1999/PR-rdf-schema-19990303#"
xmlns:dc = "http://purl.org/metadata/dublin_core#">
<!-- Metadata about the VoiceXML document -->
<rdf:Description about="http://www.example.com/meta.vxml"
dc:Title="Directory Enquiry Service"
dc:Description="Directory Enquiry Service for London
in VoiceXML"
dc:Publisher="W3C"
dc:Language="en"
dc:Date="2002-02-12"
dc:Rights="Copyright 2002 John Smith"
dc:Format="application/voicexml+xml" >
<dc:Creator>
<rdf:Seq ID="CreatorsAlphabeticalBySurname">
<rdf:li>Jackie Crystal</rdf:li>
<rdf:li>William Lee</rdf:li>
</rdf:Seq>
</dc:Creator>
</rdf:Description>
</rdf:RDF>
</metadata>
<form>
<block>
<prompt>Hello</prompt>
</block>
</form>
</vxml>
|
Now, you might say to yourself that this is quite a mouthful.
However, it is anticipated that much of this information will
be generated automatically (by a tooling environment for example).
The benefit is the use of a standard mechanism for storing
metadata within an XML document, allowing more general metadata
tools to be used for indexing and document manipulation. Examination
of the information in the above example shows a great deal
of information regarding the document, and reflects the often-rich
structure of such information. RDF provides an extensible
framework for the representation of such information, and
further meets the W3C purpose of standards reuse as part of
specification development.
Summary
It is interesting to note that SRGS grammars, and SSML speech
markup can both contain <meta> and <metadata>
components, just as VoiceXML documents can. In fact, the <metadata>
mechanism is supported in other W3C languages, including HTML.
For further details regarding the use of <metadata>
you might want to have a look at:
- Resource Description Framework -
http://www.w3.org/TR/REC-rdf-syntax/
- Dublin Core Metadata Initiative -
http://purl.org/DC/
This
month, we’ve talked a little about the use of
metadata as part of your VoiceXML document. Next month,
we’ll look at some of the additional clarifications
and tweaks made as part of the migration of VoiceXML
2.0 to Proposed Recommendation.

back
to the top

Copyright
© 2001-2004 VoiceXML Forum. All rights reserved.
The VoiceXML Forum is a program of the
IEEE
Industry Standards and Technology Organization (IEEE-ISTO).
|