得用google查询资料才会啊,惭愧

解决方案 »

  1.   

    第一题:
    <?xml version="1.0" encoding="UTF-8"?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.example.org/CDCA"
    xmlns:tns="http://www.example.org/CDCA"
    elementFormDefault="qualified">
    <complexType name="months">
    <sequence>
    <element name="Jan" type="string"></element>
    <element name="Feb" type="string"></element>
    <element name="Mar" type="string"></element>
    <element name="Apr" type="string"></element>
    <element name="May" type="string"></element>
    <element name="Jun" type="string"></element>
    <element name="Jul" type="string"></element>
    <element name="Aug" type="string"></element>
    <element name="Sep" type="string"></element>
    <element name="Oct" type="string"></element>
    <element name="Nov" type="string"></element>
    <element name="Dec" type="string"></element>
    </sequence>
    </complexType>
    <complexType name="smp">
    <attribute name="month" type="integer"/>
    <attribute name="day" type="integer"/>
    <attribute name="workhours" type="integer"/>
    </complexType>
    <complexType name="cplx">
    <sequence>
    <element name="MONTH-FREE-DAYS" type="tns:months" minOccurs="1" maxOccurs="1"/>
    <element name="SPECIAL.WORKHOURS.DAYS" type="tns:smp" minOccurs="1" maxOccurs="1"/>
    </sequence>
    </complexType>
    <element name="CDCA.WFS.WORK.CALENDAR" type="tns:cplx"/>
    </schema>
    休息会。。有空再做下面的题目。。
      

  2.   

    上学期Semantic web这门课就是讲的这个,可是偶忘了。过几天再复习一下。
      

  3.   

    很感谢feihua317
    这是一家大公司的让我带回家的面试题,要在20小时内做完。
    感觉要学的东西真的挺多的,再次感谢,给分,结贴吧,这个题太麻烦了。
      

  4.   

    <xs:element name="CDCA.WFS.WORK.CALENDAR">
       <xs:complexType>
          <xs:sequence>
             <xs:element name="MONTH-FREE-DAYS"/>
             <xs:element name="SPECIAL.WORKHOURS.DAYS">
                <xs:complexType>
                   <xs:sequence>
                      <xs:element name="DAY">
                         <xs:complexType>
                            <xs:attribute name="MONTH">
                            </xs:attribute>
                            <xs:attribute name="DAY">
                            </xs:attribute>
                            <xs:attribute name="WORKHOURS">
                            </xs:attribute>
                         </xs:complexType>
                      </xs:element>
                   </xs:sequence>
                </xs:complexType>
             </xs:element>
          </xs:sequence>
          <xs:attribute name="YEAR">
          </xs:attribute>
          <xs:attribute name="WORKHOURSPERDAY">
          </xs:attribute>
       </xs:complexType>
    </xs:element>