build_WPS_Functions.xsl 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  4. exclude-result-prefixes="xs"
  5. version="2.0">
  6. <xsl:output indent="yes"/>
  7. <xsl:strip-space elements="*"/>
  8. <xsl:param name="WPS_Functions" required="yes"/>
  9. <xsl:include href="../default_db_xml_cache.public/system_cache__appinfo/basedir.xsl"/>
  10. <xsl:template match="WPS_Functions.childproperties.builds">
  11. <project basedir="{$basedir}" name="WPS_Functions.childproperties.builds" default="WPS_Functions.childproperties.builds">
  12. <description>
  13. Generated ant by xsl from childproperties modules, to be run modules in mode to let they give their properties and dependencies
  14. </description>
  15. <target name="WPS_Functions.childproperties.builds">
  16. <xsl:for-each select="tokenize(.,';')">
  17. <echo>Running <xsl:value-of select="."/></echo>
  18. <xsl:variable name="antfile" select="doc(concat($WPS_Functions,'/',.))"/>
  19. <xsl:variable name="default_prefix">
  20. <xsl:choose>
  21. <xsl:when test="substring-before($antfile/project/@default,':')">
  22. <xsl:value-of select="substring-before($antfile/project/@default,':')"/>
  23. </xsl:when>
  24. <xsl:otherwise/>
  25. </xsl:choose>
  26. </xsl:variable>
  27. <xsl:choose>
  28. <xsl:when test="$antfile//target[@name='write_child_props_to_config_dir']">
  29. <xsl:message>#23 adding task to read properties for <xsl:value-of select="."/> - build project default prefix is not used!</xsl:message>
  30. <ant antfile="{$WPS_Functions}/{.}" inheritall="yes" inheritrefs="yes" target="write_child_props_to_config_dir"/>
  31. </xsl:when>
  32. <xsl:when test="$antfile//target[@name=concat($default_prefix,':','write_child_props_to_config_dir')]">
  33. <ant antfile="{$WPS_Functions}/{.}" inheritall="yes" inheritrefs="yes" target="{$default_prefix}:write_child_props_to_config_dir"/>
  34. </xsl:when>
  35. <xsl:otherwise>
  36. <xsl:message>#26 WARNING file <xsl:value-of select="."/> doesnt specify task for export properties ( target write_child_props_to_config_dir ) </xsl:message>
  37. </xsl:otherwise>
  38. </xsl:choose>
  39. </xsl:for-each>
  40. </target>
  41. </project>
  42. </xsl:template>
  43. </xsl:stylesheet>