forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: xml-forrest/src/documentation/content/skins skins.xml
Date Tue, 30 Sep 2003 14:50:01 GMT
nicolaken    2003/09/30 07:50:01

  Modified:    src/resources/forrest-shbat forrest.build.xml
  Added:       src/resources/forrest-shbat/var skinlist2echo.xsl
                        skinlist2fetch.xsl
               src/documentation/content/skins skins.xml
  Log:
        <action dev="NKB" type="add" context="skins">
          Skins can now be packaged, downloaded and automatically installed.
        </action>
  
  Revision  Changes    Path
  1.101     +63 -1     xml-forrest/src/resources/forrest-shbat/forrest.build.xml
  
  Index: forrest.build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrest-shbat/forrest.build.xml,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- forrest.build.xml	20 Sep 2003 08:33:56 -0000	1.100
  +++ forrest.build.xml	30 Sep 2003 14:50:01 -0000	1.101
  @@ -1103,4 +1103,66 @@
     <delete dir="${project.build-dir}" />
     </target>
   
  +<!-- ***************************************************************** -->
  +<!-- ***************************************************************** -->
  +<!-- **                                                             ** -->
  +<!-- **                                                             ** -->
  +<!-- **              SKIN PACKAGES                                  ** -->
  +<!-- **                                                             ** -->
  +<!-- **                                                             ** -->
  +<!-- ***************************************************************** -->
  +<!-- ***************************************************************** -->
  +  
  +  <!-- public targets -->     
  +     
  +  <target name="package-skin" description="Make a package of an existing skin">
  +    <input message="Which skin do you want to package?"
  +           addproperty="skin-name"/>
  +    <jar destfile="${forrest.home}/context/skins/${skin-name}.fsj"
  +       basedir="${forrest.home}/context/skins/"
  +       includes="${skin-name}/**"/>
  +  </target>
  +      
  +  <target name="install-skin" 
  +          depends = "init-props, fetch-skin, unpack-skin"
  +          description="Install the needed skin from the remote repository"/>
  +          
  +  <!-- private targets -->        
  +          
  +  <target name="unpack-skin"
  +          depends="init-props">
  +     <unjar src="${forrest.home}/context/skins/${project.skin}.fsj"
  +            dest="${forrest.home}/context/skins/"/>
  +     <delete file="${forrest.home}/context/skins/${project.skin}.fsj"/>
  +  </target>  
  +
  +  <target name="fetch-skins-descriptor">
  +      <get src="http://www.apache.org/~nicolaken/whiteboard/forrestskins/skins.xml"

  +           dest="${forrest.home}/context/skins/skins.xml"/>
  +  </target>  
  +  
  +  <target name="available-skins"
  +          depends="init-props, fetch-skins-descriptor"
  +          description="What skins are available?">
  +    <xslt in="${forrest.home}/context/skins/skins.xml" 
  +          out="${project.work-dir}/skinlist2echobuild.xml"
  +          style="${forrest.home}/var/skinlist2echo.xsl"/>  
  +    <ant antfile="${project.work-dir}/skinlist2echobuild.xml"/>
  +  </target>  
  +  
  +  <target name="fetch-skin" 
  +          depends="init-props, fetch-skins-descriptor"
  +          description="Get a skin from the remote repository">
  +    <xslt in="${forrest.home}/context/skins/skins.xml" 
  +          out="${project.work-dir}/skinlist2fetchbuild.xml"
  +          style="${forrest.home}/var/skinlist2fetch.xsl">
  +      <param name="skin-name" expression="${project.skin}"/>       
  +    </xslt>  
  +    <ant antfile="${project.work-dir}/skinlist2fetchbuild.xml"/>
  +  </target>    
  +  
  +  <target name="install-skin" 
  +          depends = "init-props, fetch-skin, unpack-skin"
  +          description="Install a skin from the remote repository"/>
  +   
   </project>
  
  
  
  1.1                  xml-forrest/src/resources/forrest-shbat/var/skinlist2echo.xsl
  
  Index: skinlist2echo.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
  	<xsl:template match="skins">
        <project default="echoskins">
        	<target name="echoskins">
        	<echo>Available skins:</echo>
    	      <xsl:apply-templates select="skin" />
  	    </target>
  	  </project>
  	</xsl:template>
  	
  	<xsl:template match="skin">
  	    <echo><xsl:value-of select="@name"/></echo>
  	</xsl:template>	
  	
  </xsl:stylesheet>
  
  
  1.1                  xml-forrest/src/resources/forrest-shbat/var/skinlist2fetch.xsl
  
  Index: skinlist2fetch.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     
      <xsl:param name="skin-name"/>
  
  	<xsl:template match="skins">
        <project default="fetchskin">
        	<target name="fetchskin">
           <get>
             <xsl:attribute  name="src" >http://www.apache.org/~nicolaken/whiteboard/forrestskins/<xsl:value-of
select="$skin-name"/>.fsj</xsl:attribute>
             <xsl:attribute  name="dest">${forrest.home}/context/skins/<xsl:value-of
select="$skin-name"/>.fsj</xsl:attribute>
           </get>
  	    </target>
  	  </project>
  	</xsl:template>
  	
  	<xsl:template match="skin">
  	    <echo><xsl:value-of select="@name"/></echo>
  	</xsl:template>	
  	
  </xsl:stylesheet>
  
  
  1.1                  xml-forrest/src/documentation/content/skins/skins.xml
  
  Index: skins.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE skins [
    <!ENTITY % links.att 'name CDATA #REQUIRED'>
    <!ENTITY % link.att 'name CDATA #REQUIRED href CDATA #REQUIRED'>
    <!ELEMENT skins (skin*)>
    <!ELEMENT skin EMPTY>
    <!ATTLIST skin name CDATA #REQUIRED
                   url  CDATA #REQUIRED>
    ]>
    
  <skins>
     <skin name="testskin"
           url="http://www.apache.org/~nicolaken/whiteboard/forrestskins/"/>
     <skin name="testskin2"
           url="http://www.apache.org/~nicolaken/whiteboard/forrestskins/"/>
  </skins> 
  
  
  

Mime
View raw message