So I confirm... it's set correctly... but always have the error...<br><br><b>antargaz_news.xsd</b><br><xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" /><br> <xsd:element name="AntargazNews" type="OpenCmsAntargazNews" /><br>
<xsd:complexType name="OpenCmsAntargazNews"><br> <xsd:sequence><br> <xsd:element name="AntargazNew" type="OpenCmsAntargazNew"<br> minOccurs="0" maxOccurs="unbounded" /><br>
</xsd:sequence><br> </xsd:complexType><br> <xsd:complexType name="OpenCmsAntargazNew"><br> <xsd:sequence minOccurs="0" maxOccurs="unbounded"><br> <xsd:element name="Title" type="OpenCmsString" /><br>
<xsd:element name="Image" type="OpenCmsVfsFile"<br> minOccurs="0" maxOccurs="1" /><br> <xsd:element name="Text" type="OpenCmsHtml" minOccurs="0" maxOccurs="unbounded"/><br>
<xsd:element name="Image" type="OpenCmsVfsFile"<br> minOccurs="0" maxOccurs="1" /><br> </xsd:sequence><br> <xsd:attribute name="language" type="OpenCmsLocale"<br>
use="required" /><br> </xsd:complexType><br> <xsd:annotation><br> <xsd:appinfo><br> <mappings><br> <mapping element="Title" mapto="property:Title" /><br>
</mappings><br> <layouts><br> <layout element="Image" widget="ImageGalleryWidget" /><br> </layouts><br> </xsd:appinfo><br>
</xsd:annotation><br><br><b>antargaz_newslist.xsd</b><br> <xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" /><br> <!-- INCLUDE your OpenCmsMyNew XSD file here --><br> <xsd:include<br>
schemaLocation="opencms://system/modules/org.antargaz.modules.first/schemas/antargaz_news.xsd" /><br> <xsd:element name="MyNewsLists" type="OpenCmsMyNewsLists" /><br> <xsd:complexType name="OpenCmsMyNewsLists"><br>
<xsd:sequence><br> <xsd:element name="MyNewsList" type="OpenCmsMyNewsList"<br> minOccurs="0" maxOccurs="unbounded" /><br> </xsd:sequence><br>
</xsd:complexType><br> <xsd:complexType name="OpenCmsMyNewsList"><br> <xsd:sequence minOccurs="0" maxOccurs="unbounded"><br> <xsd:element name="AntargazNew" type="OpenCmsAntargazNew"<br>
minOccurs="0" maxOccurs="unbounded" /><br> </xsd:sequence><br> <xsd:attribute name="language" type="OpenCmsLocale"<br> use="required" /><br>
</xsd:complexType><br><br><div class="gmail_quote">2008/5/6 Bozidar Ilievski <<a href="mailto:bozidar.ilievski@netcetera.com.mk">bozidar.ilievski@netcetera.com.mk</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
<br>
Territorio Jordan-V. wrote:<br>
> I changed it but this appears :<br>
> XML validation error :<br>
> <errors><br>
> <error column="11" line="5">cvc-complex-type.4: Attribute 'language'<br>
> must appear on element 'News'.</error><br>
> </errors><br>
<br>
</div>You need the language attribute in all your xsd files.<br>
It should be set for the type that does not finish with 's'.<br>
<br>
This is how the xsd should look like:<br>
<div class="Ih2E3d"><br>
<xsd:schema xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a>"<br>
elementFormDefault="qualified"><br>
<br>
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/><br>
<br>
</div> <xsd:element name="XXXs" type="OpenCmsXXXs"/><br>
<br>
<xsd:complexType name="OpenCmsXXXs"><br>
<xsd:sequence><br>
<xsd:element name="XXX" type="OpenCmsXXXs" minOccurs="0"<br>
<div class="Ih2E3d">maxOccurs="unbounded"/><br>
</xsd:sequence><br>
</xsd:complexType><br>
<br>
</div> <xsd:complexType name="XXX"><br>
<xsd:sequence><br>
<xsd:element name="name_1" type="type_1" minOccurs.... /><br>
...<br>
<xsd:element name="name_n" type="type_n" minOccurs.... /><br>
</xsd:sequence><br>
<!-- THIS IS WHERE THE LANGUAGE ATTRIBUTE SHOULD BE SET --><br>
<div class="Ih2E3d"> <xsd:attribute name="language" type="OpenCmsLocale" use="required"/><br>
</xsd:complexType><br>
<br>
</div> <!-- This part is not required. --><br>
<xsd:annotation><br>
...<br>
</xsd:annotation><br>
<br>
</xsd:schema><br>
<br>
Here XXX is the name of the resource type you define.<br>
<br>
If you still have problems, post your xsd files.<br>
<div><div></div><div class="Wj3C7c"><br>
> But I think there already this attribute set, doesn't it?<br>
> ... :s i know i'm noob but opencms is going to make me crazy ^^<br>
><br>
> <xsd:schema xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a>"<br>
> elementFormDefault="qualified"><br>
><br>
> <xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" /><br>
> <!-- INCLUDE your OpenCmsMyNew XSD file here --><br>
> <xsd:include<br>
> schemaLocation="opencms://system/modules/org.antargaz.modules.first/schemas/antargaz_news.xsd"<br>
> /><br>
><br>
> <xsd:element name="MyNewsLists" type="OpenCmsMyNewsLists" /><br>
><br>
> <xsd:complexType name="OpenCmsMyNewsLists"><br>
> <xsd:sequence><br>
> <xsd:element name="MyNewsList" type="OpenCmsMyNewsList"<br>
> minOccurs="0" maxOccurs="unbounded" /><br>
> </xsd:sequence><br>
> </xsd:complexType><br>
><br>
> <xsd:complexType name="OpenCmsMyNewsList"><br>
> <xsd:sequence minOccurs="0" maxOccurs="unbounded"><br>
> <xsd:element name="News" type="OpenCmsMyNew"<br>
> minOccurs="0" maxOccurs="unbounded" /><br>
> </xsd:sequence><br>
> <xsd:attribute name="language" type="OpenCmsLocale"<br>
> use="required" /><br>
> </xsd:complexType><br>
> </xsd:schema><br>
><br>
><br>
><br>
> 2008/5/6 Bozidar Ilievski <<a href="mailto:bozidar.ilievski@netcetera.com.mk">bozidar.ilievski@netcetera.com.mk</a><br>
</div></div><div><div></div><div class="Wj3C7c">> <mailto:<a href="mailto:bozidar.ilievski@netcetera.com.mk">bozidar.ilievski@netcetera.com.mk</a>>>:<br>
><br>
><br>
> Territorio Jordan-V. wrote:<br>
> > It's loaded, it was the path to the MyNew.xsd.<br>
> ><br>
> > But i have always the same problem than in the first file. I<br>
> can't add a<br>
> > new "MyNew" block... I can have multiples Text block in the MyNew<br>
> block<br>
> > but no multiples block MyNew in the MyList.xsd...<br>
> ><br>
> > In fact i have exactly the same result than the beginning :s<br>
> ><br>
> > 2008/5/6 Bozidar Ilievski <<a href="mailto:bozidar.ilievski@netcetera.com.mk">bozidar.ilievski@netcetera.com.mk</a><br>
> <mailto:<a href="mailto:bozidar.ilievski@netcetera.com.mk">bozidar.ilievski@netcetera.com.mk</a>><br>
> > <mailto:<a href="mailto:bozidar.ilievski@netcetera.com.mk">bozidar.ilievski@netcetera.com.mk</a><br>
> <mailto:<a href="mailto:bozidar.ilievski@netcetera.com.mk">bozidar.ilievski@netcetera.com.mk</a>>>>:<br>
> ><br>
> > Hi.<br>
> ><br>
> > Territorio Jordan-V. wrote:<br>
> > > I must do something wrong...<br>
> > ><br>
> > > org.opencms.xml.CmsXmlException: Unmarshalling XML<br>
> document failed.<br>
> > > at<br>
> > org.opencms.xml.CmsXmlUtils.unmarshalHelper(CmsXmlUtils.java:654)<br>
> > > at<br>
> > org.opencms.xml.CmsXmlUtils.unmarshalHelper(CmsXmlUtils.java:617)<br>
> > ><br>
> > > here is the new code for the list :<br>
> > > <xsd:schema xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a>"<br>
> > > elementFormDefault="qualified"><br>
> > ><br>
> > > <xsd:include<br>
> schemaLocation="opencms://opencms-xmlcontent.xsd" /><br>
> > > <!-- I think the problem is there... --><br>
> > > <xsd:include schemaLocation="./antargaz_news.xsd" /><br>
> ><br>
> > I usually enter the absolute location of the referenced<br>
> schema file:<br>
> > Example:<br>
> > <xsd:include<br>
> schemaLocation="opencms://system/.../my_schema.xsd"/><br>
> ><br>
> > > <xsd:element name="MyNewsLists"<br>
> type="OpenCmsMyNewsLists" /><br>
> > ><br>
> > > <xsd:complexType name="OpenCmsMyNewsLists"><br>
> > > <xsd:sequence><br>
> > > <xsd:element name="MyNewsList"<br>
> type="OpenCmsMyNewsList"<br>
> > > minOccurs="0" maxOccurs="unbounded" /><br>
> > > </xsd:sequence><br>
> > > </xsd:complexType><br>
> > ><br>
> > > <xsd:complexType name="OpenCmsMyNewsList"><br>
> > > <xsd:sequence minOccurs="0" maxOccurs="unbounded"><br>
> > > <xsd:element name="News" type="OpenCmsNew"<br>
> ><br>
> > or maybe this is your problem.<br>
> > In the previous post, your type was OpenCmsMyNew, not OpenCmsNew.<br>
> ><br>
> > > minOccurs="0" maxOccurs="1" /><br>
><br>
> This is the reason why you can't add multiple MyNew blocks.<br>
><br>
> Set maxOccurs="unbounded", and it will work.<br>
><br>
> > > </xsd:sequence><br>
> > > <xsd:attribute name="language" type="OpenCmsLocale"<br>
> > > use="required" /><br>
> > > </xsd:complexType><br>
> > > </xsd:schema><br>
> > ><br>
><br>
<br>
--<br>
Bozidar Ilievski | <a href="mailto:bozidar.ilievski@netcetera.com.mk">bozidar.ilievski@netcetera.com.mk</a><br>
phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495<br>
Netcetera | 1000 Skopje | Macedonia | <a href="http://netcetera.com.mk" target="_blank">http://netcetera.com.mk</a><br>
<br>
_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list, please visit<br>
<a href="http://lists.opencms.org/mailman/listinfo/opencms-dev" target="_blank">http://lists.opencms.org/mailman/listinfo/opencms-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>TERRITORIO Jordan-Victor<br>Ingénieur d'Intégration Java<br>TEAMLOG – Ingenieurs 2000<br><br>+33 6 30 66 54 69<br><a href="mailto:jot@teamlog.com">jot@teamlog.com</a>