AW: [opencms-dev] AW: Nested Structured Content and Locale
Nick Panienski
panienski at codecentric.de
Thu May 3 10:55:38 CEST 2007
Eric, try to put minOccurs and maxOccurs values to your "Name" and "Text" elements in the second schema.
--
Mit freundlichen Grüßen
Nick Panienski
Consultant
codecentric GmbH
Grünewalder Str. 29-31
42657 Solingen
Telefon +49 (212) 24 94 330
Fax +49 (212) 24 94 334
Mobil +49 (151) 167 06 496
eMail panienski at codecentric.de
Internet http://www.codecentric.de <https://217.91.54.60/exchweb/bin/redir.asp?URL=http://www.codecentric.de>
Geschäftsführer: Peter Gierse, Mirko Novakovic und Rainer Vehns
Sitz der Gesellschaft: Solingen
Registergericht: Amtsgericht Wuppertal, HRB 19214
________________________________
Von: opencms-dev-bounces at opencms.org im Auftrag von bessette
Gesendet: Mi 02.05.2007 21:25
An: opencms-dev at opencms.org
Betreff: Re: [opencms-dev] AW: Nested Structured Content and Locale
Nick,
Thanks for your help. I may need it some more. I'm getting the following exception thrown. I've included my main schema and the included one below.
Error:
org.opencms.xml.CmsXmlException: Invalid OpenCms content definition XML schema structure:
Element "/xsd:schema/xsd:complexType[2]/xsd:sequence/xsd:element[1]" does not have the required attribute "minOccurs".
at org.opencms.xml.CmsXmlContentDefinition.validateAttribute(CmsXmlContentDefinition.java:393)
at org.opencms.xml.CmsXmlContentDefinition.validateComplexTypeSequence(CmsXmlContentDefinition.java:559)
at org.opencms.xml.CmsXmlContentDefinition.unmarshalInternal(CmsXmlContentDefinition.java:682)
at org.opencms.xml.CmsXmlContentDefinition.unmarshal(CmsXmlContentDefinition.java:298)
at org.opencms.xml.CmsXmlContentDefinition.unmarshalInternal(CmsXmlContentDefinition.java:645)
at org.opencms.xml.CmsXmlContentDefinition.unmarshal(CmsXmlContentDefinition.java:252)
at org.opencms.file.types.CmsResourceTypeXmlContent.createResource(CmsResourceTypeXmlContent.java:111)
at org.opencms.file.CmsObject.createResource(CmsObject.java:631)
at org.opencms.workplace.explorer.CmsNewResourceXmlContent.actionCreateResource(CmsNewResourceXmlContent.java:181)
at org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.commons.newresource_005fxmlcontent_jsp._jspService(org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.commons.newresource_005fxmlcontent_jsp:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:369)
at org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:730)
at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1469)
at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:151)
at org.opencms.main.OpenCmsServlet.doPost(OpenCmsServlet.java:163)
...
Main:
<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/path.to.my.module/schemas/namedtext.xsd" />
<xsd:element name="mains" type="OpenCmsMains" />
<xsd:complexType name="OpenCmsMains">
<xsd:sequence>
<xsd:element name="main" type="OpenCmsMain"
minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsMain">
<xsd:sequence>
<xsd:element name="Name" type="OpenCmsString" />
<xsd:element name="Number" type="OpenCmsString" />
<xsd:element name="Image" type="OpenCmsVfsFile"
minOccurs="0" maxOccurs="1" />
<xsd:element name="Namedtext" type="OpenCmsNamedtext"
minOccurs="0" maxOccurs="5" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale"
use="required" />
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<mappings>
<mapping element="name" mapto="property:Title" />
</mappings>
<layouts>
<layout element="Image" widget="ImageGalleryWidget" />
</layouts>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
Included:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" />
<xsd:element name="namedtexts" type="OpenCmsNamedtexts" />
<xsd:complexType name="OpenCmsNamedtexts">
<xsd:sequence>
<xsd:element name="namedtext" type="OpenCmsNamedtext"
minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsNamedtext">
<xsd:sequence>
<xsd:element name="Name" type="OpenCmsString" />
<xsd:element name="Text" type="OpenCmsHtml" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale"
use="optional" />
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<mappings />
<layouts>
<layout element="Text" widget="HtmlWidget"
configuration="source,link,anchor,formatselect,imagegallery,downloadgallery,linkgallery,htmlgallery,tablegallery,height:200px" />
</layouts>
<defaults />
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
Thanks, Eric
________________________________
View this message in context: Re: AW: Nested Structured Content and Locale <http://www.nabble.com/Nested-Structured-Content-and-Locale-tf3644477.html#a10292900>
Sent from the OpenCMS - Dev mailing list archive <http://www.nabble.com/OpenCMS---Dev-f654.html> at Nabble.com.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 7355 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20070503/642c0ee6/attachment.bin>
More information about the opencms-dev
mailing list