Transformation Error on XMLDataSource and Basic Repeater

Mike Bilz asked on August 2, 2017 22:54

Hello Kentico Team,

I am attempting to pull in some text information from an external XML document, so that it can be displayed cleanly on a page. Unfortunately, the simple ASCX transformation I've written is causing an error I don't understand:

[CMSAbstractTransformation.DataBind]: [CMSAbstractTransformation.EnsureObject]: Could not initialize the transformation object, missing the ClassName column or typed DataSet to properly determine the object type.

Is this saying that I need to declare a ClassName or a DataSet within the transformation in order for it to work?

Any assistance you could provide would be greatly appreciated. Thanks.

-mike

Recent Answers


Brenden Kehren answered on August 2, 2017 23:21

Maybe you could post some of your transformation code and the setup of your data source.

0 votesVote for this answer Mark as a Correct answer

Mike Bilz answered on August 3, 2017 00:08

Hi Brenden,

Here's my Transformation, based on the example provided in the RSS documentation:

<div class="openClassItem">
  <h4>
    <%# Eval("A.SUBJECT") %>
  </h4>
  <p>
    <strong>Meets</strong>: <%# Eval("MEETINGS") %>
  </p>
  <p>
    <%# Eval("A.ENRL_TOT") %> / <%# Eval("A.ENRL_CAP") %>
  </p>
</div>

The XML itself looks like this:

<row rownumber="1">
<H.TERM_DESCR><![CDATA[XXXX]]></H.TERM_DESCR>
<A.CLASS_NBR>XXXX</A.CLASS_NBR>
<A.CLASS_SECTION><![CDATA[XXXX]]></A.CLASS_SECTION>
<A.SUBJECT><![CDATA[XXXX]]></A.SUBJECT>
<A.CATALOG_NBR><![CDATA[XXXX]]></A.CATALOG_NBR>
<A.START_DT>XXXX</A.START_DT>
<A.END_DT>XXXX</A.END_DT>
<A.SSR_COMPONENT><![CDATA[XXXX]]></A.SSR_COMPONENT>
<J.CRSE_ATTR_VALUE><![CDATA[XXXX]]></J.CRSE_ATTR_VALUE>
<A.INSTRUCTION_MODE><![CDATA[XXXX]]></A.INSTRUCTION_MODE>
<MEETINGS><![CDATA[XXXX]]></MEETINGS>
<D.MEETING_TIME_START>XXXX</D.MEETING_TIME_START>
<D.MEETING_TIME_END>XXXX</D.MEETING_TIME_END>
<TBA><![CDATA[XXXX]]></TBA>
<EXPR25_25><![CDATA[XXXX]]></EXPR25_25>
<A.ENRL_STAT><![CDATA[XXXX]]></A.ENRL_STAT>
<G.NAME><![CDATA[XXXX]]></G.NAME>
<I.SCTN_COMBINED_ID><![CDATA[XXXX]]></I.SCTN_COMBINED_ID>
<A.ENRL_TOT>XXXX</A.ENRL_TOT>
<A.ENRL_CAP>XXXX</A.ENRL_CAP>
<A.WAIT_CAP>XXXX</A.WAIT_CAP>
<A.WAIT_TOT>XXXX</A.WAIT_TOT>
<C.ACAD_ORG><![CDATA[XXXX]]></C.ACAD_ORG>
<DEPT><![CDATA[XXXX]]></DEPT>
</row>

There aren't a lot of settings in the XMLDataSource aside from Table Name: row

At this point I'm just trying to get the thing to return anything, but so far no luck.

Thanks in advance.

-mike

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 3, 2017 04:11

Since all of your elements data are in CDATA you need to use EvalCDATA

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.