Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1106131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:44:38+00:00 2026-05-17T01:44:38+00:00

In another question – Getting directory listing from SVN for use in ANT dropdown

  • 0

In another question – Getting directory listing from SVN for use in ANT dropdown

I asked about how I can connect SVN up to my ANT scripts directly. The answer I got was really good and follows the lines of exporting a directory listing from SVN as XML and then using XSL to build the form.

I’ve no experience with XSL so I was wondering if anyone who has might be able to give me any pointers? More specifically with building forms in ANTForms through XSL. Their website doesn’t seem to mention anything about using it and I can’t find anything on Google.

Additional Info…

Here’s a small sample of the XML I’m getting back from SVN.

<?xml version="1.0"?>
<lists>
<list path="https://example.com/svn/website/tags">
    <entry kind="dir">
        <name>archive</name>
        <commit revision="1337">
            <author>itncj</author>
            <date>2010-02-17T12:21:22.342500Z</date>
        </commit>
    </entry>
    <entry kind="dir">
        <name>milestone 1-0-0</name>
        <commit revision="1302">
            <author>jcb4337</author>
            <date>2010-02-12T10:15:00.282625Z</date>
        </commit>
    </entry>
    <entry kind="dir">
        <name>milestone 1-0-0b</name>
        <commit revision="1329">
            <author>itncj</author>
            <date>2010-02-17T12:08:56.248750Z</date>
        </commit>
    </entry>
</list>

All I’m needing from this is the name nodes so I can build a form of the following structure –

  • SOME TITLE LABEL
  • LABEL | TEXTFIELD
  • SVN CALL1 NAMES IN A DROPDOWN
  • SVN CALL2 NAMES IN A DROPDOWN
  • SVN CALL3 NAMES IN A DROPDOWN
  • YES / NO <- Radio button – For releasing the core files of our applications framework
  • SVN CALL4 NAMES IN A DROPDOWN <- Which version of the core
  • Test / Production /> <- Radio Button – the environment we’re wanting to release to
  • PASSWORD TEXTFIELD
  • DEPLOY BUTTON
  • CANCEL BUTTON

