以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 DTD/XML Schema 』  (http://bbs.xml.org.cn/list.asp?boardid=23)
----  求助!这样结构的XML的schema应该怎么写?初学者,绕了半天绕不过来  (http://bbs.xml.org.cn/dispbbs.asp?boardid=23&rootid=&id=32476)


--  作者:dosh
--  发布时间:5/16/2006 3:56:00 AM

--  求助!这样结构的XML的schema应该怎么写?初学者,绕了半天绕不过来
各位高手可以列出完整的schema给小弟参考么?谢谢啊~~~

<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="emp.xsl" ?>
<employee_list>
<employee>
  <name>David Lee </name>
  <position>Kitchener</position>
  <id>10001 </id>
  <phone_no>0433748995</phone_no>
  <description>Stay in the kitchen and make lunch for the customers</description>
  <shift>9:30AM-1:30PM</shift>
  <img>david.jpg</img>
</employee>
<employee>
  <name>Angela Howard </name>
  <position>Receptionist</position>
  <id>10002 </id>
  <phone_no>0449876204</phone_no>
  <description>Receive orders and payments</description>
  <shift>10:30AM-2:00PM</shift>
  <img>angela.jpg</img>
</employee>
<employee>
  <name>Tracey Hao </name>
  <position>Receptionist</position>
  <id>10003 </id>
  <phone_no>0439850163</phone_no>
  <description>Receive orders and payments</description>
  <shift>10:30AM-2:00PM</shift>
  <img>tracey.jpg</img>
</employee>
<employee>
  <name>Mike Jackson </name>
  <position>Deliverer</position>
  <id>10004 </id>
  <phone_no>0408184936</phone_no>
  <description>Make sure the deliverability and the lunch is delivering to correct customers</description>
  <shift>10:30AM-2:30PM</shift>
  <img>mike.jpg</img>
</employee>
<employee>
  <name>Andrew Gates </name>
  <position>Driver</position>
  <id>10005 </id>
  <phone_no>0402187675</phone_no>
  <description>Delivery car driver</description>
  <shift>10:30AM-3:00PM</shift>
  <img>andrew.jpg</img>
</employee>
</employee_list>


--  作者:gemingke
--  发布时间:5/16/2006 11:58:00 AM

--  
.........
<xs:element name="employee_list">
<xs:complexType>
<xs:sequence>
<xs:element name="employee" type="employeeType" maxoccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:complexType name="employeeType">
<xs:sequence>
<xs:element name="name" ........./>
.................
<xs:element name="img" .........?>  
</xs:sequence>
</xs:complexType>


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms