Menu

define:taglib please help

Help
beuveda
2007-02-22
2013-04-25
  • beuveda

    beuveda - 2007-02-22

    I have the following script called 'myTagLib.xml' 

    <j:jelly xmlns:j="jelly:core" xmlns:define="jelly:define"
                                  xmlns:ant="jelly:ant">

      <define:taglib uri="myTagLib">

        <define:tag name="myTag">
            <ant:echo message="output from myTag in myTagLib"/>
        </define:tag>

      </define:taglib>
    </j:jelly>

    and now I wish to use the tag myTag in another script called useLib.xml

    <j:jelly xmlns:my=??????????????>

      <my:myTag/>

    </j:jelly>

    Is it possible and if yes how can I achieve this ?

    Thank you in advance

     
    • Christian Hargraves

      Try asking this on the Jelly Forums.

       
    • beuveda

      beuveda - 2007-04-02

      There is 2 kinds of libraries that can be used. The ones in xml file with the define directives and the ones made off java custom tags. In the sample below, I am using both kind of libraries.

      The 'defined' one called toolTagLibray is used in the script by the <j:import> directive and is bound with xmlns:tool="toolTagLib".

      And the custom tags one defining ftp operations is bound with xmlns:ftp="jelly:bugs.bunny.whatsupdoc.FtpTagLibrary"
       
      <?xml version="1.0" encoding="UTF-8"?>
      <jmln:testcase xmlns:jmln="jelly:jameleon" xmlns:j="jelly:core"
                     xmlns:tool="toolTagLib"
                     xmlns:ftp="jelly:bugs.bunny.whatsupdoc.FtpTagLibrary">

        <jmln:test-case-summary>
            LOGIN TO FTP SERVER AS CUSTOMER X
        </jmln:test-case-summary>

        <jmln:ju-session application="MID">

            <j:import file="./jellylib/toolTagLib.xml"/>

           <jmln:function-doc functionId="Setting up Ftp Connection"/>
          <tool:setFtpConnectionTag/>

           <jmln:function-doc functionId="Quit"/>
          <ftp:ftpQuitTag/>
          <tool:checkFtpConnectionTag/>
         
         </jmln:ju-session>

      </jmln:testcase>

       

Log in to post a comment.