SVG Tiny 1.2 – 20081222

18 メタデータ

目次

18.1 概要

メタデータとはデータについて述べる構造化されたデータである。 Metadata is structured data about data.

コンピュータ産業においては、産業における相互運用性と効率性の向上に向けてメタデータの標準化の努力が進行中である。内容製作者はこれらの開発に追随し、様々なメタデータ標準が現れる度、必要に応じてこれらのメタデータ標準に適合する適切なメタデータを SVG 内容に含めるべきである。 In the computing industry, there are ongoing standardization efforts towards metadata with the goal of promoting industry interoperability and efficiency. Content creators should track these developments and include appropriate metadata in their SVG content which conforms to these various metadata standards as they emerge.

W3C の Semantic Web Activity は、様々なアプリケーションにわたるデータの自動処理, 統合, 再利用をサポートするため、仕様の設計および技術の開かれた共同開発において指導的な役割を果たすものとして設立された。 Semantic Web Activity は、RDF(Resource Description Framework - リソース記述フレームワーク)の定義を含む、以前の W3C Metadata Activity を基に築かれた。 RDF の6つの仕様セットは手始めの Resource Description Framework Primer [RDF] から参照できる。 The W3C has a Semantic Web Activity which has been established to serve a leadership role, in both the design of enabling specifications and the open, collaborative development of technologies that support the automation, integration and reuse of data across various applications. The Semantic Web Activity builds upon the earlier W3C Metadata Activity, including the definition of RDF (Resource Description Framework). The set of six specifications for RDF can be found starting with the Resource Description Framework Primer [RDF]

メタデータの応用のほとんどに関わる別の活動は Dublin Core [DCORE] によるものであり、汎用性のあるコアメタデータプロパティ(例えば、タイトル, 創作者/著作者, 主題, 説明, 等々)のセットを定めている。 Another activity relevant to most applications of metadata is the Dublin Core [DCORE], which is a set of generally applicable core metadata properties (e.g., Title, Creator/Author, Subject, Description, etc.).

SVG コミュニティの中で好まれている RDF メタデータの利用として クリエイティブ・コモンズ [CC] ライセンスフレームワークを利用したライセンス条項の包含がある。ポピュラーなオープンソース SVG 文書作成ツール Inkscape では、このライセンス情報や、多くの共同制作ウェブサイトで必要になるその種のライセンスを自動的に含められる。これはメタデータの潜在的な可能性と影響力を示している。 A popular usage of RDF metadata in the SVG community is the inclusion of license terms using the Creative Commons [CC] license framework. The popular open-source SVG authoring tool Inkscape can automatically include this license information, and inclusion of such a license is required by many collaborative Web sites. This indicates the potential and impact of metadata.

個々の業者または内容製作者達が彼等独自のメタデータスキーマを定義するのは自由であるが、データ互換性と相互運用性を促すためには、可能な限り既存のメタデータ標準に従い、標準メタデータスキーマを利用することが奨励される。特定の標準メタデータスキーマが要求を満たさない場合は、標準スキーマを完全に無視するよりはむしろ、 RDF の様な存在するフレームワークに対する追加のメタデータスキーマを定義して、独自のメタデータスキーマを標準のメタデータスキーマと組み合わせて利用する方が通常は良い結果が得られる。 Individual industries or individual content creators are free to define their own metadata schema but are 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 an existing framework such as RDF and to use custom metadata schema in combination with standard metadata schema, rather than totally ignore the standard schema.

SVG には文書にメタデータを追加する2つの仕組み: metadata 要素および、いくつかの メタデータ属性 が用意されている。これらの異なる仕組みは独立に、あるいは同時にも利用できる。両方が RDF ( RDFRDFa )に用いられていた場合、 RDF プロセッサはそれらを同じグラフに合併させるべきである。(注記: メタデータ属性 は RDF 要素に直接的に用いられるべきではない。) SVG provides two mechanisms for adding metadata directly to a document: the 'metadata' element, and several metadata attributes. These different mechanisms may be used independently, or in concert. If both are being used for RDF (that is, RDF and RDFa), then an RDF processor should combine them into the same graph. (Note: metadata attributes should not be used directly on RDF elements.)

