You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Inger, Matthew" <In...@Synygy.com> on 2004/04/28 17:18:54 UTC

[Velocity-DVSL] Adding directives to DVSL

Can anyone tell me how to add a directive which will be available to dvsl?

I have created a directive named "redirect", which serves the same function
as the Xalan redirect extension.  It will allow you to send the contents of
the
enclosed block to a specific file.  This is useful when generating multiple
outputs
from the same XML file, such as when generating HTML with frames.

However, I am having difficulty plugging in the attribute.  I have tried the
<velconfig name="userdirective" value="RedirectDirective" />
under the <dvsl> element with no luck.  I keep getting the following error:

E:\home\inger\jakarta-velocity-dvsl\mytest\build.xml:20:
org.apache.velocity.exception.ParseErrorException: Encountered "#end\r\n" at
line 23, column 1.

with this dvsl fragment:

#match ( "html" )
   #redirect ( "$attrib.path" )
   <html>
      <body>
        $node.copy($node.children())
      </body>
   </html>
   #end
#end


Any help would be appreciated.

----------------------
Matthew Inger
Design Architect
Synygy, Inc
610-664-7433 x7770


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org