File: anakia.html

package info (click to toggle)
velocity 1.4-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 17,900 kB
  • ctags: 9,916
  • sloc: java: 24,335; xml: 17,188; sh: 99; lisp: 53; makefile: 16
file content (790 lines) | stat: -rw-r--r-- 35,547 bytes parent folder | download
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
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!--
Copyright 1999-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->


<!-- Content Stylesheet for Site -->

        
<!-- start the processing -->
    <!-- ====================================================================== -->
    <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
    <!-- Main Page Section -->
    <!-- ====================================================================== -->
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

                                                    <meta name="author" value="Jon S. Stevens">
            <meta name="email" value="jon@latchkey.com">
            
           
                                    
                        
            <title>Velocity - Anakia</title>
        </head>

        <body bgcolor="#ffffff" text="#000000" link="#525D76">        
            <table border="0" width="100%" cellspacing="0">
                <!-- TOP IMAGE -->
                <tr>
                    <td align="left">
<a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" border="0"/></a>
</td>
<td align="right">
<a href="http://jakarta.apache.org/velocity/"><img src="./images/logo.gif" alt="Velocity" border="0"/></a>
</td>
                </tr>
            </table>
            <table border="0" width="100%" cellspacing="4">
                <tr><td colspan="2">
                    <hr noshade="" size="1"/>
                </td></tr>
                
                <tr>
                    <!-- LEFT SIDE NAVIGATION -->
                    <td width="20%" valign="top" nowrap="true">
                    
    <!-- ============================================================ -->

                <p><strong>About</strong></p>
        <ul>
                    <li>    <a href="./index.html">Overview</a>
</li>
                    <li>    <a href="./getting-started.html">Getting Started</a>
</li>
                    <li>    <a href="http://jakarta.apache.org/builds/jakarta-velocity/">Download</a>
</li>
                    <li>    <a href="./install.html">Install</a>
</li>
                    <li>    <a href="./design.html">Design</a>
</li>
                    <li>    <a href="./contributors.html">Contributors</a>
</li>
                    <li>    <a href="./changes.html">ChangeLog</a>
</li>
                    <li>    <a href="./code-standards.html">Coding Standards</a>
</li>
                    <li>    <a href="./license.html">License</a>
</li>
                    <li>    <a href="./todo.html">TODO</a>
</li>
                    <li>    <a href="http://issues.apache.org/bugzilla/enter_bug.cgi?product=Velocity">Report Issues</a>
</li>
                </ul>
            <p><strong>Community</strong></p>
        <ul>
                    <li>    <a href="./powered.html">Powered By Velocity</a>
</li>
                    <li>    <a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
</li>
                    <li>    <a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
</li>
                    <li>    <a href="http://jakarta.apache.org/site/cvsindex.html">CVS Repositories</a>
</li>
                </ul>
            <p><strong>Docs</strong></p>
        <ul>
                    <li>    <a href="./user-guide.html">User's Guide (English)</a>
</li>
                    <li>    <a href="./user-guide_fi.html">User's Guide (Finnish)</a>
</li>
                    <li>    <a href="./user-guide_fr.html">User's Guide (French)</a>
</li>
                    <li>    <a href="./user-guide_es.html">User's Guide (Spanish)</a>
</li>
                    <li>    <a href="./developer-guide.html">Developer's Guide</a>
</li>
                    <li>    <a href="./vtl-reference-guide.html">VTL Reference Guide</a>
</li>
                    <li>    <a href="./specification.html">Specification</a>
</li>
                    <li>    <a href="./api/index.html">Javadoc</a>
</li>
                </ul>
            <p><strong>Tools</strong></p>
        <ul>
                    <li>    <a href="./tools/index.html">Velocity Tools</a>
</li>
                    <li>    <a href="./anakia.html">Anakia : XML->doc tool</a>
</li>
                    <li>    <a href="./texen.html">Texen : text generation</a>
</li>
                    <li>    <a href="./dvsl/index.html">DVSL : XML xformation</a>
</li>
                    <li>    <a href="./veltag.html">Veltag : JSP taglib</a>
</li>
                    <li>    <a href="./migration.html">Migration to Velocity</a>
</li>
                    <li>    <a href="./devtools.html">Editors and IDEs</a>
