1 Reply Latest reply on Aug 2, 2007 2:29 PM by Chris DeLashmutt

    PortletBridge woes

    Chris DeLashmutt Newbie

      Is anyone out there successfully using PortletBridge (www.portletbridge.org) with JBoss Portal?

      I know this is the JBoss Portal forum, but I wanted to see if anyone has had any luck with it. I've spent the better part of today trying to use it, and although XSLT seems to be the right way to go to transform a page into portlet friendly content, it is a pain to get working properly.

      For instance, it seems like the default XSL that the PortletBridge uses is mostly ignoring it's templates because of the "Identity" template at the bottom of the file:

       <xsl:template match="@*|*">
       <xsl:copy>
       <xsl:apply-templates select="@*|node()"/>
       </xsl:copy>
       </xsl:template>


      I didn't want to copy the _entire_ xsl here, but you can view it at http://portletbridge.cvs.sourceforge.net/portletbridge/portletbridge-portlet/src/xsl/org/portletbridge/xsl/portletbridge.xsl?revision=1.12&view=markup

      If I test out the default stylesheet conversion in oXygen with a page I'm trying to transform, that stylesheet seems to do nothing more that copy everything from the source document with no modification. It's not re-writing URLs, or doing anything. Is the default stylesheet broken that anyone is aware of? Anyone on the team ever tried using PortletBridge?[/url]

        • 1. Re: PortletBridge woes
          Chris DeLashmutt Newbie

          I'm still trying to get a better understanding of why my pages aren't getting transformed properly with the portlet bridge XSLT transform.

          At first, I thought it might have had something to do with the uppercase tag names in the XSLT, but I found out that was a conscious choice by the portletbridge folks. Apparently NekoHTML, the library the team uses to try and clean up the HTML code, uppercases all tag names by default. Apparently, this is actually what is defined by the HTML 4 specification, according to their FAQ at http://people.apache.org/~andyc/neko/doc/html/faq.html#uppercase. I'm still trying to get to the root of this issue. If anyone else is interested, I can try to post an example here of the source, and the XSLT.

          In any event. I got to thinking about this a bit, and I'm wondering if XSLT will be feasible for a portal user. Although I think that transforming to XHTML and then using XSLT is technically the best way to go for web-clipping, I doubt whether most portal admins will be able to use it. Also, I'm not sure if that the default behavior of simply grabbing a whole page and displaying it in a portlet is the right approach, either. I would think that in a lot of situations, you really want to grab some small piece of a page instead, like a particular paragraph, or a table or something. It would be great if you could have a UI that would let you simply select the sections of the page you wanted to clip out, and let the portlet figure out the best way to grab those elements (by "id" attribute, regexp, XPath, etc).

          I think, for now, the portletbridge structurally still makes sense, but it may need to be adjusted to add in some better ease of use and alternate transformation methods.