previous next contents properties index

# 21 Metadata

### Contents

## 21.1 Introduction

Metadata is information about a document.

RDF is the appropriate language for metadata. The specifications for RDF can be found at:

- Resource Description Framework Model and Syntax Specification
- Resource Description Framework (RDF) Schema Specification

It is recommended that metadata within an SVG document fragment be expressed in an appropriate RDF namespaces and placed within the 'metadata' child element to the document's 'svg' root element. (See Example below.)

Here are some suggestions for content creators regarding metadata:

- It is recommended that content creators refer to W3C Metadata Recommendations and activities when deciding which metadata schema to use in their documents.
- It is recommended that content creators refer to the Dublin Core, which is a set of generally applicable core metadata properties (e.g., Title, Creator/Author, Subject, Description, etc.).
- Additionally, SVG Metadata Schema (below) contains a set of additional metadata properties that are common across most uses of vector graphics.

Individual industries or individual content creators are free to define their own metadata schema, but everyone is encouraged to follow existing metadata standards and use standard metadata schema wherever possible to promote interchange and interoperability. If a particular standard metadata schema does not meet your needs, then it is usually better to define an additional metadata schema in RDF which is used in combination with the given standard metadata schema than to totally avoid the standard schema.

## 21.2 An example

Here is an example of how metadata can be included in an SVG document. The example uses the Dublin Core version 1.1 schema and the SVG metadata schema:

    <?xml version="1.0" standalone="yes"?>
    <svg width="4in" height="3in"
        xmlns = 'http://www.w3.org/2000/svg-20000303-stylable'>
        <desc xmlns:myfoo="http://bar.org/myfoo">
          <myfoo:title>This is a financial report</myfoo:title>
          <myfoo:descr>The global description uses markup from the
            <myfoo:emph>myfoo</myfoo:emph> namespace.</myfoo:descr>
          <myfoo:scene><myfoo:what>widget $growth</myfoo:what>
          <myfoo:contains>$three $graph-bar</myfoo:contains>
            <myfoo:when>1998 $through 2000</myfoo:when> </myfoo:scene>
       </desc>
        <metadata>
          <rdf:RDF
                   xmlns:rdf = "http://www.w3.org/...-rdf-syntax-ns"
                   xmlns:rdfs = "http://www.w3.org/TR/...-schema"
                   xmlns:dc = "http://purl.org/dc/elements/1.1/"
                   xmlns:svgmetadata = "http://www.w3.org/..." >
            <rdf:Description about="http://bar.org/myfoo"
                     dc:title="MyFoo Financial Report"
                     dc:description="$three $bar $thousands $dollars $from 1998
    $through 2000"
                     dc:publisher="BarOrg Incorporated"
                     dc:date="1999-03-03"
                     dc:format="image/svg"
                     dc:language="en" >
              <dc:creator>
                <rdf:Bag>
                    <rdf:li>Irving Bird</rdf:li>
                    <rdf:li>Mary Lambert</rdf:li>
                </rdf:Bag>
              </dc:creator>
              <svgmetadata:General UsesControlledVocabulary="true"/>
            </rdf:Description>
          </rdf:RDF>
        </metadata>
    </svg>

Download this example

## 21.3 DOM interfaces

The following interfaces are defined below: SVGMetadataElement.

### Interface SVGMetadataElement

The SVGMetadataElement interface corresponds to the 'metadata' element.

IDL Definition

      interface SVGMetadataElement : SVGElement;

previous next contents properties index