mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-08-08 21:42:07 +03:00
- libxslt/preproc.c: removed a warning on xsl:transform
- tests/docs/Makefile.am tests/docs/array.xml tests/general/Makefile.am tests/general/array.out tests/general/array.xsl: added a new test fround in xsl-dev Daniel
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
Thu Jun 14 10:07:59 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* libxslt/preproc.c: removed a warning on xsl:transform
|
||||||
|
* tests/docs/Makefile.am tests/docs/array.xml tests/general/Makefile.am
|
||||||
|
tests/general/array.out tests/general/array.xsl: added a new
|
||||||
|
test fround in xsl-dev
|
||||||
|
|
||||||
Wed Jun 13 23:12:57 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Wed Jun 13 23:12:57 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* tests/docbook/result/html/*.html tests/XSLTMark/xslbench[12].out
|
* tests/docbook/result/html/*.html tests/XSLTMark/xslbench[12].out
|
||||||
|
@@ -1336,6 +1336,9 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||||||
} else if (IS_XSLT_NAME(inst, "stylesheet")) {
|
} else if (IS_XSLT_NAME(inst, "stylesheet")) {
|
||||||
/* no computation needed */
|
/* no computation needed */
|
||||||
return;
|
return;
|
||||||
|
} else if (IS_XSLT_NAME(inst, "transform")) {
|
||||||
|
/* no computation needed */
|
||||||
|
return;
|
||||||
} else if (IS_XSLT_NAME(inst, "key")) {
|
} else if (IS_XSLT_NAME(inst, "key")) {
|
||||||
/* no computation needed */
|
/* no computation needed */
|
||||||
return;
|
return;
|
||||||
|
@@ -41,5 +41,6 @@ EXTRA_DIST = \
|
|||||||
bug-35-.xml \
|
bug-35-.xml \
|
||||||
bug-36-.xml \
|
bug-36-.xml \
|
||||||
character.xml \
|
character.xml \
|
||||||
|
array.xml \
|
||||||
items.xml
|
items.xml
|
||||||
|
|
||||||
|
7
tests/docs/array.xml
Normal file
7
tests/docs/array.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<!-- filename: test.xml=20
|
||||||
|
created on: 2001 Jun 14 01:44:46 +0200 (CEST)
|
||||||
|
last modified: 2001 Jun 14 01:44:57 +0200 (CEST)
|
||||||
|
(c) 2001 by Goetz Bock <bock@blacknet.de>
|
||||||
|
-->
|
||||||
|
<test />
|
@@ -40,6 +40,7 @@ EXTRA_DIST = \
|
|||||||
bug-35-.out bug-35-.xsl \
|
bug-35-.out bug-35-.xsl \
|
||||||
bug-36-.out bug-36-.xsl \
|
bug-36-.out bug-36-.xsl \
|
||||||
bug-36-inc.out bug-36-inc.xsl \
|
bug-36-inc.out bug-36-inc.xsl \
|
||||||
|
array.out array.xsl \
|
||||||
character.out character.xsl \
|
character.out character.xsl \
|
||||||
character2.out character2.xsl \
|
character2.out character2.xsl \
|
||||||
itemschoose.out itemschoose.xsl \
|
itemschoose.out itemschoose.xsl \
|
||||||
|
4
tests/general/array.out
Normal file
4
tests/general/array.out
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
First we try to find the value for "12M" (should be 1): 1
|
||||||
|
Now we define a variable $BP to be "18M".
|
||||||
|
$BP is defined as: 18M
|
||||||
|
Now we try to find the value for $BP (should be 2): 2
|
24
tests/general/array.xsl
Normal file
24
tests/general/array.xsl
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<!-- filename: test.xsl created on: 2001 Jun 14 01:35:21 +0200 (CEST) last modified: 2001 Jun 14 01:47:18 +0200 (CEST) (c) 2001 by Goetz Bock <bock@blacknet.de>
|
||||||
|
-->
|
||||||
|
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:local="data local to this file" version='1.0'>
|
||||||
|
<xsl:output method="text" />
|
||||||
|
<local:benefit>
|
||||||
|
<local:period ID='12M'>1</local:period>
|
||||||
|
<local:period ID='18M'>2</local:period>
|
||||||
|
<local:period ID='24M'>3</local:period>
|
||||||
|
<local:period ID='2Y' >4</local:period>
|
||||||
|
<local:period ID='5Y' >5</local:period>
|
||||||
|
</local:benefit>
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:text>First we try to find the value for "12M" (should be 1): </xsl:text>
|
||||||
|
<xsl:value-of select="document('')//local:benefit/local:period[@ID='12M']"/>
|
||||||
|
<xsl:text>
Now we define a variable $BP to be "18M".</xsl:text>
|
||||||
|
<xsl:variable name="BP">18M</xsl:variable>
|
||||||
|
<xsl:text>
$BP is defined as: </xsl:text>
|
||||||
|
<xsl:value-of select="$BP" />
|
||||||
|
<xsl:text>
Now we try to find the value for $BP (should be 2): </xsl:text>
|
||||||
|
<xsl:value-of select="document('')//local:benefit/local:period[@ID=$BP]"/>
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:transform>
|
Reference in New Issue
Block a user