[opencms-dev] XSD contents : minOccurs maxOccurs problems

Territorio Jordan-V. jordan.territorio at gmail.com
Tue May 6 14:47:04 CEST 2008


It's hard to know when remove when keep... but i still have the error. :'(
That's great we have noticed 5 ways for "how to not make a correct list of
some complex type with opencms"...

fu.... CMS !!!! lol

for the moment that's what i have with your correction :
antargaz_news.xsd
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" />
    <xsd:element name="AntargazNews" type="OpenCmsAntargazNews" />

    <xsd:complexType name="OpenCmsAntargazNews">
        <xsd:sequence>
            <xsd:element name="AntargazNew" type="OpenCmsAntargazNew"
                minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="OpenCmsAntargazNew">
        <xsd:sequence>
            <xsd:element name="Title" type="OpenCmsString" />
            <xsd:element name="Image" type="OpenCmsVfsFile"
                minOccurs="0" maxOccurs="1" />
            <xsd:element name="Text" type="OpenCmsHtml" minOccurs="0"
maxOccurs="unbounded"/>
            <xsd:element name="Image" type="OpenCmsVfsFile"
                minOccurs="0" maxOccurs="1" />
        </xsd:sequence>
        <xsd:attribute name="language" type="OpenCmsLocale"
            use="required" />
    </xsd:complexType>
...

antargaz_newslist.xsd
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified">

    <xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" />
    <xsd:include

schemaLocation="opencms://system/modules/org.antargaz.modules.first/schemas/antargaz_news.xsd"
/>

    <xsd:element name="MyNewsLists" type="OpenCmsMyNewsLists" />

    <xsd:complexType name="OpenCmsMyNewsLists">
        <xsd:sequence>
            <xsd:element name="MyNewsList" type="OpenCmsMyNewsList"
                minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="OpenCmsMyNewsList">
        <xsd:sequence minOccurs="0" maxOccurs="unbounded">
            <xsd:element name="OpenCmsAntargazNew"
type="OpenCmsAntargazNew"/>
        </xsd:sequence>
        <xsd:attribute name="language" type="OpenCmsLocale"
            use="required" />
    </xsd:complexType>
</xsd:schema>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20080506/3f3ac380/attachment.htm>


More information about the opencms-dev mailing list