[opencms-dev] /* How to create new ARTICLE? */
Wils
wilson.neto at cesar.org.br
Thu Jan 19 15:36:00 CET 2006
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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060119/44fd42da/attachment.htm>
More information about the opencms-dev
mailing list