[opencms-dev] XSD contents : minOccurs maxOccurs problems
Bozidar Ilievski
bozidar.ilievski at netcetera.com.mk
Tue May 6 11:52:02 CEST 2008
Hi.
Territorio Jordan-V. wrote:
> I must do something wrong...
>
> org.opencms.xml.CmsXmlException: Unmarshalling XML document failed.
> at org.opencms.xml.CmsXmlUtils.unmarshalHelper(CmsXmlUtils.java:654)
> at org.opencms.xml.CmsXmlUtils.unmarshalHelper(CmsXmlUtils.java:617)
>
> here is the new code for the list :
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified">
>
> <xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" />
> <!-- I think the problem is there... -->
> <xsd:include schemaLocation="./antargaz_news.xsd" />
I usually enter the absolute location of the referenced schema file:
Example:
<xsd:include schemaLocation="opencms://system/.../my_schema.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="News" type="OpenCmsNew"
or maybe this is your problem.
In the previous post, your type was OpenCmsMyNew, not OpenCmsNew.
> minOccurs="0" maxOccurs="1" />
> </xsd:sequence>
> <xsd:attribute name="language" type="OpenCmsLocale"
> use="required" />
> </xsd:complexType>
> </xsd:schema>
>
Regadrds,
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