Hope that makes sense but what I’m needing to do is make x4 SVN calls, one for each repository which holds our projects files ( the main project files, associated components, plugins & core ) and populate these dropdowns using ANTForm’s selectionProperty (http://antforms.sourceforge.net/usageaf.html).

There is more I need to do beyond that (like append “Trunk” to the start of each dropdown) but one step at a I time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:44:39+00:00Added an answer on May 17, 2026 at 1:44 am

    One strategy that I have used in the past is to have an ANT script generate another ANT build file and then execute that dynamically generated ANT build file in the run:

    1. invoke a process(to fetch SVN info)
    2. invoke an XSLT to dynamically produce another ANT build file(with a dynamically constructed ANTForm)
    3. invoke the dynamically generated ANT build file (using antcall, ant, etc)

    A stylesheet like this could be used as a starting point to generate the dynamic ANT build file that invokes the dynamically generated ANT Form:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output indent="yes"/>
    
        <xsl:template match="/">
            <project name="enhancedRSS" default="form" basedir=".">
                <taskdef name="antform" classname="com.sardak.antform.AntForm" 
                    classpath="${antform.home}/lib/antform.jar"/>
                <target name="form">
                    <xsl:call-template name="ANTFORM" />
                </target>
            </project>
        </xsl:template>
    
        <xsl:template name="ANTFORM">
            <antform title="Example ANTForm generated from XSLT">
    
                <label>Some title label</label>
                <textProperty label="LABEL" property="label1" required="true" focus="true"
                    tooltip="This is the first label, which will assign the value entered to the ANT property label1" />
    
                <selectionProperty label="Values from SVN-CALL1:" property="svn-call1" separator=";">
                    <xsl:attribute name="values">
                        <xsl:call-template name="SVN-CALL1" />
                    </xsl:attribute>
                </selectionProperty>
    
                <selectionProperty label="Values from SVN-CALL2:" property="svn-call2" separator=";">
                    <xsl:attribute name="values">
                        <xsl:call-template name="SVN-CALL2" />
                    </xsl:attribute>
                </selectionProperty>
    
                <selectionProperty label="Values from SVN-CALL3:" property="svn-call3" separator=";">
                    <xsl:attribute name="values">
                        <xsl:call-template name="SVN-CALL3" />
                    </xsl:attribute>
                </selectionProperty>
    
                <radioSelectionProperty label="Release core files: " property="release" values="Yes;No" separator=";" />
    
                <selectionProperty label="Which verion of the core:">
                    <xsl:attribute name="values">
                        <xsl:call-template name="SVN-CALL4" />
                    </xsl:attribute>
                </selectionProperty>
    
                <radioSelectionProperty label="Environment: " property="environment" values="Test;Production" separator=";" />
    
                <textProperty label="Password" property="svn.password" required="true" password="true" />
    
                <controlbar>
                    <button label="Cancel" type="cancel" />
                    <button label="Deploy" target="deploy" />
                </controlbar>
            </antform>
        </xsl:template>
    
        <xsl:template name="SVN-CALL1">
           <xsl:text>Trunk</xsl:text> 
            <xsl:for-each select="/lists/list/entry/name">
                <xsl:text>;</xsl:text>
                <xsl:value-of select="."/>
            </xsl:for-each>
        </xsl:template>
    
        <xsl:template name="SVN-CALL2">
            <!--Similar logic as SVN-CALL1-->
        </xsl:template>
        <xsl:template name="SVN-CALL3">
            <!--Similar logic as SVN-CALL1-->
        </xsl:template>
        <xsl:template name="SVN-CALL4">
            <!--Similar logic as SVN-CALL1-->
        </xsl:template>
    </xsl:stylesheet>
    

    It creates this ANT build file with the majority of the ANT Form that you described (should be enough to get you started):

    <?xml version="1.0" encoding="UTF-8"?>
    <project name="enhancedRSS" default="form" basedir=".">
       <taskdef name="antform" classname="com.sardak.antform.AntForm"
                classpath="$/lib/antform.jar"/>
       <target name="form">
          <antform title="Example ANTForm generated from XSLT">
             <label>Some title label</label>
             <textProperty label="LABEL" property="label1" required="true" focus="true"
                           tooltip="This is the first label, which will assign the value entered to the ANT property label1"/>
             <selectionProperty label="Values from SVN-CALL1:" property="svn-call1" separator=";"
                                values="Trunk;archive;milestone 1-0-0;milestone 1-0-0b"/>
             <selectionProperty label="Values from SVN-CALL2:" property="svn-call2" separator=";" values=""/>
             <selectionProperty label="Values from SVN-CALL3:" property="svn-call3" separator=";" values=""/>
             <radioSelectionProperty label="Release core files: " property="release" values="Yes;No" separator=";"/>
             <selectionProperty label="Which verion of the core:" property="svn-call4" values=""/>
             <radioSelectionProperty label="Environment: " property="environment" values="Test;Production"
                                     separator=";"/>
             <textProperty label="Password" property="svn.password" required="true" password="true"/>
             <controlbar>
                <button label="Cancel" type="cancel"/>
                <button label="Deploy" target="deploy"/>
             </controlbar>
          </antform>
       </target>
    </project>
    

    When executed, the generated ANT build file and ANT Form produce:

    ANT Form

    This should be enough to get you started. The ANTForm usage page tells you what each of the attributes are for each of the ANTForm elements. There is also a lot more that you can do to customize(skin it with your own CSS, custom icons, save properties to pre-populate the form on next run, etc)

    If you are going to have the results of your four SVN calls in separate XML files, then you may need to look into using the XSLT document() function to accomplish what you need in a single XSLT.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Another question asked about the meaning of the code snippet a >>> 0 in
Another question asked about attributes, but I would like to extend the question to
In another question I asked about alignment this was given to me to answer
Another question about my implementation. I am fairly new to java/android coming from a
Another question asked about determining odd/evenness in C, and the idiomatic (x & 1)
In another question on stackoverflow I got a hint that I can use thread
Another question of mine about optimizing Objective C programs inspired the following: does anyone
Answering another question about how const string data was stored in an executable a
From another question I recently posted, it seems that Classic ASP might not be
In another question, a user posted the following reflog: 8c48bab HEAD@{16}: checkout: moving from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.