~ubuntu-branches/ubuntu/natty/libxslt/natty

« back to all changes in this revision

Viewing changes to tests/exslt/strings/replace.1.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-01-24 16:26:15 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070124162615-8ivleans2t5rdkjt
Tags: 1.1.20-0ubuntu1
* New upstream release.
* debian/rules:
  - bumped shlibs, new interfaces added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<xsl:stylesheet version="1.0"
 
3
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 
4
    xmlns:str="http://exslt.org/strings"
 
5
    exclude-result-prefixes="str">
 
6
 
 
7
<xsl:template match="/">
 
8
        <xsl:variable name="x" select="doc/strings/x"/>
 
9
        <xsl:variable name="y" select="doc/strings/y"/>
 
10
 
 
11
<out>;
 
12
        str:replace('a, simple, list', ', ', '-')
 
13
        <xsl:copy-of select="str:replace('a, simple, list', ', ', '-')"/>
 
14
 
 
15
        str:replace('a, simple, list', 'a, ', 'the ')
 
16
        <xsl:copy-of select="str:replace('a, simple, list', 'a, ', 'the ')"/>
 
17
 
 
18
        str:replace('a, simple, list', 'list', 'array')
 
19
        <xsl:copy-of select="str:replace('a, simple, list', 'list', 'array')"/>
 
20
 
 
21
        str:replace('a, simple, list', 'i', 'I')
 
22
        <xsl:copy-of select="str:replace('a, simple, list', 'i', 'I')"/>
 
23
 
 
24
        str:replace('a, simple, list', ', ', '')
 
25
        <xsl:copy-of select="str:replace('a, simple, list', ', ', '')"/>
 
26
 
 
27
        str:replace('fee, fi, fo, fum', $x, $y)
 
28
        <xsl:copy-of select="str:replace('fee, fi, fo, fum', $x, $y)" />
 
29
 
 
30
        str:replace('fee, fi, fo, fum', $x, 'j')
 
31
        <xsl:copy-of select="str:replace('fee, fi, fo, fum', $x, 'j')" />
 
32
 
 
33
</out>
 
34
</xsl:template>
 
35
 
 
36
</xsl:stylesheet>