留言板

Proxy Web Portlet and XSLT

Jorge López Díaz,修改在11 年前。

Proxy Web Portlet and XSLT

New Member 帖子: 4 加入日期: 12-7-10 最近的帖子
Hi all,

I'm new to Liferay. I'm using 6.1.0 GA1.

I'm trying to use Proxy Web portlet to show results returned from a RSS 2.0 subscription in a customized way. The xslt sheet I'm using is something like that:

<!--?xml version="1.0"?-->
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 <xsl:output method="html" omit-xml-declaration="yes" />
<xsl:template match="/">

  <div>
		   <ul>Grupo
				<xsl:for-each select="/rss/channel/item">
					<li>
						<xsl:element name="a">
							 <xsl:attribute name="href">
									<xsl:value-of select="link" />
							 </xsl:attribute>
							<xsl:value-of select="description" />
						</xsl:element>
						<xsl:element name="a">
						 <xsl:attribute name="href">
								<xsl:value-of select="link" />
						 </xsl:attribute>
						<xsl:value-of select="title" />
						</xsl:element>
						<xsl:value-of select="pubDate" />
					</li>
				</xsl:for-each>
		  </ul>
 </div>

</xsl:template>
</xsl:stylesheet>


In XMLSpy 2013 debugger it produces expected results but from Proxy Web portlet it just produces:

<div id="aui_3_4_0_1_13237" class="portlet-body">
   <div id="aui_3_4_0_1_13236">
      <ul id="aui_3_4_0_1_13235">Grupo </ul>
   </div>
</div>


I've read about LR using something like "root/dynamic-element[@name='anything']/../dynamic-content" to reference imported elements.

Can anyone give me some light on this issue? How might I make a good xslt to achieve what I want?

Thank you in advance to anyone out there who cares about this!!!