portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <da...@bluesunrise.com>
Subject Re: Bug: XSL requires post-processing stage
Date Mon, 06 Jan 2003 22:17:46 GMT

On Monday, January 6, 2003, at 01:41  PM, Gary Lawrence Murphy wrote:

> If no one is in charge of this, stand by and I'll probably have time
> to fix it over the next couple of days, but it's an easy fix and the
> author can probably code it faster than I can find the spot.
>
> It's a common problem: Only Microsoft XSL provides filter tags to
> un-escape markup embedded in the description tags (markup can also
> be embedded in other tags, even link GET request.
>
> The short story is that a listing ends up being rendered with
> entities expanded by the browser:
>
>   Western Oil Sands Inc . - Fire extinguished at the Muskeg River ...
>   Canada NewsWire (press release),&nbsp;CA<br> <b>...</b> The mine's
>   <b>emergency</b> <b>response</b> <b>...</b> It
is part of the
>   Athabasca Oil Sands Project (AOSP),<br> a joint venture of Shell
>   <b>Canada</b> Limited (60 per cent), Chevron <b>...</b>
>
> Instead of <b> causing bold-face, it gets printed verbatim.
>
> The fix is something I had to do on my website as well: After the XSL
> transform, you need to comb through and replace the common entities
> with string equivalents.
>
> In perl (ack! blasphemy! ok, in OROInc's donated Perl5Match ;)
> you need to apply the following filters just after the XSL transform:
>
>     $quot = "'";
>     while (<>) {
>         $line = $_;
>         $line =~ s/&amp;/&/g;
>         $line =~ s/&lt;/</g;
>         $line =~ s/&gt;/>/g;
>         $line =~ s/&quot;/$quot/g;
>         $line =~ s/&nbsp;/ /g;
>
>         print $line;
>     }
>
> So the question then becomes whether you want to implicate Perl5 jars
> into Jetspeed, or if you want to do it brute-force -- Although it's a
> lot of jars for just one use, there's probably other uses for the
> Perl5Util classes in portlet applications.  I'm a big fan of the old
> ORO packages, so if they get folded into the Jetspeed kit, you'll get
> no complaints from me :)
>
Nothing wrong with Perl IMO.
Anyway,  jakarta-regexp-1.2.jar has been in the distribution for a 
while now. See the lib directory.

I haven't come across the problem you described above.
It sounds like a lot of extra processing that will not be necessary in 
most cases.
If you are going to submit a patch to the Jetspeed transform class, 
please make this feature optional and configurable.

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646




--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message