Specifies the XML version number, and optionally the character encodings, as part of a grammar document's XML declaration on the first line of the document. This header must appear on the first line of all XML documents; therefore, all XML Grammar documents must have the XML header at the top. It is an accepted convention to use the .grxml file extension for XML-based grammar documents that conform to the Speech Recognition Grammar Specification Version 1.0 specification.
Example
The following examples demonstrate XML headers with and without the character encoding declaration.
XML | Copy Code |
---|---|
<!-- With character encoding. --> <?xml encoding="ISO-8859-1"?> <grammar version="1.0" xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en-US" tag-format="semantics/1.0" ...> ... </grammar> |
XML | Copy Code |
---|---|
<!-- Without character encoding. --> <?xml?> <grammar version="1.0" xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en-US" tag-format="semantics/1.0" ...> ... </grammar> |