</li>
                </ul>
            <p><strong>Comparisons</strong></p>
        <ul>
                    <li>    <a href="./ymtd/ymtd.html">YMTD</a>
</li>
                    <li>    <a href="./differences.html">VM/WM Differences</a>
</li>
                    <li>    <a href="./casestudy1.html">JSP vs. Velocity</a>
</li>
                    <li>    <a href="./casestudy2.html">XMLC vs. Velocity</a>
</li>
                </ul>
            <p><strong>Site Translations</strong></p>
        <ul>
                    <li>    <a href="http://jakarta.apache.org/velocity/">English</a>
</li>
                    <li>    <a href="http://www.ingrid.org/jajakarta/velocity/velocity-1.2-rc2/docs-ja/index.html">Japanese</a>
</li>
                </ul>
                        </td>
                    <td width="80%" align="left" valign="top">
                                                                    <table border="0" cellspacing="0" cellpadding="2" width="100%">
      <tr><td bgcolor="#525D76">
        <font color="#ffffff" face="arial,helvetica,sanserif">
          <a name="What Is Anakia?"><strong>What Is Anakia?</strong></a>
        </font>
      </td></tr>
      <tr><td>
        <blockquote>
                                    <p>
    Essentially an XML transformation tool, Anakia uses <a href="http://www.jdom.org">JDOM</a> and <a href="http://jakarta.apache.org/velocity">Velocity</a> to transform
    XML documents into the format of your choice. It provides an alternative to
    using Ant's &lt;style&gt; task and
    <a href="http://xml.apache.org/xalan/">XSL</a> to process XML
    files.
</p>
                                                <p>
   The basic model that AnakiaTask uses is pretty straightforward : 
   <ol>
   <li>Parse your XML into a JDOM Document:<br />
<pre>SAXBuilder builder;
Document root = null;

try 
{
    builder = new SAXBuilder( 
        "org.apache.xerces.parsers.SAXParser" );
    root = builder.build( file );
}
catch( Exception )
{
    System.out.println( ...  );
}</pre></li>

    <li>Stuff the Document (or root Element) into the context:<br />
<pre>context.put("root", root );</pre></li>

    <li>Render a template using Velocity. Within the template, one
        can use JDOM's methods to access the data contained in the
        XML document.</li>
    </ol>
</p>
                                                <p>
    Anakia is potentially easier to learn than XSL, but it maintains a
    similar level of functionality. Learning cryptic &lt;xsl:&gt; tags
    is unnecessary; you only need to know how to use the provided
    Context objects, JDOM, and Velocity's simple directives. Anakia
    seems to perform much faster than Xalan's XSL processor at creating
    pages. (23 pages are generated in 7-8 seconds on a PIII 500mhz
    running Win98 and JDK 1.3 with client Hotspot. A similar system
    using Ant's &lt;style&gt; task took 14-15 seconds -- nearly a 2x
    speed improvement.)
</p>
                                                <p>
    Anakia -- intended to replace Stylebook, which was originally used
    to generate simple, static web sites in which all pages had the same
    look and feel -- is great for documentation/project web sites, such
    as the sites on <a href="http://www.apache.org/">www.apache.org</a> 
    and <a href="http://jakarta.apache.org">jakarta.apache.org</a>. As it 
    is more targeted to a specific purpose, it does not provide some of 
    XSL's "extra" functionality.
</p>
                                                <p>
    The example in the jakarta-velocity/examples/anakia directory
    provides a good introduction to Anakia. You should find it quite
    simple to use.
</p>
                                                <p>
    Anakia creates a Context, which contains a JDOM Document object of
    the .xml page, as well as an (optional) JDOM Document object of your
    project.xml page. The .vsl page is executed (using Velocity) with
    the Context. You can then navigate your .xml file and pull
    information out of it by simply executing methods on the JDOM
    Document object.
</p>
                                                <p>
    Anakia is being used to create the documentation for not only this
    website, but also for the Jakarta Project's website as well as 
    many of the projects that live under the Jakarta Project. This 
    process is 
    <a href="http://jakarta.apache.org/site/jakarta-site2.html">documented</a> 
    on the site. You are welcome to use this for your own needs as well.
