[opencms-dev] [XSD, content rendering] Beginner question - I receive "??? xyz ???" when accessing xml elements

mailinglists mailinglists at pcom.at
Tue Sep 23 19:08:40 CEST 2008


Hi,

I'm using a schema definition for page templates which contain an 
element for the body text:
<xsd:element name="BodyText" type="OpenCmsString" minOccurs="0" 
maxOccurs="1" />
...
<layout element="BodyText" widget="HtmlWidget" 
configuration="height:250px,link,anchor" />

I'm now creating an content item in the admin GUI and can (without 
errors) use this item. When rendering the element I'm using following 
code to retrieve the element:
    CmsJspTagContentShow.contentShowTagAction(element, pageContext, 
"BodyText", null);

If the body text is present in the content item everything works fine. 
But when the body text has not been created  the contentSHowTagAction 
does return "??? BodyText ???".

Am I doing something wrong?
Am I completely wrong or shouldn't it return null if the element is not 
present (or throw an exception)?
Any workaround to find out if the element is present instead of ugly 
string matching or parsing myself?

May I hug the programmer till he/she squeezes (i guess it's part of the 
xml parser) who is responsible for returning rubbish instead of null ;-)


thanks in advance,
Philip



More information about the opencms-dev mailing list