xref: /PHP-7.4/ext/xsl/tests/xslt010.phpt (revision 26dfce7f)
1--TEST--
2Test 10: EXSLT Support
3--SKIPIF--
4<?php
5require_once __DIR__ .'/skipif.inc';
6$proc = new xsltprocessor;
7if (!$proc->hasExsltSupport()) die('skip EXSLT support not available');
8if (LIBXSLT_VERSION < 10117) die('skip too old libxsl');
9if (LIBXSLT_VERSION > 10129) die('skip for libxsl < 10130');
10?>
11--FILE--
12<?php
13echo "Test 10: EXSLT Support";
14
15$dom = new domDocument();
16  $dom->load(__DIR__."/exslt.xsl");
17  $proc = new xsltprocessor;
18  $xsl = $proc->importStylesheet($dom);
19
20  $xml = new DomDocument();
21  $xml->load(__DIR__."/exslt.xml");
22
23  print $proc->transformToXml($xml);
24--EXPECT--
25Test 10: EXSLT Support
26
27
28  Test Date : 0001-12-31Z
29    year                 : 1
30    leap-year            : false
31    month-in-year        : 12
32    month-name           : December
33    month-abbreviation   : Dec
34    week-in-year         : 1
35    day-in-year          : 365
36    day-in-month         : 31
37    day-of-week-in-month : 5
38    day-in-week          : 2
39    day-name             : Monday
40    day-abbreviation     : Mon
41    time                 :
42    hour-in-day          : NaN
43    minute-in-hour       : NaN
44    second-in-minute     : NaN
45
46  Test Date : 3000-01-31
47    year                 : 3000
48    leap-year            : false
49    month-in-year        : 1
50    month-name           : January
51    month-abbreviation   : Jan
52    week-in-year         : 5
53    day-in-year          : 31
54    day-in-month         : 31
55    day-of-week-in-month : 5
56    day-in-week          : 6
57    day-name             : Friday
58    day-abbreviation     : Fri
59    time                 :
60    hour-in-day          : NaN
61    minute-in-hour       : NaN
62    second-in-minute     : NaN
63
64  Test Date : 2000-02-29
65    year                 : 2000
66    leap-year            : true
67    month-in-year        : 2
68    month-name           : February
69    month-abbreviation   : Feb
70    week-in-year         : 9
71    day-in-year          : 60
72    day-in-month         : 29
73    day-of-week-in-month : 5
74    day-in-week          : 3
75    day-name             : Tuesday
76    day-abbreviation     : Tue
77    time                 :
78    hour-in-day          : NaN
79    minute-in-hour       : NaN
80    second-in-minute     : NaN
81
82  Test Date : 9990001-12-31Z
83    year                 : 9990001
84    leap-year            : false
85    month-in-year        : 12
86    month-name           : December
87    month-abbreviation   : Dec
88    week-in-year         : 1
89    day-in-year          : 365
90    day-in-month         : 31
91    day-of-week-in-month : 5
92    day-in-week          : 2
93    day-name             : Monday
94    day-abbreviation     : Mon
95    time                 :
96    hour-in-day          : NaN
97    minute-in-hour       : NaN
98    second-in-minute     : NaN
99
100  Test Date : -0004-02-29
101    year                 : -4
102    leap-year            : true
103    month-in-year        : 2
104    month-name           : February
105    month-abbreviation   : Feb
106    week-in-year         : 9
107    day-in-year          : 60
108    day-in-month         : 29
109    day-of-week-in-month : 5
110    day-in-week          : 1
111    day-name             : Sunday
112    day-abbreviation     : Sun
113    time                 :
114    hour-in-day          : NaN
115    minute-in-hour       : NaN
116    second-in-minute     : NaN
117
118  Test Date : 1999-01-02
119    year                 : 1999
120    leap-year            : false
121    month-in-year        : 1
122    month-name           : January
123    month-abbreviation   : Jan
124    week-in-year         : 53
125    day-in-year          : 2
126    day-in-month         : 2
127    day-of-week-in-month : 1
128    day-in-week          : 7
129    day-name             : Saturday
130    day-abbreviation     : Sat
131    time                 :
132    hour-in-day          : NaN
133    minute-in-hour       : NaN
134    second-in-minute     : NaN
135
136  Test Date : 1999-01-03
137    year                 : 1999
138    leap-year            : false
139    month-in-year        : 1
140    month-name           : January
141    month-abbreviation   : Jan
142    week-in-year         : 53
143    day-in-year          : 3
144    day-in-month         : 3
145    day-of-week-in-month : 1
146    day-in-week          : 1
147    day-name             : Sunday
148    day-abbreviation     : Sun
149    time                 :
150    hour-in-day          : NaN
151    minute-in-hour       : NaN
152    second-in-minute     : NaN
153
154  Test Date : 2004-01-01
155    year                 : 2004
156    leap-year            : true
157    month-in-year        : 1
158    month-name           : January
159    month-abbreviation   : Jan
160    week-in-year         : 1
161    day-in-year          : 1
162    day-in-month         : 1
163    day-of-week-in-month : 1
164    day-in-week          : 5
165    day-name             : Thursday
166    day-abbreviation     : Thu
167    time                 :
168    hour-in-day          : NaN
169    minute-in-hour       : NaN
170    second-in-minute     : NaN
171
172  Test Date : 2006-01-01
173    year                 : 2006
174    leap-year            : false
175    month-in-year        : 1
176    month-name           : January
177    month-abbreviation   : Jan
178    week-in-year         : 52
179    day-in-year          : 1
180    day-in-month         : 1
181    day-of-week-in-month : 1
182    day-in-week          : 1
183    day-name             : Sunday
184    day-abbreviation     : Sun
185    time                 :
186    hour-in-day          : NaN
187    minute-in-hour       : NaN
188    second-in-minute     : NaN
189
190  Test Date : 2007-12-31
191    year                 : 2007
192    leap-year            : false
193    month-in-year        : 12
194    month-name           : December
195    month-abbreviation   : Dec
196    week-in-year         : 1
197    day-in-year          : 365
198    day-in-month         : 31
199    day-of-week-in-month : 5
200    day-in-week          : 2
201    day-name             : Monday
202    day-abbreviation     : Mon
203    time                 :
204    hour-in-day          : NaN
205    minute-in-hour       : NaN
206    second-in-minute     : NaN
207