grammar-core.xsd
上传用户:xqtpzdz
上传日期:2022-05-21
资源大小:1764k
文件大小:12k
源码类别:

xml/soap/webservice

开发平台:

Visual C++

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  3.     <xsd:annotation>
  4.         <xsd:documentation>SRGS 1.0 Core Schema (20021115)</xsd:documentation>
  5.     </xsd:annotation>
  6.     <xsd:annotation>
  7.       <xsd:documentation>
  8.         Copyright 1998-2004 W3C (MIT, ERCIM, Keio),
  9.         All Rights Reserved. Permission to use, copy, modify and
  10.         distribute the SRGS core schema and its accompanying documentation
  11.         for any purpose and without fee is hereby granted in
  12.         perpetuity, provided that the above copyright notice and this
  13.         paragraph appear in all copies.  The copyright holders make no
  14.         representation about the suitability of the schema for any purpose. 
  15.         It is provided "as is" without expressed or implied warranty.
  16.       </xsd:documentation>
  17.     </xsd:annotation>
  18.     <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
  19.                 schemaLocation="http://www.w3.org/2001/xml.xsd"/>
  20.     <xsd:annotation>
  21.         <xsd:documentation>General Datatypes</xsd:documentation>
  22.     </xsd:annotation>
  23.     <xsd:annotation>
  24.         <xsd:documentation>Grammar-specific datatypes</xsd:documentation>
  25.     </xsd:annotation>
  26.     <xsd:simpleType name="tag">
  27.         <xsd:restriction base="xsd:string"/>
  28.     </xsd:simpleType>
  29.     <xsd:simpleType name="example">
  30.         <xsd:restriction base="xsd:string"/>
  31.     </xsd:simpleType>
  32.     <xsd:simpleType name="Id.datatype">
  33.         <xsd:annotation>
  34.             <xsd:documentation>
  35. does not expression the constraint that NULL VOID GARBAGE are illegal as rule name
  36. </xsd:documentation>
  37.         </xsd:annotation>
  38.         <xsd:restriction base="xsd:ID">
  39.             <xsd:pattern value="[^.:-]+"/>
  40.         </xsd:restriction>
  41.     </xsd:simpleType>
  42.     <xsd:simpleType name="Scope.datatype">
  43.         <xsd:restriction base="xsd:NMTOKEN">
  44.             <xsd:enumeration value="private"/>
  45.             <xsd:enumeration value="public"/>
  46.         </xsd:restriction>
  47.     </xsd:simpleType>
  48.     <xsd:simpleType name="Special.datatype">
  49.         <xsd:restriction base="xsd:NMTOKEN">
  50.             <xsd:enumeration value="NULL"/>
  51.             <xsd:enumeration value="VOID"/>
  52.             <xsd:enumeration value="GARBAGE"/>
  53.         </xsd:restriction>
  54.     </xsd:simpleType>
  55.     <xsd:simpleType name="Repeat-prob.datatype">
  56.         <xsd:restriction base="xsd:float">
  57.             <xsd:minInclusive value="0.0"/>
  58.             <xsd:maxInclusive value="1.0"/>
  59.             <xsd:pattern value="[0-9]"/>
  60.             <xsd:pattern value="[0-9][.]([0-9]+)?"/>
  61.             <xsd:pattern value="([0-9])?[.][0-9]+"/>
  62.         </xsd:restriction>
  63.     </xsd:simpleType>
  64.     <xsd:simpleType name="Repeat.datatype">
  65.         <xsd:annotation>
  66.             <xsd:documentation>
  67. does not expression the constraint in n-m that m must be greater than n
  68. </xsd:documentation>
  69.         </xsd:annotation>
  70.         <xsd:restriction base="xsd:string">
  71.             <xsd:pattern value="[0-9]+"/>
  72.             <xsd:pattern value="[0-9]+-([0-9]+)?"/>
  73.             <xsd:pattern value="([0-9]+)?-[0-9]+"/>
  74.         </xsd:restriction>
  75.     </xsd:simpleType>
  76.     <xsd:simpleType name="Weight.datatype">
  77.         <xsd:restriction base="xsd:string">
  78.             <xsd:pattern value="[0-9]+[.]?"/>
  79.             <xsd:pattern value="([0-9]+)?[.][0-9]+"/>
  80.         </xsd:restriction>
  81.     </xsd:simpleType>
  82.     <xsd:simpleType name="Tag-format.datatype">
  83.         <xsd:restriction base="xsd:anyURI"/>
  84.     </xsd:simpleType>
  85.     <xsd:simpleType name="Version.datatype">
  86.         <xsd:restriction base="xsd:NMTOKEN"/>
  87.     </xsd:simpleType>
  88.     <xsd:simpleType name="Root.datatype">
  89.         <xsd:annotation>
  90.             <xsd:documentation>does not expression the constraint that NULL VOID GARBAGE
  91. are illegal as rule name</xsd:documentation>
  92.         </xsd:annotation>
  93.         <xsd:restriction base="xsd:IDREF">
  94.             <xsd:pattern value="[^.:-]+"/>
  95.         </xsd:restriction>
  96.     </xsd:simpleType>
  97.     <xsd:simpleType name="Mode.datatype">
  98.         <xsd:restriction base="xsd:NMTOKEN">
  99.             <xsd:enumeration value="voice"/>
  100.             <xsd:enumeration value="dtmf"/>
  101.         </xsd:restriction>
  102.     </xsd:simpleType>
  103.     <xsd:simpleType name="Type.datatype">
  104.         <xsd:restriction base="xsd:string"/>
  105.     </xsd:simpleType>
  106.     <xsd:annotation>
  107.         <xsd:documentation>Grammar Attributes</xsd:documentation>
  108.     </xsd:annotation>
  109.     <xsd:attributeGroup name="Tag-format.attrib">
  110.         <xsd:annotation>
  111.             <xsd:documentation/>
  112.         </xsd:annotation>
  113.         <xsd:attribute name="tag-format" type="Tag-format.datatype"/>
  114.     </xsd:attributeGroup>
  115.     <xsd:attributeGroup name="Version.attrib">
  116.         <xsd:annotation>
  117.             <xsd:documentation/>
  118.         </xsd:annotation>
  119.         <xsd:attribute name="version" type="Version.datatype"/>
  120.     </xsd:attributeGroup>
  121.     <xsd:attributeGroup name="Mode.attrib">
  122.         <xsd:annotation>
  123.             <xsd:documentation/>
  124.         </xsd:annotation>
  125.         <xsd:attribute name="mode" type="Mode.datatype" default="voice"/>
  126.     </xsd:attributeGroup>
  127.     <xsd:attributeGroup name="Root.attrib">
  128.         <xsd:annotation>
  129.             <xsd:documentation/>
  130.         </xsd:annotation>
  131.         <xsd:attribute name="root" type="Root.datatype"/>
  132.     </xsd:attributeGroup>
  133.     <xsd:attributeGroup name="Special.attrib">
  134.         <xsd:annotation>
  135.             <xsd:documentation/>
  136.         </xsd:annotation>
  137.         <xsd:attribute name="special" type="Special.datatype"/>
  138.     </xsd:attributeGroup>
  139.     <xsd:attributeGroup name="Repeat-prob.attrib">
  140.         <xsd:annotation>
  141.             <xsd:documentation/>
  142.         </xsd:annotation>
  143.         <xsd:attribute name="repeat-prob" type="Repeat-prob.datatype"/>
  144.     </xsd:attributeGroup>
  145.     <xsd:attributeGroup name="Repeat.attrib">
  146.         <xsd:annotation>
  147.             <xsd:documentation/>
  148.         </xsd:annotation>
  149.         <xsd:attribute name="repeat" type="Repeat.datatype"/>
  150.     </xsd:attributeGroup>
  151.     <xsd:attributeGroup name="Type.attrib">
  152.         <xsd:annotation>
  153.             <xsd:documentation/>
  154.         </xsd:annotation>
  155.         <xsd:attribute name="type" type="Type.datatype"/>
  156.     </xsd:attributeGroup>
  157.     <xsd:attributeGroup name="Weight.attrib">
  158.         <xsd:annotation>
  159.             <xsd:documentation/>
  160.         </xsd:annotation>
  161.         <xsd:attribute name="weight" type="Weight.datatype"/>
  162.     </xsd:attributeGroup>
  163.     <xsd:attributeGroup name="Id.attrib">
  164.         <xsd:annotation>
  165.             <xsd:documentation/>
  166.         </xsd:annotation>
  167.         <xsd:attribute name="id" type="Id.datatype" use="required"/>
  168.     </xsd:attributeGroup>
  169.     <xsd:attributeGroup name="Scope.attrib">
  170.         <xsd:annotation>
  171.             <xsd:documentation/>
  172.         </xsd:annotation>
  173.         <xsd:attribute name="scope" type="Scope.datatype" default="private"/>
  174.     </xsd:attributeGroup>
  175.     <xsd:attributeGroup name="Token.attribs">
  176.         <xsd:annotation>
  177.             <xsd:documentation/>
  178.         </xsd:annotation>
  179.         <xsd:attribute ref="xml:lang"/>
  180.     </xsd:attributeGroup>
  181.     <xsd:attributeGroup name="One-of.attribs">
  182.         <xsd:annotation>
  183.             <xsd:documentation/>
  184.         </xsd:annotation>
  185.         <xsd:attribute ref="xml:lang"/>
  186.     </xsd:attributeGroup>
  187.     <xsd:attributeGroup name="Item.attribs">
  188.         <xsd:annotation>
  189.             <xsd:documentation/>
  190.         </xsd:annotation>
  191.         <xsd:attributeGroup ref="Repeat-prob.attrib"/>
  192.         <xsd:attributeGroup ref="Repeat.attrib"/>
  193.         <xsd:attributeGroup ref="Weight.attrib"/>
  194.         <xsd:attribute ref="xml:lang"/>
  195.     </xsd:attributeGroup>
  196.     <xsd:attributeGroup name="Grammar.attribs">
  197.         <xsd:annotation>
  198.             <xsd:documentation/>
  199.         </xsd:annotation>
  200.         <xsd:attributeGroup ref="Tag-format.attrib"/>
  201.         <xsd:attributeGroup ref="Version.attrib"/>
  202.         <xsd:attribute ref="xml:lang"/>
  203.         <xsd:attribute ref="xml:base"/>
  204.         <xsd:attributeGroup ref="Root.attrib"/>
  205.         <xsd:attributeGroup ref="Mode.attrib"/>
  206.     </xsd:attributeGroup>
  207.     <xsd:attributeGroup name="Ruleref.attribs">
  208.         <xsd:annotation>
  209.             <xsd:documentation/>
  210.         </xsd:annotation>
  211.         <xsd:attributeGroup ref="Type.attrib"/>
  212.         <xsd:attribute name="uri" type="xsd:anyURI"/>
  213.         <xsd:attributeGroup ref="Special.attrib"/>
  214.         <xsd:attribute ref="xml:lang"/>
  215.     </xsd:attributeGroup>
  216.     <xsd:attributeGroup name="Rule.attribs">
  217.         <xsd:annotation>
  218.             <xsd:documentation/>
  219.         </xsd:annotation>
  220.         <xsd:attributeGroup ref="Id.attrib"/>
  221.         <xsd:attributeGroup ref="Scope.attrib"/>
  222.     </xsd:attributeGroup>
  223.     <xsd:attributeGroup name="Lexicon.attribs">
  224.         <xsd:annotation>
  225.             <xsd:documentation/>
  226.         </xsd:annotation>
  227.         <xsd:attribute name="uri" type="xsd:anyURI" use="required"/>
  228.         <xsd:attributeGroup ref="Type.attrib"/>
  229.     </xsd:attributeGroup>
  230.     <xsd:attributeGroup name="Meta.attribs">
  231.         <xsd:annotation>
  232.             <xsd:documentation/>
  233.         </xsd:annotation>
  234.         <xsd:attribute name="name" type="xsd:NMTOKEN"/>
  235.         <xsd:attribute name="content" type="xsd:string" use="required"/>
  236.         <xsd:attribute name="http-equiv" type="xsd:NMTOKEN"/>
  237.     </xsd:attributeGroup>
  238.     <xsd:annotation>
  239.         <xsd:documentation>Content Models</xsd:documentation>
  240.     </xsd:annotation>
  241.     <xsd:group name="rule-expansion">
  242.         <xsd:choice>
  243.             <xsd:element name="token" type="token"/>
  244.             <xsd:element name="ruleref" type="ruleref"/>
  245.             <xsd:element name="item" type="item"/>
  246.             <xsd:element name="one-of" type="one-of"/>
  247.             <xsd:element name="tag" type="tag"/>
  248.         </xsd:choice>
  249.     </xsd:group>
  250.     <xsd:complexType name="ruleref">
  251.         <xsd:attributeGroup ref="Ruleref.attribs"/>
  252.     </xsd:complexType>
  253.     <xsd:complexType name="token" mixed="true">
  254.         <xsd:annotation>
  255.             <xsd:documentation>does not expression the constraint that empty content is illegal
  256. </xsd:documentation>
  257.         </xsd:annotation>
  258.         <xsd:attributeGroup ref="Token.attribs"/>
  259.     </xsd:complexType>
  260.     <xsd:complexType name="one-of">
  261.         <xsd:sequence maxOccurs="unbounded">
  262.             <xsd:element name="item" type="item"/>
  263.         </xsd:sequence>
  264.         <xsd:attributeGroup ref="One-of.attribs"/>
  265.     </xsd:complexType>
  266.     <xsd:complexType name="item" mixed="true">
  267.         <xsd:choice minOccurs="0" maxOccurs="unbounded">
  268.             <xsd:group ref="rule-expansion"/>
  269.         </xsd:choice>
  270.         <xsd:attributeGroup ref="Item.attribs"/>
  271.     </xsd:complexType>
  272.     <xsd:complexType name="rule" mixed="true">
  273.         <xsd:choice minOccurs="0" maxOccurs="unbounded">
  274.             <xsd:group ref="rule-expansion"/>
  275.             <xsd:element name="example" type="example"/>
  276.         </xsd:choice>
  277.         <xsd:attributeGroup ref="Rule.attribs"/>
  278.     </xsd:complexType>
  279.     <xsd:complexType name="lexicon">
  280.         <xsd:attributeGroup ref="Lexicon.attribs"/>
  281.     </xsd:complexType>
  282.     <xsd:complexType name="meta">
  283.         <xsd:attributeGroup ref="Meta.attribs"/>
  284.     </xsd:complexType>
  285.     <xsd:complexType name="metadata">
  286.         <xsd:choice minOccurs="0" maxOccurs="unbounded">
  287.             <xsd:any namespace="##other" processContents="lax"/>
  288.         </xsd:choice>
  289.         <xsd:anyAttribute namespace="##any" processContents="strict"/>
  290.     </xsd:complexType>
  291.     <xsd:group name="grammar.class">
  292.     <xsd:annotation>
  293.         <xsd:documentation>grammar content model</xsd:documentation>
  294.     </xsd:annotation>
  295.         <xsd:sequence>
  296.             <xsd:choice minOccurs="0" maxOccurs="unbounded">
  297.                 <xsd:element name="lexicon" type="lexicon"/>
  298.                 <xsd:element name="meta" type="meta"/>
  299.                 <xsd:element name="metadata" type="metadata"/>
  300.             </xsd:choice>
  301.             <xsd:choice minOccurs="0" maxOccurs="unbounded">
  302.                 <xsd:element name="rule" type="rule"/>
  303.             </xsd:choice>
  304.         </xsd:sequence>
  305.    </xsd:group>
  306.     <xsd:complexType name="grammar">
  307.     <xsd:annotation>
  308.         <xsd:documentation>grammar type with grammar content model and attributes</xsd:documentation>
  309.     </xsd:annotation>
  310.        <xsd:group ref="grammar.class"/>
  311.         <xsd:attributeGroup ref="Grammar.attribs"/>
  312.     </xsd:complexType>
  313.     <xsd:annotation>
  314.         <xsd:documentation>Global Elements</xsd:documentation>
  315.     </xsd:annotation>
  316.     <xsd:element name="grammar" type="grammar"/>
  317. </xsd:schema>