Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Unable to control the nested replicated item from DCR in a component
acezone
Hi All,
As per the subjected matter, here is the problem statement. In a component, I have "Main Container" with min=1 and max=10 within this container, I have nested container "Sub Container" with min=1 and max=10. Problem is such that I am able to retreive the values from DCR but dependng on the number of Main Container and Sub Container, but the value for the all the Sub Container item in DCR are getting displayed within each Main Container head. Attached is a text file containing Appearance XML, Content XML and Datacapture.cfg snippet.
It would be great if you may kindly enlight the right direction for resolving the issue.
Regards,
Ace
Find more posts tagged with
Comments
Adam Stoller
I'm just starting to get familiar with SP and haven't worked too much with parsing DCRs just yet....
Can you post the Component XML content - i.e. that part of the SP interface that displays the resultant XML from processing the component piece, to which one generally writes the XSL to format it?
I ask because your DCT appears to be written in "xml" format (location and pathid attributes) but the XSL seems to be using "iwov" format accessors (e.g.: ".../DCR/record/item/value/item[
@name=
'DescriptionContainer']/value").
That seems a bit of a mismatch - but it's hard to tell without seeing the source XML that the xSL is supposed to be processing.
acezone
Hi Ghoti,
Please find the below mentioned full component code for your perusal.
PLease do let me know your observation and findings to right direction
<Component ID="1232686494588" Version="3.0sp1"><br>
<SelectedSkin>Default</SelectedSkin><br>
<ContainerProperties ID="" locked="false"> <CacheTime>-1</CacheTime> <BGColor>#FFFFFF</BGColor> <Background/> <Width>200</Width> <Height>200</Height> <Top>10</Top> <Left>10</Left> <ZIndex>0</ZIndex><br>
</ContainerProperties><br>
<Locks><br>
<ContainerProperties Changed="false" locked="false"/><br>
<Properties Changed="false" locked="false"/><br>
<Data Changed="false" locked="false"/><br>
</Locks><br>
<Properties ComponentID="1232686494588"><br>
</Properties><br>
<Data><br>
<Datum ID="DCR01" Name="MyDCR" Replicatable="true" Type="DCR"><br>
<DCR Category="pgcom_dev" Type="news_test">templatedata/pgcom_dev/news_test/data/updated_article</DCR><br>
<DCR-Category Name="pgcom_dev"><br>
<DCR-Type Name="news_test"/><br>
</DCR-Category><br>
</Datum><br>
<Group ID="GRP01"><br>
<Datum ID="BRD01" Name="MyImageBrd" Type="String">0</Datum><br>
<Datum ID="SRC01" Name="MyImage" Type="File">$URL_PREFIX/it_IT/news/images/news_crescita.jpg</Datum><br>
<Datum ID="ALT01" Name="MyImageAlt" Type="String">P&G prodotti</Datum><br>
<Datum ID="WDT01" Name="MyImageWdt" Type="String">150</Datum><br>
<Datum ID="HGT01" Name="MyImageHgt" Type="String">150</Datum><br>
</Group><br>
<Group ID="HEAD01"><br>
<Datum ID="MAIN01" Name="MainHeading" Type="String">Continua la crescita di P&G</Datum><br>
<Datum ID="SUB01" Name="SubHeading" Type="String">Gli utili per azione aumentano del 17% e il fatturato cresce del 9%.</Datum><br>
</Group><br>
</Data><br>
<Stylesheet ContentType="text/html" Default="true" PageType="" RequiredPageLayout="" Type="1"><br>
<Name>Default</Name><br>
<XSL><!DOCTYPE html-entities SYSTEM "
http://www.interwoven.com/livesite/xsl/xsl-html.dtd">
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<!-- Skin: Default (Default Browser Type) -->
<xsl:include href="
http://www.interwoven.com/livesite/xsl/HTMLTemplates.xsl"/>
<xsl:include href="
http://www.interwoven.com/livesite/xsl/StringTemplates.xsl"/>
<xsl:template match="/">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="center_court1">
<table>
<tr>
<td>
<a name="main_content"></a>
<table cellspacing="0" cellpadding="0" >
<tr>
<td></td>
</tr>
<tr>
<td class="img_pad_right">
<IMG>
<xsl:attribute name="src">
<xsl:value-of select="/Properties/Data/Group[
@ID=
'GRP01']/Datum[
@Name=
'MyImage']" />
</xsl:attribute>
<xsl:attribute name="width">
<xsl:value-of select="/Properties/Data/Group[
@ID=
'GRP01']/Datum[
@Name=
'MyImageWdt']" />
</xsl:attribute>
<xsl:attribute name="height">
<xsl:value-of select="/Properties/Data/Group[
@ID=
'GRP01']/Datum[
@Name=
'MyImageHgt']" />
</xsl:attribute>
<xsl:attribute name="border">
<xsl:value-of select="/Properties/Data/Group[
@ID=
'GRP01']/Datum[
@Name=
'MyImageBrd']" />
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="/Properties/Data/Group[
@ID=
'GRP01']/Datum[
@Name=
'MyImageAlt']" />
</xsl:attribute>
</IMG>
</td>
<td>
<h1 class="header_copy"><xsl:value-of select="/Properties/Data/Group[
@ID=
'HEAD01']/Datum[
@Name=
'MainHeading']" /></h1>
<span class="intro_copy"><xsl:value-of select="/Properties/Data/Group[
@ID=
'HEAD01']/Datum[
@Name=
'SubHeading']" /></span></td>
</tr>
</table> </td>
</tr>
<xsl:for-each select="/Properties/Data/Datum[
@Name=
'MyDCR']/DCR/Document/DescriptionContainer">
<tr>
<td>
<xsl:choose>
<xsl:when test="DescriptionHeading = ''">
<br/>
<xsl:for-each select="/Properties/Data/Datum[
@Name=
'MyDCR']/DCR/Document/DescriptionContainer/MainDescriptionContainer">
<xsl:choose>
<xsl:when test="SubHeading = ''">
<br/>
<p class="body_copy"><br /></p>
</xsl:when>
<xsl
therwise>
<p class="body_copy" align="justify"><xsl:value-of select="SubHeading" disable-output-escaping="yes" /></p>
<p class="body_copy"><br /></p>
</xsl
therwise>
</xsl:choose>
</xsl:for-each>
</xsl:when>
<xsl
therwise>
<p class="blue_sub"><xsl:value-of select="DescriptionHeading" disable-output-escaping="yes" /></p>
<xsl:for-each select="/Properties/Data/Datum[
@Name=
'MyDCR']/DCR/Document/DescriptionContainer/MainDescriptionContainer">
<xsl:choose>
<xsl:when test="SubHeading = ''">
<br/>
<p class="body_copy"><br /></p>
</xsl:when>
<xsl
therwise>
<p class="body_copy" align="justify"><xsl:value-of select="SubHeading" disable-output-escaping="yes" /></p>
<p class="body_copy"><br /></p>
</xsl
therwise>
</xsl:choose>
</xsl:for-each>
</xsl
therwise>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet></XSL>
</Stylesheet>
</Component>
Adam Stoller
I'm sorry - I didn't phrase myself clearly - I meant that when you do a
Preview
of the Page - there's the XML data section shown in the bottom-left hand portion of the Preview window - that's what I (or anyone) would need to see in order to cross-check it against the XSL.
acezone
Hi Ghoti,
Hope this will be of some help to you for resolving the situation
<?xml version="1.0" encoding="UTF-8" ?>
- <Properties Admin="true" ComponentID="1232686494588">
- <Data>
- <Datum ID="DCR01" Name="MyDCR" Replicatable="true" Type="DCR">
- <DCR Category="pgcom_dev" Type="news_test">
- <Document>
- <DescriptionContainer>
<DescriptionHeading />
- <MainDescriptionContainer>
<SubHeading><strong>Cincinnati 31 Gennaio 2008</strong> – Procter & Gamble (NYSE
G) ha annunciato per il trimestre Ottobre-Dicembre una crescita del <strong>fatturato</strong> del 9% a <strong>21,6 miliardi di dollari</strong>, crescita guidata da un forte aumento nei volumi, specialmente nelle regioni in via di sviluppo, e dal successo continuo delle iniziative chiave di prodotto.<br />Il volume organico è aumentato del 6% ed il fattuato organico è aumentato del 5 % nel trimestre. <br />Gli <strong>utili diluiti per azione sono aumentati del 17% a 0.98 dollari per azione</strong> (EPS), in misura superiore alle precenti stime, grazie all’incremento del fatturato e ai continui benefici derivanti dalle sinergie con Gillette, che hanno più che controbilanciato l’incremento nei costi delle materie prime.</SubHeading>
</MainDescriptionContainer>
- <MainDescriptionContainer>
<SubHeading>“Questo trimestre rappresenta un’ulteriore conferma nelle capacità di P&G di ottenere ottimi risultati in un difficile contesto competitivo e di prezzi crescenti delle materie prime – <strong>ha affermato A.G.Lafley chairman of the Board e CEO </strong>-. La sostanziale crescita del fatturato e l’estrema attenzione al controllo dei costi stanno generando un’ottima crescita dei profitti e nel flusso di cassa. Per il futuro siamo ottimisti che la forza del portafoglio dei marchi della P&G, le iniziative di prodotto e i programmi sulla produttività consentiranno a P&G di continuare ad ottenere risultati uguali o superiori rispetto agli obiettivi.”</SubHeading>
</MainDescriptionContainer>
</DescriptionContainer>
- <DescriptionContainer>
<DescriptionHeading>Dati principali</DescriptionHeading>
- <MainDescriptionContainer>
<SubHeading>- Il fatturato è aumentato del 9% a 21,6 miliardi di dollari grazie ad un aumento del 6% della crescita organica dei volumi. Ogni area geografica ha registrato una crescita organica dei volumi guidata dall’incremento a doppia cifra nei mercati in via di sviluppo.<br />- Gli utili netti sono aumentati del 14% a 3,3 miliardi di dollari, soprattutto grazie all’effetto combinato della crescita del fatturato e della riduzione dei costi amministrativi che ha più che controbilanciato l’effetto dei maggiori costi delle materie prime. Gli utili per azione sono aumentati del 17% a 0,98 dollari in questo trimestre.<br />- Il flusso di cassa operativo è aumentato del 69% a 4,1 miliardi di dollari grazie ai maggiori utili e a un miglioramento significativo nel capitale operativo rispetto allo scorso anno. Il flusso di cassa disponibile è stato pari al 107% degli utili, ben superiore all’obiettivo annuale del 90%.</SubHeading>
</MainDescriptionContainer>
</DescriptionContainer>
</Document>
</DCR>
- <DCR-Category Name="pgcom_dev">
<DCR-Type Name="news_test" />
</DCR-Category>
</Datum>
- <Group ID="GRP01">
<Datum ID="BRD01" Name="MyImageBrd" Type="String">0</Datum>
<Datum ID="SRC01" Name="MyImage" Type="File">$URL_PREFIX/it_IT/news/images/news_crescita.jpg</Datum>
<Datum ID="ALT01" Name="MyImageAlt" Type="String">P&G prodotti</Datum>
<Datum ID="WDT01" Name="MyImageWdt" Type="String">150</Datum>
<Datum ID="HGT01" Name="MyImageHgt" Type="String">150</Datum>
</Group>
- <Group ID="HEAD01">
<Datum ID="MAIN01" Name="MainHeading" Type="String">Continua la crescita di P&G</Datum>
<Datum ID="SUB01" Name="SubHeading" Type="String">Gli utili per azione aumentano del 17% e il fatturato cresce del 9%.</Datum>
</Group>
- <External>
- <Parameters>
- <Datum Name="ID">
- <![CDATA[ 1232686494588
]]>
</Datum>
- <Datum Name="iw-ls-page-name">
- <![CDATA[ Article
]]>
</Datum>
- <Datum Name="method">
- <![CDATA[ xml
]]>
</Datum>
- <Datum Name="vpath">
- <![CDATA[ //pg-prodts-01/iwadmin/main/livesite/component/WORKAREA/shared/pglive/Article.component
]]>
</Datum>
</Parameters>
</External>
</Data>
</Properties>
Regards,
Ace
acezone
Hi I got it solved... Thanks for your co-operation...
Regards,
Ace