<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>Using templates problem.</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Hello,</FONT>
</P>

<P><FONT SIZE=2>I'm trying to write a simple html page using not-very-complicated template. To be honest, I'm following step-by-step examples in "Howto-template" documentation. After editing the new page in WYSIWYG editor, when I'm closing and saving the page I get such an error:</FONT></P>

<P><FONT SIZE=2>com.opencms.core.CmsException: 20 Wrong XML content type. Detailed error: XML document /lukas_demo/test3html.html is not of the expected type. This document is "page", but it should be "XMLTEMPLATE" (OpenCms XML template file).. </FONT></P>

<P>        <FONT SIZE=2>at com.opencms.template.A_CmsXmlContent.throwException(A_CmsXmlContent.java:1943)</FONT>
<BR>        <FONT SIZE=2>.... [the whole exception stack below the message] ....</FONT>
</P>

<P><FONT SIZE=2>Can anyone tell me what's going on ? This error also appears while using Alkacon templates.</FONT>
</P>

<P><FONT SIZE=2>Best regards,</FONT>
<BR>        <FONT SIZE=2>Lukas</FONT>
</P>

<P><FONT SIZE=2>-------------------</FONT>
<BR><FONT SIZE=2>Łukasz Bott</FONT>
<BR><FONT SIZE=2>Datacom Software</FONT>
<BR><FONT SIZE=2>tel. 0 601 912 017</FONT>
<BR><FONT SIZE=2>-------------------</FONT>
</P>

<P><FONT SIZE=2>com.opencms.core.CmsException: 20 Wrong XML content type. Detailed error: XML document /lukas_demo/test3html.html is not of the expected type. This document is "page", but it should be "XMLTEMPLATE" (OpenCms XML template file).. </FONT></P>

<P>        <FONT SIZE=2>at com.opencms.template.A_CmsXmlContent.throwException(A_CmsXmlContent.java:1943)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.template.A_CmsXmlContent.init(A_CmsXmlContent.java:1165)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.template.A_CmsXmlContent.init(A_CmsXmlContent.java:1029)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.template.CmsXmlTemplateFile.<init>(CmsXmlTemplateFile.java:107)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.template.CmsXmlTemplate.getOwnTemplateFile(CmsXmlTemplate.java:399)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.workplace.CmsXmlTemplateEditor.getContent(CmsXmlTemplateEditor.java:460)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.template.cache.CmsElementXml.getContent(CmsElementXml.java:171)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.template.cache.CmsUri.callCanonicalRoot(CmsUri.java:185)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.template.cache.CmsElementCache.callCanonicalRoot(CmsElementCache.java:149)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.launcher.CmsXmlLauncher.generateOutput(CmsXmlLauncher.java:285)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.launcher.CmsXmlLauncher.launch(CmsXmlLauncher.java:341)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.launcher.A_CmsLauncher.initlaunch(A_CmsLauncher.java:274)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.core.OpenCms.showResource(OpenCms.java:961)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java:310)</FONT>
<BR>        <FONT SIZE=2>at com.opencms.core.OpenCmsHttpServlet.doPost(OpenCmsHttpServlet.java:331)</FONT>
<BR>        <FONT SIZE=2>at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)</FONT>
<BR>        <FONT SIZE=2>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)</FONT>
<BR>        <FONT SIZE=2>at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)</FONT>
<BR>        <FONT SIZE=2>at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)</FONT>
<BR>        <FONT SIZE=2>at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)</FONT>
<BR>        <FONT SIZE=2>at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)</FONT>
<BR>        <FONT SIZE=2>at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)</FONT>
<BR>        <FONT SIZE=2>at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)</FONT>
<BR>        <FONT SIZE=2>at java.lang.Thread.run(Thread.java:536)</FONT>
</P>

</BODY>
</HTML>