Stormy

Anmeldungsdatum: 10.09.2004 Beiträge: 567 Wohnort: Sachsen - wo die schönen Frauen wachsen ;)
|
Verfasst am: 05.06.2008, 20:02 Titel: XSD-Problem |
|
|
Hallo,
vielleicht tummelt sich ja hier jemand, der sich mit dem XSD-Format auskennt.
Ich möchte in XSD folgendes ausdrücken:
Code: | <term>
<plus>
<zahl>4</zahl>
<zahl>5</zahl>
</plus>
</term> |
Momentan sieht das wie folgt aus:
Code: | <xsd:complexType name="term">
<xsd:choice>
<xsd:element name="plus" type="plus">
<xsd:element name="zahl" type="zahl">
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="plus">
<xsd:sequence>
<xsd:element name="plus" type="plus">
<xsd:element name="zahl" type="zahl">
</xsd:sequence>
</xsd:complexType> |
Das ist allerdings ziemlich umständlich, wenn ich neue Operatoren wie Minus, Multiplikation, Division etc. hinzufügen möchte.
Ich hatte mir sowas vorgestellt wie:
Code: | <xsd:complexType name="plus">
<xsd:sequence>
<xsd:element type="term">
<xsd:element type="term">
</xsd:sequence>
</xsd:complexType> |
Also Plus erwartet einfach nur zwei Elemente vom Typ "term" und der Name ist dabei egal. Ist das irgendwie möglich in einem validen XSD umzusetzen? Ich möchte einfach die Dopplung im Text minimieren.
- Stormy _________________ +++ QB-City +++ Die virtuelle Stadt für jeden Freelancer - Join the community!
Projekte: QB-City,MysticWorld (RPG), 2D-OpenGL-Tutorial |
|