0

いくつかの XML ファイルを検証しようとしていますが、XSD 定義と名前空間に関するさまざまな問題が原因で失敗しています...

これは公開情報であるため、データの共有に問題はありません。メインの XSD はhttp://bioinformatics.ua.pt/euadr/euadr_types.xsdにあり、 common_types.xsdという名前の同じ場所に別の XSD をインポートします。私はそれらを検証しました。 W3Cバリデーターで、彼らは合格しました。

XML

<?xml version="1.0"?>
<relationship xmlns="http://euadr.biosemantic.erasmusmc.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://euadr.biosemantic.erasmusmc.org/ http://bioinformatics.ua.pt/euadr/euadr_types.xsd">
  <sourceId>
    <source>SMILE</source>    
    <code>[S]1(=O)(=O)N(C(</code>
  </sourceId>
  <targetId>
    <source>UP</source>
    <code>P35354</code>
  </targetId>
  <creator>http://cgl.imim.es</creator>
  <observationDateTime>2010-05-12T19:03:40.097+02:00</observationDateTime>
  <informationSources>
    <informationSource>
      <relationshipType>BINDS</relationshipType>
      <interaction>
        <type>pIC50</type>
        <value>6.55</value>
      </interaction>
      <evidence>
        <type>OBSERVATIONAL</type>
        <value>1.0</value>
      </evidence>
      <databaseIds>
        <databaseId>
          <source>PDSP</source>
          <code>
            P35354</code>
          </databaseId>
      </databaseIds>
    </informationSource>
  </informationSources>
</relationship>

簡単で整形式です!いくつかのオンラインバリデーターをテストしましたが、次のエラーが表示されます

cvc-elt.1: Cannot find the declaration of element 'relationship'.

問題が何であるかを知っている人はいますか?それは名前空間の宣言にありますか? XSDの?

よろしくお願いします。

乾杯!

4

1 に答える 1

0

スキーマはと呼ばれる複合型を定義relationshipしていますが、という名前の要素は定義していませんrelationship。最初のXSDに次のようなものを追加する必要があります。

<xs:element name="relationship" type="relationship" /> 
于 2010-06-02T16:30:15.237 に答える