Stream Attributes

Stream Attributes

The attributes of the stream element are as follows:
对stream元素的属性描述如下:

  • to -- The 'to' attribute SHOULD be used only in the XML stream header from the initiating entity to the receiving entity, and MUST be set to a hostname serviced by the receiving entity. There SHOULD NOT be a 'to' attribute set in the XML stream header by which the receiving entity replies to the initiating entity; however, if a 'to' attribute is included, it SHOULD be silently ignored by the initiating entity.
  • to -- "to"这个属性只应该出现在发起方至接收方的XML流的格式头中,必须为接收方所提供服务的主机名。该属性不应该出现在接收方返回给发起方的XML流的格式头中,然而如果出现的话就应该忽略。
  • from -- The 'from' attribute SHOULD be used only in the XML stream header from the receiving entity to the initiating entity, and MUST be set to a hostname serviced by the receiving entity that is granting access to the initiating entity. There SHOULD NOT be a 'from' attribute on the XML stream header sent from the initiating entity to the receiving entity; however, if a 'from' attribute is included, it SHOULD be silently ignored by the receiving entity.
  • from -- "from"这个属性只应该出现在接收方至发起方的XML流的格式头中,必须为接收方提供给发起方接入服务的主机名。该属性不应该出现在发送方至接收方的XML流的格式头中,然而如果出现的话就应该忽略。
  • id -- The 'id' attribute SHOULD be used only in the XML stream header from the receiving entity to the initiating entity. This attribute is a unique identifier created by the receiving entity to function as a session key for the initiating entity's streams with the receiving entity, and MUST be unique within the receiving application (normally a server). Note well that the stream ID may be security-critical and therefore MUST be both unpredictable and nonrepeating (see [RANDOM]Eastlake, D., Crocker, S. and J. Schiller, Randomness Recommendations for Security, December 1994. for recommendations regarding randomness for security purposes). There SHOULD NOT be an 'id' attribute on the XML stream header sent from the initiating entity to the receiving entity; however, if an 'id' attribute is included, it SHOULD be silently ignored by the receiving entity.
  • id -- "id"这个属性只应该出现在接收方返回给发起方的XML流的格式头中。该属性是由接收方用作标识发起方会话而创建的一个唯一的标识符,
    将仅在从"receiving entity"到initiating entity的 XML stream头中使用。这个属性是一个唯一的标识符,它由"receiving entity"创建的,用来作为接收 实体与initiating entity的会话key,它在接收应用程序(通常是一个服务器)中 必须是唯一的。 必须设置一个主机名为"receiving entity"使用。注意 流 ID是临 界安全的,因此它必须是不可预料和不重复的( 见[RANDOM])。在从初 始化实体到"receiving entity"的XML stream头中没有 "id"属性; 可是,如果有一 个"id"属性,它将被"receiving entity"悄悄忽略。
  • xml:lang -- An 'xml:lang' attribute (as defined in Section 2.12 of [XML]Bray, T., Paoli, J., Sperberg-McQueen, C. and E. Maler, Extensible Markup Language (XML) 1.0 (2nd ed), October 2000.) SHOULD be included by the initiating entity on the header for the initial stream to specify the default language of any human-readable XML character data it sends over that stream. If the attribute is included, the receiving entity SHOULD remember that value as the default for both the initial stream and the response stream; if the attribute is not included, the receiving entity SHOULD use a configurable default value for both streams, which it MUST communicate in the header for the response stream. For all stanzas sent over the initial stream, if the initiating entity does not include an 'xml:lang' attribute, the receiving entity SHOULD apply the default value; if the initiating entity does include an 'xml:lang' attribute, the receiving entity MUST NOT modify or delete it (see also xml:langxml:lang). The value of the 'xml:lang' attribute MUST be an NMTOKEN (as defined in Section 2.3 of [XML]Bray, T., Paoli, J., Sperberg-McQueen, C. and E. Maler, Extensible Markup Language (XML) 1.0 (2nd ed), October 2000.) and MUST conform to the format defined in RFC 3066Alvestrand, H., Tags for the Identification of Languages, January 2001.[LANGTAGS].
  • xml:lang -- 在initiating entity的 XML stream头中含有一个"xml:lang"属性,为 初始化流用来指定在流中发送的可供人阅读的 XML 字符的缺省语言. 如果包含 这个属性,"receiving entity"将记住这个值作为 "initial stream " 和 "response stream" 两者的缺省值。如果不包含这个属性,"receiving entity"将使用配置值作为两个流的语 言属性缺省值,它必须放在"response stream"头中。对于在"initial stream" 上发送的所有 "XML stanza",如果"initial entity"不包含"xml:log"属性, "receiving entity"将使用缺省值来处理它;如果"initial entity"包含"xml:log"属 性, "receiving entity"必须不能更改和删除它( 见第9.1.5节)."xml:lang"属性值必 须是一个"NMTOKEN"( 见第2.3节) ,必须符合 RFC 3006[LANGTAGS]定义的格 式。
  • version -- The presence of the version attribute set to a value of at least "1.0" signals support for the stream-related protocols (including stream features) defined in this specification. Detailed rules regarding the generation and handling of this attribute are defined below.
  • version -- "presence"的"version"属性值至少为"1.0",支持的相关协议的 Saint-Andre, Ed. Standards Track [Page 11]

黑体关键字参照RFC2119翻译如下:
必须must)、不能must not)、必需的required)、shall)、将不shall not)、应该should)、不应该should not)、建议recommended)、可能may)、和可选的optional

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值