[opencms-dev] XSD contents : minOccurs maxOccurs problems

Bozidar Ilievski bozidar.ilievski at netcetera.com.mk
Tue May 6 14:36:41 CEST 2008


Looks fine, except for the <xsd:sequence> element.
It should be without minOccurs="0" maxOccurs="unbounded" attributes.

Territorio Jordan-V. wrote:
> So I confirm... it's set correctly... but always have the error...
> 
> *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 minOccurs="0" maxOccurs="unbounded">

Remove minOccurs and maxOccurs from this line.

>             <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>
>     <xsd:annotation>
>         <xsd:appinfo>
>             <mappings>
>                 <mapping element="Title" mapto="property:Title" />
>             </mappings>
>             <layouts>
>                 <layout element="Image" widget="ImageGalleryWidget" />
>             </layouts>
>         </xsd:appinfo>
>     </xsd:annotation>
> 
> *antargaz_newslist.xsd*
>     <xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" />
>     <!-- INCLUDE your OpenCmsMyNew XSD file here -->
>     <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">

Remove minOccurs and maxOccurs from this line too.

>             <xsd:element name="AntargazNew" type="OpenCmsAntargazNew"
>                 minOccurs="0" maxOccurs="unbounded" />
>         </xsd:sequence>
>         <xsd:attribute name="language" type="OpenCmsLocale"
>             use="required" />
>     </xsd:complexType>
> 

Regards,
Bobi.
-- 
Bozidar Ilievski | bozidar.ilievski at netcetera.com.mk
phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495
Netcetera | 1000 Skopje | Macedonia | http://netcetera.com.mk



More information about the opencms-dev mailing list