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)
BBC news update component using LiveSite
amar_maheshwary
Hi Guys,
I am trying to make BBC news update and stocks update component for my dynamic website using LiveSite.. Anyone has done similar to tht then please let me know ..
Thanks & Regards
-Amar
Find more posts tagged with
Comments
Migrateduser
I'm sure BBC provides an RSS newsfeed. Why not use that instead?
Current Environments:
(1,2) TS 6.5 on W2K3
(3) Vignette V7 Portal on Solaris 9
amar_maheshwary
True BBC provide RSS feed but how to use tht feed in livesite is my question
amar_maheshwary
I found how to implement the RSS feed. I have entered Content XML Apppearance XSL and appearnance XML data but when I try to preview the page I am getting another error. I am attaching the screen shot for the same.
I dont see any documentation of such errors with livesite components and any debugging technique in teamsite devlopment guide .. can someone advice how to proceed for such problems..
any ideas will be appreciated
amar_maheshwary
anybody got any clue on this ???
amar_maheshwary
Here is the content xml ..This seems to be it is not able to load the com.interwoven.livesite.external.xml object
<Data>
<Parameters>
<Datum ID="PARAM1" Name="URL" Type="String">
http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml
</Datum>
</Parameters>
<Object>com.interwoven.livesite.external.XML</Object>
<Method>GetURLXML</Method>
<Server />
</Data>
when I remove parameter and object section then it doesnt throw tht error attached but it wont be able to fetch the RSS feed as well without this object :-(
amar_maheshwary
Hi Guys ..
I found out the reason for these problems ..
To invoke external objects in livesite <external> tag is required but this tag is not given with the LiveSite developer pdf file
In pdf its given like this
<Data>
<Parameters>
<Datum ID="PARAM1" Name="URL" Type="String">
http://www.stencilgroup.com/ideas_scope_wsindex_rss.xml
</Datum>
</Parameters>
<Object>com.interwoven.livesite.external.XML</Object>
<Method>GetURLXML</Method>
<Server />
</Data>
but it should be
<Data>
<External>
<Parameters>
<Datum ID="PARAM1" Name="URL" Type="String">
http://www.stencilgroup.com/
ideas_scope_wsindex_rss.xml
</Datum>
</Parameters>
<Object>com.interwoven.livesite.external.impl.XML</Object>
<Method>GetURLXML</Method>
</External>
</Data>
server tag is also not required becasue while doing preview it throws an error and another important one .. object name is also wrong
it should be com.interwoven.livesite.external.impl.XML instead of com.interwoven.livesite.external.XML
There is another error in developer pdf file for RSS components in Appearance XSL
<xsl:include href="
http://www.13-colonies.com/franklin/xsl/HTMLTemplates.xsl"/>
<xsl:include href="
http://www.13-colonies.com/franklin/xsl/StringTemplates.xsl"/>
These lines are not required in appaearance xsl. I am not sure the use of these lines but if we include these lines it throws a nonsense error
So I would finally say there are couple of errors in the developer pdf of LiveSite which should be rectified. I am not sure how much I am correct here but these things worked for me after making these changes ...If anyone has more info about such problems then please pour here ....
cheers !!
-Amar
Antharix
Hi,
Could you please share the Appearence xsl code part too. That would be of great help.
--A
amar_maheshwary
Please find as an attachment
regards
-Amar
shanon
i highly recommend watching my webcast on component development with externals, it's got the skinny on all of the OOTB externals and how to use them. should really help you:
http://devnet.interwoven.com/site.fcgi/webcasts/docs/webcast-recordings.html#webcast05-31
hth,
shanon
Antharix
I could find only this
"font-size:; font-style:;font-weight:; "
is this all the content of the xsl?
regards
A
Antharix
I could see only this :: "font-size:; font-style:;font-weight:; "
Is this the only content in the xsl file?
regards
-A
amar_maheshwary
Dont open the attachment in Explorer .. right click and save the file and then open with some text editor .. u ll see the complete content :-)
Regards
-Amar
Antharix
Thanks Amar.
catorarn
Hi all, a documentation bug has been logged regarding the first single newsfeed. I am configuring the SingleSelect one and wondered if someone has a working appearance.xml, appearance.xsl and content.xml for that as well.
With the following component code I get the below error in the preview:
I got the content.xml
<Data>
<External>
<Parameters>
<Datum ID="PARAM1" Name="URL" Type="SelectMultiple">
<Option>
<Display>Business: general</Display>
<Value>
<![CDATA[
http://p.moreover.com/cgi-local/page?c=CRM%20news&o=rss
]]>
</Value>
</Option>
<Option Selected="1">
<Display>Stencil Group News</Display>
<Value>
<![CDATA[
http://www.stencilgroup.com/ideas_scope_wsindex_rss.xml
]]>
</Value>
</Option>
</Datum>
</Parameters>
<Object>com.interwoven.livesite.external.impl.XML</Object>
<Method>GetURLXML</Method>
</External>
</Data>
that validates ok, seemingly <Option Selected="YES"> as in the documentation is not accepted, so I used <Option Selected="1">. Where can I find out what the values are? Anyone knows?
Appearance.xml
<Properties>
<Group ID="group-1" Name="Main Table">
<Datum ID="MT1" Name="Cellpadding" Type="Number">5</Datum>
<Datum ID="MT2" Name="Cellspacing" Type="Number">0</Datum>
<Datum ID="MT3" Name="Width" Type="Number">100%</Datum>
<Datum ID="MT4" Name="Border" Type="Number">0</Datum>
<Datum ID="MT5" Name="BGColor" Type="Color">#000000</Datum>
<Datum ID="MT6" Name="Title Font" Type="Font"><Font Color="#ffff00" Family="verdana" Size="80%" Style="normal" Weight="bold"/></Datum>
<Datum ID="MT7" Name="Description Font" Type="Font"><Font Color="#ffffff" Family="verdana" Size="70%" Style="normal" Weight="normal"/></Datum>
</Group>
<Group ID="group-2" Name="Item Table">
<Datum ID="IT1" Name="BGColor" Type="Color">#eeeeee</Datum>
<Datum ID="IT2" Name="Headline Font" Type="Font"><Font Color="#0000cc" Family="verdana" Size="80%" Style="normal" Weight="bold"/></Datum>
<Datum ID="IT3" Name="Source Font" Type="Font"><Font Color="#000000" Family="verdana" Size="60%" Style="normal" Weight="normal"/></Datum>
</Group>
<Datum ID="MAXDATUM" Name="Number of Headlines to Display" Type="Number">6</Datum>
</Properties>
Appearance XSL
<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="/">
<xsl
aram name="maxToDisplay">
<xsl:value-of select="/Properties/Datum[
@Name=
'Number of Headlines to Display']"/>
</xsl
aram>
<TABLE>
<xsl:attribute name="width"><xsl:value-of select="/Properties/Group[
@Name=
'Main Table']/Datum[
@Name=
'Width']"/></xsl:attribute>
<xsl:attribute name="border"><xsl:value-of select="/Properties/Group[
@Name=
'Main Table']/Datum[
@Name=
'Border']"/></xsl:attribute>
<xsl:attribute name="cellpadding"><xsl:value-of select="/Properties/Group[
@Name=
'Main Table']/Datum[
@Name=
'Cellpadding']"/></xsl:attribute>
<xsl:attribute name="cellspacing"><xsl:value-of select="/Properties/Group[
@Name=
'Main Table']/Datum[
@Name=
'Cellspacing']"/></xsl:attribute>
<xsl:attribute name="bgcolor"><xsl:value-of select="/Properties/Group[
@Name=
'Main Table']/Datum[
@Name=
'BGColor']"/></xsl:attribute>
<TR>
<TD>
<a target="linkWindow"><xsl:attribute name="href"><xsl:value-of select="/Properties/Data/rss/channel/link"/></xsl:attribute>
<FONT>
<xsl:apply-templates select="/Properties/Group[
@Name=
'Main Table']/Datum[
@Name=
'Title Font']/Font"/>
<xsl:value-of select="/Properties/Data/rss/channel/title"/>
</FONT>
</a>
<p style="margin:8px;">
<FONT>
<xsl:apply-templates select="/Properties/Group[
@Name=
'Main Table']/Datum[
@Name=
'Description Font']/Font"/>
<xsl:value-of select="/Properties/Data/rss/channel/description"/>
</FONT>
</p>
</TD>
</TR>
<TR>
<TD>
<xsl:attribute name="bgcolor"><xsl:value-of select="/Properties/Group[
@Name=
'Item Table']/Datum[
@Name=
'BGColor']"/></xsl:attribute>
<ul style="margin-left:5px; margin-top:0px;">
<xsl:for-each select="/Properties/Data/rss/channel/item[position() <= $maxToDisplay]">
<span style="width:45%; height:50px;">
<A target="linkWindow">
<xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>
<FONT>
<xsl:apply-templates select="/Properties/Group[
@Name=
'Item Table']/Datum[
@Name=
'Headline Font']/Font"/>
<xsl:value-of select="title"/>
</FONT>
</A>
</span><span style="width:45%; height:50px; margin-left:5px;">
<p style="margin:0px;"></p>
<FONT>
<xsl:apply-templates select="/Properties/Group[
@Name=
'Item Table']/Datum[
@Name=
'Source Font']/Font"/>
<xsl:value-of select="description "/>
</FONT>
</span>
<p style="margin:8px;"></p>
</xsl:for-each>
</ul>
</TD>
</TR>
</TABLE>
</xsl:template>
<xsl:template match="Font">
<xsl:attribute name="face"><xsl:value-of select="
@Family"/>
;</xsl:attribute>
<xsl:attribute name="color"><xsl:value-of select="
@Color"/>
;</xsl:attribute>
<xsl:attribute name="style">font-size:<xsl:value-of select="
@Size"/>
;;font-style:<xsl:value-of select="
@Style"/>
;;font-weight:<xsl:value-of select="
@Weight"/>
;;</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
I am running through all examples to correct the documentation logging documentation bugs.
catorarn
- <Exception>
- <![CDATA[
com.interwoven.livesite.common.business.BusinessException: Failed to execute com.interwoven.livesite.external.impl.XML.GetURLXML
at com.interwoven.livesite.model.page.ComponentData.getDOM(ComponentData.java:352)
at com.interwoven.livesite.model.page.PageComponent.getTransformXML(PageComponent.java:466)
at com.interwoven.livesite.web.site.action.ComponentPreviewAction.xml(ComponentPreviewAction.java:283)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
at com.interwoven.livesite.common.web.action.BaseAction.execute(BaseAction.java:282)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at com.interwoven.ui.base.impl.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:206)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at com.interwoven.ui.base.util.SetRequestEncodingFilter.doFilter(SetRequestEncodingFilter.java:105)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.ClassCastException
at com.interwoven.livesite.external.impl.XML.execute(XML.java:70)
at com.interwoven.livesite.model.page.ComponentData.getDOM(ComponentData.java:338)
... 45 more
]]>
</Exception>
amar_maheshwary
Hi ... Option selected shud be " true" not 1 ... change this and hopefully it ll work :-)
Regards
-Amar
catorarn
Hi all, setting Select=true indeed did the trick. I now have this working code! Thanks for the reply Amar!
catorarn