You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Marco Pas <ma...@gmx.net> on 2002/11/11 08:46:18 UTC

Figuring something out using Anakia

Hi,

I am planning to use Anakia to generate my website in the same procedure as
the Jakarta site. So far no problems :-)

I am parsing the xml documents with <section> and <subsections>.
Example..

<section name="article 1">
  content in section  

  <subsection name="paragraph 1"
    content in subsection
  </subsection>

<section>

This is somewhat different then the jakarta site because they do not use
content for 
the section element
when using subsections...


The problem or question...??
When I parse my documents using following code, i always get the contents
for
the section element in combination with the subsection...

#macro ( section $section )          
      <table width="100%">
        <tr> 
          <td class="tableHeader">
            $section.getAttributeValue("name")
          </td>
        </tr>
        <tr> 
          <td>
            <p>
            #foreach ( $item in $section.getChildren() )
              #if ($item.getName().equals("subsection"))
                #subsection($item)
              #else
                $item --> display section and subsection !!!!!!!
              #end
            #end
            </p>
          </td>
        </tr>
      </table>
      <br><br>
#end 

Is ther a way to only select the contents for the section element, excluding
the 
subsection data ??

-- 
Best Regards,
Marco Pas
marco.pas@gmx.net

+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>