tests/decl/override/override-f-004.xsl
author Michael Kay <mike@saxonica.com>
Tue, 18 Aug 2015 18:22:28 +0100
changeset 1045 6d51333a8d63
parent 840 e80670ae04c0
permissions -rw-r--r--
Various corrections to xsl:override tests
840
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     1
<xsl:package 
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     2
  name="http://www.w3.org/xslt30tests/override-004"
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     3
  package-version="1.0.0"
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     4
  version="3.0"
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     5
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     6
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
1045
6d51333a8d63 Various corrections to xsl:override tests
Michael Kay <mike@saxonica.com>
parents: 840
diff changeset
     7
  xmlns:p="http://www.w3.org/xslt30tests/override-base-001"
840
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     8
  exclude-result-prefixes="xs p">
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
     9
  
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    10
  <xsl:use-package
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    11
    name="http://www.w3.org/xslt30tests/override-base-001"
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    12
    package-version="1.0.0">
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    13
    <xsl:override>
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    14
      <xsl:function name="p:fa" as="xs:string" visibility="public">
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    15
        <xsl:param name="in" as="xs:string"/>
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    16
        <xsl:param name="count" as="xs:integer"/>
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    17
        <xsl:sequence select="string-join((1 to $count)!$in, ',')"/>
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    18
      </xsl:function>
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    19
    </xsl:override>
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    20
  </xsl:use-package>
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    21
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    22
  
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    23
  
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    24
    <!-- Call public function defined in used package -->
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    25
   
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    26
    <xsl:template name="main">
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    27
      <xsl:choose>
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    28
        <xsl:when test="p:f('x', 5) = 'xxxxx'"><ok/></xsl:when>
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    29
        <xsl:otherwise><wrong value="p:f('x', 5)"/></xsl:otherwise>
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    30
      </xsl:choose>
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    31
    </xsl:template>
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    32
    
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    33
 
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    34
  
e80670ae04c0 Reorganized xsl:override tests
Michael Kay <mike@saxonica.com>
parents:
diff changeset
    35
</xsl:package>