Announcement

Collapse
No announcement yet.

Attribut Problem

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

  • Attribut Problem

    Hallo,

    ich entwickle momentan eine XSD. Sie sieht momentan so aus:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs= "http://www.w3.org/2001/XMLSchema" 
    		xmlns="http://domain.bla/Referencedata" 
    		targetNamespace="http://domain.bla/Referencedata"
    		xmlns:tns="http://domain.bla/Referencedata"
    		elementFormDefault="qualified">
    		
    		<xs:element name="refdata">
    			<xs:complexType>
    				<xs:attribute ref="name" use="required"/>
    				<xs:attribute ref="comment"/>
    			</xs:complexType>
    		</xs:element>
    		
    		<xs:attribute name="name" type="xs:string"/>
    		<xs:attribute name="comment" type="xs:string"/>
    		
    </xs:schema>
    Der dazugehörige XML-Schnipsel:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <refdata 	xmlns="http://domain.bla/Referencedata"
    			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    			xsi:schemaLocation="http://domain.bla/Referencedata Referencedata.xsd"
    
    	name="refdataVocaLink2009">
    Ich bekomme aber folgende Fehlermeldung:

    - cvc-complex-type.3.2.2: Attribute 'name' is not allowed to appear in element 'refdata'.
    - cvc-complex-type.4: Attribute 'name' must appear on element 'refdata'.

    Die Schemadatei wird zwar gefunden, akzeptiert das 'name'-Attribut aber nicht. Kann mir da jemand weiterhelfen?

    Danke im Voraus.
Working...
X