[opencms-dev] Question about XML-Content- Concept

MickyW funkycms at axidea.fr
Thu Jun 9 13:33:14 CEST 2005


----- Original Message ----- 
From: "Anatol" <opencms at recordcaster.de>
To: "The OpenCms mailing list" <opencms-dev at opencms.org>
Sent: Thursday, June 09, 2005 12:05 PM
Subject: [opencms-dev] Question about XML-Content- Concept


> Hi All,
>

> I made my first steps with xml-content files. Creating the XSD-file was
> described in the documentation. But what are the next steps?

check the mailing list archives :
http://mail.opencms.org/pipermail/opencms-dev/2005q1/015451.html
there's another post with a method in 6 steps far more complex... that does
not work :)
and the code in the post above doesn't work neither as the xml syntax has
changed but I included a working example below

>How can I  define that a new Page should based on this XSD-files? And how
can I add
> an entry in the New >> Structured Content List?

a clean way to do this would be (it's an update of what is told in the post
above):

1. create a new module  (use the module dialog in administration)
2. put your schemas etc inside
3. edit your module properties in opencms-modules.xml in WEB-INF/config :

  <module>
  <name><your module name in java package fashion></name>
        [...]
  <resourcetypes>
                <type
class="org.opencms.file.types.CmsResourceTypeXmlContent" name="<name of your
new content type>" id="<arbitrary ID,  greater than 100 not to interfere
with existing ones">
   <properties/>
                    <param name="schema">/system/modules/<your module
name>/<path to your schema></param>
                </type>
  </resourcetypes>
  <explorertypes>
  <explorertype name="<name of your new content type>" key="fileicon.<name
of your new content type>" icon="xmlcontent.gif" reference="xmlcontent">
                    <newresource page="structurecontent"
uri="newresource_xmlcontent.jsp?newresourcetype=<name of your new content
type>" order="<ID you choosed above"/>
                    <accesscontrol>
                        <accessentry principal="GROUP.Administrators"
permissions="+r+v+w+c"/>
                        <accessentry principal="GROUP.Projectmanagers"
permissions="+r+v+w+c"/>
                        <accessentry principal="GROUP.Users"
permissions="+r+v+w+c"/>
                    </accesscontrol>
                </explorertype>
  </explorertypes>
  </module>

4 - restart OpenCms

there may be some errors or missing steps but that should help you at least.

mickael





More information about the opencms-dev mailing list