My thanks to Conal, Graham, and Scott for prompt and helpful answers!

On Nov 7, 2007 7:35 PM, Conal Tuohy <[EMAIL PROTECTED]> wrote:

> Alternatively, you can add this escaping as a separate pipeline stage in
> your theme, using Cocoon's EncodeURLTransformer:
>
> http://cocoon.apache.org/2.1/userdocs/encodeurl-transformer.html

I went this route, as it seemed least disruptive. For the record,
here's how to do it.

In the sitemap.xmap file for your theme, add the following underneath
the root <map:sitemap> element:

<map:components>
   <map:transformers>
        <map:transformer name="encodeURL"
src="org.apache.cocoon.transformation.EncodeURLTransformer"/>
   </map:transformers>
</map:components>

Then between Steps 4 and 5 of the <map:pipeline> add:

<map:transform type="encodeURL"/>

In your theme's XSLT stylesheet, to make author names clickable, look
for the <xsl:for-each> element that selects each contributor, and
replace its <xsl:copy-of> subelement with the following:

<a>
        <xsl:attribute name="href">
                <xsl:value-of
select="concat($context-path,'/browse?type=author&value=')"/>
                <xsl:copy-of select="."/>
         </xsl:attribute>
         <xsl:copy-of select="."/>
</a>

(Oops, I suddenly realize this assumes you have the $context-path
variable defined in your theme. I recommend that! Pick up the
definition from structural.xsl.)

This currently seems to be working nicely on my test instance. If I
find any bugs, I'll let folks know.

Dorothea

-- 
Dorothea Salo                [EMAIL PROTECTED]
Digital Repository Librarian      AIM: mindsatuw
University of Wisconsin
Rm 218, Memorial Library
(608) 262-5493

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to