DSPL 架構
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁面及其連結子網頁記錄了 DSPL XML 架構。
這些內容適用於想瞭解該語言中低層級詳細資料的進階使用者;對大多數使用者而言,開發人員指南中的內容應足以建立及編輯 DSPL 資料集。
您可以在 DSPL 程式碼網站中,以 XSD 格式下載完整的 XML 架構。
元素:dspl
命名空間 |
http://schemas.google.com/dspl/2010 |
註解 |
DSPL 規格描述了資料集。資料集會以其命名空間識別。資料集由下列元素組成: - 資料表:資料集中定義的概念和切片的資料 - 概念:資料集中採用的使用者指定定義和結構 - Slice:資料集中維度和指標的組合 - 主題:用於整理資料集概念的階層標籤 |
圖表 |
|
屬性 |
|
模型 |
import*、info、provider、attribute*、topics{0,1}、concept{0,1}、Slice{0,1}、Table{0,1} |
兒童 |
attribute、concepts、import、info、provider、配量、
資料表、主題 |
執行個體 |
<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>
|
命名空間 |
http://schemas.google.com/dspl/2010 |
註解 |
外部資料集的匯入指令 - 以 XML 結構定義匯入指令建立的模型。為了使用在外部資料集中定義的元素,您必須使用匯入指令參照外部資料集。 |
圖表 |
|
屬性 |
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 |
註解 |
資料集的一般資訊。 |
圖表 |
|
類型 |
資訊 |
屬性 |
|
模型 |
name、description{0,1}、url{0,1} |
兒童 |
description、name、url |
執行個體 |
<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 |
註解 |
資料集供應商的一般資訊。 |
圖表 |
|
類型 |
資訊 |
屬性 |
|
模型 |
name、description{0,1}、url{0,1} |
兒童 |
description、name、url |
執行個體 |
<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>
|
命名空間 |
http://schemas.google.com/dspl/2010 |
註解 |
與資料集相關聯的屬性。 |
圖表 |
|
類型 |
屬性 |
屬性 |
content: |
複雜 |
minOccurs: |
0 |
maxOccurs: |
無限制 |
|
模型 |
info{0,1} , type{0,1} , (值*
| conceptValue{0,1}) |
兒童 |
conceptValue、info、type、value |
執行個體 |
<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>
|
命名空間 |
http://schemas.google.com/dspl/2010 |
註解 |
用於整理資料集內容的主題階層。主題的顯示順序十分重要,應以視覺化的方式呈現這些主題。 |
圖表 |
|
屬性 |
|
模型 |
主題+ |
兒童 |
主題 |
執行個體 |
<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>
|
命名空間 |
http://schemas.google.com/dspl/2010 |
圖表 |
|
類型 |
Topic |
屬性 |
content: |
複雜 |
maxOccurs: |
無限制 |
|
模型 |
info、topic* |
兒童 |
info、topic |
執行個體 |
<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"/>
|
命名空間 |
http://schemas.google.com/dspl/2010 |
註解 |
這個資料集定義的概念清單。 |
圖表 |
|
屬性 |
|
模型 |
概念 + |
兒童 |
概念 |
執行個體 |
<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>
|
命名空間 |
http://schemas.google.com/dspl/2010 |
圖表 |
|
類型 |
概念 |
屬性 |
content: |
複雜 |
maxOccurs: |
無限制 |
|
模型 |
info、topic*、type{0,1}、attribute*、property*、defaultValue{0,1}、table{0,1} |
兒童 |
attribute、defaultValue、info、property、table、topic、
type |
執行個體 |
<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 清單。 |
圖表 |
|
屬性 |
|
模型 |
投影片 |
兒童 |
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>
|
命名空間 |
http://schemas.google.com/dspl/2010 |
圖表 |
|
類型 |
片段 |
屬性 |
content: |
複雜 |
maxOccurs: |
無限制 |
|
模型 |
info{0,1}、dimension+、metric+
、table |
兒童 |
dimension、info、metric、
table |
執行個體 |
<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"/>
|
命名空間 |
http://schemas.google.com/dspl/2010 |
註解 |
這個資料集中定義的資料表清單。 |
圖表 |
|
屬性 |
|
模型 |
表格+ |
兒童 |
表格 |
執行個體 |
<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>
|
命名空間 |
http://schemas.google.com/dspl/2010 |
圖表 |
|
類型 |
表格 |
屬性 |
content: |
複雜 |
maxOccurs: |
無限制 |
|
模型 |
info{0,1}、column+、data{0,1} |
兒童 |
column、data、info |
執行個體 |
<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"/>
|
命名空間 |
沒有命名空間 |
註解 |
已匯入資料集的命名空間,指定為 URI。前置字串必須與該命名空間建立關聯,才能參照其內容。如要進一步瞭解如何在 XML 中使用命名空間與前置字串,請參閱 [XML 命名空間]。 |
屬性 |
|
使用這項素材資源的廣告 |
|
資料來源 |
<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 資料集的系統就已經知道匯入的資料集。實作注意事項:Google 資料集匯入工具會忽略位置屬性。任何匯入的資料集均須事先由 Google 匯入工具已知。 |
屬性 |
|
使用這項素材資源的廣告 |
|
資料來源 |
<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 |
屬性 |
|
使用這項素材資源的廣告 |
|
資料來源 |
<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 編輯器建立。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-01-19 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]