xmldata.xsd 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. BI and PM: UDA
  5. (C) Copyright IBM Corp. 2005, 2009
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xs:schema xmlns:d="http://developer.cognos.com/schemas/xmldata/1/" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://developer.cognos.com/schemas/xmldata/1/" elementFormDefault="qualified">
  9. <xs:element name="dataset">
  10. <xs:complexType>
  11. <xs:sequence>
  12. <xs:element name="Fault" type="xs:string" minOccurs="0" maxOccurs="1"/>
  13. <xs:element name="metadata" type="d:metadataType"/>
  14. <xs:element name="data" type="d:dataType"/>
  15. </xs:sequence>
  16. </xs:complexType>
  17. </xs:element>
  18. <xs:complexType name="metadataType">
  19. <xs:sequence>
  20. <xs:element name="item" type="d:itemType" maxOccurs="unbounded"/>
  21. </xs:sequence>
  22. </xs:complexType>
  23. <xs:complexType name="itemType">
  24. <xs:attribute name="name" type="xs:token" use="required"/>
  25. <xs:attribute name="type" use="required">
  26. <xs:simpleType>
  27. <xs:restriction base="xs:NMTOKEN">
  28. <xs:enumeration value="xs:ENTITIES"/>
  29. <xs:enumeration value="xs:ENTITY"/>
  30. <xs:enumeration value="xs:ID"/>
  31. <xs:enumeration value="xs:IDREF"/>
  32. <xs:enumeration value="xs:IDREFS"/>
  33. <xs:enumeration value="xs:NCName"/>
  34. <xs:enumeration value="xs:NMTOKEN"/>
  35. <xs:enumeration value="xs:NMTOKENS"/>
  36. <xs:enumeration value="xs:NOTATION"/>
  37. <xs:enumeration value="xs:Name"/>
  38. <xs:enumeration value="xs:QName"/>
  39. <xs:enumeration value="xs:anyURI"/>
  40. <xs:enumeration value="xs:base64Binary"/>
  41. <xs:enumeration value="xs:boolean"/>
  42. <xs:enumeration value="xs:byte"/>
  43. <xs:enumeration value="xs:date"/>
  44. <xs:enumeration value="xs:dateTime"/>
  45. <xs:enumeration value="xs:decimal"/>
  46. <xs:enumeration value="xs:double"/>
  47. <xs:enumeration value="xs:duration"/>
  48. <xs:enumeration value="xs:float"/>
  49. <xs:enumeration value="xs:gDay"/>
  50. <xs:enumeration value="xs:gMonth"/>
  51. <xs:enumeration value="xs:gMonthDay"/>
  52. <xs:enumeration value="xs:gYear"/>
  53. <xs:enumeration value="xs:gYearMonth"/>
  54. <xs:enumeration value="xs:hexBinary"/>
  55. <xs:enumeration value="xs:int"/>
  56. <xs:enumeration value="xs:integer"/>
  57. <xs:enumeration value="xs:language"/>
  58. <xs:enumeration value="xs:long"/>
  59. <xs:enumeration value="xs:negativeInteger"/>
  60. <xs:enumeration value="xs:nonNegativeInteger"/>
  61. <xs:enumeration value="xs:nonPositiveInteger"/>
  62. <xs:enumeration value="xs:normalizedString"/>
  63. <xs:enumeration value="xs:positiveInteger"/>
  64. <xs:enumeration value="xs:short"/>
  65. <xs:enumeration value="xs:string"/>
  66. <xs:enumeration value="xs:time"/>
  67. <xs:enumeration value="xs:token"/>
  68. <xs:enumeration value="xs:unsignedByte"/>
  69. <xs:enumeration value="xs:unsignedInt"/>
  70. <xs:enumeration value="xs:unsignedLong"/>
  71. <xs:enumeration value="xs:unsignedShort"/>
  72. </xs:restriction>
  73. </xs:simpleType>
  74. </xs:attribute>
  75. <xs:attribute name="length" type="xs:int" use="optional"/>
  76. <xs:attribute name="scale" type="xs:int" use="optional"/>
  77. <xs:attribute name="precision" type="xs:int" use="optional"/>
  78. <!--precision is usually tied to decimal type (xs:decimal), but it is also used specify the interval qualifier for interval type (xs:duration). In this case the following values represent different interval qualifier: 0 for unknown, 1 for second, 2 for minute, 3 for minute to second, 4 for hour, 6 for hour to minute, 7 for hour to second, 8 for day, 12 for day to hour, 14 for day to minute, 15 for day to second, 16 for month, 32 for year, 48 for year to month.-->
  79. </xs:complexType>
  80. <xs:complexType name="dataType">
  81. <xs:sequence>
  82. <xs:element ref="d:row" minOccurs="0" maxOccurs="unbounded"/>
  83. </xs:sequence>
  84. </xs:complexType>
  85. <xs:element name="row">
  86. <xs:complexType>
  87. <xs:sequence>
  88. <xs:element name="value" nillable="true" maxOccurs="unbounded">
  89. <xs:complexType mixed="true">
  90. <xs:simpleContent>
  91. <xs:extension base="xs:string">
  92. <xs:attribute name="currency"/>
  93. </xs:extension>
  94. </xs:simpleContent>
  95. </xs:complexType>
  96. </xs:element>
  97. </xs:sequence>
  98. </xs:complexType>
  99. </xs:element>
  100. </xs:schema>