source: trunk/gsdl3/dist-resources/convert-build-xml.xsl@ 10675

Last change on this file since 10675 was 10675, checked in by kjdon, 18 years ago

a script to convert the cvs build.xml into one suitable for a binary distribution. it deletes invalid targets (update, cvsupdate, prepare etc), and changes a few other targets

  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
5 <!-- we basically want to copy everything except for a few targets that no longer apply -->
6 <xsl:output method="xml"/>
7
8 <!-- for some reason, the default copy-of doesn't copy empty attributes, so have this to get the empty arg1 in equals-->
9 <xsl:template match="project|condition|and|isset|equals|not|or">
10 <xsl:copy>
11 <xsl:copy-of select="@*"/>
12 <!--<xsl:for-each select="@*">
13 <xsl:attribute name="name()"><xsl:value-of select="."/></xsl:attribute>
14 </xsl:for-each>-->
15 <xsl:apply-templates/>
16 </xsl:copy>
17 </xsl:template>
18
19 <!-- rename the 'install-for-dist' target 'install' -->
20 <xsl:template match="target[@name='install-for-dist']">
21 <target name="install">
22 <xsl:copy-of select="@depends|@description|@if|@unless|node()"/>
23 </target>
24 </xsl:template>
25
26 <!-- delete the old install target-->
27 <xsl:template match="target[@name='install']">
28 </xsl:template>
29
30 <!-- delete the unnecessary targets -->
31 <xsl:template match="target[starts-with(@name, 'prepare')]">
32 </xsl:template>
33 <xsl:template match="target[starts-with(@name, 'cvsupdate')]">
34 </xsl:template>
35 <xsl:template match="target[starts-with(@name, 'update')]">
36 </xsl:template>
37
38 <xsl:template match="property[@name='install-command']">
39 <property name="install-command" value="ant [options] install"/>
40 </xsl:template>
41
42 <xsl:template match="*">
43 <xsl:copy-of select="."/>
44 </xsl:template>
45
46 <xsl:template match="comment()">
47 <xsl:copy-of select="."/>
48 <xsl:text>
49</xsl:text>
50 </xsl:template>
51
52</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.