OSDN Git Service

130128版スキーマ対応
[mikutoga/Pmd2XML.git] / src / main / resources / jp / sfjp / mikutoga / pmd / xml / resources / pmdxml-130128.xsd
1 <?xml version="1.0" encoding="UTF-8" ?>
2
3 <!--
4   MikuMikuDance
5     model-data(*.pmd) on XML
6     schema definition
7
8   License : The MIT License
9   Copyright(c) 2013 MikuToga Partners
10 -->
11
12
13 <xsd:schema
14     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
15
16     targetNamespace="http://mikutoga.sourceforge.jp/xml/ns/pmdxml/130128"
17     xmlns:tns      ="http://mikutoga.sourceforge.jp/xml/ns/pmdxml/130128"
18
19     elementFormDefault="qualified"
20     version="130128"
21 >
22
23     <xsd:annotation>
24         <xsd:documentation>
25             MikuMikuDance model-data(*.pmd) on XML.
26             License : The MIT License
27             Copyright(c) 2013 MikuToga Partners
28         </xsd:documentation>
29     </xsd:annotation>
30
31
32     <xsd:import
33         namespace="http://www.w3.org/XML/1998/namespace"
34         schemaLocation="http://www.w3.org/2001/xml.xsd" />
35
36
37     <!-- ROOT -->
38     <xsd:element name="pmdModel">
39         <xsd:annotation>
40             <xsd:documentation>
41                 Root element.
42             </xsd:documentation>
43         </xsd:annotation>
44
45         <xsd:complexType>
46             <xsd:sequence>
47                 <xsd:element ref="tns:i18nName"
48                     minOccurs="0" maxOccurs="unbounded" />
49                 <xsd:element ref="tns:description"
50                     minOccurs="1" maxOccurs="unbounded" />
51                 <xsd:element ref="tns:license"
52                     minOccurs="0" maxOccurs="unbounded" />
53                 <xsd:element ref="tns:credits"
54                     minOccurs="0" maxOccurs="unbounded" />
55                 <xsd:element ref="tns:meta"
56                     minOccurs="0" maxOccurs="unbounded" />
57                 <xsd:element ref="tns:materialList" />
58                 <xsd:element ref="tns:toonMap" />
59                 <xsd:element ref="tns:boneList" />
60                 <xsd:element ref="tns:boneGroupList" />
61                 <xsd:element ref="tns:ikChainList" />
62                 <xsd:element ref="tns:morphList" />
63                 <xsd:element ref="tns:rigidList" />
64                 <xsd:element ref="tns:rigidGroupList" />
65                 <xsd:element ref="tns:jointList" />
66                 <xsd:element ref="tns:surfaceGroupList" />
67                 <xsd:element ref="tns:vertexList" />
68             </xsd:sequence>
69             <xsd:attribute name="name" type="xsd:string" use="required" />
70             <xsd:attribute
71                 name="schemaVersion"
72                 type="xsd:string"
73                 use="required"
74                 fixed="130128" />
75         </xsd:complexType>
76
77         <xsd:unique name="ModelLang">
78             <xsd:selector xpath="./tns:i18nName" />
79             <xsd:field xpath="@lang" />
80         </xsd:unique>
81
82         <xsd:unique name="DescriptionLang">
83             <xsd:selector xpath="./tns:description" />
84             <xsd:field xpath="@lang" />
85         </xsd:unique>
86
87         <xsd:unique name="LicenseLang">
88             <xsd:selector xpath="./tns:license" />
89             <xsd:field xpath="@lang" />
90         </xsd:unique>
91
92         <xsd:unique name="CreditsLang">
93             <xsd:selector xpath="./tns:credits" />
94             <xsd:field xpath="@lang" />
95         </xsd:unique>
96
97         <xsd:keyref name="Material-SurfaceGroup" refer="tns:SurfaceGroup-Id">
98             <xsd:selector xpath="./tns:materialList/tns:material" />
99             <xsd:field xpath="@surfaceGroupIdRef" />
100         </xsd:keyref>
101
102         <xsd:keyref name="Material-Toon" refer="tns:Toon-Id">
103             <xsd:selector xpath="./tns:materialList/tns:material/tns:toon" />
104             <xsd:field xpath="@toonFileIdRef" />
105         </xsd:keyref>
106
107         <xsd:keyref name="Bone-prev" refer="tns:Bone-Id">
108             <xsd:selector xpath="./tns:boneList/tns:bone/tns:boneChain" />
109             <xsd:field xpath="@prevBoneIdRef" />
110         </xsd:keyref>
111
112         <xsd:keyref name="Bone-next" refer="tns:Bone-Id">
113             <xsd:selector xpath="./tns:boneList/tns:bone/tns:boneChain" />
114             <xsd:field xpath="@nextBoneIdRef" />
115         </xsd:keyref>
116
117         <xsd:keyref name="Bone-source" refer="tns:Bone-Id">
118             <xsd:selector xpath="./tns:boneList/tns:bone/tns:sourceBone" />
119             <xsd:field xpath="@boneIdRef" />
120         </xsd:keyref>
121
122         <xsd:keyref name="BoneGroup-Bone" refer="tns:Bone-Id">
123             <xsd:selector xpath="./tns:boneGroupList/tns:boneGroup/tns:boneGroupMember" />
124             <xsd:field xpath="@boneIdRef" />
125         </xsd:keyref>
126
127         <xsd:keyref name="IkChain-Bone" refer="tns:Bone-Id">
128             <xsd:selector xpath="./tns:ikChainList/tns:ikChain" />
129             <xsd:field xpath="@ikBoneIdRef" />
130         </xsd:keyref>
131
132         <xsd:keyref name="IkChainPart-Bone" refer="tns:Bone-Id">
133             <xsd:selector xpath="./tns:ikChainList/tns:ikChain/tns:chainOrder" />
134             <xsd:field xpath="@boneIdRef" />
135         </xsd:keyref>
136
137         <xsd:keyref name="Morph-Vertex" refer="tns:Vertex-Id">
138             <xsd:selector xpath="./tns:morphList/tns:morph/tns:morphVertex" />
139             <xsd:field xpath="@vtxIdRef" />
140         </xsd:keyref>
141
142         <xsd:keyref name="Rigid-Bone" refer="tns:Bone-Id">
143             <xsd:selector xpath="./tns:rigidList/tns:rigid/tns:linkedBone" />
144             <xsd:field xpath="@boneIdRef" />
145         </xsd:keyref>
146
147         <xsd:keyref name="Rigid-RigidGroup" refer="tns:RigidGroup-Id">
148             <xsd:selector xpath="./tns:rigidList/tns:rigid/tns:throughRigidGroup" />
149             <xsd:field xpath="@rigidGroupIdRef" />
150         </xsd:keyref>
151
152         <xsd:keyref name="RigidGroup-Rigid" refer="tns:Rigid-Id">
153             <xsd:selector xpath="./tns:rigidGroupList/tns:rigidGroup/tns:rigidGroupMember" />
154             <xsd:field xpath="@rigidIdRef" />
155         </xsd:keyref>
156
157         <xsd:keyref name="Joint-Rigid1" refer="tns:Rigid-Id">
158             <xsd:selector xpath="./tns:jointList/tns:joint/tns:jointedRigidPair" />
159             <xsd:field xpath="@rigidIdRef1" />
160         </xsd:keyref>
161
162         <xsd:keyref name="Joint-Rigid2" refer="tns:Rigid-Id">
163             <xsd:selector xpath="./tns:jointList/tns:joint/tns:jointedRigidPair" />
164             <xsd:field xpath="@rigidIdRef2" />
165         </xsd:keyref>
166
167         <xsd:keyref name="Surface-Vertex1" refer="tns:Vertex-Id">
168             <xsd:selector xpath="./tns:surfaceGroupList/tns:surfaceGroup/tns:surface" />
169             <xsd:field xpath="@vtxIdRef1" />
170         </xsd:keyref>
171
172         <xsd:keyref name="Surface-Vertex2" refer="tns:Vertex-Id">
173             <xsd:selector xpath="./tns:surfaceGroupList/tns:surfaceGroup/tns:surface" />
174             <xsd:field xpath="@vtxIdRef2" />
175         </xsd:keyref>
176
177         <xsd:keyref name="Surface-Vertex3" refer="tns:Vertex-Id">
178             <xsd:selector xpath="./tns:surfaceGroupList/tns:surfaceGroup/tns:surface" />
179             <xsd:field xpath="@vtxIdRef3" />
180         </xsd:keyref>
181
182         <xsd:keyref name="Vertex-Bone1" refer="tns:Bone-Id">
183             <xsd:selector xpath="./tns:vertexList/tns:vertex/tns:skinning" />
184             <xsd:field xpath="@boneIdRef1" />
185         </xsd:keyref>
186
187         <xsd:keyref name="Vertex-Bone2" refer="tns:Bone-Id">
188             <xsd:selector xpath="./tns:vertexList/tns:vertex/tns:skinning" />
189             <xsd:field xpath="@boneIdRef2" />
190         </xsd:keyref>
191
192     </xsd:element>
193
194
195     <xsd:simpleType name="NonJaLanguage">
196         <xsd:annotation>
197             <xsd:documentation>
198                 xsd:language except "ja" (Primary-language in MMD)
199             </xsd:documentation>
200         </xsd:annotation>
201
202         <xsd:restriction base="xsd:language">
203             <xsd:pattern value="([^jJ].*)|([jJ][^aA].*)|([jJ][aA].+)" />
204         </xsd:restriction>
205
206     </xsd:simpleType>
207
208
209     <xsd:element name="i18nName">
210         <xsd:annotation>
211             <xsd:documentation>
212                 Multilingual name.
213             </xsd:documentation>
214         </xsd:annotation>
215
216         <xsd:complexType>
217             <xsd:attribute
218                 name="lang"
219                 type="tns:NonJaLanguage"
220                 use="required" />
221             <xsd:attribute
222                 name="name"
223                 type="xsd:string"
224                 use="required" />
225         </xsd:complexType>
226
227     </xsd:element>
228
229
230     <xsd:element name="br">
231         <xsd:annotation>
232             <xsd:documentation>
233                 Break line.
234             </xsd:documentation>
235         </xsd:annotation>
236     </xsd:element>
237
238
239     <xsd:complexType name="bredContent" mixed="true">
240         <xsd:annotation>
241             <xsd:documentation>
242                 Free paragraph with break-line.
243                 Any raw-newline(CR,CRLF) will be ignored later.
244                 But, other white-spaces will be preserved.
245             </xsd:documentation>
246         </xsd:annotation>
247
248         <xsd:sequence>
249             <xsd:element ref="tns:br" minOccurs="0" maxOccurs="unbounded" />
250         </xsd:sequence>
251
252         <xsd:attribute
253             name="lang"
254             type="xsd:language"
255             use="optional"
256             default="ja" />
257         <xsd:attribute ref="xml:space" use="optional" fixed="preserve" />
258
259     </xsd:complexType>
260
261
262     <xsd:element name="description" type="tns:bredContent">
263         <xsd:annotation>
264             <xsd:documentation>
265                 Description note about model.
266             </xsd:documentation>
267         </xsd:annotation>
268     </xsd:element>
269
270
271     <xsd:element name="license" type="tns:bredContent">
272         <xsd:annotation>
273             <xsd:documentation>
274                 License term of usage.
275             </xsd:documentation>
276         </xsd:annotation>
277     </xsd:element>
278
279
280     <xsd:element name="credits" type="tns:bredContent">
281         <xsd:annotation>
282             <xsd:documentation>
283                 Credits for someone.
284             </xsd:documentation>
285         </xsd:annotation>
286     </xsd:element>
287
288
289     <xsd:element name="meta">
290         <xsd:annotation>
291             <xsd:documentation>
292                 Meta-information of model.
293                 Use free.
294                 but, some meta-name has recommended usage.
295                 + "generator" (Generator application name)
296                 + "siteURL" (Website URL)
297                 + "imageURL" (Thumbnail image URL)
298             </xsd:documentation>
299         </xsd:annotation>
300
301         <xsd:complexType>
302             <xsd:attribute
303                 name="name"
304                 type="xsd:NCName"
305                 use="required" />
306             <xsd:attribute
307                 name="content"
308                 type="xsd:string"
309                 use="required" />
310         </xsd:complexType>
311
312     </xsd:element>
313
314
315     <xsd:element name="materialList">
316         <xsd:annotation>
317             <xsd:documentation>
318                 Material list.
319                 All visual things can be tracked from here.
320             </xsd:documentation>
321         </xsd:annotation>
322
323         <xsd:complexType>
324             <xsd:sequence>
325                 <xsd:element
326                     ref="tns:material"
327                     minOccurs="0" maxOccurs="unbounded" />
328             </xsd:sequence>
329         </xsd:complexType>
330
331         <xsd:unique name="SurfaceGroupRef">
332             <xsd:selector xpath="./tns:material" />
333             <xsd:field xpath="@surfaceGroupIdRef" />
334         </xsd:unique>
335
336     </xsd:element>
337
338
339     <xsd:element name="material">
340         <xsd:annotation>
341             <xsd:documentation>
342                 Material definition.
343                 Colors, shading, any other definitions.
344             </xsd:documentation>
345         </xsd:annotation>
346
347         <xsd:complexType>
348             <xsd:sequence>
349                 <xsd:element ref="tns:i18nName" minOccurs="0" maxOccurs="unbounded"/>
350                 <xsd:element ref="tns:diffuse" />
351                 <xsd:element ref="tns:specular" />
352                 <xsd:element ref="tns:ambient" />
353                 <xsd:element ref="tns:toon" minOccurs="0" />
354                 <xsd:element ref="tns:textureFile" minOccurs="0" />
355                 <xsd:element ref="tns:spheremapFile" minOccurs="0" />
356             </xsd:sequence>
357
358             <xsd:attribute
359                 name="name"
360                 type="xsd:string"
361                 use="optional" />
362             <xsd:attribute
363                 name="showEdge"
364                 type="xsd:boolean"
365                 use="required" />
366             <xsd:attribute
367                 name="surfaceGroupIdRef"
368                 type="xsd:NCName"
369                 use="required" />
370         </xsd:complexType>
371
372     </xsd:element>
373
374
375     <xsd:simpleType name="SrgbCompo">
376         <xsd:annotation>
377             <xsd:documentation>
378                 sRGB component value. (0.0 - 1.0)
379             </xsd:documentation>
380         </xsd:annotation>
381
382         <xsd:restriction base="xsd:float">
383             <xsd:minInclusive value="0.0" />
384             <xsd:maxInclusive value="1.0" />
385         </xsd:restriction>
386
387     </xsd:simpleType>
388
389
390     <xsd:element name="diffuse">
391         <xsd:annotation>
392             <xsd:documentation>
393                 Diffuse color definition.
394             </xsd:documentation>
395         </xsd:annotation>
396
397         <xsd:complexType>
398             <xsd:attribute name="r" type="tns:SrgbCompo" use="required" />
399             <xsd:attribute name="g" type="tns:SrgbCompo" use="required" />
400             <xsd:attribute name="b" type="tns:SrgbCompo" use="required" />
401             <xsd:attribute name="alpha" type="tns:SrgbCompo" use="required" />
402         </xsd:complexType>
403
404     </xsd:element>
405
406
407     <xsd:element name="specular">
408         <xsd:annotation>
409             <xsd:documentation>
410                 Specular color definition.
411             </xsd:documentation>
412         </xsd:annotation>
413
414         <xsd:complexType>
415             <xsd:attribute name="r" type="tns:SrgbCompo" use="required" />
416             <xsd:attribute name="g" type="tns:SrgbCompo" use="required" />
417             <xsd:attribute name="b" type="tns:SrgbCompo" use="required" />
418             <xsd:attribute name="shininess" type="xsd:float" use="required" />
419         </xsd:complexType>
420
421     </xsd:element>
422
423
424     <xsd:element name="ambient">
425         <xsd:annotation>
426             <xsd:documentation>
427                 Ambient color definition.
428             </xsd:documentation>
429         </xsd:annotation>
430
431         <xsd:complexType>
432             <xsd:attribute name="r" type="tns:SrgbCompo" use="required" />
433             <xsd:attribute name="g" type="tns:SrgbCompo" use="required" />
434             <xsd:attribute name="b" type="tns:SrgbCompo" use="required" />
435         </xsd:complexType>
436
437     </xsd:element>
438
439
440     <xsd:element name="toon">
441         <xsd:annotation>
442             <xsd:documentation>
443                 Reference for Toon-image.
444             </xsd:documentation>
445         </xsd:annotation>
446
447         <xsd:complexType>
448             <xsd:attribute
449                 name="toonFileIdRef"
450                 type="xsd:NCName"
451                 use="required" />
452         </xsd:complexType>
453
454     </xsd:element>
455
456
457     <xsd:element name="textureFile">
458         <xsd:annotation>
459             <xsd:documentation>
460                 Texture file information.
461             </xsd:documentation>
462         </xsd:annotation>
463
464         <xsd:complexType>
465             <xsd:attribute
466                 name="winFileName"
467                 type="xsd:string"
468                 use="required" />
469         </xsd:complexType>
470
471     </xsd:element>
472
473
474     <xsd:element name="spheremapFile">
475         <xsd:annotation>
476             <xsd:documentation>
477                 Sphere-map file information.
478             </xsd:documentation>
479         </xsd:annotation>
480
481         <xsd:complexType>
482             <xsd:attribute
483                 name="winFileName"
484                 type="xsd:string"
485                 use="required" />
486         </xsd:complexType>
487
488     </xsd:element>
489
490
491     <xsd:element name="toonMap">
492         <xsd:annotation>
493             <xsd:documentation>
494                 Toon-file mappings.
495             </xsd:documentation>
496         </xsd:annotation>
497
498         <xsd:complexType>
499             <xsd:sequence>
500                 <xsd:element
501                     ref="tns:toonDef"
502                     minOccurs="0" maxOccurs="unbounded" />
503             </xsd:sequence>
504         </xsd:complexType>
505
506         <xsd:unique name="ToonIndex">
507             <xsd:selector xpath="./tns:toonDef" />
508             <xsd:field xpath="@index" />
509         </xsd:unique>
510
511         <xsd:key name="Toon-Id">
512             <xsd:selector xpath="./tns:toonDef" />
513             <xsd:field xpath="@toonFileId" />
514         </xsd:key>
515
516     </xsd:element>
517
518
519     <xsd:element name="toonDef">
520         <xsd:annotation>
521             <xsd:documentation>
522                 Toon-file information.
523             </xsd:documentation>
524         </xsd:annotation>
525
526         <xsd:complexType>
527             <xsd:attribute
528                 name="toonFileId"
529                 type="xsd:NCName"
530                 use="required" />
531             <xsd:attribute
532                 name="index"
533                 type="xsd:nonNegativeInteger"
534                 use="required" />
535             <xsd:attribute
536                 name="winFileName"
537                 type="xsd:string"
538                 use="required" />
539         </xsd:complexType>
540
541     </xsd:element>
542
543
544     <xsd:element name="boneList">
545         <xsd:annotation>
546             <xsd:documentation>
547                 List of bone information.
548             </xsd:documentation>
549         </xsd:annotation>
550
551         <xsd:complexType>
552             <xsd:sequence>
553                 <xsd:element ref="tns:bone" minOccurs="0" maxOccurs="unbounded" />
554             </xsd:sequence>
555         </xsd:complexType>
556
557         <xsd:key name="Bone-Id">
558             <xsd:selector xpath="./tns:bone" />
559             <xsd:field xpath="@boneId" />
560         </xsd:key>
561 <!--
562         <xsd:unique name="BoneName">
563             <xsd:selector xpath="./tns:bone" />
564             <xsd:field xpath="@name" />
565         </xsd:unique>
566 -->
567     </xsd:element>
568
569
570     <xsd:simpleType name="BoneType">
571         <xsd:annotation>
572             <xsd:documentation>
573                 bone types.
574             </xsd:documentation>
575         </xsd:annotation>
576
577         <xsd:restriction base="xsd:string">
578             <xsd:enumeration value="ROTATE" />      <!-- 回転 -->
579             <xsd:enumeration value="ROTMOV" />      <!-- 回転/移動 -->
580             <xsd:enumeration value="IK" />          <!-- IK -->
581             <xsd:enumeration value="UNKNOWN" />     <!-- 不明 -->
582             <xsd:enumeration value="UNDERIK" />     <!-- IK影響下(回転) -->
583             <xsd:enumeration value="UNDERROT" />    <!-- 回転影響下 -->
584             <xsd:enumeration value="IKCONNECTED" /> <!-- IK接続先 -->
585             <xsd:enumeration value="HIDDEN" />      <!-- 非表示 -->
586             <xsd:enumeration value="TWIST" />       <!-- 捩り -->
587             <xsd:enumeration value="LINKEDROT" />   <!-- 回転連動 -->
588         </xsd:restriction>
589
590     </xsd:simpleType>
591
592
593     <xsd:element name="bone">
594         <xsd:annotation>
595             <xsd:documentation>
596                 Bone definition.
597             </xsd:documentation>
598         </xsd:annotation>
599
600         <xsd:complexType>
601             <xsd:sequence>
602                 <xsd:element ref="tns:i18nName" minOccurs="0" maxOccurs="unbounded" />
603                 <xsd:element ref="tns:position" />
604                 <xsd:choice minOccurs="0">
605                     <xsd:element ref="tns:rotationRatio" />
606                     <xsd:element ref="tns:sourceBone" />
607                 </xsd:choice>
608                 <xsd:element ref="tns:boneChain" />
609             </xsd:sequence>
610
611             <xsd:attribute name="name" type="xsd:string" use="required" />
612             <xsd:attribute name="boneId" type="xsd:NCName" use="required" />
613             <xsd:attribute name="type" type="tns:BoneType" use="required" />
614         </xsd:complexType>
615
616     </xsd:element>
617
618
619     <xsd:element name="boneChain">
620         <xsd:annotation>
621             <xsd:documentation>
622                 Relationship-info between bones.
623             </xsd:documentation>
624         </xsd:annotation>
625
626         <xsd:complexType>
627             <xsd:attribute
628                 name="prevBoneIdRef"
629                 type="xsd:NCName"
630                 use="optional" />
631             <xsd:attribute
632                 name="nextBoneIdRef"
633                 type="xsd:NCName"
634                 use="optional" />
635         </xsd:complexType>
636
637     </xsd:element>
638
639
640     <xsd:element name="rotationRatio">
641         <xsd:annotation>
642             <xsd:documentation>
643                 Rotation ratio between Linked-rotationed bones.
644             </xsd:documentation>
645         </xsd:annotation>
646
647         <xsd:complexType>
648             <xsd:attribute
649                 name="ratio"
650                 type="xsd:integer"
651                 use="required" />
652         </xsd:complexType>
653
654     </xsd:element>
655
656
657     <xsd:element name="sourceBone">
658         <xsd:annotation>
659             <xsd:documentation>
660                 Reference to source-Bone (UNDERIK, IKCONNECTED, UNDERROT)
661             </xsd:documentation>
662         </xsd:annotation>
663
664         <xsd:complexType>
665             <xsd:attribute
666                 name="boneIdRef"
667                 type="xsd:NCName"
668                 use="required" />
669         </xsd:complexType>
670
671     </xsd:element>
672
673
674     <xsd:element name="boneGroupList">
675         <xsd:annotation>
676             <xsd:documentation>
677                 List of Bone-group.
678             </xsd:documentation>
679         </xsd:annotation>
680
681         <xsd:complexType>
682             <xsd:sequence>
683                 <xsd:element
684                     ref="tns:boneGroup"
685                     minOccurs="0" maxOccurs="unbounded" />
686             </xsd:sequence>
687         </xsd:complexType>
688
689 <!--
690         <xsd:unique name="BoneGroupName">
691             <xsd:selector xpath="./tns:boneGroup" />
692             <xsd:field xpath="@name" />
693         </xsd:unique>
694 -->
695     </xsd:element>
696
697
698     <xsd:element name="boneGroup">
699         <xsd:annotation>
700             <xsd:documentation>
701                 Bone-group.
702             </xsd:documentation>
703         </xsd:annotation>
704
705         <xsd:complexType>
706             <xsd:sequence>
707                 <xsd:element
708                     ref="tns:i18nName"
709                     minOccurs="0" maxOccurs="unbounded" />
710                 <xsd:element
711                     ref="tns:boneGroupMember"
712                     minOccurs="0" maxOccurs="unbounded" />
713             </xsd:sequence>
714             <xsd:attribute
715                 name="name"
716                 type="xsd:string"
717                 use="required" />
718         </xsd:complexType>
719
720     </xsd:element>
721
722
723     <xsd:element name="boneGroupMember">
724         <xsd:annotation>
725             <xsd:documentation>
726                 Member of Bone-group.
727             </xsd:documentation>
728         </xsd:annotation>
729
730         <xsd:complexType>
731             <xsd:attribute
732                 name="boneIdRef"
733                 type="xsd:NCName"
734                 use="required" />
735         </xsd:complexType>
736
737     </xsd:element>
738
739
740     <xsd:element name="ikChainList">
741         <xsd:annotation>
742             <xsd:documentation>
743                 List of IK chain.
744             </xsd:documentation>
745         </xsd:annotation>
746
747         <xsd:complexType>
748             <xsd:sequence>
749                 <xsd:element
750                     ref="tns:ikChain"
751                     minOccurs="0" maxOccurs="unbounded" />
752             </xsd:sequence>
753         </xsd:complexType>
754
755 <!--
756         <xsd:unique name="IkChainBone">
757             <xsd:selector xpath="./tns:ikChain" />
758             <xsd:field xpath="@ikBoneIdRef" />
759         </xsd:unique>
760 -->
761
762     </xsd:element>
763
764
765     <xsd:element name="ikChain">
766         <xsd:annotation>
767             <xsd:documentation>
768                 IK chained bones definition.
769             </xsd:documentation>
770         </xsd:annotation>
771
772         <xsd:complexType>
773             <xsd:sequence>
774                 <xsd:element
775                     ref="tns:chainOrder"
776                     minOccurs="1" maxOccurs="unbounded" />
777             </xsd:sequence>
778
779             <xsd:attribute
780                 name="ikBoneIdRef"
781                 type="xsd:NCName"
782                 use="required" />
783             <xsd:attribute
784                 name="recursiveDepth"
785                 type="xsd:integer"
786                 use="required" />
787             <xsd:attribute
788                 name="weight"
789                 type="xsd:float"
790                 use="required" />
791         </xsd:complexType>
792
793     </xsd:element>
794
795
796     <xsd:element name="chainOrder">
797         <xsd:annotation>
798             <xsd:documentation>
799                 Part of IK chained bones.
800             </xsd:documentation>
801         </xsd:annotation>
802
803         <xsd:complexType>
804             <xsd:attribute
805                 name="boneIdRef"
806                 type="xsd:NCName"
807                 use="required" />
808         </xsd:complexType>
809
810     </xsd:element>
811
812
813     <xsd:element name="morphList">
814         <xsd:annotation>
815             <xsd:documentation>
816                 List of morphing definition.
817             </xsd:documentation>
818         </xsd:annotation>
819
820         <xsd:complexType>
821             <xsd:sequence>
822                 <xsd:element
823                     ref="tns:morph"
824                     minOccurs="0" maxOccurs="unbounded" />
825             </xsd:sequence>
826         </xsd:complexType>
827
828 <!--
829         <xsd:unique name="MorphName">
830             <xsd:selector xpath="./tns:morph" />
831             <xsd:field xpath="@name" />
832         </xsd:unique>
833 -->
834     </xsd:element>
835
836
837     <xsd:simpleType name="MorphType">
838         <xsd:annotation>
839             <xsd:documentation>
840                 Morph types.
841             </xsd:documentation>
842         </xsd:annotation>
843
844         <xsd:restriction base="xsd:string">
845             <xsd:enumeration value="EYEBROW" /> <!-- まゆ -->
846             <xsd:enumeration value="EYE" />     <!-- 目 -->
847             <xsd:enumeration value="LIP" />     <!-- リップ -->
848             <xsd:enumeration value="EXTRA" />   <!-- その他 -->
849         </xsd:restriction>
850
851     </xsd:simpleType>
852
853
854     <xsd:element name="morph">
855         <xsd:annotation>
856             <xsd:documentation>
857                 Morphing definition.
858             </xsd:documentation>
859         </xsd:annotation>
860
861         <xsd:complexType>
862             <xsd:sequence>
863                 <xsd:element
864                     ref="tns:i18nName"
865                     minOccurs="0" maxOccurs="unbounded" />
866                 <xsd:element
867                     ref="tns:morphVertex"
868                     minOccurs="0" maxOccurs="unbounded" />
869             </xsd:sequence>
870             <xsd:attribute
871                 name="name"
872                 type="xsd:string"
873                 use="required" />
874             <xsd:attribute name="type" type="tns:MorphType" use="required" />
875         </xsd:complexType>
876
877     </xsd:element>
878
879
880     <xsd:element name="morphVertex">
881         <xsd:annotation>
882             <xsd:documentation>
883                 Morphing vertex information.
884             </xsd:documentation>
885         </xsd:annotation>
886
887         <xsd:complexType>
888             <xsd:attribute name="vtxIdRef" type="xsd:NCName" use="required" />
889             <xsd:attribute name="xOff" type="xsd:float" use="required" />
890             <xsd:attribute name="yOff" type="xsd:float" use="required" />
891             <xsd:attribute name="zOff" type="xsd:float" use="required" />
892         </xsd:complexType>
893
894     </xsd:element>
895
896
897     <xsd:element name="rigidList">
898         <xsd:annotation>
899             <xsd:documentation>
900                 list of Rigid-body definition.
901             </xsd:documentation>
902         </xsd:annotation>
903
904         <xsd:complexType>
905             <xsd:sequence>
906                 <xsd:element
907                     ref="tns:rigid"
908                     minOccurs="0" maxOccurs="unbounded" />
909             </xsd:sequence>
910         </xsd:complexType>
911
912         <xsd:key name="Rigid-Id">
913             <xsd:selector xpath="./tns:rigid" />
914             <xsd:field xpath="@rigidId" />
915         </xsd:key>
916 <!--
917         <xsd:unique name="RigidName">
918             <xsd:selector xpath="./tns:rigid" />
919             <xsd:field xpath="@name" />
920         </xsd:unique>
921 -->
922     </xsd:element>
923
924
925     <xsd:simpleType name="RigidBehaviorType">
926         <xsd:annotation>
927             <xsd:documentation>
928                 Rigid bahavior types.
929             </xsd:documentation>
930         </xsd:annotation>
931
932         <xsd:restriction base="xsd:string">
933             <xsd:enumeration value="FOLLOWBONE" />    <!-- ボーン追従 -->
934             <xsd:enumeration value="ONLYDYNAMICS" />  <!-- 物理 -->
935             <xsd:enumeration value="BONEDDYNAMICS" /> <!-- 物理+ボーン -->
936         </xsd:restriction>
937
938     </xsd:simpleType>
939
940
941     <xsd:element name="rigid">
942         <xsd:annotation>
943             <xsd:documentation>
944                 Rigid-body definition.
945             </xsd:documentation>
946         </xsd:annotation>
947
948         <xsd:complexType>
949             <xsd:sequence>
950                 <xsd:element
951                     ref="tns:i18nName"
952                     minOccurs="0" maxOccurs="unbounded" />
953                 <xsd:element ref="tns:linkedBone" minOccurs="0" />
954
955                 <xsd:choice>
956                     <xsd:element ref="tns:rigidShapeSphere" />
957                     <xsd:element ref="tns:rigidShapeBox" />
958                     <xsd:element ref="tns:rigidShapeCapsule" />
959                 </xsd:choice>
960
961                 <xsd:element ref="tns:position" />
962                 <xsd:element ref="tns:radRotation" />
963                 <xsd:element ref="tns:dynamics" />
964                 <xsd:element
965                     ref="tns:throughRigidGroup"
966                     minOccurs="0" maxOccurs="unbounded" />
967             </xsd:sequence>
968
969             <xsd:attribute name="name" type="xsd:string" use="required" />
970             <xsd:attribute name="rigidId" type="xsd:NCName" use="required" />
971             <xsd:attribute
972                 name="behavior"
973                 type="tns:RigidBehaviorType"
974                 use="required" />
975         </xsd:complexType>
976
977         <xsd:unique name="ThroughRigidGroup">
978             <xsd:selector xpath="./tns:throughRigidGroup" />
979             <xsd:field xpath="@rigidGroupIdRef" />
980         </xsd:unique>
981
982     </xsd:element>
983
984
985     <xsd:element name="linkedBone">
986         <xsd:annotation>
987             <xsd:documentation>
988                 Referenced Bone from Rigid-body.
989             </xsd:documentation>
990         </xsd:annotation>
991
992         <xsd:complexType>
993             <xsd:attribute
994                 name="boneIdRef"
995                 type="xsd:NCName"
996                 use="required" />
997         </xsd:complexType>
998
999     </xsd:element>
1000
1001
1002     <xsd:element name="rigidShapeSphere">
1003         <xsd:annotation>
1004             <xsd:documentation>
1005                 Sphere shape of Rigid-body.
1006             </xsd:documentation>
1007         </xsd:annotation>
1008
1009         <xsd:complexType>
1010             <xsd:attribute name="radius" type="xsd:float" use="required" />
1011         </xsd:complexType>
1012
1013     </xsd:element>
1014
1015
1016     <xsd:element name="rigidShapeBox">
1017         <xsd:annotation>
1018             <xsd:documentation>
1019                 Box shape of Rigid-body.
1020             </xsd:documentation>
1021         </xsd:annotation>
1022
1023         <xsd:complexType>
1024             <xsd:attribute name="width"  type="xsd:float" use="required" />
1025             <xsd:attribute name="height" type="xsd:float" use="required" />
1026             <xsd:attribute name="depth"  type="xsd:float" use="required" />
1027         </xsd:complexType>
1028
1029     </xsd:element>
1030
1031
1032     <xsd:element name="rigidShapeCapsule">
1033         <xsd:annotation>
1034             <xsd:documentation>
1035                 Capsule shape of Rigid-body.
1036             </xsd:documentation>
1037         </xsd:annotation>
1038
1039         <xsd:complexType>
1040             <xsd:attribute name="height" type="xsd:float" use="required" />
1041             <xsd:attribute name="radius" type="xsd:float" use="required" />
1042         </xsd:complexType>
1043
1044     </xsd:element>
1045
1046
1047     <xsd:element name="radRotation">
1048         <xsd:annotation>
1049             <xsd:documentation>
1050                 Rotaion information by radian.
1051             </xsd:documentation>
1052         </xsd:annotation>
1053
1054         <xsd:complexType>
1055             <xsd:attribute name="xRad" type="xsd:float" use="required" />
1056             <xsd:attribute name="yRad" type="xsd:float" use="required" />
1057             <xsd:attribute name="zRad" type="xsd:float" use="required" />
1058         </xsd:complexType>
1059
1060     </xsd:element>
1061
1062
1063     <xsd:element name="dynamics">
1064         <xsd:annotation>
1065             <xsd:documentation>
1066                 Dynamics parameters.
1067             </xsd:documentation>
1068         </xsd:annotation>
1069
1070         <xsd:complexType>
1071             <xsd:attribute
1072                 name="mass"
1073                 type="xsd:float"
1074                 use="required" />
1075             <xsd:attribute
1076                 name="dampingPosition"
1077                 type="xsd:float"
1078                 use="required" />
1079             <xsd:attribute
1080                 name="dampingRotation"
1081                 type="xsd:float"
1082                 use="required" />
1083             <xsd:attribute
1084                 name="restitution"
1085                 type="xsd:float"
1086                 use="required" />
1087             <xsd:attribute
1088                 name="friction"
1089                 type="xsd:float"
1090                 use="required" />
1091         </xsd:complexType>
1092
1093     </xsd:element>
1094
1095
1096     <xsd:element name="throughRigidGroup">
1097         <xsd:annotation>
1098             <xsd:documentation>
1099                 Reference for non-collision rigid-group.
1100             </xsd:documentation>
1101         </xsd:annotation>
1102
1103         <xsd:complexType>
1104             <xsd:attribute
1105                 name="rigidGroupIdRef"
1106                 type="xsd:NCName"
1107                 use="required" />
1108         </xsd:complexType>
1109
1110     </xsd:element>
1111
1112
1113     <xsd:element name="rigidGroupList">
1114         <xsd:annotation>
1115             <xsd:documentation>
1116                 List of Rigid-body group.
1117             </xsd:documentation>
1118         </xsd:annotation>
1119
1120         <xsd:complexType>
1121             <xsd:sequence>
1122                 <xsd:element
1123                     ref="tns:rigidGroup"
1124                     minOccurs="0" maxOccurs="unbounded" />
1125             </xsd:sequence>
1126         </xsd:complexType>
1127
1128         <xsd:key name="RigidGroup-Id">
1129             <xsd:selector xpath="./tns:rigidGroup" />
1130             <xsd:field xpath="@rigidGroupId" />
1131         </xsd:key>
1132
1133     </xsd:element>
1134
1135
1136     <xsd:element name="rigidGroup">
1137         <xsd:annotation>
1138             <xsd:documentation>
1139                 Rigid-body group.
1140             </xsd:documentation>
1141         </xsd:annotation>
1142
1143         <xsd:complexType>
1144             <xsd:sequence>
1145                 <xsd:element
1146                     ref="tns:rigidGroupMember"
1147                     minOccurs="0" maxOccurs="unbounded" />
1148             </xsd:sequence>
1149
1150             <xsd:attribute
1151                 name="rigidGroupId"
1152                 type="xsd:NCName"
1153                 use="required" />
1154         </xsd:complexType>
1155
1156         <xsd:unique name="RigidGroupMember">
1157             <xsd:selector xpath="./tns:rigidGroupMember" />
1158             <xsd:field xpath="@rigidIdRef" />
1159         </xsd:unique>
1160
1161     </xsd:element>
1162
1163
1164     <xsd:element name="rigidGroupMember">
1165         <xsd:annotation>
1166             <xsd:documentation>
1167                 Member of Rigid-body group.
1168             </xsd:documentation>
1169         </xsd:annotation>
1170
1171         <xsd:complexType>
1172             <xsd:attribute
1173                 name="rigidIdRef"
1174                 type="xsd:NCName"
1175                 use="required" />
1176         </xsd:complexType>
1177
1178     </xsd:element>
1179
1180
1181     <xsd:element name="jointList">
1182         <xsd:annotation>
1183             <xsd:documentation>
1184                 List of joint definition.
1185             </xsd:documentation>
1186         </xsd:annotation>
1187
1188         <xsd:complexType>
1189             <xsd:sequence>
1190                 <xsd:element
1191                     ref="tns:joint"
1192                     minOccurs="0" maxOccurs="unbounded" />
1193             </xsd:sequence>
1194         </xsd:complexType>
1195
1196     </xsd:element>
1197
1198
1199     <xsd:element name="joint">
1200         <xsd:annotation>
1201             <xsd:documentation>
1202                 Joint definition.
1203             </xsd:documentation>
1204         </xsd:annotation>
1205
1206         <xsd:complexType>
1207             <xsd:sequence>
1208                 <xsd:element
1209                     ref="tns:i18nName"
1210                     minOccurs="0" maxOccurs="unbounded" />
1211                 <xsd:element ref="tns:jointedRigidPair" />
1212                 <xsd:element ref="tns:position" />
1213                 <xsd:element ref="tns:limitPosition" />
1214                 <xsd:element ref="tns:radRotation" />
1215                 <xsd:element ref="tns:limitRotation" />
1216                 <xsd:element ref="tns:elasticPosition" />
1217                 <xsd:element ref="tns:elasticRotation" />
1218             </xsd:sequence>
1219
1220             <xsd:attribute
1221                 name="name"
1222                 type="xsd:string"
1223                 use="required" />
1224         </xsd:complexType>
1225
1226 <!--
1227         <xsd:unique name="JointName">
1228             <xsd:selector xpath="./tns:joint" />
1229             <xsd:field xpath="@name" />
1230         </xsd:unique>
1231 -->
1232     </xsd:element>
1233
1234
1235     <xsd:element name="jointedRigidPair">
1236         <xsd:annotation>
1237             <xsd:documentation>
1238                 Jointed-bones information.
1239             </xsd:documentation>
1240         </xsd:annotation>
1241
1242         <xsd:complexType>
1243             <xsd:attribute
1244                 name="rigidIdRef1"
1245                 type="xsd:NCName"
1246                 use="required" />
1247             <xsd:attribute
1248                 name="rigidIdRef2"
1249                 type="xsd:NCName"
1250                 use="required" />
1251         </xsd:complexType>
1252
1253     </xsd:element>
1254
1255
1256     <xsd:element name="limitPosition">
1257         <xsd:annotation>
1258             <xsd:documentation>
1259                 Limit of Position.
1260             </xsd:documentation>
1261         </xsd:annotation>
1262
1263         <xsd:complexType>
1264             <xsd:attribute name="xFrom" type="xsd:float" use="required" />
1265             <xsd:attribute name="xTo"   type="xsd:float" use="required" />
1266             <xsd:attribute name="yFrom" type="xsd:float" use="required" />
1267             <xsd:attribute name="yTo"   type="xsd:float" use="required" />
1268             <xsd:attribute name="zFrom" type="xsd:float" use="required" />
1269             <xsd:attribute name="zTo"   type="xsd:float" use="required" />
1270         </xsd:complexType>
1271
1272     </xsd:element>
1273
1274
1275     <xsd:element name="limitRotation">
1276         <xsd:annotation>
1277             <xsd:documentation>
1278                 Limit of Rotation.
1279             </xsd:documentation>
1280         </xsd:annotation>
1281
1282         <xsd:complexType>
1283             <xsd:attribute name="xFrom" type="xsd:float" use="required" />
1284             <xsd:attribute name="xTo"   type="xsd:float" use="required" />
1285             <xsd:attribute name="yFrom" type="xsd:float" use="required" />
1286             <xsd:attribute name="yTo"   type="xsd:float" use="required" />
1287             <xsd:attribute name="zFrom" type="xsd:float" use="required" />
1288             <xsd:attribute name="zTo"   type="xsd:float" use="required" />
1289         </xsd:complexType>
1290
1291     </xsd:element>
1292
1293
1294     <xsd:element name="elasticPosition">
1295         <xsd:annotation>
1296             <xsd:documentation>
1297                 Elastic position of joint.
1298             </xsd:documentation>
1299         </xsd:annotation>
1300
1301         <xsd:complexType>
1302             <xsd:attribute name="x" type="xsd:float" use="required" />
1303             <xsd:attribute name="y" type="xsd:float" use="required" />
1304             <xsd:attribute name="z" type="xsd:float" use="required" />
1305         </xsd:complexType>
1306
1307     </xsd:element>
1308
1309
1310     <xsd:element name="elasticRotation">
1311         <xsd:annotation>
1312             <xsd:documentation>
1313                 Elastic rotation of joint by degree.
1314             </xsd:documentation>
1315         </xsd:annotation>
1316
1317         <xsd:complexType>
1318             <xsd:attribute name="xDeg" type="xsd:float" use="required" />
1319             <xsd:attribute name="yDeg" type="xsd:float" use="required" />
1320             <xsd:attribute name="zDeg" type="xsd:float" use="required" />
1321         </xsd:complexType>
1322
1323     </xsd:element>
1324
1325
1326     <xsd:element name="surfaceGroupList">
1327         <xsd:annotation>
1328             <xsd:documentation>
1329                 List of surface group.
1330             </xsd:documentation>
1331         </xsd:annotation>
1332
1333         <xsd:complexType>
1334             <xsd:sequence>
1335                 <xsd:element
1336                     ref="tns:surfaceGroup"
1337                     minOccurs="0" maxOccurs="unbounded" />
1338             </xsd:sequence>
1339         </xsd:complexType>
1340
1341         <xsd:key name="SurfaceGroup-Id">
1342             <xsd:selector xpath="./tns:surfaceGroup" />
1343             <xsd:field xpath="@surfaceGroupId" />
1344         </xsd:key>
1345
1346     </xsd:element>
1347
1348
1349     <xsd:element name="surfaceGroup">
1350         <xsd:annotation>
1351             <xsd:documentation>
1352                 Surface group.
1353             </xsd:documentation>
1354         </xsd:annotation>
1355
1356         <xsd:complexType>
1357             <xsd:sequence>
1358                 <xsd:element ref="tns:surface" minOccurs="0" maxOccurs="unbounded" />
1359             </xsd:sequence>
1360
1361             <xsd:attribute
1362                 name="surfaceGroupId"
1363                 type="xsd:NCName"
1364                 use="required" />
1365         </xsd:complexType>
1366
1367     </xsd:element>
1368
1369
1370     <xsd:element name="surface">
1371         <xsd:annotation>
1372             <xsd:documentation>
1373                 Each surface with Triangle.
1374             </xsd:documentation>
1375         </xsd:annotation>
1376
1377         <xsd:complexType>
1378             <xsd:attribute
1379                 name="vtxIdRef1"
1380                 type="xsd:NCName"
1381                 use="required" />
1382             <xsd:attribute
1383                 name="vtxIdRef2"
1384                 type="xsd:NCName"
1385                 use="required" />
1386             <xsd:attribute
1387                 name="vtxIdRef3"
1388                 type="xsd:NCName"
1389                 use="required" />
1390         </xsd:complexType>
1391
1392     </xsd:element>
1393
1394
1395     <xsd:element name="vertexList">
1396         <xsd:annotation>
1397             <xsd:documentation>
1398                 List of vertex.
1399             </xsd:documentation>
1400         </xsd:annotation>
1401
1402         <xsd:complexType>
1403             <xsd:sequence>
1404                 <xsd:element ref="tns:vertex" minOccurs="0" maxOccurs="unbounded" />
1405             </xsd:sequence>
1406         </xsd:complexType>
1407
1408         <xsd:key name="Vertex-Id">
1409             <xsd:selector xpath="./tns:vertex" />
1410             <xsd:field xpath="@vtxId" />
1411         </xsd:key>
1412
1413     </xsd:element>
1414
1415
1416     <xsd:element name="vertex">
1417         <xsd:annotation>
1418             <xsd:documentation>
1419                 Vertex definition.
1420             </xsd:documentation>
1421         </xsd:annotation>
1422
1423         <xsd:complexType>
1424             <xsd:sequence>
1425                 <xsd:element ref="tns:position" />
1426                 <xsd:element ref="tns:normal" />
1427                 <xsd:element ref="tns:uvMap" />
1428                 <xsd:element ref="tns:skinning" />
1429             </xsd:sequence>
1430
1431             <xsd:attribute
1432                 name="vtxId"
1433                 type="xsd:NCName"
1434                 use="required" />
1435             <xsd:attribute
1436                 name="showEdge"
1437                 type="xsd:boolean"
1438                 use="required" />
1439         </xsd:complexType>
1440
1441     </xsd:element>
1442
1443
1444     <xsd:element name="position">
1445         <xsd:annotation>
1446             <xsd:documentation>
1447                 Position definition.
1448             </xsd:documentation>
1449         </xsd:annotation>
1450
1451         <xsd:complexType>
1452             <xsd:attribute name="x" type="xsd:float" use="required" />
1453             <xsd:attribute name="y" type="xsd:float" use="required" />
1454             <xsd:attribute name="z" type="xsd:float" use="required" />
1455         </xsd:complexType>
1456
1457     </xsd:element>
1458
1459
1460     <xsd:element name="normal">
1461         <xsd:annotation>
1462             <xsd:documentation>
1463                 Normal vector definition.
1464             </xsd:documentation>
1465         </xsd:annotation>
1466
1467         <xsd:complexType>
1468             <xsd:attribute name="x" type="xsd:float" use="required" />
1469             <xsd:attribute name="y" type="xsd:float" use="required" />
1470             <xsd:attribute name="z" type="xsd:float" use="required" />
1471         </xsd:complexType>
1472
1473     </xsd:element>
1474
1475
1476     <xsd:element name="uvMap">
1477         <xsd:annotation>
1478             <xsd:documentation>
1479                 UV-mapping information.
1480             </xsd:documentation>
1481         </xsd:annotation>
1482
1483         <xsd:complexType>
1484             <xsd:attribute name="u" type="xsd:float" use="required" />
1485             <xsd:attribute name="v" type="xsd:float" use="required" />
1486         </xsd:complexType>
1487
1488     </xsd:element>
1489
1490
1491     <xsd:element name="skinning">
1492         <xsd:annotation>
1493             <xsd:documentation>
1494                 Skinning definition from vertex to bone.
1495             </xsd:documentation>
1496         </xsd:annotation>
1497
1498         <xsd:complexType>
1499             <xsd:attribute name="boneIdRef1" type="xsd:NCName" use="required" />
1500             <xsd:attribute name="boneIdRef2" type="xsd:NCName" use="required" />
1501             <xsd:attribute
1502                 name="weightBalance"
1503                 type="xsd:nonNegativeInteger"
1504                 use="required" />
1505         </xsd:complexType>
1506
1507     </xsd:element>
1508
1509
1510 </xsd:schema>
1511
1512
1513 <!-- EOF -->