[opencms-dev] recursive nested xmlcontent
Jordi Pedrerol
jordi.pedrerol at adequa.net
Tue Jun 14 18:45:23 CEST 2005
Hello, I finally made the recursive nested xmlcontent. I modified the xsd file (now are 2 xsd files) so now opencms has not marshalling/unmarshalling problems when saving the modified control code of the contentxml file. But I still have a problem: When I click "edit" on the xmlcontent file, the opencms editor opens normally but I can only create one level, neither the recursive nested element nor the "new" button (to create the the recursive nested element) are shown.
Can anybody help me?
Thank you very much.
Here are the 2 new xsd files:
-----------------
- Menu.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.iteatre.web/public/proves/MenuItem.xsd"/>
<xsd:element name="Menus" type="OpenCmsMenus"/>
<xsd:complexType name="OpenCmsMenus">
<xsd:sequence>
<xsd:element name="Menu" type="OpenCmsMenu" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsMenu">
<xsd:sequence>
<xsd:element name="Item" type="OpenCmsMenuItem" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="optional"/>
</xsd:complexType>
</xsd:schema>
-----------------------
- MenuItem.xsd:
-----------------------
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>
<xsd:element name="MenuItems" type="OpenCmsMenuItems"/>
<xsd:complexType name="OpenCmsMenuItems">
<xsd:sequence>
<xsd:element name="MenuItem" type="OpenCmsMenuItem" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsMenuItem">
<xsd:sequence>
<xsd:element name="Titol" type="OpenCmsString" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Submenu" type="OpenCmsMenu" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="optional"/>
</xsd:complexType>
</xsd:schema>
----- Original Message -----
From: Jordi Pedrerol
To: opencms-dev at opencms.org
Sent: Monday, June 13, 2005 8:06 PM
Subject: [opencms-dev] recursive nested xmlcontent
Hello, I'm trying to make a recursive nested xmlcontent in order to build a hierarchic structure (a menu). The xsd file is as follows:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>
<xsd:element name="Menus" type="OpenCmsMenus"/>
<xsd:complexType name="OpenCmsMenus">
<xsd:sequence>
<xsd:element name="Menu" type="OpenCmsMenu" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsMenu">
<xsd:sequence>
<xsd:element name="Title" type="OpenCmsString" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="Menu" type="OpenCmsMenu" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="required"/>
</xsd:complexType>
</xsd:schema>
The problem is that when I modify the control code of the respective contentxml file, opencms doesn't recongnize the nested OpenCmsMenu complex type.
Does anyone know if am I doing something wrong or if what I'm trying to do is no possible?
Thank you very much in advance.
------------------------------------------------------------------------------
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050614/11654f93/attachment.htm>
More information about the opencms-dev
mailing list