1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-08-01 14:06:55 +03:00
Files
libxslt/tests/extensions/evaluate.xsl
Thomas Broyer 3ee2cad5b4 added implementation of SAXON expression(), eval() and evaluate()
* libexslt/saxon.c libexslt/Makefile.am libexslt/exslt.[ch]:
	  added implementation of SAXON expression(), eval() and
	  evaluate() functions.
	  See http://saxon.sourceforge.net/saxon6.4.4/extensions.html
	* tests/extension/evaluate.xsl tests/extension/list.{xsl,out}:
	  modified to use SAXON namespace (functions are not registered
	  in the LibXSLT namespace)
	* tests/exslt/common/object-type.1.out: modified to take account
	  of the new saxon:expression function
2001-10-07 16:55:36 +00:00

27 lines
841 B
XML

<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://icl.com/saxon"
version='1.0'>
<xsl:variable name="expression" select="saxon:expression('doc/two')"/>
<xsl:template match="/">
<xsl:variable name="string">doc/one</xsl:variable>
<xsl:value-of select="saxon:evaluate($string)"/>
<xsl:value-of select="count(saxon:evaluate('/doc/one')/../*)"/>
<xsl:value-of select="saxon:evaluate(/doc/three)"/>
<xsl:value-of select="saxon:eval($expression)"/>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="four">
<xsl:variable name="string">doc/one</xsl:variable>
<xsl:value-of select="saxon:evaluate($string)"/>
<xsl:value-of select="saxon:eval($expression)"/>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>