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