Re: [MEDIACTRL] msc-ivr XSD not allowing to use an inlined custom grammar

"McGlashan, Scott" <scott.mcglashan@hp.com> Sat, 02 October 2010 14:55 UTC

Return-Path: <scott.mcglashan@hp.com>
X-Original-To: mediactrl@core3.amsl.com
Delivered-To: mediactrl@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 13DC93A6C65 for <mediactrl@core3.amsl.com>; Sat, 2 Oct 2010 07:55:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.932
X-Spam-Level:
X-Spam-Status: No, score=-105.932 tagged_above=-999 required=5 tests=[AWL=0.667, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wCqIY4aVxgGN for <mediactrl@core3.amsl.com>; Sat, 2 Oct 2010 07:55:48 -0700 (PDT)
Received: from g1t0028.austin.hp.com (g1t0028.austin.hp.com [15.216.28.35]) by core3.amsl.com (Postfix) with ESMTP id 16B883A6C17 for <mediactrl@ietf.org>; Sat, 2 Oct 2010 07:55:47 -0700 (PDT)
Received: from G6W0641.americas.hpqcorp.net (g6w0641.atlanta.hp.com [16.230.34.77]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by g1t0028.austin.hp.com (Postfix) with ESMTPS id 74FAE1C49D; Sat, 2 Oct 2010 14:56:38 +0000 (UTC)
Received: from G5W0324.americas.hpqcorp.net (16.228.8.69) by G6W0641.americas.hpqcorp.net (16.230.34.77) with Microsoft SMTP Server (TLS) id 8.2.176.0; Sat, 2 Oct 2010 14:52:36 +0000
Received: from GVW1124EXC.americas.hpqcorp.net ([16.228.24.184]) by G5W0324.americas.hpqcorp.net ([16.228.8.69]) with mapi; Sat, 2 Oct 2010 14:52:35 +0000
From: "McGlashan, Scott" <scott.mcglashan@hp.com>
To: Jean-Francois Bertrand <jeffy@broadsoft.com>, "mediactrl@ietf.org" <mediactrl@ietf.org>
Date: Sat, 02 Oct 2010 14:52:31 +0000
Thread-Topic: [MEDIACTRL] msc-ivr XSD not allowing to use an inlined custom grammar
Thread-Index: ActiQXLsDfAUlno6T1Kr8U7cZLpbEA==
Message-ID: <C8CD10EC.8F9C%Scott.McGlashan@hp.com>
In-Reply-To: <D64134C7765B58448BEF1C5E0B4BBB1514AB216ACA@EXMBXCLUS01.citservers.local>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.0.0.100802
acceptlanguage: en-US
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [MEDIACTRL] msc-ivr XSD not allowing to use an inlined custom grammar
X-BeenThere: mediactrl@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Media Control WG Discussion List <mediactrl.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/mediactrl>, <mailto:mediactrl-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/mediactrl>
List-Post: <mailto:mediactrl@ietf.org>
List-Help: <mailto:mediactrl-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mediactrl>, <mailto:mediactrl-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 02 Oct 2010 14:55:49 -0000

Hi Jean-Francois,

I checked this with Xerces-J and can't replicate the grammar problem (the schema doesn't impose any constraint on grammar mixed content beyond valid CDATA and well-formed XML). However, your example contains termchar="" which isn't valid  according to the schema. Removing the termchar attribute allows your example  to be validated in Xerces-J.
Can you re-check this with your parser and let me know if there is anything to fix in the IVR spec?

Thanks

Scott



From: Jean-Francois Bertrand <jeffy@broadsoft.com<mailto:jeffy@broadsoft.com>>
Date: Fri, 23 Jul 2010 18:12:10 +0000
To: "mediactrl@ietf.org<mailto:mediactrl@ietf.org>" <mediactrl@ietf.org<mailto:mediactrl@ietf.org>>
Subject: [MEDIACTRL] msc-ivr XSD not allowing to use an inlined custom grammar

Our MediaServer support the digitmap grammar, as defined by MSCML-04f.  An application Server should be able to use this custom grammar by sending a message like this:

<mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
       <dialogstart dialogid="1:1864798348" connectionid="1:1864798348">
              <dialog repeatDur="10s" repeatCount="10">
                     <prompt>
                           <media loc="file:///var/www/media/en/SomeMessagePart1.wav"/>
                           <media loc="file:///var/www/media/en/SomeMessagePart2.wav"/>
                     </prompt>
                     <collect cleardigitbuffer="false" timeout="86400000ms" termchar="" interdigittimeout="5000ms">
                          <grammar type="application/mgcp-digitmap">(*|*[0-9])</grammar>
                     </collect>
              </dialog>
       </dialogstart>
</mscivr>


Note that ‘type’ is used to specify the mimetype of the inline grammar, in this case we are using application/mgcp-digitmap.

When performing a strict XSD validation, our Media Server ends up responding with the following:

<mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
  <response status="400" dialogid=""
            reason="error: message:'value '' does not match regular expression facet '[0-9#*A-D]''
line:9
column:119
publicId:unknown
systemId:localhost
"/>
</mscivr>


With strict XSD validation, xerces-c complains that the grammar does not match the regular expression facet '[0-9#*A-D]'.  XSD validation also fails when enclosing the grammar with a CDATA section.   When a custom grammar is specified, the XSD should not attempt to parse the inlined grammar.

The msc-ivr XSD should be updated so that it does not attempt to validate a custom inlined grammar.

Jean-François Bertrand
Sr. Software Designer| BroadSoft, Inc.