<info>
实体用于指定提醒的详细信息。提醒必须包含至少一个 <info>
代码块。如果您支持多种语言,我们建议您为同一 <alert>
实体针对每种语言使用一个 <info>
块。
info
实体元素
下表介绍了 <info>
实体的子元素值:
元素名称 | 可选性 | 类型 | CAP 和 Google 备注和要求 |
---|---|---|---|
<language> |
可选 | language |
对于 如果不存在 |
<category> |
必需 | InfoCategory |
<category> 代码表示警报消息的主题事件所属的类别。如需为您的事件确定正确的类别,请参阅 OASIS 事件术语列表。正确分类有助于 Google 更准确地向用户显示提醒。 |
<event> |
必需 | string |
Google 对
|
<responseType> |
可选 | responseType |
如需指明为正确受众群体推荐的操作类型(如果适用),我们强烈建议您使用 |
<urgency> |
必需 | urgency |
请勿为 请务必告知 Google 最好是发布商根据具体情况设置 |
<severity> |
必需 | severity |
请勿为 请务必告知 Google 最好是发布商根据具体情况设置 |
<certainty> |
必需 | certainty |
请勿为 请务必告知 Google 最好是发布商根据具体情况设置 |
<audience> |
可选 | string |
<audience> 元素的值是用于描述提醒消息目标受众群体的文本。 |
<eventCode> |
可选 | string |
其中:
我们强烈建议您从 OASIS 事件术语列表中获取
|
<effective> |
可选 | dateTime |
您必须在所有 如果消息内容适用于多个时区,我们建议消息生产者使用世界协调时间 (UTC),而不是当地时间。 示例:
|
<onset> |
可选 | dateTime |
如果 如果消息内容适用于多个时区,我们建议消息生产者使用世界协调时间 (UTC),而不是当地时间。 示例:
|
<expires> |
必填* |
dateTime |
如果您无法为所有提醒设置失效时间,请为不含 您必须在所有 如果消息内容适用于多个时区,我们建议消息生产者使用世界协调时间 (UTC),而不是当地时间。 示例:
|
<senderName> |
可选 | string |
如果发件人具有人类可读的名称, |
<headline> |
可选 | string |
将
请勿为 |
<description> |
必填* |
string |
我们建议您提供可供用户轻松阅读且信息丰富的内容,并回答以下问题:
Google 使用 您可以使用以下受支持的 Markdown 标记: |
<instruction> |
可选 | string |
列出与提醒严重级别相符且非一般性的操作。使用简洁且区分大小写的句子,并添加读者可以采取行动的安全提示,其中最重要的提示应放在前面。
|
<web> |
可选 |
string |
将 <web> 元素链接到一个有效的网址,以提供有关提醒的更多信息。 |
<contact> |
可选 | string |
|
<parameter> |
可选 | string |
其中:
|
<resource> |
可选 | resource |
|
<area> |
必填* |
area |
我们强烈建议使用 |
* Google 要求使用带有粗体红色 REQUIRED 选项性的元素,但这些元素在 CAP 标准中是可选的。
示例
<info>
<language>en-CA</language>
<category>Met</category>
<event>blowing snow</event>
<responseType>Monitor</responseType>
<urgency>Future</urgency>
<severity>Moderate</severity>
<certainty>Possible</certainty>
<audience>general public</audience>
<eventCode>
<valueName>profile:CAP-CP:Event:0.4</valueName>
<value>blowingSnow</value>
</eventCode>
<effective>2023-04-13T23:16:53-00:00</effective>
<expires>2023-04-14T15:11:38-00:00</expires>
<senderName>Environment Canada</senderName>
<headline>blowing snow advisory in effect</headline>
<description>
Periods of poor visibility in blowing snow.
When: Tonight through this weekend.
Impacts: Poor visibility due to blowing snow.
Remarks: Strong easterly winds are expected to continue through the
Richardson Mountains through at least this weekend. Gusty northeasterly
winds are also possible near the Ogilvie Mountains during the same
timeframe. These strong winds will likely generate periods of blowing
snow through the mountain passes and visibility will at times be
significantly reduced.
</description>
<instruction>Be prepared to adjust your driving with changing road
conditions.</instruction>
<web>http://weather.gc.ca/warnings/index_e.html?prov=yt</web>
<area>
<areaDesc>Dempster</areaDesc>
<polygon>65.4581,-137.8443 64.3417,-137.8311 64.3385,
-137.911 64.3497,-138.0022 64.415,-138.4948 64.5198,-138.9891 65.53,
-139.0095 66.6721,-137.1316 67.0102,-136.6048 67.1424,
-136.3737 67.2766,-136.136 67.2657,-135.9251 67.1757,-136.0889 67.0,
-136.012 67.0,-135.9999 67.0133,-135.4962 67.0,-134.9833 65.4581,
-137.8443</polygon>
<geocode>
<valueName>layer:EC-MSC-SMC:1.0:CLC</valueName>
<value>093100</value>
</geocode>
<geocode>
<valueName>profile:CAP-CP:Location:0.3</valueName>
<value>6001045</value>
</geocode>
</area>
</info>