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