Interesting idea. Here is a shot at it.


xsl example:

<xsl:template match="items">
  <xsl:for-each select="item">
    <xsl:sort select="."/>
    <p>
      <xsl:number value="position()" format="1. "/>
      <xsl:value-of select="."/>
    </p>
  </xsl:for-each>
</xsl:template>

Velocity example:

#template_match( "items", $result )
{
   #set $item = sort_select("item", $result)
   #foreach $i in $item
      <p>
      $Counter $i
      </p>
   #end
}

Theo


> one thing that might be neato is if we put the functionality of Xalan into
> Velocity directly. for example, instead of XSL you would write in VTL
> (velocity template language) and modify/walk the DOM that way.
> 
> i'm not quite sure how it would work or symantics or anything, but i think
> that it would be beyond cool if we could make that work natively within
> velocity itself. therefore, instead of writing ugly XSL, one could write
in
> nice clean VTL and do the same thing but with more power.
>
> i bet that velocitymacro's would go a long way here. one could just have a
> page of velocitymacro's that get processed together to perform actions on
> the DOM.
>
> -jon

-- 
twice of not very much is still a lot more than not very much

Reply via email to