2017-10-03 16 views
1

:S4S-ELT--match.1해야한다 X의 내용이 일치해야합니다 (주석? (형 simpleType | 복합 타입)? (독특한 | 키 | keyref) *))이 오류가 계속

s4s-elt-must-match.1: The content of 'tvshow' must match (annotation?, (simpleType | complexType)?, (unique | key | keyref)*)). A problem was found starting at: element.

을 내가 지금 몇 시간 동안보고 된 내가 잃은에서왔다

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns="http://www.tvshow.com/2016/XMLSchema" 
    targetNamespace="http://www.tvshow.com/2016/XMLSchema" 
    elementFormDefault="qualified"> 

    <xs:element name="televisionshows"> 
     <xs:complexType> 
     <xs:sequence> 
     <xs:element name="tvshow"> 

      <xs:element name="productioninformation"> 
       <xs:complexType> 
        <xs:sequence> 
         <xs:element name="rate" type="xs:string" maxOccurs="unbounded"/> 
         <xs:element name="title" type="xs:string" maxOccurs="unbounded"/> 
         <xs:element name="runtime" type="xs:string" maxOccurs="unbounded"/> 
         <xs:element name="production" type="xs:string" maxOccurs="unbounded"/> 
         <xs:element name="genre" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> 
         <xs:element name="distributors" maxOccurs="unbounded"> 
          <xs:complexType> 
           <xs:sequence> 
            <xs:element name="distribution" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> 
           </xs:sequence> 
          </xs:complexType> 
         </xs:element> 
         <xs:element name="creator" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> 
         <xs:element name="director" type="xs:string" maxOccurs="unbounded"/> 
        </xs:sequence> 
      </xs:complexType> 
      </xs:element> 

     <xs:element name="synopsis" type="xs:string"/> 

     <xs:element name="cast"> 
      <xs:complexType> 
       <xs:sequence> 
        <xs:element name="star" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> 
       </xs:sequence> 
      </xs:complexType> 
     </xs:element> 

    <xs:element name="gueststars"> 
     <xs:complexType> 
      <xs:sequence> 
       <xs:element name="actor" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> 
      </xs:sequence> 
     </xs:complexType> 
    </xs:element> 

     <xs:element name="season"> 
      <xs:complexType> 
       <xs:sequence> 
        <xs:attribute name="no" type="xs:string"/> 
        <xs:element name="year" type="xs:string"/> 
        <xs:element name="episode"> 
         <xs:complexType> 
          <xs:sequence> 
          <xs:element name="release_date" type="xs:string"/> 
          <xs:element name="title" type="xs:string"/> 
          <xs:element name="plot" type="xs:string"/> 
          </xs:sequence> 
          <xs:attribute name="no" type="xs:string" /> 
         </xs:complexType> 
         </xs:element> 
       </xs:sequence> 
      </xs:complexType> 
     </xs:element> 
    </xs:element> 
    </xs:sequence> 
</xs:complexType>   
</xs:element> 
</xs:schema> 

:

