[opencms-dev] Including XML content

Juri Ganitkevitch j.ganitkevitch at gmail.com
Tue Oct 25 15:45:04 CEST 2005


Hello everyone,

I'm reposting this, because it really is urgent to me (and because  
I'm afraid my first mail got lost a bit, yesterday night). Sorry for  
the spamming :(

So, my question refers to a problem I have experienced trying to do  
the following:

I am using XML content for teasers, having a front page, where I'd  
like to display some of those.
There is a detail view template for the teaser type which displays  
them exactly as they should be on the front page.

Basically, I try to treat the XML content like normal page objects  
here. So, in my front page template, I'm doing:
...
<cms:include file="somewhere/teaser_1.html" ?>
...

What I would expect is the system to apply the known template to the  
XML content object and return me processed HTML code.
Instead, this crashes. My guess would be that it interferes somehow  
with the XML content include-tag feature (accessing the attributes by  
"element="AttName" ").

The same error can be reproduced easily (on my 6.0.0) by adding the  
following three lines to include.jsp in the xmlcontentdemo:

<div class="element">
     <cms:include file="article_0002.html" />
</div>

Is there a elegant way to include detail views of XML content into  
site code? Using CmsJspActionElement.getContent() gives me nothing  
usable in return.
Should I include a template instead and pass the XML content's name  
on to it? This doesn't really seem right to me either.

Can anybody help me out here? This would be really appreciated.

Big thanks in advance!!

Cheers,

Juri







More information about the opencms-dev mailing list