Twilio架构验证警告

时间:2016-07-05 17:46:40

标签: xml xsd twilio xsd-validation xml-validation

我收到了schema validation warning

  

警告 - 12200

     

架构验证警告

     

提供的XML不符合Twilio标记XML架构。   请参阅具体错误并更正问题。可能   原因

     

拼写错误的动词不正确的情况,因为动词拼写错误或未知   属性未知或意外嵌套元素。可能的解决方案

     

检查警告报告的行和列,看看是哪一部分   您的XML响应导致投诉

以下

<?xml version="1.0" encoding="UTF-8" ?>
<Response>
  <Gather numDigits="1" action="/employee/set_job_type">
    <Say voice="alice" language="en-US">press</Say>
    <Say voice="alice" language="en-US">1 for CREW.</Say>
    <Pause length="0.3" />
    <Say voice="alice" language="en-US">2 for PORTER-MAID.</Say>
    <Pause length="0.3" />
    <Say voice="alice" language="en-US">3 for PROJECT WORK.</Say>
    <Pause length="0.3" />
    <Pause length="5" />
    <Say voice="alice" language="en-US">press</Say>
    <Say voice="alice" language="en-US">4 for CREW.</Say>
    <Pause length="0.3" />
    <Say voice="alice" language="en-US">5 for PORTER-MAID.</Say>
    <Pause length="0.3" />
    <Say voice="alice" language="en-US">6 for PROJECT WORK.</Say>
    <Pause length="0.3" />
    <Pause length="5" />
    <Say voice="alice" language="en-US">press</Say>
    <Say voice="alice" language="en-US">7 for CREW.</Say>
    <Pause length="0.3" />
    <Say voice="alice" language="en-US">8 for PORTER-MAID.</Say>
    <Pause length="0.3" />
    <Say voice="alice" language="en-US">9 for PROJECT WORK.</Say>
    <Pause length="0.3" />
    <Pause length="5" />
  </Gather>
</Response>

我无法找到拼写错误或无效的嵌套。我唯一能想到的就是背靠背暂停动词的使用。但是,我没有看到提及任何反对意见的文档。

1 个答案:

答案 0 :(得分:2)

您没有链接到管理XSD。假设它是here,那么以下更正的XML将对它有效:

<?xml version="1.0" encoding="UTF-8" ?>
<Response  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/twilio/twilio-csharp/master/src/Twilio.Twiml.Tests/TwiML.xsd">
  <Gather numDigits="1" action="/employee/set_job_type">
    <Say voice="woman" language="en">press</Say>
    <Say voice="woman" language="en">1 for CREW.</Say>
    <Pause length="1" />
    <Say voice="woman" language="en">2 for PORTER-MAID.</Say>
    <Pause length="1" />
    <Say voice="woman" language="en">3 for PROJECT WORK.</Say>
    <Pause length="1" />
    <Pause length="5" />
    <Say voice="woman" language="en">press</Say>
    <Say voice="woman" language="en">4 for CREW.</Say>
    <Pause length="1" />
    <Say voice="woman" language="en">5 for PORTER-MAID.</Say>
    <Pause length="1" />
    <Say voice="woman" language="en">6 for PROJECT WORK.</Say>
    <Pause length="1" />
    <Pause length="5" />
    <Say voice="woman" language="en">press</Say>
    <Say voice="woman" language="en">7 for CREW.</Say>
    <Pause length="1" />
    <Say voice="woman" language="en">8 for PORTER-MAID.</Say>
    <Pause length="1" />
    <Say voice="woman" language="en">9 for PROJECT WORK.</Say>
    <Pause length="1" />
    <Pause length="5" />
  </Gather>
</Response>