DSPL 結構定義

本頁及其連結的子頁面記錄了 DSPL XML 架構。 此教材適用於有興趣瞭解的進階使用者 語言的低分資訊;對大多數使用者而言 在 開發人員指南應足以建立及編輯影片 DSPL 資料集

完整的 XML 架構可透過 XSD 格式下載 在 DSPL 程式碼網站

元素:dspl

命名空間 http://schemas.google.com/dspl/2010
註解 DSPL 規格說明資料集,資料集是 識別物件資料集包含下列元素 元素:- 表格:定義 資料集 - 概念: 資料集 - 扇區: 資料集 - 主題:階層式標籤,用來整理 資料集
圖表 圖表 dspl9.tmp#id103 dspl9.tmp#id2 dspl9.tmp#id5 dspl9.tmp#id16 dspl9.tmp#id17 dspl9.tmp#id27 dspl9.tmp#id35 dspl9.tmp#id68 dspl9.tmp#id86
屬性
content: 複雜
型號 import*資訊供應商屬性*topics{0,1}概念{0,1}配量{0,1}資料表{0,1}
子項 屬性概念匯入info供應商切片資料表主題
執行個體
<dspl targetNamespace="">
  <import location="" namespace="">{0,unbounded}</import>
  <info>{1,1}</info>
  <provider>{1,1}</provider>
  <attribute concept="" id="">{0,unbounded}</attribute>
  <topics>{0,1}</topics>
  <concepts>{0,1}</concepts>
  <slices>{0,1}</slices>
  <tables>{0,1}</tables>
</dspl>
屬性
QName 類型 固定 預設 使用 註解
targetNamespace xs:anyURI 選用 每個資料集可能會提供目標命名空間。目標 命名空間是專門用來識別資料集的 URI。如要 有關在 XML 中使用命名空間的詳細資訊,請參閱: http://www.w3.org/TR/REC-xml-names/ 如果沒有 targetNamespace 系統就會在資料集 已匯入。
來源
<xs:element name="dspl">
  <xs:annotation>
    <xs:documentation>A DSPL specification describes a dataset. A dataset is
        identified by its namespace. A dataset is comprised of the
        following elements:

        - Tables: Data for the concepts and slices defined in the
        dataset

        - Concepts: User-specified definitions and structures used in
        the dataset

        - Slices: Combinations of dimensions and metrics present in
        the dataset

        - Topics: Hierarchical labels used to organise the concepts of
        the dataset</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="import" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Import directive for external datasets -- modeled after
              the XML Schema import directive.  In order to use
              elements defined in an external dataset, the external
              dataset must be referenced using an import directive.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attribute name="namespace" use="required">
            <xs:annotation>
              <xs:documentation>The namespace of the imported dataset, specified as
                  a URI. A prefix must be associated with this
                  namespace before its contents can be referenced. See
                  [XML Namespaces] for more information about the use
                  of namespaces and prefixes in XML.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
          <xs:attribute name="location" use="optional">
            <xs:annotation>
              <xs:documentation>An optional location where the definition of the
                  imported dataset can be found, specified as a
                  URL. If the location is omitted, the system
                  processing this DSPL dataset must already know the
                  imported dataset.

                  Implementation note: The Google dataset importer
                  ignores the location attribute. Any imported dataset
                  must be known by the Google importer beforehand.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="info" type="Info" minOccurs="1">
        <xs:annotation>
          <xs:documentation>General information about the dataset.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="provider" type="Info">
        <xs:annotation>
          <xs:documentation>General information about the dataset provider.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="attribute" type="Attribute" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Attribute associated with the dataset.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="topics" minOccurs="0">
        <xs:annotation>
          <xs:documentation>A hierarchy of topics used to organize the contents of
              the dataset. The order in which topics are given is
              meaningful and should be respected by visualizations
              that displays these topics.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="topic" type="Topic" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="concepts" minOccurs="0">
        <xs:annotation>
          <xs:documentation>A list of concepts defined in this dataset.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="concept" type="Concept" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="slices" minOccurs="0">
        <xs:annotation>
          <xs:documentation>A list of slices defined in this dataset.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="slice" type="Slice" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="tables" minOccurs="0">
        <xs:annotation>
          <xs:documentation>A list of tables defined in this dataset.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="table" type="Table" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="targetNamespace" type="xs:anyURI" use="optional">
      <xs:annotation>
        <xs:documentation>Each dataset may provide a target namespace. The
              target namespace is a URI that uniquely identifies the
              dataset. For more information about the use of namespaces in XML,
              see:

              http://www.w3.org/TR/REC-xml-names/

              If no targetNamespace is provided,  then a namespace will be
              generated when the dataset is imported.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
</xs:element>

元素:dspl / import

命名空間 http://schemas.google.com/dspl/2010
註解 外部資料集的匯入指令 -- 以 XML 為基礎建立模型 結構定義匯入指令。如要使用在外部定義的 資料集,就必須透過匯入功能來參照外部資料集 指令。
圖表 圖表 dspl9.tmp#id3 dspl9.tmp#id4
屬性
content: 複雜
分鐘數: 0
maxOccurs: 無界限
屬性
QName 類型 固定 預設 使用 註解
位置資訊 選用 選用位置,定義已匯入的 指定資料集,並將其指定為網址。如果位置: 省略後,處理這個 DSPL 資料集的系統必須知道 匯入資料集導入註意事項:Google 資料集 匯入工具會忽略位置屬性。任何匯入的資料集都必須 Google 匯入工具預先得知資訊
命名空間 必填 匯入資料集的命名空間,指定為 URI。前置字串必須與這個命名空間建立關聯,才能 資源。詳情請參閱 [XML 命名空間] 瞭解在容器中使用的命名空間和前置字元 XML。
來源
<xs:element name="import" minOccurs="0" maxOccurs="unbounded">
  <xs:annotation>
    <xs:documentation>Import directive for external datasets -- modeled after
              the XML Schema import directive.  In order to use
              elements defined in an external dataset, the external
              dataset must be referenced using an import directive.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:attribute name="namespace" use="required">
      <xs:annotation>
        <xs:documentation>The namespace of the imported dataset, specified as
                  a URI. A prefix must be associated with this
                  namespace before its contents can be referenced. See
                  [XML Namespaces] for more information about the use
                  of namespaces and prefixes in XML.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="location" use="optional">
      <xs:annotation>
        <xs:documentation>An optional location where the definition of the
                  imported dataset can be found, specified as a
                  URL. If the location is omitted, the system
                  processing this DSPL dataset must already know the
                  imported dataset.

                  Implementation note: The Google dataset importer
                  ignores the location attribute. Any imported dataset
                  must be known by the Google importer beforehand.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
</xs:element>

元素:dspl / info

命名空間 http://schemas.google.com/dspl/2010
註解 資料集的一般資訊。
圖表 圖表 dspl4.tmp#id7 dspl4.tmp#id14 dspl4.tmp#id15 dspl4.tmp#id6
類型 資訊
屬性
content: 複雜
分鐘數: 1
型號 namedescription{0,1}url{0,1}
子項 descriptionnameurl
執行個體
<info>
  <name>{1,1}</name>
  <description>{0,1}</description>
  <url>{0,1}</url>
</info>
來源
<xs:element name="info" type="Info" minOccurs="1">
  <xs:annotation>
    <xs:documentation>General information about the dataset.</xs:documentation>
  </xs:annotation>
</xs:element>

元素:dspl / provider

命名空間 http://schemas.google.com/dspl/2010
註解 資料集提供者的一般資訊。
圖表 圖表 dspl4.tmp#id7 dspl4.tmp#id14 dspl4.tmp#id15 dspl4.tmp#id6
類型 資訊
屬性
content: 複雜
型號 namedescription{0,1}url{0,1}
子項 descriptionnameurl
執行個體
<provider>
  <name>{1,1}</name>
  <description>{0,1}</description>
  <url>{0,1}</url>
</provider>
來源
<xs:element name="provider" type="Info">
  <xs:annotation>
    <xs:documentation>General information about the dataset provider.</xs:documentation>
  </xs:annotation>
</xs:element>

元素:dspl / 屬性

命名空間 http://schemas.google.com/dspl/2010
註解 與資料集相關聯的屬性,
圖表 圖表 dspl14.tmp#id24 dspl14.tmp#id26 dspl14.tmp#id19 dspl14.tmp#id20 dspl0.tmp#id10 dspl0.tmp#id12 dspl0.tmp#id9 dspl14.tmp#id18
類型 屬性
屬性
content: 複雜
分鐘數: 0
maxOccurs: 無界限
型號 info{0,1}type{0,1}, (value* |conceptValue{0,1})
子項 conceptValueinfotype
執行個體
<attribute concept="" id="">
  <info>{0,1}</info>
  <type format="" ref="">{0,1}</type>
</attribute>
屬性
QName 類型 固定 預設 使用 註解
概念 xs:QName 選用 所對應概念的概念參照 屬性。如果屬性指定了類型,請將類型 必須符合所參照概念的類型。對於 外部概念必須採用下列格式 「prefix:other_concept_id」,其中「prefix」為 外部資料集命名空間使用的前置字串 (請參閱 XML 命名空間)。
id LocalId 選用 概念屬性的 ID,此 ID 必須是 屬於特定類別 (所有屬性和屬性) 的不重複值 如果已指定概念屬性,則可省略 ID。在這個例子中 系統會建立隱含的 ID,並將值做為 所學概念例如 <attribute concept=&quot;unit:currency&quot;/&gt;相當於 <attribute id="currency" concept=&quot;unit:currency&quot;/&gt;
來源
<xs:element name="attribute" type="Attribute" minOccurs="0" maxOccurs="unbounded">
  <xs:annotation>
    <xs:documentation>Attribute associated with the dataset.</xs:documentation>
  </xs:annotation>
