DSPL 架构
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本页及其关联的子页面介绍了 DSPL XML 架构。
本材料适用于希望了解语言低层细节的高级用户;对于大多数用户而言,开发者指南中的内容应足以创建和修改 DSPL 数据集。
您可访问 DSPL 代码网站以 XSD 格式下载完整的 XML 架构。
元素:dspl
命名空间 |
http://schemas.google.com/dspl/2010 |
注释 |
DSPL 规范描述的是数据集。数据集由其命名空间标识。数据集由以下元素组成:- 表:数据集中定义的概念和切片的数据 - 概念:数据集中使用的用户指定定义和结构 - 切片:数据集中存在的维度和指标的组合 - 主题:用于整理数据集的概念的分层标签 |
图示 |
|
属性 |
|
模型 |
import*、info、provider、attribute*、topics{0,1}、concepts{0,1}、slices{0,1}、tables{0,1} |
儿童 |
属性、概念、导入、信息、提供方、切片、表、主题 |
实例 |
<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-name/。如果未提供 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 架构导入指令。为了使用外部数据集中定义的元素,必须使用导入指令来引用外部数据集。 |
图示 |
|
属性 |
content: |
复杂 |
minOccurs: |
0 |
maxOccurs: |
无界限 |
|
属性 |
QName |
类型 |
已修复 |
默认 |
使用 |
注解 |
地理位置 |
|
|
|
可选 |
可选位置,可以在其中找到导入的数据集的定义,以网址形式指定。如果省略了此位置,则处理此 DSPL 数据集的系统必须已经知道导入的数据集。实现备注:Google 数据集导入工具会忽略位置属性。Google 导入方必须事先知道所有导入的数据集。 |
namespace |
|
|
|
必需 |
导入的数据集的命名空间,以 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>
|
命名空间 |
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 / provider
命名空间 |
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}、(value*
| conceptValue{0,1}) |
儿童 |
conceptValue、info、type、value |
实例 |
<attribute concept="" id="">
<info>{0,1}</info>
<type format="" ref="">{0,1}</type>
</attribute>
|
属性 |
QName |
类型 |
已修复 |
默认 |
使用 |
注解 |
概念 |
xs:QName |
|
|
可选 |
对与属性值对应的概念的引用。如果属性指定类型,则该类型必须与所引用概念的类型匹配。对外部概念的引用必须采用“前缀:other_concept_id”格式,其中“前缀”是用于外部数据集命名空间的前缀(请参阅 XML 命名空间)。 |
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 / topics
命名空间 |
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 |
类型 |
已修复 |
默认 |
使用 |
注解 |
id |
ID |
|
|
必需 |
数据集中主题的唯一标识符。 |
parentTopic |
xs:QName |
|
|
可选 |
此主题的父主题的 ID(如果有)。
无法为内嵌在其他主题中的主题指定 parentTopic。 |
|
来源 |
<xs:element name="topic" type="Topic" maxOccurs="unbounded"/>
|
元素:dspl / concepts
命名空间 |
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 |
类型 |
已修复 |
默认 |
使用 |
注解 |
扩展 |
xs:QName |
|
|
可选 |
此概念扩展的概念的唯一标识符。引用的概念可以在同一个数据集中定义,也可以在外部进行定义,即在另一个数据集内进行定义。对外部概念的引用必须采用“前缀:other_concept_id”格式,其中“前缀”是用于外部数据集命名空间的前缀(请参阅 XML 命名空间)。 |
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 |
图示 |
|
类型 |
Slice |
属性 |
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 |
类型 |
已修复 |
默认 |
使用 |
注解 |
id |
ID |
|
|
必需 |
Slice 的唯一标识符。 |
|
来源 |
<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 |
类型 |
已修复 |
默认 |
使用 |
注解 |
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-name/。如果未提供 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 编辑器创建。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):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":"其他"
}]