Dorothea,

Things are simpler with XSL 2.0 where you can just use regular  
expressions to match anything relatively painlessly. But with XSL 1.0  
you can use the build in string manipulation functions for some help....

starts-with()
contains()
substring-before()

Option 1, just use contains to see if the url contains what you're  
looking for. This will probably work in all cases but has the  
potential to match a url you didn't intend. Or another option is to  
use starts-with() for matching absolute paths. And lastly a third  
option would be to processes using substring-before based upon the  
character "?" so it will strip out any of the query parameters from  
the url.

Scott--



On Jan 4, 2008, at 10:58 AM, Dorothea Salo wrote:

>> That is generally the best option, however it's not your only option.
>> One at least one theme we have done we've split out the document
>> template so that it checks the page your on and based upon that may  
>> do
>> something special.
>
> I've done this. I set up a "currentpage" variable as follows, to  
> save effort:
>
> <xsl:variable name="currentpage">
>    <xsl:value-of select="$context-path"/>
>    <xsl:text>/</xsl:text>
>    <xsl:value-of
> select="/dri:document/dri:meta/dri:pageMeta/ 
> dri:[EMAIL PROTECTED]'request'
> and @qualifier='URI']"/>
> </xsl:variable>
>
> If you want just the last chunk of URL, then what you need is the
> <xsl:value-of> above. For anything that you want to depend on the
> identity of the page, then:
>
> <xsl:if test="$currentpage=[whatever]"><xsl:doSomething/></xsl:if>
>
> One small problem: any page that has parameters won't match. Scott
> will know better than I do whether Manakin still has parameterized
> URLs.
>
> 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: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to