</xs:element>

元素:dspl / topic

命名空間 http://schemas.google.com/dspl/2010
註解 主題階層,可用來組織 主題的指定順序有意義且必須 並以圖表呈現這些主題。
圖表 圖表 dspl9.tmp#id28
屬性
content: 複雜
分鐘數: 0
型號 topic+
子項 主題
執行個體
<topics>
  <topic id="" parentTopic="">{1,unbounded}</topic>
</topics>
來源
<xs:element name="topics" minOccurs="0">
  <xs:annotation>
    <xs:documentation>A hierarchy of topics used to organize the contents of
              the dataset. The order in which topics are given is
              meaningful and should be respected by visualizations
              that displays these topics.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="topic" type="Topic" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

元素:dspl / topics / topic

命名空間 http://schemas.google.com/dspl/2010
圖表 圖表 dspl15.tmp#id32 dspl15.tmp#id34 dspl15.tmp#id30 dspl15.tmp#id31 dspl15.tmp#id29
類型 主題
屬性
content: 複雜
maxOccurs: 無界限
型號 資訊主題*
子項 infotopic
執行個體
<topic id="" parentTopic="">
  <info>{1,1}</info>
  <topic id="" parentTopic="">{0,unbounded}</topic>
</topic>
屬性
QName 類型 固定 預設 使用 註解
id ID 必填 資料集。
parentTopic xs:QName 選用 此主題的父項主題 ID (如果有的話)。 在內嵌主題中,無法指定父項主題 其他主題。
來源
<xs:element name="topic" type="Topic" maxOccurs="unbounded"/>

元素:dspl / 概念

命名空間 http://schemas.google.com/dspl/2010
註解 這個資料集中定義的概念清單。
圖表 圖表 dspl9.tmp#id36
屬性
content: 複雜
分鐘數: 0
型號 概念 +
子項 概念
執行個體
<concepts>
  <concept extends="" id="">{1,unbounded}</concept>
</concepts>
來源
<xs:element name="concepts" minOccurs="0">
  <xs:annotation>
    <xs:documentation>A list of concepts defined in this dataset.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="concept" type="Concept" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

元素:dspl / 概念 / 概念

命名空間 http://schemas.google.com/dspl/2010
圖表 圖表 dspl6.tmp#id66 dspl6.tmp#id67 dspl6.tmp#id38 dspl6.tmp#id43 dspl6.tmp#id45 dspl6.tmp#id47 dspl6.tmp#id48 dspl6.tmp#id57 dspl6.tmp#id58 dspl6.tmp#id37
類型 概念
屬性
content: 複雜
maxOccurs: 無界限
型號 infotopic*type{0,1}attribute*property*defaultValue{0,1}table{0,1}
子項 attributedefaultValueinfo屬性資料表主題類型
執行個體
<concept extends="" id="">
  <info>{1,1}</info>
  <topic ref="">{0,unbounded}</topic>
  <type ref="">{0,1}</type>
  <attribute concept="" id="">{0,unbounded}</attribute>
  <property concept="" id="" isMapping="false" isParent="false">{0,unbounded}</property>
  <defaultValue>{0,1}</defaultValue>
  <table ref="">{0,1}</table>
</concept>
屬性
QName 類型 固定 預設 使用 註解
延伸 xs:QName 選用 該概念的專屬 ID 。參照的概念可在同一個資料集中定義 也就是在其他資料集中對外部 IP 位址的參照 概念必須採用「prefix:other_concept_id」格式、 其中「prefix」是 Pod 中 外部資料集 (請參閱 XML 命名空間)。
id ID 必填 概念的專屬 ID,必須是 資料集內的全域不重複值
來源
<xs:element name="concept" type="Concept" maxOccurs="unbounded"/>

元素:dspl / slices

命名空間 http://schemas.google.com/dspl/2010
註解 這個資料集中定義的配量清單。
圖表 圖表 dspl9.tmp#id69
屬性
content: 複雜
分鐘數: 0
型號 Slice +
子項 slice
執行個體
<slices>
  <slice id="">{1,unbounded}</slice>
</slices>
來源
<xs:element name="slices" minOccurs="0">
  <xs:annotation>
    <xs:documentation>A list of slices defined in this dataset.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="slice" type="Slice" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

元素:dspl / slices / Slice

