I gave Dirk some bad advice, so I hope I've got this resolved right for him
this time.
Its working for me now with the following jcfg entries ( this is simply a
transform on the distributed jetspeed content as a test ):


        <portlet-entry type="abstract" name="XSLPortlet" >

<classname>org.apache.jetspeed.portal.portlets.XSLPortlet</classname>
        </portlet-entry>
....
             <portlet-entry type="ref" parent="XSLPortlet" name="XSLTest">
                <url>/jcm/jetspeed-content.xml</url>
          <parameter name="stylesheet" value="/WEB-INF/xsl/jpc-full.xsl" />
           <meta-info>
            <title>XSLTest</title>
           </meta-info>
        </portlet-entry>


Next, I had to modify the XSLPortlet to build the webapp relative path.

+ import org.apache.jetspeed.cache.disk.*;

+         String url;
+
+         try {
+               stylesheet = JetspeedDiskCache.getInstance().getEntry(
stylesheet ).getURL();
+                       url = getPortletConfig().getURL();
+               url = JetspeedDiskCache.getInstance().getEntry( url ).getURL();
+         } catch ( IOException e ) {
+             Log.error( e );
+             content = new ClearElement(e.getMessage());
+             return content;
+         }

-                         SimpleTransform.transform(
getPortletConfig().getURL(),
+                         SimpleTransform.transform( url,

Note to Santiago: I updated your latest changes this afternoon.
Did you change something to cause this, or did the XSLPortlet ever work?
I have other XSL-based-portlets that are now also broken...and they are
working on my other machine...

I can check this in, but Im waiting to hear from you first,

Thanks,

David

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Dirk Hamstra
> Sent: Sunday, January 07, 2001 8:44 PM
> To: JetSpeed
> Subject: XSLPortlet , JetspeedContent
>
>
> Hi!
>
> I want to display some XML files with associated XSL. So I thought of two
> options see below. In general what is the correct method?
>
>
> 1. using the XSLPortlet with the following entries in the jcfg-file both
> failed. Is the the right type of portlet to use and if so how do I pass
> parameters to it?
>
>        <!--
> =======================================================================
>       <portlet-entry type="ref" parent="XSLPortlet" name="XSLTest">
>              <meta-info>
>                  <title>XSLTest</title>
>              </meta-info>
>               <parameter name="url" value="/jcm/test.xml" />
>               <parameter name="stylesheet" value="/WEB-INF/xsl/test.xsl"/>
>
> ==================================================================
> ====== -->
>
>       <portlet-entry type="ref" parent="XSLPortlet" name="XSLTest">
>         <url>/jcm/test.xml </url>
>         <stylesheet>/WEB-INF/xsl/test.xsl </stylesheet
>             <meta-info>
>                  <title>XSLTest</title>
>              </meta-info>
>
> 2. use JetspeedContent portlet by adding an entry to the
> JetspeedResources.properties like:
> content.provider.test.url=/jcm/test.xml
> content.provider.test.stylesheet.url=/WEB-INF/xsl/test.xsl
> content.provider.test.title=Test
> content.provider.test.description=Test Document
>
> and an entry in my psml file like:
>
> <entry type="ref" parent="Test"/>
>
> This seems to pick up the file correctly but than generates an error from
> SAX
>
> file:E:/Nile/tomcat/webapps/nile/jcm/test.xml; Line 14; Column 74
> XSL Error: Could not parse file:E:\Nile\tomcat\webapps\nile\jcm\test.xml
> document!
> XSL Error: SAX Exception
>
> Not sure what's going on here since that file is correctly formatted and
> displayed in a browser and XMLSpy.
>
> --Dirk
>
>
>
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/[email protected]/>
> List Help?:          [EMAIL PROTECTED]
>
>



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/[email protected]/>
List Help?:          [EMAIL PROTECTED]

Reply via email to