Re: [Hypercontent-users] set div tag depending on loction in site
Brought to you by:
alexvigdor
|
From: Alex V. <al...@bi...> - 2007-08-09 13:37:42
|
Hi Carl,
Off the top of my head, I'd suggest trying something like this:
<div>
<xsl:attribute name="id">
<xsl:choose>
<xsl:when test="starts-with($sourceDirectory,'/
undergraduate/')">
<xsl:text>underdgraduate</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>corporate</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
Cheers,
Alex
On Aug 9, 2007, at 9:18 AM, Carl P Barrow wrote:
> Hi,
>
> I want to use a different opening div tag depending on the location
> in the site so :
>
> <xsl:choose>
> <xsl:when test="starts-with($sourceDirectory,'/
> undergraduate/')">
> <div id="undergraduate">
> </xsl:when>
> <xsl:otherwise>
> <div id="corporate">
> </xsl:otherwise>
> </xsl:choose>
>
> This won't work because is needs a closing div tag before the
> closing when.
>
> I tried setting a variable depending on location :
>
> <xsl:choose>
> <xsl:when test="starts-with($sourceDirectory,'/
> undergraduate/')">
> <xsl:variable name="scheme" select="underdraduate"/>
> </xsl:when>
> <xsl:otherwise>
> <xsl:variable name="scheme" select="corporate"/>
> </xsl:otherwise>
> </xsl:choose>
>
> and then using
>
> <div id="$scheme">
>
> which doesn't work either.
>
> Any ideas how I might be able to achieve this?
>
> Cheers
> Carl
>
> *************************************
>
> Carl Barrow
> Systems Integrator
> e-Services
> The University of Hull
> Cottingham Road
> Hull
> HU6 7RX
> Ext. 6838
>
> *************************************
>
>
>
> **********************************************************************
> *******************
> To view the terms under which this email is distributed, please go
> to http://www.hull.ac.uk/legal/email_disclaimer.html
> **********************************************************************
> *******************---------------------------------------------------
> ----------------------
> 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/
> _______________________________________________
> Hypercontent-users mailing list
> Hyp...@li...
> https://lists.sourceforge.net/lists/listinfo/hypercontent-users
|