LocalizationSpec.xsd 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: localizationkit
  5. (C) Copyright IBM Corp. 2005, 2010
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted
  7. by GSA ADP Schedule Contract with IBM Corp.
  8. -->
  9. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  10. <xs:element name="messageFiles">
  11. <xs:annotation>
  12. <xs:documentation/>
  13. </xs:annotation>
  14. <xs:complexType>
  15. <xs:sequence maxOccurs="unbounded">
  16. <xs:element name="messageFile">
  17. <xs:annotation>
  18. <xs:documentation>The messageFile element describes all transformations applied to a particular instance of a CCL Input Resource File that conforms to the CCLMessageFile.xsd schema and to where in the product the resulting consumable localized resource should be placed.
  19. </xs:documentation>
  20. </xs:annotation>
  21. <xs:complexType>
  22. <xs:sequence>
  23. <xs:element name="transformations">
  24. <xs:complexType>
  25. <xs:sequence maxOccurs="unbounded">
  26. <xs:element name="transformation">
  27. <xs:annotation>
  28. <xs:documentation>Describes the process by which the CCL Input Resource File is transformed to a runtime consumable resource.
  29. Choose the transformation from the enumeration provided by the 'process'
  30. attribute. The generic 'xslt' transformation, which provides the ability for a component to supply their own specialized transformation, will require you to provide further information by specifying an xsltOptions element.</xs:documentation>
  31. </xs:annotation>
  32. <xs:complexType>
  33. <xs:all>
  34. <xs:element name="targetDirs">
  35. <xs:complexType>
  36. <xs:sequence maxOccurs="unbounded">
  37. <xs:element name="targetDir">
  38. <xs:complexType>
  39. <xs:attribute name="type" use="optional" default="Release">
  40. <xs:annotation>
  41. <xs:documentation>Specifies if this target specification is for Debug or Release (default).
  42. The LDK processes only Release target specifications by default. You can override this by setting the Generate property of the LDK to one of "Debug", "Release", or "All".
  43. </xs:documentation>
  44. </xs:annotation>
  45. <xs:simpleType>
  46. <xs:restriction base="xs:string">
  47. <xs:enumeration value="Debug"/>
  48. <xs:enumeration value="Release"/>
  49. </xs:restriction>
  50. </xs:simpleType>
  51. </xs:attribute>
  52. <xs:attribute name="dir" use="required">
  53. <xs:annotation>
  54. <xs:documentation>Location into which the resulting transformed file is to be installed.
  55. This path is expected to be relative to the product installation location.
  56. Typical locations are
  57. bin
  58. cgi-bin
  59. webapps/p2pd/WEB-INF/classes</xs:documentation>
  60. </xs:annotation>
  61. <xs:simpleType>
  62. <xs:restriction base="xs:string">
  63. <xs:pattern value="[^\\]+"/>
  64. </xs:restriction>
  65. </xs:simpleType>
  66. </xs:attribute>
  67. </xs:complexType>
  68. </xs:element>
  69. </xs:sequence>
  70. </xs:complexType>
  71. </xs:element>
  72. <xs:element name="customOptions" minOccurs="0">
  73. <xs:annotation>
  74. <xs:documentation>Provides information for applying a custom process in the event that the process attribute of the parent transformation element is set to 'custom'</xs:documentation>
  75. </xs:annotation>
  76. <xs:complexType>
  77. <xs:sequence>
  78. <xs:annotation>
  79. <xs:documentation>Provides context from LDKSpec to applicable custom impl of of com.cognos.localizationkit.ExternalProcess</xs:documentation>
  80. </xs:annotation>
  81. <xs:element name="properties"/>
  82. </xs:sequence>
  83. <xs:attribute name="impl" use="required">
  84. <xs:annotation>
  85. <xs:documentation>The impl determines the java implementation of com.cognos.localizationkit.ExternalProcess to call.</xs:documentation>
  86. </xs:annotation>
  87. <xs:simpleType>
  88. <xs:restriction base="xs:string">
  89. <xs:pattern value="[a-zA-Z0-9.]+"/>
  90. </xs:restriction>
  91. </xs:simpleType>
  92. </xs:attribute>
  93. <xs:attribute name="targetFileType" use="required">
  94. <xs:annotation>
  95. <xs:documentation>The target file type determines what implicit processing is required.</xs:documentation>
  96. </xs:annotation>
  97. <xs:simpleType>
  98. <xs:restriction base="xs:string">
  99. <xs:pattern value="[a-zA-Z0-9]+"/>
  100. </xs:restriction>
  101. </xs:simpleType>
  102. </xs:attribute>
  103. <xs:attribute name="targetFileExtension" use="required">
  104. <xs:annotation>
  105. <xs:documentation>The file extension to be appended to the resulting target file.</xs:documentation>
  106. </xs:annotation>
  107. <xs:simpleType>
  108. <xs:restriction base="xs:string">
  109. <xs:pattern value="\.[a-zA-Z0-9]+"/>
  110. </xs:restriction>
  111. </xs:simpleType>
  112. </xs:attribute>
  113. </xs:complexType>
  114. </xs:element>
  115. <xs:element name="xsltOptions" minOccurs="0">
  116. <xs:annotation>
  117. <xs:documentation>Provides information for applying a generic XSLT script in the event that the process attribute of the parent transformation element is set to 'xslt'</xs:documentation>
  118. </xs:annotation>
  119. <xs:complexType>
  120. <xs:attribute name="script" use="required">
  121. <xs:annotation>
  122. <xs:documentation>Name of an XSLT script.
  123. </xs:documentation>
  124. </xs:annotation>
  125. <xs:simpleType>
  126. <xs:restriction base="xs:string">
  127. <xs:pattern value=".+\.xslt?"/>
  128. </xs:restriction>
  129. </xs:simpleType>
  130. </xs:attribute>
  131. <xs:attribute name="targetFileType" use="required">
  132. <xs:annotation>
  133. <xs:documentation>The target file type determines what implicit processing is required.
  134. XML - values must be made XML-safe
  135. Java Properties - Unicode values must be written out as excape sequences since properties files must be ASCII. Note: if targetFileExtension is '.properties' then "Java Properties is implied.
  136. Text - no special processing.</xs:documentation>
  137. </xs:annotation>
  138. <xs:simpleType>
  139. <xs:restriction base="xs:string">
  140. <xs:enumeration value="Java Properties">
  141. <xs:annotation>
  142. <xs:documentation>The target file is a Java Properites file. The target file must encode non-ASCII characters as escape sequences in order to support unicode characters.</xs:documentation>
  143. </xs:annotation>
  144. </xs:enumeration>
  145. <xs:enumeration value="Text">
  146. <xs:annotation>
  147. <xs:documentation>The target file is a plain text file.</xs:documentation>
  148. </xs:annotation>
  149. </xs:enumeration>
  150. <xs:enumeration value="XML">
  151. <xs:annotation>
  152. <xs:documentation>The target file contains XML text. The resulting file will be encoded as to be XML-safe.</xs:documentation>
  153. </xs:annotation>
  154. </xs:enumeration>
  155. </xs:restriction>
  156. </xs:simpleType>
  157. </xs:attribute>
  158. <xs:attribute name="targetFileExtension" use="required">
  159. <xs:annotation>
  160. <xs:documentation>The file extension to be appended to the resulting target file.</xs:documentation>
  161. </xs:annotation>
  162. <xs:simpleType>
  163. <xs:restriction base="xs:string">
  164. <xs:pattern value="\.[a-zA-Z0-9]+"/>
  165. </xs:restriction>
  166. </xs:simpleType>
  167. </xs:attribute>
  168. </xs:complexType>
  169. </xs:element>
  170. </xs:all>
  171. <xs:attribute name="process" use="required">
  172. <xs:annotation>
  173. <xs:documentation>Transformation to be used in order to create the runtime consumable resource files. Select one of:
  174. BMF
  175. binary message file.
  176. CCLXmlToProperties.xslt
  177. Official XSLT script that produces a Java Properties file.
  178. CCLXmlToProperties2.xslt
  179. Official XSLT script that produces a Java Properties file which escapes single quote.
  180. CCLInputSource.xslt
  181. Official XSLT script that produces another CCL Input Resource File with all error messages prefixed with the standard error message prefix.
  182. Copy
  183. Simply copies the CCL Input Resource File.
  184. xslt
  185. Alternate XSLT script. You must describe this script using the xsltOptions element.</xs:documentation>
  186. </xs:annotation>
  187. <xs:simpleType>
  188. <xs:restriction base="xs:string">
  189. <xs:enumeration value="BMF"/>
  190. <xs:enumeration value="CCLInputSource.xslt"/>
  191. <xs:enumeration value="CCLXmlToProperties.xslt"/>
  192. <xs:enumeration value="CCLXmlToProperties2.xslt"/>
  193. <xs:enumeration value="Copy"/>
  194. <xs:enumeration value="xslt"/>
  195. <xs:enumeration value="custom"/>
  196. </xs:restriction>
  197. </xs:simpleType>
  198. </xs:attribute>
  199. </xs:complexType>
  200. </xs:element>
  201. </xs:sequence>
  202. </xs:complexType>
  203. </xs:element>
  204. </xs:sequence>
  205. <xs:attribute name="srcDir" type="xs:string" use="optional" default=".">
  206. <xs:annotation>
  207. <xs:documentation>Location of this message file.</xs:documentation>
  208. </xs:annotation>
  209. </xs:attribute>
  210. <xs:attribute name="baseName" use="required">
  211. <xs:annotation>
  212. <xs:documentation>CCL Resource Input File base name (i.e. without the locale specification).
  213. For example cclbitmsgs</xs:documentation>
  214. </xs:annotation>
  215. <xs:simpleType>
  216. <xs:restriction base="xs:string">
  217. <xs:pattern value="[a-zA-Z0-9][a-zA-Z0-9_]*"/>
  218. </xs:restriction>
  219. </xs:simpleType>
  220. </xs:attribute>
  221. <xs:attribute name="component" use="required">
  222. <xs:annotation>
  223. <xs:documentation>The name of the component to which this message file belongs.
  224. This should be the official component short-name.</xs:documentation>
  225. </xs:annotation>
  226. <xs:simpleType>
  227. <xs:restriction base="xs:string">
  228. <xs:pattern value="[a-zA-Z0-9][a-zA-Z0-9_]*"/>
  229. </xs:restriction>
  230. </xs:simpleType>
  231. </xs:attribute>
  232. <xs:attribute name="containsBrand" use="optional">
  233. <xs:annotation>
  234. <xs:documentation>Indicates whether this is a brandable resource.</xs:documentation>
  235. </xs:annotation>
  236. <xs:simpleType>
  237. <xs:restriction base="xs:boolean"/>
  238. </xs:simpleType>
  239. </xs:attribute>
  240. </xs:complexType>
  241. </xs:element>
  242. </xs:sequence>
  243. </xs:complexType>
  244. </xs:element>
  245. </xs:schema>