Subject: [Speechsc] NLSML clarification

From: Brett Gavagni <[email-masked]>
Date: Wed, 20 Sep 2006 11:38:17 -0400

Hi,

I'm hoping to solicit some feedback from the implementing community with a 
MRCP clarification request w.r.t. NLSML. 

More specifically, NLSML results containing a grammar URI with invalid XML 
characters.

A MRCP client sends a RECOGNIZE request to a MRCP server identifying the 
grammars to define and enable.

Example:
C->S
RECOGNIZE 2 MRCP/1.0
no-input-timeout: 7000
recognizer-start-timers: false
speech-language: en-US

content-type: text/uri-list
content-length: 105

http://speechsc.ietf.org/srgs1.grxml
http://speechsc.ietf.org/srgs?test1=test1&test2=test2

A RECOGNITION-COMPLETE is later returned by the MRCP server to the MRCP 
client matching the external grammar query URI ("
http://speechsc.ietf.org/srgs?test1=test1&test2=test2"). 

The resulting generated NLSML using this URI reference is not well formed 
however,  According to the MAY 30 2001 draft of the NLSML specification:  
The value is the grammar URI used by the dialog markup interpreter to 
specify the grammar. 

What is the common practice to avoid this condition?   We see the 
following three options (outside of separate DEFINE-GRAMMAR):

1) MRCP server URL encodes offending XML chars (? &)
2) MRCP server XML encodes offending XML chars (? &)
3) MRCP client URL encodes offending XML chars

Which of the following examples below (A or B) appears the most 
appropriate from MRCP server perspective?

Example A: NLSML with a <result> grammar attribute reference with the XML 
sensitive characters represented URI query string which transformed as the 
escaped octet values. 
S->C
RECOGNITION-COMPLETE 2 COMPLETE MRCP/1.0
completion-cause: 000 success
content-length: 457
content-type: application/x-nlsml; charset=UTF-8

<?xml version="1.0" encoding="UTF-8"?>
<result grammar="http://speechsc.ietf.org/srgs
%3ftest1%3dtest1%26test2%3dtest2">
  <interpretation confidence="66" grammar="http://speechsc.ietf.org/srgs
%3ftest1%3dtest1%26test2%3dtest2">
    <instance>
      <option confidence="100"> Speech </option>
    </instance>
    <input confidence="95" mode="speech"> Speech </input>
  </interpretation>
</result>

Example B: NLSML with a <result> grammar attribute reference unaltered as 
specified by the MRCP client.
S->C
RECOGNITION-COMPLETE 2 COMPLETE MRCP/1.0
completion-cause: 000 success
content-length: 457
content-type: application/x-nlsml; charset=UTF-8

<?xml version="1.0" encoding="UTF-8"?>
<result grammar="http://speechsc.ietf.org/srgs?test1=test1&test2=test2">
  <interpretation confidence="66" grammar="
http://speechsc.ietf.org/srgs?test1=test1&test2=test2">
    <instance>
      <option confidence="100"> Speech </option>
    </instance>
    <input confidence="95" mode="speech"> Speech </input>
  </interpretation>
</result>

Thanks,

Brett Gavagni 
WebSphere Voice Server Development 
http://www-306.ibm.com/software/pervasive/voice_server/ 
[email-masked]

_______________________________________________
Speechsc mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/speechsc