Announcement

Collapse
No announcement yet.

Problem bei Validierung

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem bei Validierung

    Hallo Leute, ich bin etwas wütend, da ich seit zwei Tagen keine Lösung finde. Ich hab auch schon in anderen Foren gefragt und Antworten erhalten.

    Ich habe folgende Dateien. Ich will festlegen, dass weder das Attribut fKey leer sein oder feheln darf, sowie auch der Inhalt von fTable. Woran scheitert es denn?

    XML:
    Code:
    <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
    <!-- <!DOCTYPE tableList SYSTEM "tabellen.dtd"> -->
    
    <tableList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:noNamespaceSchemaLocation="test.xsd">
    
    <table>
    	<fTable fKey="aid">name</fTable>
    </table>
    
    
    </tableList>
    XMLSchema:
    Code:
    <?xml version="1.0"?>
    
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
    
    
    
    <simpleType name="fTableType">
      <restriction base="string">
      	<minLength value="1" />
    	</restriction>
    </simpleType>
    
    
    
    <!-- Liste von Tabellen -->
    <element name="tableList">
    <complexType>
    <sequence>
    <!-- Tabellen -->
    <element name="table">
    <complexType>
    		<sequence>
    			<element name="fTable">
    				<complexType mixed="true">
    					<simpleContent>
              <extension base="fTableType">
    					<!-- Name des Fremdschlüssels -->
    					<attribute name="fKey" type="string" use="required"/>
    					</extension>
              </simpleContent>					
    				</complexType>
    			</element>
    		</sequence>
    </complexType>
    </element>
    </sequence>	
    </complexType>
    </element>
    Fehler:
    [Xerces-J 2.7.1] Validating "test.xml" against "file:test.xsd" ...
    Ln 26 Col 40 - src-resolve.4.2: Error resolving component 'fTableType'. It was detected that 'fTableType' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:/Users/kschnei/Desktop/test.xsd'. If this is the incorrect namespace, perhaps the prefix of 'fTableType' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/Users/kschnei/Desktop/test.xsd'.


    Kann mir irgendjemand helfen?
    Großes Danke.
Working...
X