命名空間 http://schemas.google.com/dspl/2010
圖表 圖表 dspl2.tmp#id85 dspl2.tmp#id71 dspl2.tmp#id72 dspl2.tmp#id75 dspl2.tmp#id76 dspl2.tmp#id70
類型 片段
屬性
content: 複雜
maxOccurs: 無界限
型號 info{0,1}dimension+metric+ , 表格
子項 維度資訊指標表格
執行個體
<slice id="">
  <info>{0,1}</info>
  <dimension concept="">{1,unbounded}</dimension>
  <metric concept="">{1,unbounded}</metric>
  <table ref="">{1,1}</table>
</slice>
屬性
QName 類型 固定 預設 使用 註解
id ID 必填 該片段的專屬 ID。
來源
<xs:element name="slice" type="Slice" maxOccurs="unbounded"/>

元素:dspl / table

命名空間 http://schemas.google.com/dspl/2010
註解 這個資料集中定義的資料表清單。
圖表 圖表 dspl9.tmp#id87
屬性
content: 複雜
分鐘數: 0
型號 table+
子項 表格
執行個體
<tables>
  <table id="">{1,unbounded}</table>
</tables>
來源
<xs:element name="tables" minOccurs="0">
  <xs:annotation>
    <xs:documentation>A list of tables defined in this dataset.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="table" type="Table" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

元素:dspl / table / table

命名空間 http://schemas.google.com/dspl/2010
圖表 圖表 dspl10.tmp#id102 dspl10.tmp#id89 dspl10.tmp#id90 dspl10.tmp#id97 dspl10.tmp#id88
類型 表格
屬性
content: 複雜
maxOccurs: 無界限
型號 info{0,1}欄+資料{0,1}
子項 資料欄資料資訊
執行個體
<table id="">
  <info>{0,1}</info>
  <column format="" id="" type="">{1,unbounded}</column>
  <data>{0,1}</data>
</table>
屬性
QName 類型 固定 預設 使用 註解
id ID 必填 資料集。
來源
<xs:element name="table" type="Table" maxOccurs="unbounded"/>

屬性:dspl / import / @namespace

命名空間 沒有命名空間
註解 匯入資料集的命名空間,以 URI 的形式指定。A 罩杯 前置字串必須與這個命名空間相關聯,才能 參照。如要進一步瞭解 XML 中的命名空間和前置字元。
屬性
而應改為使用下列指令: 必填
使用這項素材資源的廣告
元素 dspl/import
來源
<xs:attribute name="namespace" use="required">
  <xs:annotation>
    <xs:documentation>The namespace of the imported dataset, specified as
                  a URI. A prefix must be associated with this
                  namespace before its contents can be referenced. See
                  [XML Namespaces] for more information about the use
                  of namespaces and prefixes in XML.</xs:documentation>
  </xs:annotation>
</xs:attribute>

屬性:dspl / import / @location

命名空間 沒有命名空間
註解 選用位置,定義已匯入的 指定資料集,並將其指定為網址。省略位置時, 系統在處理這個 DSPL 資料集時必須知道 導入註意事項:Google 資料集匯入工具會忽略 location 屬性任何匯入的資料集都必須由 Google 匯入程式。
屬性
而應改為使用下列指令: 選用
使用這項素材資源的廣告
元素 dspl/import
來源
<xs:attribute name="location" use="optional">
  <xs:annotation>
    <xs:documentation>An optional location where the definition of the
                  imported dataset can be found, specified as a
                  URL. If the location is omitted, the system
                  processing this DSPL dataset must already know the
                  imported dataset.

                  Implementation note: The Google dataset importer
                  ignores the location attribute. Any imported dataset
                  must be known by the Google importer beforehand.</xs:documentation>
  </xs:annotation>
</xs:attribute>

屬性:dspl / @targetNamespace

命名空間 沒有命名空間
註解 每個資料集可能會提供目標命名空間。目標 命名空間是專門用來識別資料集的 URI。如要 有關在 XML 中使用命名空間的詳細資訊,請參閱: http://www.w3.org/TR/REC-xml-names/ 如未提供 targetNamespace, 系統會在資料集 已匯入。
類型 xs:anyURI
屬性
而應改為使用下列指令: 選用
使用這項素材資源的廣告
元素 dspl
來源
<xs:attribute name="targetNamespace" type="xs:anyURI" use="optional">
  <xs:annotation>
    <xs:documentation>Each dataset may provide a target namespace. The
              target namespace is a URI that uniquely identifies the
              dataset. For more information about the use of namespaces in XML,
              see:

              http://www.w3.org/TR/REC-xml-names/

              If no targetNamespace is provided,  then a namespace will be
              generated when the dataset is imported.</xs:documentation>
  </xs:annotation>
</xs:attribute>

使用 oXygen XML 編輯器