يتم التداولات "إذا كانت البيانات" إذا كانت البيانات المسموح بها في VXML؟
-
19-09-2019 - |
سؤال
يتم التداخل "إذا كانت البيانات المسموح بها؟ السابق:
<if cond="1 == 1">
<if cond="2 == 2">
One is in fact equal to one and Two is in fact equal to two
<else/>
One is in fact equal to one but Two is never not equal to two
</if>
<else/>
One is never not equal to one
</if>
أدرك أنني أستطيع إعادة كتابة هذا الشرط مع "&&
"بيان لكن المنطق الذي أحاول القيام به سيكون فوضوي للحفاظ على التكرار في سلسلة ما إذا كان من الضروري أن يكون.
المحلول
نعم، وفقا لتعريف المخطط وجدت هنا. وبعد أ if
هو executable.content
العنصر، الذي يسمح لاحتواء سلسلة من الصفر أو أكثر executable.content
عناصر.
نصائح أخرى
إضافة إلى إجابة @ John (نظرا لأن التعليقات تحتوي على حد كلمة):
يبقى هذا صحيحا ل VXML 2.1 كذلك: https://www.w3.org/tr/voicexml21/vxml.xsd.
<xsd:element name="if">
<xsd:sequence>
<xsd:group ref="executable.content" minOccurs="0" maxOccurs="unbounded"/>
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="elseif"/>
<xsd:group ref="executable.content" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:sequence minOccurs="0" maxOccurs="1">
<xsd:element ref="else"/>
<xsd:group ref="executable.content" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:sequence>
<xsd:attributeGroup ref="If.attribs"/>
</xsd:complexType>
</xsd:element>
لا تنتمي إلى StackOverflow