-
Notifications
You must be signed in to change notification settings - Fork 233
/
build.xml
615 lines (577 loc) · 33.8 KB
/
build.xml
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is a build file for Apache ant (http://ant.apache.org/). This has been tested with Ant 1.7. -->
<project name="wcag20" basedir="." default="usage">
<description>Generate WCAG 2.0 and related documents</description>
<!-- Load overriding properties -->
<xmlproperty file="build.properties" keeproot="false" semanticattributes="true"/>
<!-- The following properties need to be set appropriately before doing a build - they should all be overridden by the above property file, but are kept here to serve as defaults -->
<property name="pubdate" value="20090123" description="Publication date of this version of the documents, in YYYYMMDD format, used to generate the output directory"/>
<property name="pubdate.previous" value="20081211" description="Publication date of a previous version of the documents, used to find the folder from which to copy static files (images, CSS) into the new output directory"/>
<property name="guidelines.w3c-version" value="REC" description="W3C version of the guidelines, used to generate the output directory"/>
<property name="understanding.w3c-version" value="NOTE" description="W3C version of understanding, used to generate the output directory"/>
<property name="techniques.w3c-version" value="NOTE" description="W3C version of the techniques, used to generate the output directory"/>
<property name="wcag2ict.w3c-version" value="WD" description="W3C version of WCAG2ICT, used to generate the output directory"/>
<property name="guidelines.w3c-version.previous" value="REC" description="W3C version of a previous version of the guidelines, used to find the folder from which to copy static files (images, CSS) into the new output directory"/>
<property name="understanding.w3c-version.previous" value="NOTE" description="W3C version of a previous version of understanding, used to find the folder from which to copy static files (images, CSS) into the new output directory"/>
<property name="techniques.w3c-version.previous" value="NOTE" description="W3C version of a previous version of the techniques, used to find the folder from which to copy static files (images, CSS) into the new output directory"/>
<property name="wcag2ict.w3c-version" value="WD" description="W3C version of a previous version of WCAG2ICT, used to find the folder from which to copy static files (images, CSS) into the new output directory"></property>
<property name="outputdir" location="." description="Directory within which the output folders are created, normally "../YYYY" unless doing TR in which case it is "../../../TR/<YYYY>""/>
<property name="outputdir.previous" location="." description="Directory in which previous build containing static files is located, almost always "../YYYY""/>
<property name="outputdir.prefix" value="file:///" description="Prefix if any that must be prepended to the outputdir to make it resolve on the platform"/>
<property name="slices" value="true" description="Set to "true" to output mutliple-file versions"/>
<property name="monolithic" value="true" description="Set to "true" to output single-file version"/>
<property name="diffspec" value="false" description="Set to "true" to output a diff version (as a separate copy of monolithic versions, but as the only format for multiple-file versions)"/>
<property name="ednotes" value="1" description="Whether to output editorial notes"/>
<property name="xslt.factory" value="net.sf.saxon.TransformerFactoryImpl" description="Class name of the XSLT transformer factory, which sets which XSLT engine to use; must be an XSLT 2.0 processor"/>
<property name="pubtarget" value="editors" description="Publication target, either 'tr' or 'editors', to allow build to output values appropriately"/>
<!-- The following properties usually do not need to be adjusted -->
<property name="source.guidelines" location="sources/wcag2-src.xml"/>
<property name="source.understanding" location="sources/guide-to-wcag2-src.xml"/>
<property name="source.techniques" location="sources/wcag20-merged-techs.xml"/>
<property name="source.quickref" location="sources/wcag2-quickref.xml"/>
<property name="source.quickref.leadin" location="sources/quickref-leadin.php"/>
<property name="source.refs" location="sources/refs.xml"/>
<property name="source.wcag2ict" location="sources/wcag2ict.html"/>
<property name="cvs.basedir" location="../../../../../"/>
<property name="outputdir.guidelines" location="${outputdir}/${guidelines.w3c-version}-WCAG20-${pubdate}"/>
<property name="outputdir.understanding" location="${outputdir}/${understanding.w3c-version}-UNDERSTANDING-WCAG20-${pubdate}"/>
<property name="outputdir.techniques" location="${outputdir}/${techniques.w3c-version}-WCAG20-TECHS-${pubdate}"/>
<property name="outputdir.quickref" location="../../WCAG20/quickref/${pubdate}"/>
<property name="outputdir.wcag2ict" location="${outputdir}/${wcag2ict.w3c-version}-wcag2ict-${pubdate}"/>
<property name="outputdir.guidelines.previous" location="${outputdir.previous}/${guidelines.w3c-version.previous}-WCAG20-${pubdate.previous}"/>
<property name="outputdir.understanding.previous" location="${outputdir.previous}/${understanding.w3c-version.previous}-UNDERSTANDING-WCAG20-${pubdate.previous}"/>
<property name="outputdir.techniques.previous" location="${outputdir.previous}/${techniques.w3c-version.previous}-WCAG20-TECHS-${pubdate.previous}"/>
<property name="outputdir.quickref.previous" location="../../WCAG20/quickref/${pubdate.previous}"/>
<property name="outputdir.zip" location="../../WCAG20/versions"/>
<property name="outputdir.zip.guidelines" location="${outputdir.zip}/guidelines"/>
<property name="outputdir.zip.understanding" location="${outputdir.zip}/understanding"/>
<property name="outputdir.zip.techniques" location="${outputdir.zip}/techniques"/>
<property name="outputdir.utility" location="../../../../WCAG/utility"/>
<!--
<path id="saxon.classpath">
<fileset dir="C:\Documents\Java\saxonb9-1-0-2j">
<include name="saxon9.jar"/>
<include name="saxon9-dom.jar"/>
<include name="saxon9-xpath.jar"/>
</fileset>
<pathelement location="C:\Documents\Java\saxon-ant9-1\saxon9-ant.jar"/>
</path>
-->
<filelist id="techs" description="Individual technique files" dir="sources/techniques">
<file name="aria.xml"/>
<file name="html.xml"/>
<file name="css.xml"/>
<file name="client-side-script.xml"/>
<file name="server-side-script.xml"/>
<file name="smil.xml"/>
<file name="text.xml"/>
<file name="failures.xml"/>
<file name="flash.xml"/>
<file name="pdf.xml"/>
<file name="silverlight.xml"/>
<file name="general.xml"/>
</filelist>
<!-- Saxon XSLT -->
<!-- This task is not needed since Saxon can be called with the transformer factory, though it provides additional features -->
<!--
<taskdef name="saxon-xslt" classname="net.sf.saxon.ant.AntTransform">
<classpath refid="saxon.classpath"/>
</taskdef>
-->
<target name="usage">
<echo level="info">Usage: "ant <target>" to execute a build task
Enter "ant -projecthelp" to get list of available build tasks</echo>
</target>
<target name="init">
<!-- Set properties that affect whether diff and slices output, done here because 1) the conditions in targets can only depend on whether a property is set, not its value, while it is more convenient to define the property so it isn't forgotten about, and 2) the conditions intersect, and this resolves those. -->
<condition property="monolithic.nodiff">
<equals arg1="${monolithic}" arg2="true"/>
</condition>
<condition property="slices.nodiff">
<and>
<equals arg1="${slices}" arg2="true"/>
<not>
<equals arg1="${diffspec}" arg2="true"/>
</not>
</and>
</condition>
<condition property="slices.diff">
<and>
<equals arg1="${slices}" arg2="true"/>
<equals arg1="${diffspec}" arg2="true"/>
</and>
</condition>
<!-- For now, not doing CVS within the build process -->
<!--<cvs command="update"/>-->
</target>
<!--<target name="clean" description="Clean up any temp files"></target>-->
<!-- === Static content === -->
<target name="guidelines.static" description="Copy static files for guidelines into new directory" depends="init">
<copy todir="${outputdir.guidelines}">
<fileset dir="${outputdir.guidelines.previous}">
<exclude name="*.html"/>
<exclude name="CVS/"/>
</fileset>
</copy>
</target>
<target name="understanding.static" description="Copy static files for understanding into new directory" depends="init">
<copy todir="${outputdir.understanding}">
<fileset dir="${outputdir.understanding.previous}">
<exclude name="*.html"/>
<exclude name="CVS/"/>
</fileset>
</copy>
</target>
<target name="techniques.static" description="Copy static files for techniques into new directory" depends="init">
<copy todir="${outputdir.techniques}">
<fileset dir="${outputdir.techniques.previous}">
<exclude name="*.html"/>
<exclude name="CVS/"/>
</fileset>
</copy>
</target>
<target name="quickref.static" description="Copy static files for quickref into new directory" depends="init">
<copy todir="${outputdir.quickref}">
<fileset dir="${outputdir.quickref.previous}">
<exclude name="*.html"/>
<exclude name="*.php"/>
<exclude name="CVS/"/>
</fileset>
</copy>
</target>
<target name="all.static" description="Copy static files into new directories" depends="guidelines.static, understanding.static, techniques.static, quickref.static"/>
<!-- === HTML versions === -->
<!-- Guidelines -->
<target name="guidelines.single" depends="init">
<mkdir dir="${outputdir.guidelines}"/>
<xslt in="${source.guidelines}" out="${outputdir.guidelines}/Overview.html" style="sources/diffspec.xsl" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="show.diff.markup" expression="0"/>
<param name="show.issue.links" expression="0"/>
<param name="show.ednotes" expression="${ednotes}" if="${ednotes}"/>
<param name="glthisversion" expression=""/>
<param name="guidethisversion" expression="${understanding.uri}" if="understanding.uri"/>
<param name="techsthisversion" expression="${techniques.uri}" if="techniques.uri"/>
<param name="guidelines.file" expression="file:///${source.guidelines}"/>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="techniques.file" expression="file:///${source.techniques}"/>
<param name="quickref.file" expression="file:///${source.quickref}"/>
<param name="refs.file" expression="file:///${source.refs}"/>
</xslt>
</target>
<target name="guidelines.single.diff" depends="init" if="monolithic">
<mkdir dir="${outputdir.guidelines}"/>
<xslt in="${source.guidelines}" out="${outputdir.guidelines}/Overview-diff.html" style="sources/diffspec.xsl" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="show.diff.markup" expression="1"/>
<param name="show.issue.links" expression="1"/>
<param name="show.ednotes" expression="${ednotes}" if="${ednotes}"/>
<param name="glthisversion" expression=""/>
<param name="guidethisversion" expression="${understanding.uri}" if="understanding.uri"/>
<param name="techsthisversion" expression="${techniques.uri}" if="techniques.uri"/>
<param name="guidelines.file" expression="file:///${source.guidelines}"/>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="techniques.file" expression="file:///${source.techniques}"/>
<param name="quickref.file" expression="file:///${source.quickref}"/>
<param name="refs.file" expression="file:///${source.refs}"/>
</xslt>
</target>
<target name="guidelines" depends="guidelines.single, guidelines.single.diff" description="Generate Guidelines"/>
<!-- Understanding -->
<target name="understanding.single" depends="init">
<mkdir dir="${outputdir.understanding}"/>
<xslt in="${source.understanding}" out="${outputdir.understanding}/complete.html" style="sources/diffspec-howto.xsl" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="show.diff.markup" expression="0"/>
<param name="show.issue.links" expression="0"/>
<param name="show.ednotes" expression="${ednotes}" if="${ednotes}"/>
<param name="glthisversion" expression="${guidelines.uri}" if="guidelines.uri"/>
<param name="guidethisversion" expression=""/>
<param name="techsthisversion" expression="${techniques.uri}" if="techniques.uri"/>
<param name="guidelines.file" expression="file:///${source.guidelines}"/>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="techniques.file" expression="file:///${source.techniques}"/>
<param name="quickref.file" expression="file:///${source.quickref}"/>
<param name="refs.file" expression="file:///${source.refs}"/>
</xslt>
</target>
<target name="understanding.single.diff" depends="init" if="monolithic">
<mkdir dir="${outputdir.understanding}"/>
<xslt in="${source.understanding}" out="${outputdir.understanding}/complete-diff.html" style="sources/diffspec-howto.xsl" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="show.diff.markup" expression="1"/>
<param name="show.issue.links" expression="1"/>
<param name="show.ednotes" expression="${ednotes}" if="${ednotes}"/>
<param name="glthisversion" expression="${guidelines.uri}" if="guidelines.uri"/>
<param name="guidethisversion" expression=""/>
<param name="techsthisversion" expression="${techniques.uri}" if="techniques.uri"/>
<param name="guidelines.file" expression="file:///${source.guidelines}"/>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="techniques.file" expression="file:///${source.techniques}"/>
<param name="quickref.file" expression="file:///${source.quickref}"/>
<param name="refs.file" expression="file:///${source.refs}"/>
</xslt>
</target>
<target name="understanding.slices" depends="init">
<mkdir dir="${outputdir.understanding}"/>
<xslt in="${source.understanding}" out="temp.html" style="sources/slices-understanding-common.xsl" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="show.diff.markup" expression="0" if="slices.nodiff"/>
<param name="show.issue.links" expression="0" if="slices.nodiff"/>
<param name="show.diff.markup" expression="1" if="slices.diff"/>
<param name="show.issue.links" expression="1" if="slices.diff"/>
<param name="show.ednotes" expression="${ednotes}" if="${ednotes}"/>
<param name="output.dir" expression="${outputdir.understanding}"/>
<param name="output.dir.prefix" expression="${outputdir.prefix}"/>
<param name="glthisversion" expression="${guidelines.uri}" if="guidelines.uri"/>
<param name="guidethisversion" expression=""/>
<param name="techsthisversion" expression="${techniques.uri}" if="techniques.uri"/>
<param name="guidelines.file" expression="file:///${source.guidelines}"/>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="techniques.file" expression="file:///${source.techniques}"/>
<param name="quickref.file" expression="file:///${source.quickref}"/>
<param name="refs.file" expression="file:///${source.refs}"/>
</xslt>
<delete file="temp.html"/>
</target>
<target name="understanding" depends="understanding.single, understanding.single.diff, understanding.slices" description="Generate Understanding"/>
<!-- Techniques -->
<!-- This target is only needed if generating an explicit merged techniques document, a pattern now removed. If returning to that pattern, targets that process wcag20-merged-techs.xml will need to change back to merged-techs.xml. -->
<target name="techniques-merge" depends="init">
<xslt in="${source.techniques}" out="sources/merged-techs.xml" style="sources/techs-merge.xslt">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
</xslt>
</target>
<target name="techniques.single" depends="init">
<mkdir dir="${outputdir.techniques}"/>
<xslt in="${source.techniques}" out="${outputdir.techniques}/complete.html" style="sources/diffspec-tech.xsl" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="show.diff.markup" expression="0"/>
<param name="show.issue.links" expression="0"/>
<param name="show.ednotes" expression="${ednotes}" if="${ednotes}"/>
<param name="glthisversion" expression="${guidelines.uri}" if="guidelines.uri"/>
<param name="guidethisversion" expression="${understanding.uri}" if="understanding.uri"/>
<param name="techsthisversion" expression="${techniques.uri}" if="techniques.uri"/>
<param name="guidelines.file" expression="file:///${source.guidelines}"/>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="techniques.file" expression="file:///${source.techniques}"/>
<param name="quickref.file" expression="file:///${source.quickref}"/>
<param name="refs.file" expression="file:///${source.refs}"/>
</xslt>
</target>
<target name="techniques.single.diff" depends="init" if="monolithic">
<mkdir dir="${outputdir.techniques}"/>
<xslt in="${source.techniques}" out="${outputdir.techniques}/complete-diff.html" style="sources/diffspec-tech.xsl" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="show.diff.markup" expression="1"/>
<param name="show.issue.links" expression="1"/>
<param name="show.ednotes" expression="${ednotes}" if="${ednotes}"/>
<param name="glthisversion" expression="${guidelines.uri}" if="guidelines.uri"/>
<param name="guidethisversion" expression="${understanding.uri}" if="understanding.uri"/>
<param name="techsthisversion" expression="${techniques.uri}" if="techniques.uri"/>
<param name="guidelines.file" expression="file:///${source.guidelines}"/>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="techniques.file" expression="file:///${source.techniques}"/>
<param name="quickref.file" expression="file:///${source.quickref}"/>
<param name="refs.file" expression="file:///${source.refs}"/>
</xslt>
</target>
<target name="techniques.slices" depends="init">
<mkdir dir="${outputdir.techniques}"/>
<xslt in="${source.techniques}" out="temp.html" style="sources/slices-techniques-common.xsl" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="show.diff.markup" expression="0" if="slices.nodiff"/>
<param name="show.issue.links" expression="0" if="slices.nodiff"/>
<param name="show.diff.markup" expression="1" if="slices.diff"/>
<param name="show.issue.links" expression="1" if="slices.diff"/>
<param name="show.ednotes" expression="${ednotes}" if="${ednotes}"/>
<param name="output.dir" expression="${outputdir.techniques}"/>
<param name="output.dir.prefix" expression="${outputdir.prefix}"/>
<param name="glthisversion" expression="${guidelines.uri}" if="guidelines.uri"/>
<param name="guidethisversion" expression="${understanding.uri}" if="understanding.uri"/>
<param name="techsthisversion" expression="${techniques.uri}" if="techniques.uri"/>
<param name="guidelines.file" expression="file:///${source.guidelines}"/>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="techniques.file" expression="file:///${source.techniques}"/>
<param name="quickref.file" expression="file:///${source.quickref}"/>
<param name="refs.file" expression="file:///${source.refs}"/>
</xslt>
<delete file="temp.html"/>
</target>
<target name="techniques.bytech" depends="init">
<mkdir dir="${outputdir.techniques}"/>
<xslt destdir="${outputdir.techniques}" style="sources/diffspec-tech.xsl" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="bytech" expression="1"/>
<param name="show.diff.markup" expression="0" if="slices.nodiff"/>
<param name="show.issue.links" expression="0" if="slices.nodiff"/>
<param name="show.diff.markup" expression="1" if="slices.diff"/>
<param name="show.issue.links" expression="1" if="slices.diff"/>
<param name="show.ednotes" expression="${ednotes}" if="${ednotes}"/>
<param name="glthisversion" expression="${guidelines.uri}" if="guidelines.uri"/>
<param name="guidethisversion" expression="${understanding.uri}" if="understanding.uri"/>
<param name="techsthisversion" expression="${techniques.uri}" if="techniques.uri"/>
<param name="guidelines.file" expression="file:///${source.guidelines}"/>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="techniques.file" expression="file:///${source.techniques}"/>
<param name="quickref.file" expression="file:///${source.quickref}"/>
<param name="refs.file" expression="file:///${source.refs}"/>
<filelist refid="techs"/>
<mapper>
<globmapper from="aria.xml" to="aria.html"/>
<globmapper from="html.xml" to="html.html"/>
<globmapper from="css.xml" to="css.html"/>
<globmapper from="client-side-script.xml" to="client-side-script.html"/>
<globmapper from="server-side-script.xml" to="server-side-script.html"/>
<globmapper from="smil.xml" to="smil.html"/>
<globmapper from="text.xml" to="text.html"/>
<globmapper from="failures.xml" to="failures.html"/>
<globmapper from="flash.xml" to="flash.html"/>
<globmapper from="pdf.xml" to="pdf.html"/>
<globmapper from="silverlight.xml" to="silverlight.html"/>
<globmapper from="general.xml" to="general.html"/>
</mapper>
</xslt>
</target>
<target name="techniques" description="Generate Techniques" depends="init, techniques.single, techniques.single.diff, techniques.slices, techniques.bytech"/>
<!-- Quickref -->
<target name="quickref" depends="init" description="Generate Quickref">
<mkdir dir="${outputdir.quickref}"/>
<xslt in="${source.quickref}" out="quickref-temp.php" style="sources/diffspec-quickref.xsl" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="show.diff.markup" expression="1" if="${diffspec}"/>
<param name="show.ednotes" expression="${ednotes}" if="${ednotes}"/>
<param name="guidelines.file" expression="file:///${source.guidelines}"/>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="techniques.file" expression="file:///${source.techniques}"/>
<param name="quickref.file" expression="file:///${source.quickref}"/>
<param name="refs.file" expression="file:///${source.refs}"/>
</xslt>
<concat destfile="${outputdir.quickref}/Overview.php" force="true">
<filelist dir=".">
<file name="${source.quickref.leadin}"/>
<file name="quickref-temp.php"/>
</filelist>
</concat>
<delete file="quickref-temp.php"/>
</target>
<!-- Everything -->
<target name="all" depends="guidelines, understanding, techniques, quickref" description="Generate entire suite"/>
<!-- === Zip files of HTML versions === -->
<target name="guidelines.zip" depends="guidelines" description="Create zip and tgz files for the Guidelines">
<mkdir dir="${outputdir.zip.guidelines}"/>
<zip basedir="${outputdir.guidelines}" destfile="${outputdir.zip.guidelines}/wcag20-guidelines.zip" level="9">
<exclude name="CVS/"/>
</zip>
<tar basedir="${outputdir.guidelines}" destfile="${outputdir.zip.guidelines}/wcag20-guidelines.tar">
<exclude name="CVS/"/>
</tar>
<gzip src="${outputdir.zip.guidelines}/wcag20-guidelines.tar" destfile="${outputdir.zip.guidelines}/wcag20-guidelines.tgz"/>
<delete file="${outputdir.zip.guidelines}/wcag20-guidelines.tar"/>
</target>
<target name="understanding.zip" depends="understanding" description="Create zip and tgz files for Understanding">
<mkdir dir="${outputdir.zip.understanding}"/>
<zip basedir="${outputdir.understanding}" destfile="${outputdir.zip.understanding}/wcag20-understanding.zip" level="9">
<exclude name="CVS/"/>
</zip>
<tar basedir="${outputdir.understanding}" destfile="${outputdir.zip.understanding}/wcag20-understanding.tar">
<exclude name="CVS/"/>
</tar>
<gzip src="${outputdir.zip.understanding}/wcag20-understanding.tar" destfile="${outputdir.zip.understanding}/wcag20-understanding.tgz"/>
<delete file="${outputdir.zip.understanding}/wcag20-understanding.tar"/>
</target>
<target name="techniques.zip" depends="techniques" description="Create zip and tgz files for the Techniques">
<mkdir dir="${outputdir.zip.techniques}"/>
<zip basedir="${outputdir.techniques}" destfile="${outputdir.zip.techniques}/wcag20-techniques.zip" level="9">
<exclude name="CVS/"/>
</zip>
<tar basedir="${outputdir.techniques}" destfile="${outputdir.zip.techniques}/wcag20-techniques.tar">
<exclude name="CVS/"/>
</tar>
<gzip src="${outputdir.zip.techniques}/wcag20-techniques.tar" destfile="${outputdir.zip.techniques}/wcag20-techniques.tgz"/>
<delete file="${outputdir.zip.techniques}/wcag20-techniques.tar"/>
</target>
<target name="all.zip" depends="guidelines.zip, understanding.zip, techniques.zip" description="Generate zip and tgz files for the entire suite">
<!-- Generate guidelines, understanding, and techniques slightly differently for the monolithic zip -->
<antcall>
<target name="guidelines"/>
<target name="understanding"/>
<target name="techniques"/>
<!-- Override the cross reference URIs to be appropriate to the zip file. The parameters are passed along only if these properties are set from this task. -->
<param name="guidelines.uri" value="../guidelines/"/>
<param name="understanding.uri" value="../understanding/"/>
<param name="techniques.uri" value="../techniques/"/>
</antcall>
<mkdir dir="${outputdir.zip}"/>
<zip destfile="${outputdir.zip}/wcag20-all.zip" level="9">
<zipfileset dir="${outputdir.guidelines}" prefix="guidelines">
<exclude name="CVS/"/>
</zipfileset>
<zipfileset dir="${outputdir.understanding}" prefix="understanding">
<exclude name="CVS/"/>
</zipfileset>
<zipfileset dir="${outputdir.techniques}" prefix="techniques">
<exclude name="CVS/"/>
</zipfileset>
</zip>
<tar destfile="${outputdir.zip}/wcag20-all.tar">
<zipfileset dir="${outputdir.guidelines}" prefix="guidelines">
<exclude name="CVS/"/>
</zipfileset>
<zipfileset dir="${outputdir.understanding}" prefix="understanding">
<exclude name="CVS/"/>
</zipfileset>
<zipfileset dir="${outputdir.techniques}" prefix="techniques">
<exclude name="CVS/"/>
</zipfileset>
</tar>
<gzip src="${outputdir.zip}/wcag20-all.tar" destfile="${outputdir.zip}/wcag20-all.tgz"/>
<delete file="${outputdir.zip}/wcag20-all.tar"/>
<!-- Delete the generated HTML files because they're no good for checking into CVS, relative urls are specific to the zip file -->
<delete>
<fileset dir="${outputdir.guidelines}" includes="*.html"/>
<fileset dir="${outputdir.understanding}" includes="*.html"/>
<fileset dir="${outputdir.techniques}" includes="*.html"/>
</delete>
</target>
<!-- === XSL:FO versions === -->
<target name="guidelines.fo" depends="init"></target>
<target name="understanding.fo" depends="init"></target>
<target name="techniques.fo" depends="init"></target>
<target name="all.fo" depends="init, guidelines.fo, understanding.fo, techniques.fo"></target>
<!-- === Sanity check === -->
<target name="sanity" depends="init" description="Identifies cross-referencing inconsistencies between documents">
<xslt in="${source.guidelines}" out="${outputdir.utility}/sanity.html" style="sources/misc/sanity-check.xslt" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="guidelines.file" expression="file:///${source.guidelines}"/>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="techniques.file" expression="file:///${source.techniques}"/>
</xslt>
</target>
<!-- === ID List === -->
<target name="id-list" depends="init" description="Generates structured IDs for the comment form, technique submission form, and placeholder sections">
<xslt in="${source.guidelines}" out="${outputdir.utility}/id-list.html" style="sources/misc/id-list.xslt" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="techniques.file" expression="file:///${source.techniques}"/>
</xslt>
</target>
<!-- === Comment Tracker List === -->
<target name="comment-tracking-lists-sql" depends="init" description="Generates structured IDs for the comment tracker form">
<xslt in="${source.guidelines}" out="${outputdir.utility}/comment-tracking-lists-sql.txt" style="sources/misc/comment-tracking-lists-sql.xslt" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="techniques.file" expression="file:///${source.techniques}"/>
<param name="guidelines.specId" expression="${guidelines.w3c-version}-WCAG20-${pubdate}"/>
<param name="understanding.specId" expression="${understanding.w3c-version}-UNDERSTANDING-WCAG20-${pubdate}"/>
<param name="techniques.specId" expression="${techniques.w3c-version}-WCAG20-TECHS-${pubdate}"/>
</xslt>
</target>
<!-- === Remove diff markup === -->
<target name="diff" depends="init" description="Remove diff markup from source files">
<xslt style="sources/remove-diff-markup.xsl" destdir="sources" useimplicitfileset="false" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<filelist>
<file name="${source.guidelines}"/>
<file name="${source.understanding}"/>
</filelist>
<filelist refid="techs"/>
<chainedmapper>
<flattenmapper/>
<globmapper from="*.xml" to="*.xml.new"/>
</chainedmapper>
</xslt>
<copy todir="sources">
<filelist>
<file name="${source.guidelines}"/>
<file name="${source.understanding}"/>
</filelist>
<filelist refid="techs"/>
<chainedmapper>
<flattenmapper/>
<globmapper from="*.xml" to="*.xml.bak"/>
</chainedmapper>
</copy>
<move todir="sources">
<fileset dir="sources" includes="*.xml.new"/>
<globmapper from="*.xml.new" to="*.xml"/>
</move>
</target>
<!-- WCAG2ICT -->
<target name="wcag2ict" depends="init" description="Generate WCAG2ICT">
<xslt in="${source.wcag2ict}" out="${outputdir.wcag2ict}/Overview.html" style="sources/wcag2ict.xslt" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="show.diff.markup" expression="0"/>
<param name="show.ednotes" expression="${ednotes}" if="${ednotes}"/>
<param name="guidelines.file" expression="file:///${source.guidelines}"/>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="pubtarget" expression="${pubtarget}"/>
</xslt>
</target>
<target name="wcag2ict.accordion" depends="init" description="Generate WCAG2ICT accordion view">
<xslt in="${source.wcag2ict}" out="${outputdir.wcag2ict}/accordion.html" style="sources/wcag2ict.xslt" force="true">
<factory name="net.sf.saxon.TransformerFactoryImpl">
<attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
</factory>
<param name="show.diff.markup" expression="0"/>
<param name="show.ednotes" expression="${ednotes}" if="${ednotes}"/>
<param name="guidelines.file" expression="file:///${source.guidelines}"/>
<param name="understanding.file" expression="file:///${source.understanding}"/>
<param name="pubtarget" expression="${pubtarget}"/>
<param name="expandable" expression="true"/>
</xslt>
</target>
<!-- publish to http://w3c.github.io/wcag/ -->
<target name="gh-pages">
<antcall target="understanding">
<param name="outputdir.understanding" value="../../../Generated/Understanding"/>
<param name="outputdir.prefix" value=""/>
<param name="publoc.understanding" value="http://w3c.github.io/wcag/Understanding"/>
<param name="publoc.techniques" value="http://w3c.github.io/wcag/Techniques"/>
</antcall>
<antcall target="techniques">
<param name="outputdir.techniques" value="../../../Generated/Techniques"/>
<param name="outputdir.prefix" value=""/>
<param name="publoc.understanding" value="http://w3c.github.io/wcag/Understanding"/>
<param name="publoc.techniques" value="http://w3c.github.io/wcag/Techniques"/>
</antcall>
<antcall target="guidelines">
<param name="outputdir.guidelines" value="../../../Generated/WCAG20"/>
<param name="outputdir.prefix" value=""/>
<param name="publoc.understanding" value="http://w3c.github.io/wcag/Understanding"/>
<param name="publoc.techniques" value="http://w3c.github.io/wcag/Techniques"/>
<param name="source.guidelines" value="sources/wcag2-src.xml"/>
</antcall>
</target>
</project>