d2a.ditamap.write.xsl 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
  3. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  4. xmlns:p5dkp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd"
  5. xmlns:p5bws="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd"
  6. xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
  7. xmlns:d2a="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita-to-ant/d2a.xsd"
  8. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  9. xmlns:p5dg="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/documentation_generator/documentation_generator.xsd"
  10. exclude-result-prefixes="xs d2a system_cache__appinfo vc p5dkp p5bws p5dg"
  11. version="2.0">
  12. <xsl:include href="../documentation_generator/p5dg.filepath.xsl"/>
  13. <xsl:include href="d2a.new_ant_project.child.task.bash.syntaxdiagram.xsl"/>
  14. <xsl:output indent="yes"/>
  15. <xsl:strip-space elements="*"/>
  16. <xsl:param name="d2a:basedir"/>
  17. <xsl:param name="d2a:repository"/>
  18. <xsl:param name="WPS_Functions.basedir" required="yes"/>
  19. <xsl:param name="d2a.ditamap.INPUT" required="yes"/>
  20. <xsl:param name="d2a.new_module.INPUT" required="yes"/>
  21. <xsl:param name="d2a:basedir_ROOT_DITA_KEYREF" select="'basedir'"/>
  22. <xsl:function name="d2a:new_ant_project.write.path">
  23. <!--<xsl:param name="WPS_Functions.basedir"/>-->
  24. <xsl:param name="p5dg:filepath.true.path"/>
  25. <xsl:param name="p5dg:filename.true.path"/>
  26. <xsl:param name="PRODUCT"/>
  27. <xsl:value-of select="concat($p5dg:filepath.true.path,'/build_',$p5dg:filename.true.path,$PRODUCT,'.xml')"/>
  28. </xsl:function>
  29. <xsl:template match="d2a:new_ant_project" mode="d2a:new_ant_project.write.xml">
  30. <d2a:new_ant_project.write.xml>
  31. <xsl:apply-templates mode="#current"/>
  32. </d2a:new_ant_project.write.xml>
  33. </xsl:template>
  34. <xsl:template match="create_new_WPS_Function" mode="d2a:new_ant_project.write.xml">
  35. <xsl:message>#42 saving to <xsl:value-of select="d2a:new_ant_project.write.path(ancestor-or-self::*/@p5dg:filepath.true.path,ancestor-or-self::*/@p5dg:filename.true.path,'')"/></xsl:message>
  36. <result-document href="{d2a:new_ant_project.write.path(ancestor-or-self::*/@p5dg:filepath.true.path,ancestor-or-self::*/@p5dg:filename.true.path,'')}">
  37. <!--<xsl:copy-of select="project" copy-namespaces="no"/>-->
  38. </result-document>
  39. <xsl:result-document href="{d2a:new_ant_project.write.path(ancestor-or-self::*/@p5dg:filepath.true.path,ancestor-or-self::*/@p5dg:filename.true.path,'')}">
  40. <xsl:for-each select="project">
  41. <xsl:copy copy-namespaces="yes">
  42. <xsl:copy-of select="namespace::*"/>
  43. <xsl:copy-of select="@*"/>
  44. <include file="{d2a:new_ant_project.write.path(ancestor-or-self::*/@p5dg:filepath.true.path,ancestor-or-self::*/@p5dg:filename.true.path,'.PRODUCT')}" as="PRODUCT"/>
  45. <xsl:copy-of select="*" copy-namespaces="no"/>
  46. </xsl:copy>
  47. </xsl:for-each>
  48. </xsl:result-document>
  49. <xsl:apply-templates mode="#current"/>
  50. </xsl:template>
  51. <xsl:template match="d2a:PRODUCT.new_ant_project" mode="d2a:new_ant_project.write.xml">
  52. <xsl:message>#42 saving to <xsl:value-of select="d2a:new_ant_project.write.path(ancestor-or-self::*/@p5dg:filepath.true.path,ancestor-or-self::*/@p5dg:filename.true.path,'.PRODUCT')"/></xsl:message>
  53. <result-document href="{d2a:new_ant_project.write.path(ancestor-or-self::*/@p5dg:filepath.true.path,ancestor-or-self::*/@p5dg:filename.true.path,'.PRODUCT')}">
  54. <!--<xsl:copy-of select="project"/>-->
  55. </result-document>
  56. <xsl:result-document href="{d2a:new_ant_project.write.path(ancestor-or-self::*/@p5dg:filepath.true.path,ancestor-or-self::*/@p5dg:filename.true.path,'.PRODUCT')}">
  57. <xsl:copy-of select="project"/>
  58. </xsl:result-document>
  59. </xsl:template>
  60. <xsl:template mode="d2a:new_ant_project.write.xml" match="text()|comment()|*"/>
  61. </xsl:stylesheet>