</p>
                            </blockquote>
        </p>
      </td></tr>
      <tr><td><br/></td></tr>
    </table>
                                                <table border="0" cellspacing="0" cellpadding="2" width="100%">
      <tr><td bgcolor="#525D76">
        <font color="#ffffff" face="arial,helvetica,sanserif">
          <a name="Installation/Example"><strong>Installation/Example</strong></a>
        </font>
      </td></tr>
      <tr><td>
        <blockquote>
                                    <p>
    Before reviewing the jakarta-velocity/examples/anakia directory,
    you must <a href="install.html">build Velocity</a>.
</p>
                                                <p>
    After building Velocity, <code>cd</code> into the
    jakarta-velocity/examples/anakia/build directory and run 'ant'.
</p>
                                                <p>
    Output from running ant, in this case HTML files, is placed
    into the jakarta-velocity/examples/anakia/docs/ directory.
</p>
                                                <p>
    The jakarta-velocity/examples/anakia/xdocs/ directory has all of the
    .xml source code. The xdocs/stylesheets directory contains the .vsl
    file, in which most of the magic happens. Understanding <a href="user-guide.html">Velocity Template Language</a> and 
    <a href="http://www.jdom.org/">JDOM</a> is
    necessary to understand how the .vsl file works.
</p>
                            </blockquote>
        </p>
      </td></tr>
      <tr><td><br/></td></tr>
    </table>
                                                <table border="0" cellspacing="0" cellpadding="2" width="100%">
      <tr><td bgcolor="#525D76">
        <font color="#ffffff" face="arial,helvetica,sanserif">
          <a name="How does it work?"><strong>How does it work?</strong></a>
        </font>
      </td></tr>
      <tr><td>
        <blockquote>
                                    <p>
    Anakia is an Ant task that executes from an Ant build file. The
    build file looks something like this:
