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