You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by cr...@apache.org on 2004/07/14 05:14:00 UTC
svn commit: rev 22890 - in forrest/trunk/src/core/context/resources/stylesheets: . external
Author: crossley
Date: Tue Jul 13 20:13:59 2004
New Revision: 22890
Modified:
forrest/trunk/src/core/context/resources/stylesheets/declare-broken-site-links.xsl (contents, props changed)
forrest/trunk/src/core/context/resources/stylesheets/external/str.find-last.xslt (contents, props changed)
Log:
Do dos2unix to fix line-endings.
Do 'svn propset svn:eol-style native' for all text files.
Modified: forrest/trunk/src/core/context/resources/stylesheets/declare-broken-site-links.xsl
==============================================================================
--- forrest/trunk/src/core/context/resources/stylesheets/declare-broken-site-links.xsl (original)
+++ forrest/trunk/src/core/context/resources/stylesheets/declare-broken-site-links.xsl Tue Jul 13 20:13:59 2004
@@ -1,43 +1,43 @@
-<?xml version="1.0"?>
-<!--
- Copyright 2002-2004 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <xsl:template match="@*">
- <xsl:attribute name="{name(.)}">
- <xsl:choose>
- <!-- Change the site: and ext: links in the output so that Forrest
- understands that they are broken -->
- <xsl:when test="contains(., 'site:') or contains(., 'ext:')">
- <xsl:value-of select="concat('error:', .)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </xsl:template>
-
- <!-- Identity transformation template -->
- <xsl:template match="/ | * | comment() | processing-instruction() | text()">
- <xsl:copy>
- <xsl:apply-templates select="@* | * | comment() | processing-instruction() | text()"/>
- </xsl:copy>
- </xsl:template>
-
-
-</xsl:stylesheet>
\ No newline at end of file
+<?xml version="1.0"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:template match="@*">
+ <xsl:attribute name="{name(.)}">
+ <xsl:choose>
+ <!-- Change the site: and ext: links in the output so that Forrest
+ understands that they are broken -->
+ <xsl:when test="contains(., 'site:') or contains(., 'ext:')">
+ <xsl:value-of select="concat('error:', .)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:template>
+
+ <!-- Identity transformation template -->
+ <xsl:template match="/ | * | comment() | processing-instruction() | text()">
+ <xsl:copy>
+ <xsl:apply-templates select="@* | * | comment() | processing-instruction() | text()"/>
+ </xsl:copy>
+ </xsl:template>
+
+
+</xsl:stylesheet>
Modified: forrest/trunk/src/core/context/resources/stylesheets/external/str.find-last.xslt
==============================================================================
--- forrest/trunk/src/core/context/resources/stylesheets/external/str.find-last.xslt (original)
+++ forrest/trunk/src/core/context/resources/stylesheets/external/str.find-last.xslt Tue Jul 13 20:13:59 2004
@@ -1,158 +1,158 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-This file is from the examples included in the XSLT Cookbook, written by Sal Mangano, published by O'Reilly
-See /legal/oreilly.codepolicy.txt and /legal/oreilly.permission.txt
--->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" id="str.find-last"
- xmlns:str="http://www.ora.com/XSLTCookbook/namespaces/strings" extension-element-prefixes="str">
-
-
-<xsl:template name="str:substring-before-last">
- <xsl:param name="input"/>
- <xsl:param name="substr"/>
-
- <xsl:if test="$substr and contains($input, $substr)">
- <xsl:variable name="temp" select="substring-after($input, $substr)" />
- <xsl:value-of select="substring-before($input, $substr)" />
- <xsl:if test="contains($temp, $substr)">
- <xsl:value-of select="$substr" />
- <xsl:call-template name="str:substring-before-last">
- <xsl:with-param name="input" select="$temp" />
- <xsl:with-param name="substr" select="$substr" />
- </xsl:call-template>
- </xsl:if>
- </xsl:if>
-
-</xsl:template>
-
-
-<xsl:template name="str:substring-after-last">
- <xsl:param name="input"/>
- <xsl:param name="substr"/>
-
- <!-- Extract the string which comes after the first occurence -->
- <xsl:variable name="temp" select="substring-after($input,$substr)"/>
-
- <xsl:choose>
- <xsl:when test="$substr and contains($temp,$substr)">
- <xsl:call-template name="str:substring-after-last">
- <xsl:with-param name="input" select="$temp"/>
- <xsl:with-param name="substr" select="$substr"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$temp"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<xsl:template match="xsl:stylesheet[@id='str.find-last'] | xsl:include[@href='str.find-last.xslt'] " >
-<tests>
-
-<!-- before -->
- <test name="str:substring-before-last with no occurences of yes">
- <xsl:call-template name="str:substring-before-last">
- <xsl:with-param name="input" select=" 'No occurences' "/>
- <xsl:with-param name="substr" select=" 'yes' "/>
- </xsl:call-template>
- </test>
-
- <test name="str:substring-before-last starts with yes">
- <xsl:call-template name="str:substring-before-last">
- <xsl:with-param name="input" select=" 'yes occurences' "/>
- <xsl:with-param name="substr" select=" 'yes' "/>
- </xsl:call-template>
- </test>
-
- <test name="str:substring-before-last starts with yes and ends with yes">
- <xsl:call-template name="str:substring-before-last">
- <xsl:with-param name="input" select=" 'yes occurences yes' "/>
- <xsl:with-param name="substr" select=" 'yes' "/>
- </xsl:call-template>
- </test>
-
- <test name="str:substring-before-last 3 yes">
- <xsl:call-template name="str:substring-before-last">
- <xsl:with-param name="input" select=" 'yesyesyes' "/>
- <xsl:with-param name="substr" select=" 'yes' "/>
- </xsl:call-template>
- </test>
- <test name="str:substring-before-last empty input">
- <xsl:call-template name="str:substring-before-last">
- <xsl:with-param name="substr" select=" 'yes' "/>
- </xsl:call-template>
- </test>
-
- <test name="str:substring-before-last empty search">
- <xsl:call-template name="str:substring-before-last">
- <xsl:with-param name="input" select=" 'No occurences' "/>
- </xsl:call-template>
-
- </test>
-
- <test name="str:substring-before-last large">
- <xsl:call-template name="str:substring-before-last">
- <xsl:with-param name="input" select=" 'yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes' "/>
- <xsl:with-param name="substr" select=" 'yes' "/>
- </xsl:call-template>
-
-
- </test>
-
-<!-- after -->
-
- <test name="str:substring-after-last with no occurences of yes">
- <xsl:call-template name="str:substring-after-last">
- <xsl:with-param name="input" select=" 'No occurences' "/>
- <xsl:with-param name="substr" select=" 'yes' "/>
- </xsl:call-template>
- </test>
-
- <test name="str:substring-after-last starts with yes">
- <xsl:call-template name="str:substring-after-last">
- <xsl:with-param name="input" select=" 'yes occurences' "/>
- <xsl:with-param name="substr" select=" 'yes' "/>
- </xsl:call-template>
- </test>
-
- <test name="str:substring-after-last starts with yes and ends with yes">
- <xsl:call-template name="str:substring-after-last">
- <xsl:with-param name="input" select=" 'yes occurences yes' "/>
- <xsl:with-param name="substr" select=" 'yes' "/>
- </xsl:call-template>
- </test>
-
- <test name="str:substring-after-last 3 yes">
- <xsl:call-template name="str:substring-after-last">
- <xsl:with-param name="input" select=" 'yesyesyes' "/>
- <xsl:with-param name="substr" select=" 'yes' "/>
- </xsl:call-template>
- </test>
-
- <test name="str:substring-after-last 3 yes then no">
- <xsl:call-template name="str:substring-after-last">
- <xsl:with-param name="input" select=" 'yesyesyesno' "/>
- <xsl:with-param name="substr" select=" 'yes' "/>
- </xsl:call-template>
- </test>
-
- <test name="str:substring-after-last empty input">
- <xsl:call-template name="str:substring-after-last">
- <xsl:with-param name="substr" select=" 'yes' "/>
- </xsl:call-template>
- </test>
-
- <test name="str:substring-after-last empty search">
- <xsl:call-template name="str:substring-after-last">
- <xsl:with-param name="input" select=" 'No occurences' "/>
- </xsl:call-template>
-
- </test>
-
-</tests>
-</xsl:template>
-
- <xsl:template match="text()"/>
-
-</xsl:stylesheet>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+This file is from the examples included in the XSLT Cookbook, written by Sal Mangano, published by O'Reilly
+See /legal/oreilly.codepolicy.txt and /legal/oreilly.permission.txt
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" id="str.find-last"
+ xmlns:str="http://www.ora.com/XSLTCookbook/namespaces/strings" extension-element-prefixes="str">
+
+
+<xsl:template name="str:substring-before-last">
+ <xsl:param name="input"/>
+ <xsl:param name="substr"/>
+
+ <xsl:if test="$substr and contains($input, $substr)">
+ <xsl:variable name="temp" select="substring-after($input, $substr)" />
+ <xsl:value-of select="substring-before($input, $substr)" />
+ <xsl:if test="contains($temp, $substr)">
+ <xsl:value-of select="$substr" />
+ <xsl:call-template name="str:substring-before-last">
+ <xsl:with-param name="input" select="$temp" />
+ <xsl:with-param name="substr" select="$substr" />
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:if>
+
+</xsl:template>
+
+
+<xsl:template name="str:substring-after-last">
+ <xsl:param name="input"/>
+ <xsl:param name="substr"/>
+
+ <!-- Extract the string which comes after the first occurence -->
+ <xsl:variable name="temp" select="substring-after($input,$substr)"/>
+
+ <xsl:choose>
+ <xsl:when test="$substr and contains($temp,$substr)">
+ <xsl:call-template name="str:substring-after-last">
+ <xsl:with-param name="input" select="$temp"/>
+ <xsl:with-param name="substr" select="$substr"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$temp"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<xsl:template match="xsl:stylesheet[@id='str.find-last'] | xsl:include[@href='str.find-last.xslt'] " >
+<tests>
+
+<!-- before -->
+ <test name="str:substring-before-last with no occurences of yes">
+ <xsl:call-template name="str:substring-before-last">
+ <xsl:with-param name="input" select=" 'No occurences' "/>
+ <xsl:with-param name="substr" select=" 'yes' "/>
+ </xsl:call-template>
+ </test>
+
+ <test name="str:substring-before-last starts with yes">
+ <xsl:call-template name="str:substring-before-last">
+ <xsl:with-param name="input" select=" 'yes occurences' "/>
+ <xsl:with-param name="substr" select=" 'yes' "/>
+ </xsl:call-template>
+ </test>
+
+ <test name="str:substring-before-last starts with yes and ends with yes">
+ <xsl:call-template name="str:substring-before-last">
+ <xsl:with-param name="input" select=" 'yes occurences yes' "/>
+ <xsl:with-param name="substr" select=" 'yes' "/>
+ </xsl:call-template>
+ </test>
+
+ <test name="str:substring-before-last 3 yes">
+ <xsl:call-template name="str:substring-before-last">
+ <xsl:with-param name="input" select=" 'yesyesyes' "/>
+ <xsl:with-param name="substr" select=" 'yes' "/>
+ </xsl:call-template>
+ </test>
+ <test name="str:substring-before-last empty input">
+ <xsl:call-template name="str:substring-before-last">
+ <xsl:with-param name="substr" select=" 'yes' "/>
+ </xsl:call-template>
+ </test>
+
+ <test name="str:substring-before-last empty search">
+ <xsl:call-template name="str:substring-before-last">
+ <xsl:with-param name="input" select=" 'No occurences' "/>
+ </xsl:call-template>
+
+ </test>
+
+ <test name="str:substring-before-last large">
+ <xsl:call-template name="str:substring-before-last">
+ <xsl:with-param name="input" select=" 'yesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyesyes' "/>
+ <xsl:with-param name="substr" select=" 'yes' "/>
+ </xsl:call-template>
+
+
+ </test>
+
+<!-- after -->
+
+ <test name="str:substring-after-last with no occurences of yes">
+ <xsl:call-template name="str:substring-after-last">
+ <xsl:with-param name="input" select=" 'No occurences' "/>
+ <xsl:with-param name="substr" select=" 'yes' "/>
+ </xsl:call-template>
+ </test>
+
+ <test name="str:substring-after-last starts with yes">
+ <xsl:call-template name="str:substring-after-last">
+ <xsl:with-param name="input" select=" 'yes occurences' "/>
+ <xsl:with-param name="substr" select=" 'yes' "/>
+ </xsl:call-template>
+ </test>
+
+ <test name="str:substring-after-last starts with yes and ends with yes">
+ <xsl:call-template name="str:substring-after-last">
+ <xsl:with-param name="input" select=" 'yes occurences yes' "/>
+ <xsl:with-param name="substr" select=" 'yes' "/>
+ </xsl:call-template>
+ </test>
+
+ <test name="str:substring-after-last 3 yes">
+ <xsl:call-template name="str:substring-after-last">
+ <xsl:with-param name="input" select=" 'yesyesyes' "/>
+ <xsl:with-param name="substr" select=" 'yes' "/>
+ </xsl:call-template>
+ </test>
+
+ <test name="str:substring-after-last 3 yes then no">
+ <xsl:call-template name="str:substring-after-last">
+ <xsl:with-param name="input" select=" 'yesyesyesno' "/>
+ <xsl:with-param name="substr" select=" 'yes' "/>
+ </xsl:call-template>
+ </test>
+
+ <test name="str:substring-after-last empty input">
+ <xsl:call-template name="str:substring-after-last">
+ <xsl:with-param name="substr" select=" 'yes' "/>
+ </xsl:call-template>
+ </test>
+
+ <test name="str:substring-after-last empty search">
+ <xsl:call-template name="str:substring-after-last">
+ <xsl:with-param name="input" select=" 'No occurences' "/>
+ </xsl:call-template>
+
+ </test>
+
+</tests>
+</xsl:template>
+
+ <xsl:template match="text()"/>
+
+</xsl:stylesheet>