Partilhar via


targetattribute Attribute

  Microsoft Speech Technologies Homepage

Specifies the attribute or property of the target element to which the value attribute of the bind element is assigned. Optional.

Syntax

HTML <bind targetattribute = "targetAttr">
JScript bind.targetattribute = "targetAttr"

Remarks

The result of a successful recognition is an Extensible Markup Language (XML) document defined using Semantic Markup Language (SML). SML labels specific words or phrases within the recognition result. Those specific words or phrases are assigned to the value attribute of the bind element. The value attribute is then bound to a control on a Web page or to a script variable.

If targetattribute is not specified, the named recognition result (value attribute of the bind element) is assigned to the value property of the targetelement by default. If both targetattribute and targetmethod are specified within the same bind element, the targetattribute attribute takes precedence and targetmethod is ignored.

Example

The following code demonstrates the use of the targetattribute attribute:

<salt:listen id="listen1" mode="automatic" onreco="Handleonreco()" onnoreco="Handleonnoreco()"  onsilence="Handleonsilence()" onerror="Handleonerror()">
  <salt:grammar id="gram1" src="./cities.grxml"/> 
  <salt:bind targetelement="boxFromCity" targetattribute="value" value="//origin_city"/>
  <salt:bind targetelement="boxToCity" targetattribute="value" value="//destination_city"/>
</salt:listen>

See Also

bind Element | targetelement Attribute | targetmethod Attribute | value Attribute | bind Element Example