| Line | |
|---|
| 1 | <?xml version='1.0' encoding='UTF-8'?> |
|---|
| 2 | |
|---|
| 3 | <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|---|
| 4 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> |
|---|
| 5 | <xsl:stylesheet |
|---|
| 6 | xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'> |
|---|
| 7 | |
|---|
| 8 | <xsl:template name='get-announce'> |
|---|
| 9 | <xsl:param name='text'/> |
|---|
| 10 | <xsl:if test='contains( $text, "@@" )'> |
|---|
| 11 | <xsl:call-template name='announce-callback'> |
|---|
| 12 | <xsl:with-param name='announcement'><xsl:value-of |
|---|
| 13 | select='substring-before( |
|---|
| 14 | substring-after( $text, "@@" ), "@@" )'/></xsl:with-param> |
|---|
| 15 | </xsl:call-template> |
|---|
| 16 | <xsl:call-template name='get-announce'> |
|---|
| 17 | <xsl:with-param name='text' select='substring-after( |
|---|
| 18 | substring-after( $text, "@@" ), "@@" )'/> |
|---|
| 19 | </xsl:call-template> |
|---|
| 20 | </xsl:if> |
|---|
| 21 | </xsl:template> |
|---|
| 22 | |
|---|
| 23 | <xsl:template name='strip-announcements'> |
|---|
| 24 | <xsl:param name='text'/> |
|---|
| 25 | <xsl:choose> |
|---|
| 26 | <xsl:when test='contains( $text, "@@" )'><xsl:value-of |
|---|
| 27 | select='substring-before( $text, "@@" )'/><xsl:call-template |
|---|
| 28 | name='strip-announcements'><xsl:with-param |
|---|
| 29 | name='text'><xsl:value-of |
|---|
| 30 | select='substring-after( substring-after( $text, "@@" ), "@@" )' |
|---|
| 31 | /></xsl:with-param></xsl:call-template></xsl:when> |
|---|
| 32 | <xsl:otherwise> |
|---|
| 33 | <xsl:value-of select='$text'/> |
|---|
| 34 | </xsl:otherwise> |
|---|
| 35 | </xsl:choose> |
|---|
| 36 | </xsl:template> |
|---|
| 37 | </xsl:stylesheet> |
|---|