[opencms-dev] /* How to create new ARTICLE? */
Thierry Collogne
tcollogne at hotmail.com
Thu Jan 19 15:41:14 CET 2006
Hi,
On the following link, you can find a screencast which shows how to create
an xml content
http://www.wdogsystems.com/opencms/opencms/demos/structured_content_editing.html
I used it and it works as a charm.
Hth,
Thierry
>From: "Wils" <wilson.neto at cesar.org.br>
>Reply-To: The OpenCms mailing list <opencms-dev at opencms.org>
>To: <opencms-dev at opencms.org>
>Subject: [opencms-dev] /* How to create new ARTICLE? */
>Date: Thu, 19 Jan 2006 11:36:00 -0300
>
>
>
>
>Hi people,
>
>I am using this step-by-step:
>http://mail.opencms.org/pipermail/opencms-dev/2004q4/013609.html
>
>i has:
>
>/sites/wils/myfolder/
>
>In "myfolder" i has:
>- myarticle
>- myarticle.xsd
>
>When try create myarticle i take an error:
>"Caused by: org.opencms.xml.CmsXmlException: Invalid OpenCms content
>definition XML schema structure:
>Element "/xsd:schema/xsd:complexType[1]/xsd:sequence/xsd:element" attribute
>"type" value must be "OpenCmsMyarticle" not "OpenCmsMyArticle".
>at
>org.opencms.xml.CmsXmlContentDefinition.validateAttribute(CmsXmlContentDefinition.java:512)
>"
>
>
>Please look at my 2 files struture:
>
>
>1 - myarticle:
>
>
><?xml version="1.0" encoding="UTF-8" ?>
>
><myarticles xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xsi:noNamespaceSchemaLocation="opencms://sites/wils/myfolder/myarticle.xsd">
>
><myarticle language="en">
>
><title><![CDATA[Sample article 1]]></title>
>
></myarticle>
>
></myarticles>
>
>
>
>2 - myarticle.xsd
>
><?xml version="1.0" encoding="UTF-8" ?>
>
><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>elementFormDefault="qualified">
>
><xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd" />
>
><xsd:element name="myarticles" type="OpenCmsMyArticles" />
>
><xsd:complexType name="OpenCmsMyArticles">
>
><xsd:sequence>
>
><xsd:element name="myarticle" type="OpenCmsMyArticle" minOccurs="0"
>maxOccurs="unbounded" />
>
></xsd:sequence>
>
></xsd:complexType>
>
><xsd:complexType name="OpenCmsMyArticle">
>
><xsd:sequence>
>
><xsd:element name="title" type="OpenCmsString" />
>
></xsd:sequence>
>
><xsd:attribute name="language" type="OpenCmsLocale" use="required" />
>
></xsd:complexType>
>
><xsd:annotation>
>
><xsd:appinfo>
>
><mapping element="Title" mapto="property:Title" />
>
></xsd:appinfo>
>
></xsd:annotation>
>
></xsd:schema>
>
>_______________________________________________
>This mail is sent to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list