Jupp, thanks!

What would be an appropriate XSLT forum?

Any recommendations?

Jeremy Quinn wrote:

On Thursday, Jan 30, 2003, at 15:06 Europe/London, Scherler, Thorsten wrote:

Hello group,

Function: string substring-before ( string, string ) Returns the string part preceding the first occurence of the second passed string inside the first passed string. The return value of substring-before('2000/3/22', '/') would be '2000'.

My question:
can that first string be a param?

If by this you mean 'can that first string be set by an XSLT param' ?

The answer is yes. (Be pretty useless if you could'nt ;)

eg.

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:param name="date"/>

<xsl:template match="/">
<xsl:if test="substring-before($date, '/') = '2000'">
<p>Yes, Ladies & Gentlemen, it is indeed the year 2000</p>
</xsl:if>
</xsl:template>

</xsl:stylesheet>

Ideally this kind of question ought to be asked on an appropriate XSLT forum.
But I hope it helped.

regards Jeremy


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to