cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leon tian <>
Subject Re: apply css?
Date Tue, 18 May 2004 01:33:33 GMT
Hi, i tried to using xsl:choose to link the img but the first 'when' doesn't work. Could you
spot the error for me? Thanks.
<xsl:template match="img/@src">
<xsl:variable name="link" select="." />
 <xsl:attribute name="src">
   <xsl:when test="starts-with($link ,'http')">
    <xsl:value-of select="."/>
    <xsl:value-of select="concat($remoteserver, .)"/>

Joerg Heinicke <> wrote:
On 18.05.2004 01:39, leon tian wrote:

> Hi, thanks for such detailed reply! I got it with 1 more question.
> Some remote pages reference their resources to the remote server like
> href="/css.css", the others using full url like
> href="". I'm thinking using your method
> 1 plus 'xsl:choose' to test the first four letters of 'href'
> (==http?) and link it to the correct url. But I don't know how to
> test the first four letters. Could you tell me how although it is
> more likely a xsl question.

xsl: starts-with(whatToTest, 'http')

There is also a linkrewriter block in Cocoon that might do this job in a 
more sophisticated way: Maybe you get 
it to work.


To unsubscribe, e-mail:
For additional commands, e-mail:

  Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger
View raw message