18.2 metadata 要素

SVG 内容に含まれるメタデータは metadata 要素内で指定されるべきである。 metadata の内容は他の XML 名前空間の要素にすべきであり、これらの名前空間のそれらの要素は XML 名前空間 1.0 または XML 名前空間 1.1 仕様 [XML-NS10][XML-NS] のいずれかに適合する作法で表記されるべきである。 Metadata which is included with SVG content should be specified within 'metadata' elements. The contents of the 'metadata' should be elements from other XML namespaces, with these elements from these namespaces expressed in a manner conforming with either the Namespaces in XML 1.0 or Namespaces in XML 1.1 Recommendations [XML-NS10][XML-NS].

文書作成者は独立 SVG 文書内の svg 要素には metadata 子要素を与えるべきである。 svg 要素の metadata 子要素は、文書レベルのメタデータを識別する目的に役立つ。 Authors should provide a 'metadata' child element to the 'svg' element within a stand-alone SVG document. The 'metadata' child element to an 'svg' element serves the purposes of identifying document-level metadata.

metadata 要素を意図を持って非ルート要素に直接適用すべくその子として含ませる場合、文書作成者はその旨を metadata 要素の内容に、内容がその手段を提供しているならば、明示的に含ませるべきである。例えば RDF を利用する際は対象の要素に id 属性を与え、 RDF の about 属性にその id を参照させるべきである。 If a 'metadata' element is placed as a child of a non-root element with the intent to apply directly to that element, it is recommended that the author indicate this explicitly in the content of the 'metadata' element, if that content provides a way to do so. For example, when using RDF, the target element should be given an 'id' attribute, and the 'about' attribute of the RDF should reference that 'id'.

Schema: metadata
    <define name='metadata'>
      <element name='metadata'>
        <ref name='DTM.AT'/>
        <ref name='DTM.CM'/>
      </element>
    </define>

18.2.1 metadata 要素の用例

SVG 文書内にどのようにメタデータを含めるかの例をここに示す。この例では、アートワークのライセンス表示にクリエイティブ・コモンズのスキーマを利用している。( RDF に基づかないものも含め、他の XML 互換メタデータ言語も利用できる。) Here is an example of how metadata can be included in an SVG document. The example uses the Creative Commons schema to indicate the usage license of a work of art. (Other XML-compatible metadata languages, including ones not based on RDF, can be used also.)

Example: metadata-license.svg
<svg xmlns="http://www.w3.org/2000/svg"
     version="1.2" baseProfile="tiny"
     width="8in" height="7in">

  <title>Shiny Donkey</title>

  <!-- 尻をぺたりとついて座る鼻の白い茶色のロバの絵。
    輪郭を丸めるフィルタ効果付きのベクターパスで作成。 -->
  <desc>
    A drawing of a brown donkey with a white nose, sitting on 
    his haunches.  Made with vector paths enhanced with filter 
    effects to add a rounded contour.
  </desc>

  <metadata id="license"
            xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
            xmlns:dc="http://purl.org/dc/elements/1.1/"
            xmlns:cc="http://creativecommons.org/ns#">
    <rdf:RDF>
      <cc:Work rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
      </cc:Work>
      <cc:License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">
        <cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
        <cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
        <cc:requires rdf:resource="http://creativecommons.org/ns#Notice" />
        <cc:requires rdf:resource="http://creativecommons.org/ns#Attribution" />
        <cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
        <cc:requires rdf:resource="http://creativecommons.org/ns#ShareAlike" />
      </cc:License>
    </rdf:RDF>
  </metadata>
  
  <!-- graphical elements -->

