Page 1 of 1

count attribute

Posted: Mon Oct 03, 2016 12:11 pm
by AlexM
Hi

http://www.plumvoice.com/docs/dev/devel ... e:tutorial
http://www.plumvoice.com/docs/dev/voicexml:tags:catch

The both links contain examples with ‘catch’ statement like as
<catch event="nomatch noinput" count="1,2">

Seems the statement is not complient with the voice xml schema:

Code: Select all

    <xsd:attributeGroup name="Count.attrib">
        <xsd:annotation>
            <xsd:documentation/>
        </xsd:annotation>
        <xsd:attribute name="count" type="Integer.datatype"/>
    </xsd:attributeGroup>

The ‘count’ attribute is declared as ‘integer’.

Could you comment, please?

Re: count attribute

Posted: Tue Oct 04, 2016 10:36 am
by support
Hi Alex,
Thanks for pointing this out, you are correct when you say that it must be of type integer and not a range or multiple integers. We have updated the documentation and you can view the changes here:http://www.plumvoice.com/docs/dev/devel ... e:tutorial and http://www.plumvoice.com/docs/dev/voicexml:tags:catch

An example of our updated code section would be from the second url @ tags:catch looking like this:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <field name="customer_id" type="digits?length=5">
      <prompt>
        Please enter your customer identification number.
      </prompt>
      <filled>
        <prompt>
          Thank you.
        </prompt>
        <!-- submit to a script that doesn't exist -->
        <submit next="process_customer.php" namelist="customer_id"/>
      </filled>
      <catch event="nomatch noinput" count="1">
       <!-- this code executes for count 1 and 2, the FIA looks at all of the matching <catch> elements and finds the highest count value that is <= the current count-->
        <prompt>
          Your input was not valid. Your customer identification number is the five digit number on your membership card.
        </prompt>
        <reprompt/>
      </catch>
      <catch event="nomatch noinput" count="3">
        <prompt>
          It seems you are having difficulty with your customer identification number. Please call the number on the back of your membership card. Goodbye.
        </prompt>
        <exit/>
      </catch>
      <catch event="error.badfetch">
        <prompt>
          I'm sorry, it appears we are having technical difficulties. Please try your call again later.
        </prompt>
        <exit/>
      </catch>
    </field>
  </form>
</vxml>