commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jexl/xdocs index.xml project.xml site.dvsl toolbox.props
Date Fri, 26 Apr 2002 04:47:44 GMT
geirm       02/04/25 21:47:44

  Added:       jexl/xdocs index.xml project.xml site.dvsl toolbox.props
  Log:
  docs & dvsl support
  
  Revision  Changes    Path
  1.1                  jakarta-commons-sandbox/jexl/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <document>
  
      <properties>
          <title>Jexl</title>
          <author email="geirm@apache.org">Geir Magnusson Jr.</author>
      </properties>
  
      <body>
  
      <section name="Jexl : Java Expression Language">
  
      <p>
      Jexl is an expression language engine designed for easy embedding in
      applications and frameworks.  It implements an extended version of the
      Expression Language of the JSTL.
      </p>
  
      <p>
      The motivation was to bring some of the lessons learned by the Velocity
      community about expersssion languages in templating to a wider audience.
      And I just had to get Velocity-ish method access in Jelly.  Just had to.
      </p>
  
      <p>
      Here is an example of using Jexl :
      </p>
  
      <source>
      <![CDATA[
          /*
           *  create an expression object
           */
          Expression e = ExpressionFactory.createExpression("foo.innerFoo.bar()");
  
          /*
           *  create a context and add data
           */
          JexlContext jc = JexlHelper.createContext();
          jc.getVars().put("foo", new Foo() );
  
          /*
           *  now evaluate the expression, getting the result
          Object o = e.evaluate(jc);
      ]]>
      </source>
  
      <p>
      Jexl has extended the JSTL in a few ways :
      </p>
  
      <ul>
          <li>
          Support for invocation of any accessible method (see example above).
          </li>
          <li>
          Added a general size() method, which works on String, returning length,
          Map, returning # of keys, and List and arrays, returning the
          number of elements.
          </li>
          <li>
          Optional syntax for the 'empty' function :   empty(obj)
          </li>
       </ul>
  
      </section>
  
      <section name="Current Status">
  
          <p>
          The current status is best described as 'development, active'.
          </p>
  
      </section>
  
      <section name="Anyone Using It Yet?">
  
          <p>
          James Strachan's
          <a href="http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/jelly/">
          Jelly</a>, currently in commons-sandbox.
          </p>
  
          <p>
          Jexl and Jelly are two components of the Jakarta Je*l* Pack
          </p>
  
      </section>
  
      <section name="Nightly Snapshots">
  
          <p>
          Soon.
          </p>
  
      </section>
  
   </body>
  </document>
  
  
  
  
  1.1                  jakarta-commons-sandbox/jexl/xdocs/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project name="Commons"
          href="http://jakarta.apache.org/commons/">
  
      <title>Commons</title>
      <logo href="/images/logo.jpg">Commons</logo>
  
      <body>
  
      <menu name="Home">
          <item name="Jakarta Commons"       href="/index.html" />
      </menu>
  
      <menu name="About Us">
          <item name="Contributors"           href="/contributors.html"/>
          <item name="License"                href="/license.html"/>
      </menu>
  
      <menu name="Download">
          <item name="Release"                href="http://jakarta.apache.org/builds/jakarta-commons/release"/>
          <item name="Nightly"                href="http://jakarta.apache.org/builds/jakarta-commons/nightly"/>
      </menu>
  
      <menu name="Information">
          <item name="Overview"               href="/index.html"/>
          <item name="Components"             href="/components.html"/>
          <!-- Yet to come?
          <item name="Guidelines"             href="/guidelines.html"/>
          <item name="News"                   href="/news.html"/>
          -->
          <!-- deprecated?
          <item name="Commons Proper"         href="/commons.html"/>
          <item name="Sandbox"                href="/sandbox.html"/>
          -->
      </menu>
  
      <menu name="Components Repository">
          <item name="BeanUtils"              href="/beanutils.html"/>
          <item name="Cactus"                 href="/cactus/index.html"/>
          <item name="Collections"            href="/collections.html"/>
          <item name="Digester"               href="/digester.html"/>
          <item name="DBCP"                   href="http://cvs.apache.org/viewcvs/jakarta-commons/dbcp/"/>
          <item name="HTTP Client"            href="/httpclient"/>
          <item name="JXPath"                 href="http://cvs.apache.org/viewcvs/jakarta-commons/jxpath/"/>
          <item name="Latka"                  href="/latka/index.html"/>
          <item name="Pool"                   href="http://cvs.apache.org/viewcvs/jakarta-commons/pool/"/>
          <item name="Logging"                href="http://cvs.apache.org/viewcvs/jakarta-commons/logging/"/>
          <item name="Validator"              href="http://cvs.apache.org/viewcvs/jakarta-commons/validator/"/>
      </menu>
  
      <menu name="Sandbox Components">
          <item name="Betwixt"                href="/betwixt.html"/>
          <item name="Jelly"                  href="http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/jelly/"/>
          <item name="Jelly"                  href="http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/jexl/"/>
          <item name="JJar"                   href="http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/jjar/"/>
          <item name="Messenger"              href="/messenger.html"/>
          <item name="Workflow"               href="http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/workflow/"/>
      </menu>
  
      <menu name="Jakarta Community">
          <item name="Get Involved"           href="/site/getinvolved.html"/>
          <item name="Mailing Lists"          href="/site/mail.html"/>
          <item name="CVS Repositories"       href="/site/cvsindex.html"/>
      </menu>
  
      <menu name="Project Docs">
          <item name="Charter"                href="/charter.html"/>
          <item name="Releases"               href="/releases.html"/>
          <item name="Versioning"             href="/versioning.html"/>
      </menu>
      </body>
  </project>
  
  
  
  1.1                  jakarta-commons-sandbox/jexl/xdocs/site.dvsl
  
  Index: site.dvsl
  ===================================================================
  
  
  #set( $relative-path = "." )
  
  #set( $body-bg = '#ffffff' )
  #set( $body-fg = '#000000' )
  #set( $body-link = '#525D76' )
  #set( $banner-bg = '#525D76')
  #set( $banner-fg = '#ffffff')
  #set( $sub-banner-bg = '#828DA6')
  #set( $sub-banner-fg = '#ffffff')
  #set( $table-th-bg = '#039acc')
  #set( $table-td-bg = '#a0ddf0')
  #set( $source-color = '#023264')
  #set( $source-font-size = '+0')
  
  ## Double quote for convenience
  #set ($qq = '"')
  
  ## Macro to output argument if test evaluates to true
  #macro(ifset $test $output)
  #if ( $test )$output#end
  #end
  
  #match( "document" )
  
      #set( $project = $node.selectSingleNode("document('xdocs/project.xml')/project" ) )
  
      <html>
      <head>
        <title>$project.title - $node.properties.title</title>
  
         #foreach( $n in $node.properties.selectNodes("author") )
          <meta name="author" value="$n"/>
          <meta name="email" value="$n.attribute("email")" />
         #end
  
      </head>
  
      <body bgcolor="$body-bg" text="$body-fg" link="$body-link"
            alink="$body-link" vlink="$body-link">
  
      <table border="0" width="100%" cellspacing="4">
  
        ## PAGE HEADER
        <tr><td colspan="2">
  
          ## JAKARTA LOGO
          <a href="http://jakarta.apache.org/">
            <img src="http://jakarta.apache.org/images/jakarta-logo.gif"
               align="left" alt="The Jakarta Project" border="0"/>
          </a>
  
          #if( $project.logo )
  
            #set( $alt = $project.logo )
            #set( $home = $project.attribute("href") )
            #set( $src = $project.logo.attribute( "href" ) )
  
            ## PROJECT LOGO
            <a href="$home">
              <img src="$src" align="right" alt="$alt" border="0"/>
            </a>
          #end
  
        </td></tr>
  
        ## HEADER SEPARATOR
        <tr>
          <td colspan="2">
            <hr noshade="" size="1"/>
          </td>
        </tr>
  
        <tr>
  
          ## LEFT SIDE NAVIGATION
          <td width="20%" valign="top" nowrap="true">
            $context.applyTemplates( $project, "body/menu" )
          </td>
  
          <!-- RIGHT SIDE MAIN BODY -->
          <td width="80%" valign="top" align="left">
            $context.applyTemplates("body/section")
          </td>
  
        </tr>
  
        <!-- FOOTER SEPARATOR -->
        <tr>
          <td colspan="2">
            <hr noshade="" size="1"/>
          </td>
        </tr>
  
        <!-- PAGE FOOTER -->
        <tr><td colspan="2">
          <div align="center"><font color="$body-link" size="-1"><em>
          Copyright &#169; 1999-2001, Apache Software Foundation
          </em></font></div>
        </td></tr>
  
      </table>
      </body>
      </html>
  #end
  
  
  #*
   *   Process a menu for the navigation bar
   *#
  #match( "menu" )
      <p>
        <strong>$attrib.name</strong>
      </p>
      <ul>
          $context.applyTemplates("item")
      </ul>
  #end
  
  #*
   *   Process a menu item for the navigation bar
   *#
  #match( "item" )
  
      #if( $attrib.href.startsWith("http") )
          <li><a href="$attrib.href">$attrib.name</a></li>
      #else
          <li><a href="${relative-path}$attrib.href">$attrib.name</a></li>
      #end
  #end
  
  
  #*
   *  process a documentation section
   *#
  #match( "section" )
  
      <table border="0" cellspacing="0" cellpadding="2" width="100%">
  
        <tr><td bgcolor="$banner-bg">
            <font color="$banner-fg" face="arial,helvetica.sanserif">
            #if ( $attrib.anchor )
                #set( $anchor = $attrib.anchor )
            #else
                #set( $anchor = $attrib.name )
            #end
            <a name="$anchor">
            <strong>$attrib.name</strong></a></font>
        </td></tr>
  
        <tr><td><blockquote>
          $context.applyTemplates("*")
        </blockquote></td></tr>
  
      </table>
  #end
  
  #match( "subsection" )
  
      <table border="0" cellspacing="0" cellpadding="2" width="100%">
        <!-- Subsection heading -->
        <tr><td bgcolor="$sub-banner-bg">
            <font color="$sub-banner-fg" face="arial,helvetica.sanserif">
            #if ( $attrib.anchor )
                #set( $anchor = $attrib.anchor )
            #else
                #set( $anchor = $attrib.name )
            #end
            <a name="$anchor">
            <strong>$attrib.name</strong></a></font>
        </td></tr>
        <!-- Subsection body -->
        <tr><td><blockquote>
          $context.applyTemplates("*")
        </blockquote></td></tr>
      </table>
  
  #end
  
  #match( "source" )
  
      <div align="left">
        <table cellspacing="4" cellpadding="0" border="0">
          <tr>
            <td bgcolor="$source-color" width="1" height="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="$source-color" height="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="$source-color" width="1" height="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
          </tr>
          <tr>
            <td bgcolor="$source-color" width="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="#ffffff" height="1">
            <font size="$source-font-size"><pre>$toolbox.htmlescape.getText( $node.value()
)</pre></font>
            </td>
            <td bgcolor="$source-color" width="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
          </tr>
          <tr>
            <td bgcolor="$source-color" width="1" height="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="$source-color" height="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
            <td bgcolor="$source-color" width="1" height="1">
              <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
            </td>
          </tr>
        </table>
      </div>
  #end
  
  
  
  #match("table")
  <table>
  $context.applyTemplates("*")
  </table>
  #end
  
  #match("tr")
  <tr>
  $context.applyTemplates("*")
  </tr>
  #end
  
  #match( "td" )
  <td bgcolor="$table-td-bg" #*
      *##ifset($attrib.colspan "colspan=$qq$attrib.colspan$qq ")#*
      *##ifset($attrib.rowspan "rowspan=$qq$attrib.rowspan$qq ")#*
      *#valign="top" align="left">
      <font color="#000000" size="-1" face="arial,helvetica,sanserif">
         $node.copy( $node.children() )
      </font>
  </td>
  #end
  
  #match( "th" )
  <td bgcolor="$table-th-bg" #*
      *##ifset($attrib.colspan "colspan=$qq$attrib.colspan$qq ")#*
      *##ifset($attrib.rowspan "rowspan=$qq$attrib.rowspan$qq ")#*
      *#valign="top" align="left">
      <font color="#000000" size="-1" face="arial,helvetica,sanserif">
         $node.copy( $node.children())
      </font>
  </td>
  #end
  
  #match("*")
  $node.copy()
  #end
  
  
  
  
  1.1                  jakarta-commons-sandbox/jexl/xdocs/toolbox.props
  
  Index: toolbox.props
  ===================================================================
  toolbox.contextname = toolbox
  toolbox.tool.htmlescape = org.apache.velocity.anakia.Escape
  
  
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message