精图规范1.0----21 元数据 Metadata

previous  next   contents   elements   attributes   properties   index  


04 September 2001

21 元数据 Metadata



内容 Contents


 

21.1 引言 Introduction

 

元数据是一种关于数据的结构化数据。Metadata is structured data about data.

在计算机工业中,为了达到提升工业互操作性和效率正在朝元数据的方向进行标准化努力。内容创作者应该跟踪这些发展并在精图内容中包含适当的与正在形成的各种元数据标准保持一致的元数据。In the computing industry, there are ongoing standardization effortstowards metadata with the goal of promoting industry interoperability andefficiency. Content creators should track these developments and includeappropriate metadata in their SVG content which conforms to these variousmetadata standards as they emerge.

W3C 的语义网络组织 已经成为可用规范的制定和开放协作开发支持跨应用的自动操作、综合和数据的重用的技术的领导地位。语义网络活动基于早期的W3C元数据活动,包括资源描述框架(RDF)的定义。而RDF的规范可从下列链接中找到:The W3C has a Semantic Web Activity which hasbeen established to serve a leadership role, in both the design of enablingspecifications and the open, collaborative development of technologies thatsupport the automation, integration and reuse of data across variousapplications. The Semantic Web Activity builds upon the earlier W3C MetadataActivity, including the definition of Resource Description Framework (RDF). Thespecifications for RDF can be found at:

另一个与大多数元数据应用相关的组织是都柏林核心, 它提供一套可使用的通用核心元数据属性(例如:标题、作者、主题、描述等等)。Another activity relevant to most applications of metadata is the Dublin Core, which is a set of generallyapplicable core metadata properties (e.g., Title, Creator/Author, Subject,Description, etc.).

个别行业或个别内容制作者可以自由地定义他们自己的元数据模式,然而为了促进交换和互操作,鼓励尽可能遵从已有的元数据标准和使用标准的元数据模式。如果一个特定的标准元数据模式不满足您的要求,通常在一个存在的框架如RDF下定义一个附加的元数据模式并且使用自定义元数据模式和标准元数据模式的组合,而不要完全忽视标准的模式较好。Individual industries or individual content creators are free todefine their own metadata schema but are encouraged to follow existing metadatastandards and use standard metadata schema wherever possible to promoteinterchange and interoperability. If a particular standard metadata schema doesnot meet your needs, then it is usually better to define an additional metadataschema in an existing framework such as RDF and to use custom metadata schemain combination with standard metadata schema, rather than totally ignore thestandard schema.

21.2 元数据元素'metadata' The 'metadata' element

包含在精图中的元数据必须在元素'metadata' 内加以说明。'metadata' 的内容应为来自其他XML命名空间的元素,而这些元素的命名空间以与“XML中的命名空间”推荐标准[XML-NS]一致的方式表示。Metadata which is includedwith SVG content should be specified within 'metadata'elements. The contents of the 'metadata' shouldbe elements from other XML namespaces, with these elements from thesenamespaces expressed in a manner conforming with the "Namespaces inXML" Recommendation [XML-NS].

在单独的精图文档内创作者应该为最外层的'svg' 元素提供一个'metadata' 子元素。这个'svg' 元素的'metadata' 子元素用作文档级的元数据。 Authors should provide a 'metadata'child element to the outermost 'svg' element within a stand-alone SVG document.The 'metadata' child element to an 'svg' element serves the purposes of identifyingdocument-level metadata.

精图的很多元素的DTD定义(特别是容器和文本元素)对于'metadata' 子元素无位置和数目的限制。这种弹性只表示容器元素可以有一种兼容的内容模型,因为精图中的某些容器元素允许混合的内容,而这些混合内容针对XML规定[XML-MIXED] 不允许期望的限制。精图语言的未来版本也许使用比DTD更富于表现力的表示方法,这种方法对于混合内容可以使用限制性规则。强烈建议在任何特殊元素里面最多包含一个 'metadata' 元素作为其子元素,并且此元素出现在其他子元素或字符数据内容的前面(也许 'desc''title' 元素除外)。如果处理元数据的用户代理需要从多个'metadata' 元素中选择一个进行处理(例如,确定用哪一字符串作为提示),用户代理应该选择第一个。The DTD definitions of many of SVG's elements (particularly,container and text elements) place no restriction on the placement or number ofthe 'metadata' sub-elements. This flexibilityis only present so that there will be a consistent content model for containerelements, because some container elements in SVG allow for mixed content, andbecause the mixed content rules for XML [XML-MIXED] do notpermit the desired restrictions. Representations of future versions of the SVGlanguage might use more expressive representations than DTDs which allow formore restrictive mixed content rules. It is strongly recommended that at mostone 'metadata' element appear as a child of anyparticular element, and that this element appear before any other childelements (except possibly 'desc' or 'title' elements) or character data content. Ifmetadata-processing user agents need to choose among multiple 'metadata' elements for processing (e.g., to decidewhich string to use for a tooltip), the user agent shall choose the first one.

 
<!ENTITY % metadataExt "" >
<!ELEMENT metadata (#PCDATA %metadataExt;)* >
<!ATTLIST metadata
  %stdAttrs; >

Attribute definitions:

Attributes defined elsewhere:

%stdAttrs;.



21.3 一个例子 An example

这里是一个精图文档如何包含元数据的例子。这个例子使用都柏林核心版本1.1的模式。(其他XML兼容的元数据语言,即使不基于RDF,也可以使用)Here is an example of howmetadata can be included in an SVG document. The example uses the Dublin Coreversion 1.1 schema. (Other XML-compatible metadata languages, including onesnot based on RDF, can be used also.)

 
<?xml version="1.0" standalone="yes"?>
<svg width="4in" height="3in"
    xmlns = 'http://www.w3.org/2000/svg'>
    <desc xmlns:myfoo="http://example.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/1999/02/22-rdf-syntax-ns#"
           xmlns:rdfs = "http://www.w3.org/2000/01/rdf-schema#"
           xmlns:dc = "http://purl.org/dc/elements/1.1/" >
        <rdf:Description about="http://example.org/myfoo"
             dc:title="MyFoo Financial Report"
             dc:description="$three $bar $thousands $dollars $from 1998 $through 2000"
             dc:publisher="Example Organization"
             dc:date="2000-04-11"
             dc:format="image/svg+xml"
             dc:language="en" >
          <dc:creator>
            <rdf:Bag>
              <rdf:li>Irving Bird</rdf:li>
              <rdf:li>Mary Lambert</rdf:li>
            </rdf:Bag>
          </dc:creator>
        </rdf:Description>
      </rdf:RDF>
    </metadata>
</svg>



21.4 文档对象模型接口 DOM interfaces

在下面定义的接口: SVGMetadataElement. The followinginterfaces are defined below: SVGMetadataElement.

 

接口SVGMetadataElement Interface SVGMetadataElement

接口 SVGMetadataElement 对应于'metadata' 元素。The SVGMetadataElementinterface corresponds to the 'metadata'element.


IDL Definition

 
interface SVGMetadataElement : SVGElement {};

 


previous  next   contents   elements   attributes   properties   index  

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值