</svg>

18.3 拡張可能なメタデータ属性

他の名前空間からのメタデータ文書片の直接的包含を可能にする metadata 要素に加え、 SVG には任意の要素に与えられるいくつかの属性があり、属性を基礎に置くメタデータ形式に利用できる。これらには属性: class, role, rel, rev, about, content, datatype, property, resource, typeof が含まれる。 SVG ではこれらの属性値に対し、文字列や空白区切りの文字列のリストなどそれら特有の値のデータ型を除き、特別な要求を定めていない。 RDFa [RDFA], Microformats パターン [MF], ARIA オントロジー [ARIA] など、他の仕様においてはそれぞれの言語に適合するため、検証目的の追加的スキーマとして表現されるべき、より厳格な要求を課すかもしれない。そのような制約についての参考例を少しばかり挙げる: In addition to the 'metadata' element, which allows for the direct inclusion of metadata document fragments from other namespaces, SVG includes several attributes that may be placed on any element, for the use of attribute-based metadata formats. These include the 'class', 'role', 'rel', 'rev', 'about', 'content', 'datatype', 'property', 'resource', and 'typeof' attributes. SVG makes no specific requirements about the values for these attributes, other than their particular value data types, such as a string or a space-separated lists of strings. Other specifications, such as RDFa [RDFA], Microformats patterns [MF], or ARIA ontologies [ARIA], may impose stricter requirements in order to conform to that particular language, which should be expressed as an additional schema for purposes of validation. A few informative examples of such restrictions include:

SVG はこれらのどの言語, 形式, オントロジーのサポートも要求しないが、文書作成者が欲すればそれらが利用できるよう、これらのメタデータ属性を含めている。この仕様におけるこれらの相補的な形式についての記述は、説明目的としてのみであり、それらの形式に対する新たな制約を課すものではないことに注意。 SVG does not mandate or require support for any of these languages, formats, or ontologies, but it includes these metadata attributes to enable their use as the author desires. Note that this specification's description of these complementary formats is intended for illustrative purposes only, and does not impose additional restrictions on those formats.

実装の一貫性と単純さを維持するため、および、利用における衝突と多義性を予防するため、文書作成者や非 RDFa 形式が属性 about, content, datatype, property, resource, typeof を再利用する場合、 RDFa 構文処理規則 [RDFA] の作法と整合させることが推奨される。 In order to maintain consistency and simplicity of implementation, and prevent conflict or ambiguity of use, if an author or a non-RDFa format reuses the 'about', 'content', 'datatype', 'property', 'resource', or 'typeof' attributes, it is recommended that this is done in a manner consistent with the RDFa Syntax Processing Rules [RDFA].

現在、多くの SVG 文書は Dublin Core [DCORE] 名前空間に属するタイトルを与える RDF メタデータを含んでおり、ある種の処理には有用なものだが、多くの UA からは文書のタイトルとして扱ってもらえていない。タイトルを含む RDF メタデータを埋め込む文書作成ツールは、少なくとも文書レベルの title 要素を与えることが推奨される。次の例に RDFa の作法において人間からも機械からも読み取り易いタイトルを与えるための property 属性と 記述要素 の組み合わせ方を示す。 Currently, many SVG documents contain RDF metadata that provides a title in the Dublin Core [DCORE] namespace, which is useful for certain types of processing, but which is not treated as a title for the document by many user agents. It is recommended that authoring tools which embed RDF metadata that contains a title also provide at least a document-level 'title' element. The following example shows how the 'property' attribute may be combined with the descriptive elements to supply both a human- and machine-readable title, in the manner of RDFa.

Example: metadata-dc-title.svg
<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:dc="http://purl.org/dc/elements/1.1/">

  <title property="dc:title">Metamorphosis I-IV</title>
  <desc property="dc:creator">M.C. Escher</desc>

  <!-- graphical elements -->
  
</svg>