<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v5 U (http://www.xmlspy.com) by holycat (lamost) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="ObvPlan">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Pri"/>
<xs:element name="CreationTime"/>
<xs:element name="MeanMag"/>
<xs:element name="ReMark"/>
<xs:element name="CentralLocation" type="Location"/>
<xs:element name="ObvObj" maxOccurs="4000">
<xs:complexType>
<xs:all>
<xs:element name="Mag"/>
<xs:element name="Pri"/>
<xs:element name="FiberId"/>
<xs:element name="ObjType"/>
<xs:element name="Location" type="Location"/>
</xs:all>
<xs:attribute name="ObvObjId" type="xs:positiveInteger" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="LigthObj" maxOccurs="30">
<xs:complexType>
<xs:all>
<xs:element name="Status"/>
<xs:element name="ReMark"/>
<xs:element name="Location" type="Location"/>
</xs:all>
<xs:attribute name="LigthObjId" type="xs:positiveInteger" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="GuideObj" maxOccurs="3">
<xs:complexType>
<xs:all>
<xs:element name="Location" type="Location"/>
</xs:all>
<xs:attribute name="GuideObjId" type="xs:int"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="PlanId" type="xs:positiveInteger" use="required"/>
</xs:complexType>
</xs:element>
<xs:complexType name="RA">
<xs:sequence>
<xs:element name="Hour" type="xs:positiveInteger"/>
<xs:element name="Min" type="xs:positiveInteger"/>
<xs:element name="Sec" type="xs:positiveInteger"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DE">
<xs:sequence>
<xs:element name="Deg" type="xs:positiveInteger"/>
<xs:element name="Min" type="xs:positiveInteger"/>
<xs:element name="Sec" type="xs:positiveInteger"/>
<xs:element name="NDE" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Location">
<xs:all>
<xs:element name="RA" type="RA"/>
<xs:element name="DE" type="DE"/>
</xs:all>
</xs:complexType>
</xs:schema>
此博客给出了一段XML代码,定义了一个XML Schema。该Schema包含根元素ObvPlan,其下有多个子元素,如Pri、CreationTime等,还定义了多种复杂类型,如RA、DE、Location等,编码为UTF - 8。
2978

被折叠的 条评论
为什么被折叠?



