xliff-core-2.0.xsd 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. XLIFF Version 2.0
  4. OASIS Standard
  5. 05 August 2014
  6. Copyright (c) OASIS Open 2014. All rights reserved.
  7. Source: http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/schemas/
  8. -->
  9. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  10. elementFormDefault="qualified"
  11. xmlns:xlf="urn:oasis:names:tc:xliff:document:2.0"
  12. targetNamespace="urn:oasis:names:tc:xliff:document:2.0">
  13. <!-- Import -->
  14. <xs:import namespace="http://www.w3.org/XML/1998/namespace"
  15. schemaLocation="informativeCopiesOf3rdPartySchemas/w3c/xml.xsd"/>
  16. <!-- Element Group -->
  17. <xs:group name="inline">
  18. <xs:choice>
  19. <xs:element ref="xlf:cp"/>
  20. <xs:element ref="xlf:ph"/>
  21. <xs:element ref="xlf:pc"/>
  22. <xs:element ref="xlf:sc"/>
  23. <xs:element ref="xlf:ec"/>
  24. <xs:element ref="xlf:mrk"/>
  25. <xs:element ref="xlf:sm"/>
  26. <xs:element ref="xlf:em"/>
  27. </xs:choice>
  28. </xs:group>
  29. <!-- Attribute Types -->
  30. <xs:simpleType name="yesNo">
  31. <xs:restriction base="xs:string">
  32. <xs:enumeration value="yes"/>
  33. <xs:enumeration value="no"/>
  34. </xs:restriction>
  35. </xs:simpleType>
  36. <xs:simpleType name="yesNoFirstNo">
  37. <xs:restriction base="xs:string">
  38. <xs:enumeration value="yes"/>
  39. <xs:enumeration value="firstNo"/>
  40. <xs:enumeration value="no"/>
  41. </xs:restriction>
  42. </xs:simpleType>
  43. <xs:simpleType name="dirValue">
  44. <xs:restriction base="xs:string">
  45. <xs:enumeration value="ltr"/>
  46. <xs:enumeration value="rtl"/>
  47. <xs:enumeration value="auto"/>
  48. </xs:restriction>
  49. </xs:simpleType>
  50. <xs:simpleType name="appliesTo">
  51. <xs:restriction base="xs:string">
  52. <xs:enumeration value="source"/>
  53. <xs:enumeration value="target"/>
  54. </xs:restriction>
  55. </xs:simpleType>
  56. <xs:simpleType name="userDefinedValue">
  57. <xs:restriction base="xs:string">
  58. <xs:pattern value="[^\s:]+:[^\s:]+"/>
  59. </xs:restriction>
  60. </xs:simpleType>
  61. <xs:simpleType name="attrType_type">
  62. <xs:restriction base="xs:string">
  63. <xs:enumeration value="fmt"/>
  64. <xs:enumeration value="ui"/>
  65. <xs:enumeration value="quote"/>
  66. <xs:enumeration value="link"/>
  67. <xs:enumeration value="image"/>
  68. <xs:enumeration value="other"/>
  69. </xs:restriction>
  70. </xs:simpleType>
  71. <xs:simpleType name="typeForMrkValues">
  72. <xs:restriction base="xs:NMTOKEN">
  73. <xs:enumeration value="generic"/>
  74. <xs:enumeration value="comment"/>
  75. <xs:enumeration value="term"/>
  76. </xs:restriction>
  77. </xs:simpleType>
  78. <xs:simpleType name="attrType_typeForMrk">
  79. <xs:union memberTypes="xlf:typeForMrkValues xlf:userDefinedValue"/>
  80. </xs:simpleType>
  81. <xs:simpleType name="priorityValue">
  82. <xs:restriction base="xs:positiveInteger">
  83. <xs:minInclusive value="1"/>
  84. <xs:maxInclusive value="10"/>
  85. </xs:restriction>
  86. </xs:simpleType>
  87. <xs:simpleType name="stateType">
  88. <xs:restriction base="xs:string">
  89. <xs:enumeration value="initial"/>
  90. <xs:enumeration value="translated"/>
  91. <xs:enumeration value="reviewed"/>
  92. <xs:enumeration value="final"/>
  93. </xs:restriction>
  94. </xs:simpleType>
  95. <!-- Structural Elements -->
  96. <xs:element name="xliff">
  97. <xs:complexType mixed="false">
  98. <xs:sequence>
  99. <xs:element minOccurs="1" maxOccurs="unbounded" ref="xlf:file"/>
  100. </xs:sequence>
  101. <xs:attribute name="version" use="required"/>
  102. <xs:attribute name="srcLang" use="required"/>
  103. <xs:attribute name="trgLang" use="optional"/>
  104. <xs:attribute ref="xml:space" use="optional" default="default"/>
  105. <xs:anyAttribute namespace="##other" processContents="lax"/>
  106. </xs:complexType>
  107. </xs:element>
  108. <xs:element name="file">
  109. <xs:complexType mixed="false">
  110. <xs:sequence>
  111. <xs:element minOccurs="0" maxOccurs="1" ref="xlf:skeleton"/>
  112. <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"
  113. processContents="lax"/>
  114. <xs:element minOccurs="0" maxOccurs="1" ref="xlf:notes"/>
  115. <xs:choice minOccurs="1" maxOccurs="unbounded">
  116. <xs:element ref="xlf:unit"/>
  117. <xs:element ref="xlf:group"/>
  118. </xs:choice>
  119. </xs:sequence>
  120. <xs:attribute name="id" use="required" type="xs:NMTOKEN"/>
  121. <xs:attribute name="canResegment" use="optional" type="xlf:yesNo" default="yes"/>
  122. <xs:attribute name="original" use="optional"/>
  123. <xs:attribute name="translate" use="optional" type="xlf:yesNo" default="yes"/>
  124. <xs:attribute name="srcDir" use="optional" type="xlf:dirValue" default="auto"/>
  125. <xs:attribute name="trgDir" use="optional" type="xlf:dirValue" default="auto"/>
  126. <xs:attribute ref="xml:space" use="optional"/>
  127. <xs:anyAttribute namespace="##other" processContents="lax"/>
  128. </xs:complexType>
  129. </xs:element>
  130. <xs:element name="skeleton">
  131. <xs:complexType mixed="true">
  132. <xs:sequence>
  133. <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"
  134. processContents="lax"/>
  135. </xs:sequence>
  136. <xs:attribute name="href" use="optional"/>
  137. </xs:complexType>
  138. </xs:element>
  139. <xs:element name="group">
  140. <xs:complexType mixed="false">
  141. <xs:sequence>
  142. <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"
  143. processContents="lax"/>
  144. <xs:element minOccurs="0" maxOccurs="1" ref="xlf:notes"/>
  145. <xs:choice minOccurs="0" maxOccurs="unbounded">
  146. <xs:element ref="xlf:unit"/>
  147. <xs:element ref="xlf:group"/>
  148. </xs:choice>
  149. </xs:sequence>
  150. <xs:attribute name="id" use="required" type="xs:NMTOKEN"/>
  151. <xs:attribute name="name" use="optional"/>
  152. <xs:attribute name="canResegment" use="optional" type="xlf:yesNo"/>
  153. <xs:attribute name="translate" use="optional" type="xlf:yesNo"/>
  154. <xs:attribute name="srcDir" use="optional" type="xlf:dirValue"/>
  155. <xs:attribute name="trgDir" use="optional" type="xlf:dirValue"/>
  156. <xs:attribute name="type" use="optional" type="xlf:userDefinedValue"/>
  157. <xs:attribute ref="xml:space" use="optional"/>
  158. <xs:anyAttribute namespace="##other" processContents="lax"/>
  159. </xs:complexType>
  160. </xs:element>
  161. <xs:element name="unit">
  162. <xs:complexType mixed="false">
  163. <xs:sequence>
  164. <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other"
  165. processContents="lax"/>
  166. <xs:element minOccurs="0" maxOccurs="1" ref="xlf:notes"/>
  167. <xs:element minOccurs="0" maxOccurs="1" ref="xlf:originalData"/>
  168. <xs:choice minOccurs="1" maxOccurs="unbounded">
  169. <xs:element ref="xlf:segment"/>
  170. <xs:element ref="xlf:ignorable"/>
  171. </xs:choice>
  172. </xs:sequence>
  173. <xs:attribute name="id" use="required" type="xs:NMTOKEN"/>
  174. <xs:attribute name="name" use="optional"/>
  175. <xs:attribute name="canResegment" use="optional" type="xlf:yesNo"/>
  176. <xs:attribute name="translate" use="optional" type="xlf:yesNo"/>
  177. <xs:attribute name="srcDir" use="optional" type="xlf:dirValue"/>
  178. <xs:attribute name="trgDir" use="optional" type="xlf:dirValue"/>
  179. <xs:attribute ref="xml:space" use="optional"/>
  180. <xs:attribute name="type" use="optional" type="xlf:userDefinedValue"/>
  181. <xs:anyAttribute namespace="##other" processContents="lax"/>
  182. </xs:complexType>
  183. </xs:element>
  184. <xs:element name="segment">
  185. <xs:complexType mixed="false">
  186. <xs:sequence>
  187. <xs:element minOccurs="1" maxOccurs="1" ref="xlf:source"/>
  188. <xs:element minOccurs="0" maxOccurs="1" ref="xlf:target"/>
  189. </xs:sequence>
  190. <xs:attribute name="id" use="optional" type="xs:NMTOKEN"/>
  191. <xs:attribute name="canResegment" use="optional" type="xlf:yesNo"/>
  192. <xs:attribute name="state" use="optional" type="xlf:stateType" default="initial"/>
  193. <xs:attribute name="subState" use="optional"/>
  194. </xs:complexType>
  195. </xs:element>
  196. <xs:element name="ignorable">
  197. <xs:complexType mixed="false">
  198. <xs:sequence>
  199. <xs:element minOccurs="1" maxOccurs="1" ref="xlf:source"/>
  200. <xs:element minOccurs="0" maxOccurs="1" ref="xlf:target"/>
  201. </xs:sequence>
  202. <xs:attribute name="id" use="optional" type="xs:NMTOKEN"/>
  203. </xs:complexType>
  204. </xs:element>
  205. <xs:element name="notes">
  206. <xs:complexType mixed="false">
  207. <xs:sequence>
  208. <xs:element minOccurs="1" maxOccurs="unbounded" ref="xlf:note"/>
  209. </xs:sequence>
  210. </xs:complexType>
  211. </xs:element>
  212. <xs:element name="note">
  213. <xs:complexType mixed="true">
  214. <xs:attribute name="id" use="optional" type="xs:NMTOKEN"/>
  215. <xs:attribute name="appliesTo" use="optional" type="xlf:appliesTo"/>
  216. <xs:attribute name="category" use="optional"/>
  217. <xs:attribute name="priority" use="optional" type="xlf:priorityValue" default="1"/>
  218. <xs:anyAttribute namespace="##other" processContents="lax"/>
  219. </xs:complexType>
  220. </xs:element>
  221. <xs:element name="originalData">
  222. <xs:complexType mixed="false">
  223. <xs:sequence>
  224. <xs:element minOccurs="1" maxOccurs="unbounded" ref="xlf:data"/>
  225. </xs:sequence>
  226. </xs:complexType>
  227. </xs:element>
  228. <xs:element name="data">
  229. <xs:complexType mixed="true">
  230. <xs:sequence>
  231. <xs:element minOccurs="0" maxOccurs="unbounded" ref="xlf:cp"/>
  232. </xs:sequence>
  233. <xs:attribute name="id" use="required" type="xs:NMTOKEN"/>
  234. <xs:attribute name="dir" use="optional" type="xlf:dirValue" default="auto"/>
  235. <xs:attribute ref="xml:space" use="optional" fixed="preserve"/>
  236. </xs:complexType>
  237. </xs:element>
  238. <xs:element name="source">
  239. <xs:complexType mixed="true">
  240. <xs:group ref="xlf:inline" minOccurs="0" maxOccurs="unbounded"/>
  241. <xs:attribute ref="xml:lang" use="optional"/>
  242. <xs:attribute ref="xml:space" use="optional"/>
  243. </xs:complexType>
  244. </xs:element>
  245. <xs:element name="target">
  246. <xs:complexType mixed="true">
  247. <xs:group ref="xlf:inline" minOccurs="0" maxOccurs="unbounded"/>
  248. <xs:attribute ref="xml:lang" use="optional"/>
  249. <xs:attribute ref="xml:space" use="optional"/>
  250. <xs:attribute name="order" use="optional" type="xs:positiveInteger"/>
  251. </xs:complexType>
  252. </xs:element>
  253. <!-- Inline Elements -->
  254. <xs:element name="cp">
  255. <!-- Code Point -->
  256. <xs:complexType mixed="false">
  257. <xs:attribute name="hex" use="required" type="xs:hexBinary"/>
  258. </xs:complexType>
  259. </xs:element>
  260. <xs:element name="ph">
  261. <!-- Placeholder -->
  262. <xs:complexType mixed="false">
  263. <xs:attribute name="canCopy" use="optional" type="xlf:yesNo" default="yes"/>
  264. <xs:attribute name="canDelete" use="optional" type="xlf:yesNo" default="yes"/>
  265. <xs:attribute name="canReorder" use="optional" type="xlf:yesNoFirstNo" default="yes"/>
  266. <xs:attribute name="copyOf" use="optional" type="xs:NMTOKEN"/>
  267. <xs:attribute name="disp" use="optional"/>
  268. <xs:attribute name="equiv" use="optional"/>
  269. <xs:attribute name="id" use="required" type="xs:NMTOKEN"/>
  270. <xs:attribute name="dataRef" use="optional" type="xs:NMTOKEN"/>
  271. <xs:attribute name="subFlows" use="optional" type="xs:NMTOKENS"/>
  272. <xs:attribute name="subType" use="optional" type="xlf:userDefinedValue"/>
  273. <xs:attribute name="type" use="optional" type="xlf:attrType_type"/>
  274. <xs:anyAttribute namespace="##other" processContents="lax"/>
  275. </xs:complexType>
  276. </xs:element>
  277. <xs:element name="pc">
  278. <!-- Paired Code -->
  279. <xs:complexType mixed="true">
  280. <xs:group ref="xlf:inline" minOccurs="0" maxOccurs="unbounded"/>
  281. <xs:attribute name="canCopy" use="optional" type="xlf:yesNo" default="yes"/>
  282. <xs:attribute name="canDelete" use="optional" type="xlf:yesNo" default="yes"/>
  283. <xs:attribute name="canOverlap" use="optional" type="xlf:yesNo"/>
  284. <xs:attribute name="canReorder" use="optional" type="xlf:yesNoFirstNo" default="yes"/>
  285. <xs:attribute name="copyOf" use="optional" type="xs:NMTOKEN"/>
  286. <xs:attribute name="dispEnd" use="optional"/>
  287. <xs:attribute name="dispStart" use="optional"/>
  288. <xs:attribute name="equivEnd" use="optional"/>
  289. <xs:attribute name="equivStart" use="optional"/>
  290. <xs:attribute name="id" use="required" type="xs:NMTOKEN"/>
  291. <xs:attribute name="dataRefEnd" use="optional" type="xs:NMTOKEN"/>
  292. <xs:attribute name="dataRefStart" use="optional" type="xs:NMTOKEN"/>
  293. <xs:attribute name="subFlowsEnd" use="optional" type="xs:NMTOKENS"/>
  294. <xs:attribute name="subFlowsStart" use="optional" type="xs:NMTOKENS"/>
  295. <xs:attribute name="subType" use="optional" type="xlf:userDefinedValue"/>
  296. <xs:attribute name="type" use="optional" type="xlf:attrType_type"/>
  297. <xs:attribute name="dir" use="optional" type="xlf:dirValue"/>
  298. <xs:anyAttribute namespace="##other" processContents="lax"/>
  299. </xs:complexType>
  300. </xs:element>
  301. <xs:element name="sc">
  302. <!-- Start Code -->
  303. <xs:complexType mixed="false">
  304. <xs:attribute name="canCopy" use="optional" type="xlf:yesNo" default="yes"/>
  305. <xs:attribute name="canDelete" use="optional" type="xlf:yesNo" default="yes"/>
  306. <xs:attribute name="canOverlap" use="optional" type="xlf:yesNo" default="yes"/>
  307. <xs:attribute name="canReorder" use="optional" type="xlf:yesNoFirstNo" default="yes"/>
  308. <xs:attribute name="copyOf" use="optional" type="xs:NMTOKEN"/>
  309. <xs:attribute name="dataRef" use="optional" type="xs:NMTOKEN"/>
  310. <xs:attribute name="dir" use="optional" type="xlf:dirValue"/>
  311. <xs:attribute name="disp" use="optional"/>
  312. <xs:attribute name="equiv" use="optional"/>
  313. <xs:attribute name="id" use="required" type="xs:NMTOKEN"/>
  314. <xs:attribute name="isolated" use="optional" type="xlf:yesNo" default="no"/>
  315. <xs:attribute name="subFlows" use="optional" type="xs:NMTOKENS"/>
  316. <xs:attribute name="subType" use="optional" type="xlf:userDefinedValue"/>
  317. <xs:attribute name="type" use="optional" type="xlf:attrType_type"/>
  318. <xs:anyAttribute namespace="##other" processContents="lax"/>
  319. </xs:complexType>
  320. </xs:element>
  321. <xs:element name="ec">
  322. <!-- End Code -->
  323. <xs:complexType mixed="false">
  324. <xs:attribute name="canCopy" use="optional" type="xlf:yesNo" default="yes"/>
  325. <xs:attribute name="canDelete" use="optional" type="xlf:yesNo" default="yes"/>
  326. <xs:attribute name="canOverlap" use="optional" type="xlf:yesNo" default="yes"/>
  327. <xs:attribute name="canReorder" use="optional" type="xlf:yesNoFirstNo" default="yes"/>
  328. <xs:attribute name="copyOf" use="optional" type="xs:NMTOKEN"/>
  329. <xs:attribute name="dataRef" use="optional" type="xs:NMTOKEN"/>
  330. <xs:attribute name="dir" use="optional" type="xlf:dirValue"/>
  331. <xs:attribute name="disp" use="optional"/>
  332. <xs:attribute name="equiv" use="optional"/>
  333. <xs:attribute name="id" use="optional" type="xs:NMTOKEN"/>
  334. <xs:attribute name="isolated" use="optional" type="xlf:yesNo" default="no"/>
  335. <xs:attribute name="startRef" use="optional" type="xs:NMTOKEN"/>
  336. <xs:attribute name="subFlows" use="optional" type="xs:NMTOKENS"/>
  337. <xs:attribute name="subType" use="optional" type="xlf:userDefinedValue"/>
  338. <xs:attribute name="type" use="optional" type="xlf:attrType_type"/>
  339. <xs:anyAttribute namespace="##other" processContents="lax"/>
  340. </xs:complexType>
  341. </xs:element>
  342. <xs:element name="mrk">
  343. <!-- Annotation Marker -->
  344. <xs:complexType mixed="true">
  345. <xs:group ref="xlf:inline" minOccurs="0" maxOccurs="unbounded"/>
  346. <xs:attribute name="id" use="required" type="xs:NMTOKEN"/>
  347. <xs:attribute name="translate" use="optional" type="xlf:yesNo"/>
  348. <xs:attribute name="type" use="optional" type="xlf:attrType_typeForMrk"/>
  349. <xs:attribute name="ref" use="optional" type="xs:anyURI"/>
  350. <xs:attribute name="value" use="optional"/>
  351. <xs:anyAttribute namespace="##other" processContents="lax"/>
  352. </xs:complexType>
  353. </xs:element>
  354. <xs:element name="sm">
  355. <!-- Start Annotation Marker -->
  356. <xs:complexType mixed="false">
  357. <xs:attribute name="id" use="required" type="xs:NMTOKEN"/>
  358. <xs:attribute name="translate" use="optional" type="xlf:yesNo"/>
  359. <xs:attribute name="type" use="optional" type="xlf:attrType_typeForMrk"/>
  360. <xs:attribute name="ref" use="optional" type="xs:anyURI"/>
  361. <xs:attribute name="value" use="optional"/>
  362. <xs:anyAttribute namespace="##other" processContents="lax"/>
  363. </xs:complexType>
  364. </xs:element>
  365. <xs:element name="em">
  366. <!-- End Annotation Marker -->
  367. <xs:complexType mixed="false">
  368. <xs:attribute name="startRef" use="required" type="xs:NMTOKEN"/>
  369. </xs:complexType>
  370. </xs:element>
  371. </xs:schema>