[opencms-dev] having some problem in XML Content

Anindya Bandyopadhyay anindya12345 at gmail.com
Fri Apr 15 12:29:53 CEST 2005


Hi all,

 I'm trying to work on XML content and get it worked. I've managed to get 
the list of all the articles in XML content. When I click on
article001.htmlfrom the explorer view, I get the error message
"template-elements" is
undefined and get the same error when I click "read more" in the list page 
of articles. I have a VFS which looks like:

 /release/myProject/article.xsd

/release/myProject/article001.html

/release/myProject/article002.html

/release/myProject/article003.html

/release/myProject/detail.jsp

/release/myProject/list.jsp

 I followed all the stuff from the mail of Alexander Kandzior in OpenCms 
mailing list and set the *template-elements* of myProject folder to 
"/myProject/detail.jsp". Now when I click on *articleXXX.html,* I get the 
error "The page cannot be found". I'm providing the content of all the files 
below:

 *article.xsd*

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified">

<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/> 

<xsd:element name="Articles" type="OpenCmsArticles"/>

<xsd:complexType name="OpenCmsArticles">

<xsd:sequence>

 <xsd:element name="Article" type="OpenCmsArticle" minOccurs="0" 
maxOccurs="unbounded"/>

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="OpenCmsArticle">

<xsd:sequence>

<xsd:element name="Title" type="OpenCmsString" />

<xsd:element name="Teaser" type="OpenCmsString" />

<xsd:element name="Text" type="OpenCmsHtml" />

</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>

  *article001.html*

<?xml version="1.0" encoding="UTF-8"?>

<Articles xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:noNamespaceSchemaLocation="
opencms://sites/default/release/myProject/article.xsd">

<Article language="en">

<Title><![CDATA[This is the text of the article]]></Title>

<Teaser><![CDATA[This is the teaser of the article]]></Teaser>

<Text name="Text0">

<links/>

<content><![CDATA[This is the text of the article.]]></content>

</Text>

</Article>

</Articles>

  *detail.jsp*

<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>

<cms:contentload collector="${elementProperty.collector}" param="${
opencms.uri}" editable="true">

<h1><cms:contentshow element="Title" /></h1>

</cms:contentload>

  *list.jsp*

<%@ page session="false" %>

<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>

<div class="element">

<cms:contentload collector="${property.collector}" 
param="release/myProject/article_${number}.html|25" editable="true">

<div class="element">

<h3><cms:contentshow element="Title" /></h3>

<p>

<cms:contentshow element="Teaser" /></br>

<small>

By <cms:contentshow element="Author" />

<a href="<cms:link><cms:contentshow element="${opencms.filename}" 
/></cms:link>">read more...</a>

</small>

</p>

</div>

</cms:contentload>

</div>

 Would you please have a look at them and tell me what I am doing wrong? And 
please let me know if you want to know something else. I'm using
OpenCms 6.0Beta 2 with Tomcat and Oracle on windows 2000. Thanks very
muck in advance,
 Regards,

 Anindya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050415/14317381/attachment.htm>


More information about the opencms-dev mailing list