0

I have a doubt regarding xml structured content in OpenCms. I have two XML schemas, one for editing the top menus (menus are same across all the pages) and another schema for editing the page content. In the template jsp file i need to access xml element contents from both the schema files. How to go for that? do i have to specify something in ?

cyber_raj
  • 1,780
  • 1
  • 14
  • 25
  • not many opencms guys here I think, more frequent replies via nabble opencms mailing list: http://old.nabble.com/OpenCMS---Dev-f654.html – Mathias Conradt Sep 02 '10 at 08:13

2 Answers2

0

You can embed one xsd into another. First you define your menu via menu.xsd, then you include it like this in your i.e. page.xsd:

<xsd:include schemaLocation="opencms://system/modules/com.yourmodule.www/schemas/menu.xsd"/>
...
<xsd:element name="Menu" type="OpenCmsMenu" minOccurs="1" maxOccurs="1" />

where 'OpenCmsMenu' needs to be the type name as you defined it in your menu.xsd.

Mathias Conradt
  • 28,420
  • 21
  • 138
  • 192
0

An alternative solution might be to generate the menus from the folder structure. That is the usual method to deal with menus in OpenCms.