</p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>
    &lt;project name=&quot;build-site&quot; default=&quot;docs&quot; basedir=&quot;.&quot;&gt;
    &lt;property name=&quot;docs.src&quot; value=&quot;../xdocs&quot;/&gt;
    &lt;property name=&quot;docs.dest&quot; value=&quot;../docs&quot;/&gt;

    &lt;target name=&quot;prepare&quot;&gt;
        &lt;available classname=&quot;org.apache.velocity.anakia.AnakiaTask&quot;
        property=&quot;AnakiaTask.present&quot;/&gt;
    &lt;/target&gt;

    &lt;target depends=&quot;prepare&quot; name=&quot;prepare-error&quot; unless=&quot;AnakiaTask.present&quot;&gt;
        &lt;echo&gt;
            AnakiaTask is not present! Please check to make sure that
            velocity.jar is in your classpath.
        &lt;/echo&gt;
    &lt;/target&gt;

    &lt;target name=&quot;docs&quot; depends=&quot;prepare-error&quot; if=&quot;AnakiaTask.present&quot;&gt;
        &lt;taskdef name=&quot;anakia&quot; classname=&quot;org.apache.velocity.anakia.AnakiaTask&quot;/&gt;
        &lt;anakia basedir=&quot;${docs.src}&quot; destdir=&quot;${docs.dest}/&quot;
             extension=&quot;.html&quot; style=&quot;./site.vsl&quot;
             projectFile=&quot;./stylesheets/project.xml&quot;
             excludes=&quot;**/stylesheets/**&quot;
             includes=&quot;**/*.xml&quot;
             lastModifiedCheck=&quot;false&quot;
             velocityPropertiesFile=&quot;velocity.properties&quot;&gt;
        &lt;/anakia&gt;

        &lt;copy todir=&quot;${docs.dest}/images&quot; filtering=&quot;no&quot;&gt;
            &lt;fileset dir=&quot;${docs.src}/images&quot;&gt;
                &lt;include name=&quot;**/*.gif&quot;/&gt;
                &lt;include name=&quot;**/*.jpeg&quot;/&gt;
                &lt;include name=&quot;**/*.jpg&quot;/&gt;
            &lt;/fileset&gt;
        &lt;/copy&gt;
    &lt;/target&gt;
&lt;/project&gt;
</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                <table>
                        <tr>
                        <th bgcolor="#039acc" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                Name
            </font>
</th>
                                <th bgcolor="#039acc" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                Description
            </font>
</th>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                basedir
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                Specifies the path to the directory location of your
            .xml files.
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                destdir
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                Specifies the path to the directory where the output
            files should go.
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                extension
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                
            This is the extension that is appended to the end of your
            .xml file. For example, with an extension of ".html",
            index.xml would be converted into index.html. By default,
            the extension is .html.
            
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                style
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This is the path (relative to Velocity's
            template.loader.1.template.path) to the
            VelocityStyleTemplate to process. This file is the
            equivalent to the .xsl file in Ant's style task. 
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                projectFile
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This is the path to a "project" file. This file is an
            XML file that can be used as a "navigation" file. If you
            have used Stylebook or Struts system for generation of the
            web site documentation, you will understand the purpose of
            this file. <strong>It is an optional task argument.</strong>
            If you look at the Anakia example in the
            jakarta-velocity/examples/anakia directory, you can see the
            project.xml file being used in the .vsl file. 
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                excludes
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This is the standard Ant excludes attribute. Specify any
            files or directories that you do not want Anakia to try to
            process.
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                includes
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This is the standard Ant includes attribute. Specify any
            files or directories that you do want Anakia to try to
            process.
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                lastModifiedCheck
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This turns on or off the ability to check the last
            modified date on files in order to determine whether or not
            they need to be re-rendered or not. The value of this
            attribute can be "true, false, yes, no". By default, it is
            true, meaning that the last modified date should be checked
            and if the original .xml file, project file, or .vsl file
            have not changed, then don't process the page. This
            accelerates processing because pages that have not changed
            will not get reprocessed.
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                templatePath
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This is the path to the templateRoot which is the
            directory where your site.vsl file is located. This can be
            defined in the Velocity.properties or it can be defined
            here. It it an optional argument if it is defined in the
            Velocity properties file already. However, if defined, this
            value will override the path defined in the
            Velocity.properties file.
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                velocityPropertiesFile
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This is the path to the velocity.properties file. It is
            an optional argument and by default is set to find the
            properties file in the same directory that the JVM was
            started in.
            </font>
</td>
            </tr>
            </table>
                            </blockquote>
        </p>
      </td></tr>
      <tr><td><br/></td></tr>
    </table>
                                                <table border="0" cellspacing="0" cellpadding="2" width="100%">
      <tr><td bgcolor="#525D76">
        <font color="#ffffff" face="arial,helvetica,sanserif">
          <a name="Context Objects"><strong>Context Objects</strong></a>
        </font>
      </td></tr>
      <tr><td>
        <blockquote>
                                    <p>
    The Anakia Ant task places several objects into the Context for you.
    Right now, you do not have control over what is placed into the
    Context. Eventually, we hope to have a way to give you control over
    this. However, that does not prevent Anakia from being extremely
    useful for you today. :-) The objects that are available to you in
    your .vsl template are:
</p>
                                                <table>
                        <tr>
                        <th bgcolor="#039acc" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                Name
            </font>
</th>
                                <th bgcolor="#039acc" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                Value
            </font>
</th>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                $root
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This contains the JDOM root Element to your .xml document. When
            this (or any other variable containing an element) are simply
            placed into template output, their XML form is rendered.
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                $project
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This contains the JDOM root Element to your project.xml
            document. If you have not specified a project.xml document,
            then this variable will not be in the context. 
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                $escape.getText($string)
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This context object will convert HTML Entities in the
            $string that is passed into it and it will return the
            converted String. This is good for dealing with CDATA. The
            entities that are converted are: " -&gt; &amp;quot; | &lt;
            -&gt; &amp;lt; | &gt; -&gt; &amp;gt; | &amp; - &gt; &amp;amp; 
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                $relativePath
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This contains a String which is the relative path to
            your .xml document from the baseDir that was specified in
            your Ant task attributes. Please see the examples/anakia
            .vsl document for example usage of this String.
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                $xmlout
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This contains an class which extends the instance of the
            JDOM XMLOutputter() object. This allows you to easily create
            String output out of your JDOM element objects.
            $xmlout.outputString(Element). Again, please look at the
            examples for more information on how to use this
            object. NOTE: this object is obsoleted as simply specifying
            $element will output the XML serialized form of the element.
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                $xmlout.outputString(Element, true)
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This contains an class which extends the instance of the
            JDOM XMLOutputter() object. The difference between this
            .outputString() and the one in XMLOutputter is that it will
            output all of the Elements <strong>within</strong> the
            passed in Element. So, if you pass in a &lt;td&gt; Element,
            you will get everything inside the &lt;td&gt; &lt;/td&gt;, but
            not the actual &lt;td&gt; &lt;/td&gt;. NOTE: this object is
            obsoleted as simply specifying $element.content will produce the
            desired output.
            
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                $treeWalk.allElements($element)
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                This will allow you to walk a tree of JDOM Element
            objects starting at $element. The point of this context
            object is to allow you to build an XSLT type system where
            you can look at each Element node conditionally and set its
            content and attribute values. This is probably one of the
            more "ugly" aspects of Anakia, but it does do the
            job and suggestions for improvement are appreciated. This
            context object is still under development and more
            documentation will follow soon. NOTE: this object is obsolete and
            is kept for backward compatibility only. You can use
            $element.selectNodes("//*") to achieve the same effect.
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                $xpath.applyTo("document/properties/@title", $root)
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                
               The W3C XPath Specification <a href="http://www.w3.org/TR/xpath/">http://www.w3.org/TR/xpath/
               </a> refers to NodeSets repeatedly, but this implementation
               simply uses java.util.List to hold all Nodes. A 'Node' is any
               object in a JDOM object tree, such as an org.jdom.Element,
               org.jdom.Document, or org.jdom.Attribute. Please see the .vsl
               example file and the org.apache.velocity.anakia.XPathTool javadoc
               for more information. NOTE: this object is obsolete and is kept
               for backward compatibility only. You can use
               $element.selectNodes("document/properties/@title") to achieve
               the same effect with a more intuitive syntax.
            
            </font>
</td>
            </tr>
                                <tr>
                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                $date
            </font>
</td>
                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
                
                This is a new java.util.Date object. Useful for putting
                the current date/time into a page.
            
            </font>
</td>
            </tr>
            </table>
                                                <p>
    All node lists returned from Anakia objects through $element.selectNodes,
    $element.content, and $element.children, as well as through obsoleted 
    $treeWalk.allElements and $xpath.applyTo have two special features:
    <ul>
        <li>they support the selectNodes method just as a single element does
        that applies an XPath expression to all nodes in the list, and</li>
        <li>when inserted into template output by simply specifying $list, they
        produce the XML fragment consisting of all nodes they contain. This
        eliminates much of the #foreach code in templates.</li>
    </ul>
</p>
                            </blockquote>
        </p>
      </td></tr>
      <tr><td><br/></td></tr>
    </table>
                                                <table border="0" cellspacing="0" cellpadding="2" width="100%">
      <tr><td bgcolor="#525D76">
        <font color="#ffffff" face="arial,helvetica,sanserif">
          <a name="Credits"><strong>Credits</strong></a>
        </font>
      </td></tr>
      <tr><td>
        <blockquote>
                                    <p>
    Anakia was originally conceptualized and implemented by 
        <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>.
</p>
                                                <p>
    The name <a href="http://www.kabalarians.com/female/anakia.htm">Anakia</a> is a
    cool name that I think fits this project quite nicely. "The name of
    Anakia has given you the desire for creative, artistic or musical
    expression in an original way. You strive to be different and have
    the self-confidence to implement your ideas because you have the
    perseverance necessary to see something through, despite obstacles."
</p>
                                                <p>
    Further help and assistance was provided by Jason van Zyl and Geir
    Magnusson Jr. XPath support was added by Bob McWhirter. The more
    intuitive syntax achieved through selectNodes() and self-rendering
    elements and node lists was added by Attila Szegedi.
</p>
                            </blockquote>
        </p>
      </td></tr>
      <tr><td><br/></td></tr>
    </table>
                                        </td>
                </tr>

                <!-- FOOTER -->
                <tr><td colspan="2">
                    <hr noshade="" size="1"/>
                </td></tr>
                <tr><td colspan="2">
                    <div align="center"><font color="#525D76" size="-1"><em>
                    Copyright &#169; 1999-2004, The Apache Software Foundation
                    </em></font></div>
                </td></tr>
            </table>
        </body>
    </html>
<!-- end the processing -->