Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XSD schema mit exklusivem ODER

Empfohlene Antworten

Hallo Leutzzz,

Ich probiere gerade zum ersten mal in XSD-Schemas herum.

Jetzt suche ich ein Statement das mir folgende Logik ermöglicht.

Entweder es gibt ein Element, daß Leute heisst, oder es gibt in diesem XML ein element, das Person heisst. Beides auf derselben Ebene soll nicht möglich sein.

Das Sammelelement Leute habe ich bereits definiert, sowie auch das Element Person.

Zum Beispiel soll jetzt also möglich sein


<root>

  <Leute>

    <Person/>

    <Person/>

    <Person/>

  </Leute>

</root>
oder

<root>

  <Person/>

</root>
aber nicht möglich sein soll

<root>

  <Leute>

    <Person/>

    <Person/>

    <Person/>

  </Leute>

  <Person/>

</root>
und auch nicht

<root>

  <Person/>

  <Person/>

  <Person/>

</root>
Im Endeffekt muss es etwas sein wie

<xs:element name="root">

  <xs:complexType>

    <xs:sequence>

      <xs:element ref="Leute"/> [B]oder[/B] <xs:element ref="Person"/>

    </xs:sequence>

  </xs:complexType>

</xs:element>

Da gibts aus meinem Verständnis heraus sicher was aber w3schools lässt sich über solche logischen Verstrickungen nicht aus.

Hat jemand ne Idee wie das geht?

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.