build_WPS_Functions.xsl 2.8 KB

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