jon         01/08/08 17:25:49

  Modified:    docs     anakia.html
               xdocs    anakia.xml
  Log:
  added attila's anakia documentation changes
  
  Revision  Changes    Path
  1.24      +32 -8     jakarta-velocity/docs/anakia.html
  
  Index: anakia.html
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/docs/anakia.html,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- anakia.html       2001/08/01 01:10:12     1.23
  +++ anakia.html       2001/08/09 00:25:49     1.24
  @@ -507,7 +507,9 @@
   </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.
  +                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>
  @@ -569,7 +571,8 @@
               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.
  +            object. NOTE: this object is obsoleted as simply specifying
  +            $element will output the XML serialized form of the element.
               </font>
   </td>
               </tr>
  @@ -585,9 +588,11 @@
               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, 
  +            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;.
  +            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>
  @@ -608,7 +613,9 @@
               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.
  +            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>
  @@ -623,11 +630,14 @@
                   
                  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
  +               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.
  +               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>
  @@ -648,6 +658,18 @@
   </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>
  @@ -674,7 +696,9 @@
   </p>
                                                   <p>
       Further help and assistance was provided by Jason van Zyl and Geir
  -    Magnusson Jr. XPath support was added by Bob McWhirter.
  +    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>
  
  
  
  1.11      +32 -9     jakarta-velocity/xdocs/anakia.xml
  
  Index: anakia.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/xdocs/anakia.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- anakia.xml        2001/04/30 16:11:27     1.10
  +++ anakia.xml        2001/08/09 00:25:49     1.11
  @@ -263,7 +263,9 @@
           </tr>
           <tr>
               <td>$root</td>
  -            <td>This contains the JDOM root Element to your .xml document.</td>
  +            <td>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.</td>
           </tr>
           <tr>
               <td>$project</td>
  @@ -293,7 +295,8 @@
               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.</td>
  +            object. NOTE: this object is obsoleted as simply specifying
  +            $element will output the XML serialized form of the element.</td>
           </tr>
           <tr>
               <td>$xmlout.outputString(Element, true)</td>
  @@ -301,9 +304,11 @@
               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, 
  +            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;.
  +            not the actual &lt;td&gt; &lt;/td&gt;. NOTE: this object is
  +            obsoleted as simply specifying $element.content will produce the
  +            desired output.
               </td>
           </tr>
           <tr>
  @@ -316,7 +321,9 @@
               more &quot;ugly&quot; 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.</td>
  +            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.</td>
           </tr>
           <tr>
               <td>$xpath.applyTo("document/properties/@title", $root)</td>
  @@ -324,11 +331,14 @@
                  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
  +               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.
  +               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.
               </td>
           </tr>
           <tr>
  @@ -338,8 +348,19 @@
                   the current date/time into a page.
               </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>
   
   </section>
   
  @@ -358,7 +379,9 @@
   </p>
   <p>
       Further help and assistance was provided by Jason van Zyl and Geir
  -    Magnusson Jr. XPath support was added by Bob McWhirter.
  +    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>
   </section>
   
  
  
  

Reply via email to