[opencms-dev] XML-Content xsd:choice

Thomas Göttlich guo.tuomi at googlemail.com
Wed Sep 28 11:55:03 CEST 2011


Hi,

how would I use the xsd:choice element in my schemas?

Currently I tried the following but I get "invalid schema structure" errors:


<xsd:complexType name="OpenCmsTest">
    <xsd:sequence>
      <xsd:choice>
      <!--
        <xsd:element name="MT1" type="OpenCmsModule1" minOccurs="0" />
        <xsd:element name="MT2" type="OpenCmsModule2" minOccurs="0"  />
       -->
       <xsd:element name="Headline" type="OpenCmsString"
          minOccurs="1" maxOccurs="1" />
       <xsd:element name="Title" type="OpenCmsString"
        minOccurs="1" maxOccurs="1" />
      </xsd:choice>
    </xsd:sequence>

    <!-- 6. locale attribute is required -->
    <xsd:attribute name="language" type="OpenCmsLocale"
      use="optional"/>
  </xsd:complexType>

Unfortunately I did find any documentation or examples, just notes that it
is now possible to use that.

Thanks in advance,

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110928/116f3577/attachment.htm>


More information about the opencms-dev mailing list