dynamisches model in einem Xforms dokument und schema.xsd

janosch

Erfahrenes Mitglied
Hallo!

Ich bin grad bei folgendem Problem am grübeln. Angenommen ich habe folgendes model:

Code:
<foobar>
	<foo>1</foo>
	<bar>2</bar>
	<test>
		<testinhalt1>3</testinhalt1> //valid
	</test>
	<test>
		<testinhalt1>5</testinhalt1> //non Valid 
	</test>
	<test>
		<testinhalt1>7</testinhalt1> //non Valid 
	</test>
	<test>
		<testinhalt1>9</testinhalt1> //non Valid 
	</test>

	"USW."

</foobar>

Dazu habe ich die folgende schema.xsd

Code:
<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	
<xs:simpleType name="foo_type">
	<xs:restriction base="xs:string">
		<xs:pattern value="[0-9]{1}"/>
	</xs:restriction>
</xs:simpleType>

<xs:simpleType name="bar_type">
	<xs:restriction base="xs:string">
		<xs:pattern value="[0-9]{1}"/>
	</xs:restriction>
</xs:simpleType>
	
<xs:simpleType name="testinhalt1_type">
	<xs:restriction base="xs:string">
		<xs:pattern value="[0-9]{1}"/>
	</xs:restriction>
</xs:simpleType>
	
<xs:element name="buchung">
	<xs:complexType>
		<xs:sequence>
 
			<xs:element name="foo_daten" type="foo_type"/>
			
			<xs:element name="bar_daten" type="bar_type"/>
			
			<xs:element ref="daten"/>
 
		</xs:sequence>
	</xs:complexType>
</xs:element>

<xs:element name="daten">
        <xs:complexType>
		<xs:sequence >
  
  			<xs:element name="testinhalt1" type="testinhalt1_type" />
  
		</xs:sequence>
	</xs:complexType>
</xs:element>
	
</xs:schema>

So, mein Problem ist jetzt folgendes: Bei dem Element TEST wird immer nur der erste
Datensatz als korrekt angezeigt. Wie kann ich aber alle TEST Elemente prüfen, die in dem Schema vorkommen?

P.S. Bei der Eingabe kann ich die Daten nicht prüfen.
 
Zurück