DSPL 架構

本頁面及其連結子網頁記錄了 DSPL XML 架構。 這些內容適用於想瞭解該語言中低層級詳細資料的進階使用者;對大多數使用者而言,開發人員指南中的內容應足以建立及編輯 DSPL 資料集。

您可以在 DSPL 程式碼網站中,以 XSD 格式下載完整的 XML 架構。

元素:dspl

命名空間 http://schemas.google.com/dspl/2010
註解 DSPL 規格描述了資料集。資料集會以其命名空間識別。資料集由下列元素組成: - 資料表:資料集中定義的概念和切片的資料 - 概念:資料集中採用的使用者指定定義和結構 - Slice:資料集中維度和指標的組合 - 主題:用於整理資料集概念的階層標籤
圖表 圖表 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*infoproviderattribute*topics{0,1}concept{0,1}Slice{0,1}Table{0,1}
兒童 attributeconceptsimportinfoprovider配量資料表主題
執行個體
<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 類型 Fixed 預設 使用 註解
目標命名空間 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 / 匯入

命名空間 http://schemas.google.com/dspl/2010
註解 外部資料集的匯入指令 - 以 XML 結構定義匯入指令建立的模型。為了使用在外部資料集中定義的元素,您必須使用匯入指令參照外部資料集。
圖表 圖表 dspl9.tmp#id3 dspl9.tmp#id4
屬性
content: 複雜
minOccurs: 0
maxOccurs: 無限制
屬性
QName 類型 Fixed 預設 使用 註解
地點 選擇性 您可以選用這個匯入位置,瞭解已匯入資料集的定義 (指定網址)。如果省略位置,處理此 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: 複雜
minOccurs: 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 / 提供者

命名空間 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: 複雜
minOccurs: 0
maxOccurs: 無限制
模型 info{0,1} , type{0,1} , (值* | conceptValue{0,1})
兒童 conceptValueinfotypevalue
執行個體
<attribute concept="" id="">
  <info>{0,1}</info>
  <type format="" ref="">{0,1}</type>
</attribute>
屬性
QName 類型 Fixed 預設 使用 註解
概念 Xs:QName 選擇性 參照屬性屬性值的概念參照。如果屬性指定了類型,則該類型必須與所參照概念的類型相符。外部概念的參照必須採用「prefix:other_concept_id」的形式,其中「prefix」是外部資料集命名空間使用的前置字串 (請參閱 XML 命名空間)。
id 地區 ID 選擇性 概念屬性的 ID。此 ID 在概念 (包括屬性和屬性) 中不得重複。如果已指定概念屬性,則可省略這個 ID。在這種情況下,系統會使用 ID 所參照概念的本機名稱,間接建立 ID。例如 <attribute concept="unit:currency"/> 等同於 <attribute id="currency" concept="unit:currency"/>
資料來源
<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 / 主題

命名空間 http://schemas.google.com/dspl/2010
註解 用於整理資料集內容的主題階層。主題的顯示順序十分重要,應以視覺化的方式呈現這些主題。
圖表 圖表 dspl9.tmp#id28
屬性
content: 複雜
minOccurs: 0
模型 主題+
兒童 主題
執行個體
<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
類型 Topic
屬性
content: 複雜
maxOccurs: 無限制
模型 infotopic*
兒童 infotopic
執行個體
<topic id="" parentTopic="">
  <info>{1,1}</info>
  <topic id="" parentTopic="">{0,unbounded}</topic>
</topic>
屬性
QName 類型 Fixed 預設 使用 註解
id ID 必要 資料集中主題的專屬 ID。
parentTopic Xs:QName 選擇性 這個主題在父項主題的 ID (如有)。 不得針對內嵌於其他主題的主題指定 parentTopic。
資料來源
<xs:element name="topic" type="Topic" maxOccurs="unbounded"/>

元素:dspl / 概念

命名空間 http://schemas.google.com/dspl/2010
註解 這個資料集定義的概念清單。
圖表 圖表 dspl9.tmp#id36
屬性
content: 複雜
minOccurs: 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 / concepts / 概念

命名空間 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}
兒童 attributedefaultValueinfopropertytabletopictype
執行個體
<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 類型 Fixed 預設 使用 註解
延伸 Xs:QName 選擇性 這個概念延伸的概念的專屬 ID。參照的概念可在相同資料集內或外部定義,即在其他資料集中定義。外部概念的參照格式必須是「prefix:other_concept_id」,其中「prefix」是外部資料集命名空間使用的前置字串 (請參閱 XML 命名空間)。
id ID 必要 概念的專屬 ID,在資料集中必須具有全域唯一性。
資料來源
<xs:element name="concept" type="Concept" maxOccurs="unbounded"/>

元素:dspl / Slice

命名空間 http://schemas.google.com/dspl/2010
註解 這個資料集中定義的 Slice 清單。
圖表 圖表 dspl9.tmp#id69
屬性
content: 複雜
minOccurs: 0
模型 投影片
兒童 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+table
兒童 dimensioninfometrictable
執行個體
<slice id="">
  <info>{0,1}</info>
  <dimension concept="">{1,unbounded}</dimension>
  <metric concept="">{1,unbounded}</metric>
  <table ref="">{1,1}</table>
</slice>
屬性
QName 類型 Fixed 預設 使用 註解
id ID 必要 Slice 的專屬 ID。
資料來源
<xs:element name="slice" type="Slice" maxOccurs="unbounded"/>

元素:dspl / 表格

命名空間 http://schemas.google.com/dspl/2010
註解 這個資料集中定義的資料表清單。
圖表 圖表 dspl9.tmp#id87
屬性
content: 複雜
minOccurs: 0
模型 表格+
兒童 表格
執行個體
<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 / 表格 / 表格

命名空間 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}column+data{0,1}
兒童 columndatainfo
執行個體
<table id="">
  <info>{0,1}</info>
  <column format="" id="" type="">{1,unbounded}</column>
  <data>{0,1}</data>
</table>
屬性
QName 類型 Fixed 預設 使用 註解
id ID 必要 資料集中資料表的專屬 ID。
資料來源
<xs:element name="table" type="Table" maxOccurs="unbounded"/>

屬性:dspl / import / @namespace

命名空間 沒有命名空間
註解 已匯入資料集的命名空間,指定為 URI。前置字串必須與該命名空間建立關聯,才能參照其內容。如要進一步瞭解如何在 XML 中使用命名空間與前置字串,請參閱 [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 資料集匯入工具會忽略位置屬性。任何匯入的資料集均須事先由 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
屬性
而應改為使用下列指令: 選擇性
使用這項素材資源的廣告
元素 DSP
資料來源
<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 編輯器建立。