This chapter is from the book
3.14 example
Element type |
example |
Attributes |
None. |
Parents |
rule |
Children |
PCDATA |
Description |
Part of a grammar; provides an example of input that matches this element's parent rule. The example element serves as a structured comment and can be used to generate documentation or intelligent help messages. |
DTD
<!ELEMENT example (#PCDATA) >
Language model
Attributes
None.
Children
-
PCDATA
-
The example of a given rule.
Examples
Example 3-16 An example indicating "blue" and "burgundy" as responses
<?xml version="1.0" encoding="iso-8859-1"?> <vxml version="2.0"> <form> <field name="favColor"> <prompt>What's your favorite color?</prompt> <grammar xml:lang="en-US" version="1.0" root="example1"> <rule id="example1" scope="public"> <example> blue </example> <example> burgundy </example> <one-of><item tag="'red'">red</item> <item tag="'green'">green</item> <item tag="'blue'">blue</item> <item tag="'red'">burgundy</item> <item tag="'blue'">indigo</item></one-of> </rule> </grammar> </field> </form> </vxml>