<televisionshows xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.tvshow.com/2016/XMLSchema catalan_tvshow.xsd" 
    xmlns="http://www.tvshow.com/2016/XMLSchema"> 

    <tvshow> 
     <productioninformation> 
     <rate>TV-PG</rate> 
     <title>Home Movies</title> 
     <runtime>30 minutes</runtime> 
     <production>Squigglevision</production> 
     <genre>Animation</genre> 
     <genre>Comedy</genre> 
     <distributors> 
      <distribution>UPN</distribution> 
      <distribution>Cartoon Network</distribution> 
     </distributors> 
     <creator>Loren Bouchard</creator> 
     <creator>Brendon Small</creator> 
     <director> Loren Bouchard</director> 
     </productioninformation> 

     <synopsis> 
      TV series about an eight-year old who makes movies with his friends Jason and Melissa. 
      Recurring characters include Brendon's mother, Paula; soccer coach John McGuirk; 
      musician Dwayne; and teacher Mr. Lynch. 
     </synopsis> 

      <cast> 
       <star>Brendon Smalls as Brendon</star> 
       <star>H. Jon Benjamin as Jason</star> 
       <star>Melissa Bardin Galsky as Melissa</star> 
       <star>Ron Lynch as Mr. Lynch</star> 
       <star>Paula Poundstone as Paula</star> 
       <star>H. Jon Benjamin as Coach McGuirk</star> 
      </cast> 


     <gueststars> 
      <actor>Louis C.K.</actor> 
      <actor>Mitch Hedberg</actor> 
      <actor>They Might Be Giants</actor> 
     </gueststars> 

     <season no="1"> 
      <year>1999</year> 
      <episode no="1"> 
       <release_date>April 26, 1999</release_date> 
       <title>Get Away From My Mom</title> 
       <plot> 
        Brendon's mother Paula announces her plans to go 
        on a date with Brendon'ssoccer coach, Mr. McGuirk. 
       </plot> 
      </episode> 
      <episode no="2"> 
       <release_date>May 3, 1999</release_date> 
       <title>I Don't Do Well in Parent Teacher Conferences</title> 
       <plot> 
        Brendon fails to give an oral report in school, 
        so his mother is asked to attend a parent-teacher conference. 
        However, she can't keep her sanity in such a situation. 
       </plot> 
      </episode> 
      <episode no="3"> 
       <release_date>May 10, 1999</release_date> 
       <title>The Art of the Sucker Punch</title> 
       <plot> 
        After Jason is dragged through the mud by the school bully, 
        Shannon, Brendon plots a rather selfish revenge match. 
       </plot> 
      </episode> 
      <episode no="4"> 
       <release_date>May 17, 1999</release_date> 
       <title>Brendon Gets Rabies</title> 
       <plot> 
        Brendon volunteers to take care of a vacationing couple's pet cat. 
        However, it escapes its house and later turns up with rabies. 
       </plot> 
      </episode> 
      <episode no="5"> 
        <release_date>May 24, 1999</release_date> 
        <title>Yoko</title> 
        <plot> 
         While on a camping trip, Brendon and a female classmate, Loni, 
         startbecoming an item, but Melissa and Jason can't stand the newest member of their movie troupe. 
         Meanwhile, a foreign student plays a nasty prank on McGuirk. 
        </plot> 
      </episode> 
     </season> 
     <season no="2"> 
      <year>2001</year> 
      <episode no="1"> 
       <release_date>Sep. 2, 2001</release_date> 
       <title>Director's Cut</title> 
       <plot> 
        Duane wants to produce a rock opera based on Franz Kafka's "The Metamorphosis" 
        but runs into some stiff opposition from Brendon and his own project, a fictional 
        meeting between Louis Braille and Louis Pasteur. 
       </plot> 
      </episode> 
      <episode no="2"> 
       <release_date>Sep. 9, 2001</release_date> 
       <title>It Was Supposed to be Funny</title> 
       <plot> 
        Brendon films a documentary about Melissa's grandfather 
        that was supposed to be funny. 
       </plot> 
      </episode> 
      <episode no="3"> 
       <release_date>Sep. 16, 2001</release_date> 
       <title>Method of Acting</title> 
       <plot> 
        Brendon auditions for a play and Paula teaches a creative writing class. 
       </plot> 
      </episode> 
      <episode no="4"> 
       <release_date>Sep. 21, 2001</release_date> 
       <title>Life through the Fisheye Lens</title> 
       <plot> 
        Brendon tries to get a fisheye lens for his camera. 
       </plot> 
      </episode> 
      <episode no="5"> 
       <release_date>Sep. 30, 2001</release_date> 
       <title>School Nurse</title> 
       <plot> 
        Brendon fakes being sick so the school nurse will send him home. 
       </plot> 
      </episode> 
      <episode no="6"> 
       <release_date>Sep. 30, 2001</release_date> 
       <title>Mortages &amp; Marbles</title> 
       <plot> 
        Brendon's baby sister Josie has a habit of shoving marbles into her nostrils, 
        so he produces an educational film about this for extra credit in class. 
        Coach McGuirk also turns to Erik for advice about buying a new house. 
       </plot> 
      </episode> 
      <episode no="7"> 
       <release_date>Oct. 7, 2001</release_date> 
       <title>Law and Boarder</title> 
       <plot> 
        Brendon gets hit by a car while riding his bike and has to go 
        to court because he broke the law. 
       </plot> 
      </episode> 
      <episode no="8"> 
       <release_date>Oct. 7, 2001</release_date> 
       <title>Brendon's Choice</title> 
       <plot> 
        Brendon is curious about his father. 
       </plot> 
      </episode> 
     </season> 
    </tvshow> 
</televisionshows> 

이 내 XSD입니다 :

이 내 XML이다. 내 문제는 내 XSD에 있다고 생각하지만 완전히 확신하지는 않습니다. 지금 Oxygen은 <xs:element name="productioninformation">의 시작 부분이 엉망인 곳이라고 말하지만 오류를 찾을 수 없습니다. 어떤 도움을 주시면 감사하겠습니다.

답변

1

즉각적인 오류 인해 대신 물론

<xs:element name="tvshow"> 
     <xs:complexType> 
     <xs:sequence> 
      <xs:element name="productioninformation"> 

(그리고, 수 tvshow의 형제 선언의 모든 후에 필요한 닫는 태그를 추가해야합니다 귀하의 XSD에서

<xs:element name="tvshow"> 
     <xs:element name="productioninformation"> 

에)

그러면 XSD에 관련이없는 하나 이상의 추가 오류가 있음을 알 수 있습니다. 잘하면 자신을 해결할 수 있습니다. 그렇지 않다면 그것에 대해 새로운 질문을 게시하십시오.

+1

감사합니다. 나는 이제 오류를 봅니다! 때로는 너무 오랫동안 코드를 쳐다볼 때 작은 오류를 구별하기가 어려워집니다. 나는 현재 모든 것을 고치고 있지만 여기에서부터 나쁘지 않습니다. – OC1092