summaryrefslogtreecommitdiff
path: root/ext/xsl/tests/xslt010.phpt
blob: aeedabc513953391f280ac9030cf037310571ec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
--TEST--
Test 10: EXSLT Support
--SKIPIF--
<?php
require_once dirname(__FILE__) .'/skipif.inc';
$proc = new xsltprocessor;
if (!$proc->hasExsltSupport()) die('skip EXSLT support not available');
if (LIBXSLT_VERSION < 10117) die('skip too old libxsl');
if (LIBXSLT_VERSION > 10129) die('skip for libxsl < 10130');
?>
--FILE--
<?php
echo "Test 10: EXSLT Support";

$dom = new domDocument();
  $dom->load(dirname(__FILE__)."/exslt.xsl");
  $proc = new xsltprocessor;
  $xsl = $proc->importStylesheet($dom);

  $xml = new DomDocument();
  $xml->load(dirname(__FILE__)."/exslt.xml");

  print $proc->transformToXml($xml);
--EXPECT--
Test 10: EXSLT Support
  
  
  Test Date : 0001-12-31Z
    year                 : 1
    leap-year            : false
    month-in-year        : 12
    month-name           : December
    month-abbreviation   : Dec
    week-in-year         : 1
    day-in-year          : 365
    day-in-month         : 31
    day-of-week-in-month : 5
    day-in-week          : 2
    day-name             : Monday
    day-abbreviation     : Mon
    time                 : 
    hour-in-day          : NaN
    minute-in-hour       : NaN
    second-in-minute     : NaN
  
  Test Date : 3000-01-31
    year                 : 3000
    leap-year            : false
    month-in-year        : 1
    month-name           : January
    month-abbreviation   : Jan
    week-in-year         : 5
    day-in-year          : 31
    day-in-month         : 31
    day-of-week-in-month : 5
    day-in-week          : 6
    day-name             : Friday
    day-abbreviation     : Fri
    time                 : 
    hour-in-day          : NaN
    minute-in-hour       : NaN
    second-in-minute     : NaN
  
  Test Date : 2000-02-29
    year                 : 2000
    leap-year            : true
    month-in-year        : 2
    month-name           : February
    month-abbreviation   : Feb
    week-in-year         : 9
    day-in-year          : 60
    day-in-month         : 29
    day-of-week-in-month : 5
    day-in-week          : 3
    day-name             : Tuesday
    day-abbreviation     : Tue
    time                 : 
    hour-in-day          : NaN
    minute-in-hour       : NaN
    second-in-minute     : NaN
  
  Test Date : 9990001-12-31Z
    year                 : 9990001
    leap-year            : false
    month-in-year        : 12
    month-name           : December
    month-abbreviation   : Dec
    week-in-year         : 1
    day-in-year          : 365
    day-in-month         : 31
    day-of-week-in-month : 5
    day-in-week          : 2
    day-name             : Monday
    day-abbreviation     : Mon
    time                 : 
    hour-in-day          : NaN
    minute-in-hour       : NaN
    second-in-minute     : NaN
  
  Test Date : -0004-02-29
    year                 : -4
    leap-year            : true
    month-in-year        : 2
    month-name           : February
    month-abbreviation   : Feb
    week-in-year         : 9
    day-in-year          : 60
    day-in-month         : 29
    day-of-week-in-month : 5
    day-in-week          : 1
    day-name             : Sunday
    day-abbreviation     : Sun
    time                 : 
    hour-in-day          : NaN
    minute-in-hour       : NaN
    second-in-minute     : NaN
  
  Test Date : 1999-01-02
    year                 : 1999
    leap-year            : false
    month-in-year        : 1
    month-name           : January
    month-abbreviation   : Jan
    week-in-year         : 53
    day-in-year          : 2
    day-in-month         : 2
    day-of-week-in-month : 1
    day-in-week          : 7
    day-name             : Saturday
    day-abbreviation     : Sat
    time                 : 
    hour-in-day          : NaN
    minute-in-hour       : NaN
    second-in-minute     : NaN
  
  Test Date : 1999-01-03
    year                 : 1999
    leap-year            : false
    month-in-year        : 1
    month-name           : January
    month-abbreviation   : Jan
    week-in-year         : 53
    day-in-year          : 3
    day-in-month         : 3
    day-of-week-in-month : 1
    day-in-week          : 1
    day-name             : Sunday
    day-abbreviation     : Sun
    time                 : 
    hour-in-day          : NaN
    minute-in-hour       : NaN
    second-in-minute     : NaN
  
  Test Date : 2004-01-01
    year                 : 2004
    leap-year            : true
    month-in-year        : 1
    month-name           : January
    month-abbreviation   : Jan
    week-in-year         : 1
    day-in-year          : 1
    day-in-month         : 1
    day-of-week-in-month : 1
    day-in-week          : 5
    day-name             : Thursday
    day-abbreviation     : Thu
    time                 : 
    hour-in-day          : NaN
    minute-in-hour       : NaN
    second-in-minute     : NaN
  
  Test Date : 2006-01-01
    year                 : 2006
    leap-year            : false
    month-in-year        : 1
    month-name           : January
    month-abbreviation   : Jan
    week-in-year         : 52
    day-in-year          : 1
    day-in-month         : 1
    day-of-week-in-month : 1
    day-in-week          : 1
    day-name             : Sunday
    day-abbreviation     : Sun
    time                 : 
    hour-in-day          : NaN
    minute-in-hour       : NaN
    second-in-minute     : NaN
  
  Test Date : 2007-12-31
    year                 : 2007
    leap-year            : false
    month-in-year        : 12
    month-name           : December
    month-abbreviation   : Dec
    week-in-year         : 1
    day-in-year          : 365
    day-in-month         : 31
    day-of-week-in-month : 5
    day-in-week          : 2
    day-name             : Monday
    day-abbreviation     : Mon
    time                 : 
    hour-in-day          : NaN
    minute-in-hour       : NaN
    second-in-minute     : NaN