Hi all,
I have been looking through the guide
http://wiki.dspace.org/index.php/Make_author_and_subject_links_clickable_%28Manakin%29,
trying to figure out how to get our author (and subject) links to escape the
&'s and other various characters properly. The links are there and fine, it is
just Part 1 of the guide that I am having problems with, and hope someone may
be able to help me with.
So (just for interest), the code in the themes xsl is:
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat($context-path,'/browse?value=')" />
<xsl:copy-of select="." />&type=subject
</xsl:attribute>
<xsl:value-of select="text()" />
</a><br />
So, if this is in a theme named MyTheme and in the file MyTheme.xsl, I am
assuming that the sitemap I am supposed to edit is the one in the folder
MyTheme.
So below, I have included the sitemap, as I have inserted the encoding Url
parts:
So my question is, are the encode Url parts been inserted in the right places
and the right file, as even after doing this, the url escaping does not work?
Thanks
Jennifer Whalan
<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:components>
<map:transformers default="xslt">
<map:transformer name="encodeURL"
src="org.apache.cocoon.transformation.EncodeURLTransformer"/> <----
HERE
</map:transformers>
</map:components>
<map:pipelines>
<!--
Define global theme variables that are used later in this
sitemap. Two variables are typically defined here, the theme's
path and name. The path is the directory name where this theme
is located, such as "Reference" for the reference theme. The
theme's name is used only for descriptive purposes to describe
the theme.
-->
<map:component-configurations>
<global-variables>
<theme-path>PictureNT</theme-path>
<theme-name>PictureNT</theme-name>
</global-variables>
</map:component-configurations>
<map:pipeline>
<!-- Allow the browser to cache static content for an hour -->
<map:parameter name="expires" value="access plus 1 hours"/>
<!-- Static content -->
<map:match pattern="themes/*/**">
<map:read src="{2}"/>
</map:match>
</map:pipeline>
<!--
The theme's pipeline is used to process all requests handled
by the theme. It is broken up into two parts, the first part
handles all static theme content while the second part handle
all dynamic aspect generated content. The static content is
such things as stylesheets, images, or static pages. Typically
these are just stored on disk and passed directly to the
browser without any processing.
-->
<map:pipeline>
<!-- Never allow the browser to cache dynamic content -->
<map:parameter name="expires" value="now"/>
<!-- Aspect content
There are five steps to processing aspect content:
1: Generate the DRI page
The first step is to generate a DRI page for the request;
this is handled by the aspect chain. Once it is generated
it is the beginning of a theme's pipeline, the DRI page is
ultimately transformed in the resulting XHTML that is
given to the user's browser.
2: Add page metadata
The next step is to add theme specific metadata to the
DRI page. This is metadata about where the theme is
located and its name. Typically this metadata is different
depending on the users browser, this allows us to give
different stylesheets to Internet Explorer than for other
browsers.
3: Transform to XHTML
The third step is the main component of a theme the XSL
transformations will turn the DRI page from the aspects
into an XHTML page useable by browsers.
4: Localize the page
The second to last step is to localize the content for the
particular user, if they user is requesting a page in a
particular language then those language strings are inserted
into the resulting XHTML.
5: Serialize to the browser
The last step sends the page to the user's browser.
-->
<map:match pattern="**">
<!-- Step 1: Generate the DRI page -->
<map:generate type="file" src="cocoon://DRI/{1}"/>
<!-- Step 2 Add page metadata -->
<map:select type="browser">
<map:when test="explorer6">
<map:transform type="IncludePageMeta">
<map:parameter name="theme.path" value="{global:theme-path}"/>
<map:parameter name="theme.name" value="{global:theme-name}"/>
</map:transform>
</map:when>
<map:when test="explorer8">
<map:transform type="IncludePageMeta">
<map:parameter name="theme.path" value="{global:theme-path}"/>
<map:parameter name="theme.name" value="{global:theme-name}"/>
</map:transform>
</map:when>
<map:when test="explorer">
<map:transform type="IncludePageMeta">
<map:parameter name="theme.path" value="{global:theme-path}"/>
<map:parameter name="theme.name" value="{global:theme-name}"/>
</map:transform>
</map:when>
<map:otherwise>
<map:transform type="IncludePageMeta">
<map:parameter name="theme.path" value="{global:theme-path}"/>
<map:parameter name="theme.name" value="{global:theme-name}"/>
</map:transform>
</map:otherwise>
</map:select>
<!-- Debuging output -->
<map:match type="request" pattern="XML">
<map:serialize type="xml"/>
</map:match>
<map:transform type="encodeURL"/> <-- AND HERE
<!-- Step 3: Transform to XHTML -->
<map:transform src="MyTheme.xsl"/>
<!-- Step 4: Localize the page -->
<map:act type="locale">
<map:transform type="i18n">
<map:parameter name="locale" value="{locale}"/>
</map:transform>
</map:act>
<!-- Step 5: Serialize to the browser -->
<map:serialize type="xhtml"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
Jennifer Whalan
Systems Support Officer | Innovation & Access
Northern Territory Library 'Celebrating 30 Years'
Department of Natural Resources, Environment, The Arts and Sport
Northern Territory Government
Phone: (08) 8922 0752
Fax: (08) 8922 0722
Email: [email protected]<mailto:[email protected]>
Web: www.ntl.nt.gov.au<http://www.ntl.nt.gov.au/>
The information contained in this message and any attachments may be
confidential information and may be subject to legal privilege, public interest
or legal profession privilege. If you are not the intended recipient, any use,
disclosure or copying of this message or any attachments is unauthorised. If
you have received this document in error, please advise the sender. No
representation or warranty is given that attached files are free from viruses
or other defects. The recipient assumes all responsibility for any loss or
damage resulting directly or indirectly from the use of any attached files.
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech