build_dita-to-ant.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns:d2a="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita-to-ant/d2a.xsd"
  3. basedir="../../."
  4. default="project.write"
  5. name="dita-to-ant">
  6. <include as="PRODUCT" file="build.d2a.PRODUCT.xml"/>
  7. <include as="SYSTEM" file="build.d2a.SYSTEM.xml"/>
  8. <include as="INSTALL" file="build.d2a.INSTALL.xml"/>
  9. <include as="WPS_Functions" file="../build.WPS_Functions.PRODUCT.xml"/>
  10. <include file="../system_ui_info_speech/build.system_ui_info_speech.PRODUCT.xml"/>
  11. <include file="../system_ui_info_speech/build_system_ui_info_speech.xml" as="p5suis"/>
  12. <!--<include file="../dita_kosztorys_projektowy/build.p5dkp.ditafiles.xml.xml" as="ditafiles" />-->
  13. <import file="../dita_kosztorys_projektowy/build.p5dkp.PRODUCT.xml" as="p5dkp" />
  14. <!---Dd2a.new_module.INPUT=bocian-graph-2-html-test -Dd2a.ditamap.INPUT=/Users/a.binder/procesy5-dita-templates-druki/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/bocian-graph-to-html/example_last20.dita-->
  15. <property name="d2a.new_module.INPUT" value="html2image"/>
  16. <property name="d2a.ditamap.INPUT" location="/Users/a.binder/procesy5-dita-templates-druki/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/html2image/html2image_0.dita"/>
  17. <target depends="PRODUCT.PRODUCT,INSTALL.INSTALL" name="default"/>
  18. <target description="generate function from dita file"
  19. name="project"
  20. >
  21. <!--<antcall target="p5suis.p5suis.say_to_queue.copy_file">
  22. <param name="p5suis.say_to_queue.copy_file" value="${p5dkp.ditafiles.say.xml}"/>
  23. </antcall>-->
  24. <echo> $basedir - ${basedir} </echo>
  25. <input addproperty="d2a.ditamap.INPUT" message="podaj mape produktu, ktory chcesz przetwarzac"/>
  26. <input addproperty="d2a.new_module.INPUT" message="podaj nazwe modulu docelowego "/>
  27. <antcall target="p5suis.p5suis:say_to_queue.PL">
  28. <param name="p5suis:say_text" value="Tworzę automatycznie funkcje na podstawie specyfikacji dita z p5:file ${d2a.ditamap.INPUT}"/>
  29. </antcall>
  30. <ant antfile="build_dita_kosztorys_projektowy.xml" target="ditafiles.xml" dir="${basedir}/WPS_Functions/dita_kosztorys_projektowy"/>
  31. <fail unless="p5dkp.ditafiles.xml">not retrieved expected p5dkp.ditafiles.xml ${p5dkp.ditafiles.xml}</fail>
  32. <property name="d2a.new_ant_project" location="${d2a.repository}/${d2a.new_module.INPUT}/build_${d2a.new_module.INPUT}.xml"/>
  33. <xslt basedir="$d2a.basedir"
  34. destdir="$d2a.temp"
  35. force="true"
  36. in="${p5dkp.ditafiles.xml}"
  37. out="${d2a.new_ant_project}"
  38. style="${d2a.ditamap.xsl}">
  39. <factory name="net.sf.saxon.TransformerFactoryImpl">
  40. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  41. <attribute name="http://saxon.sf.net/feature/initialMode"
  42. value="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita-to-ant/d2a.xsd}new_ant_project.xml"/>
  43. <attribute name="http://saxon.sf.net/feature/dtd-validation-recoverable"
  44. value="true"/>
  45. </factory>
  46. <param expression="${d2a.basedir}"
  47. name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita-to-ant/d2a.xsd}basedir"/>
  48. <param expression="${d2a.repository}"
  49. name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita-to-ant/d2a.xsd}repository"/>
  50. <param expression="${d2a.temp}"
  51. name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita-to-ant/d2a.xsd}temp"/>
  52. <param name="d2a.ditamap.INPUT" expression="${d2a.ditamap.INPUT}"/>
  53. <param name="d2a.new_module.INPUT" expression="${d2a.new_module.INPUT}"/>
  54. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  55. <xmlcatalog refid="dita-ot.dtd.catalog"/>
  56. </xslt>
  57. <exec executable="open">
  58. <arg file="${d2a.new_ant_project}"/>
  59. </exec>
  60. </target>
  61. <target description="to confirm and write"
  62. name="project.write"
  63. depends="project"
  64. >
  65. <input addproperty="d2a.new_ant_project" message="type d2a.new_ant_project"/>
  66. <input addproperty="d2a.new_module.INPUT" message="type d2a.new_module.INPUT"/>
  67. <property name="d2a.new_ant_project.write.xml" location="${d2a.repository}/${d2a.new_module.INPUT}/d2a.new_ant_project.write.xml"/>
  68. <antcall target="p5suis.p5suis:say_to_queue.PL">
  69. <param name="p5suis:say_text" value="Zapisuję projekt funkcji do docelowego miejsca p5:file ${d2a.new_ant_project.write.xml} "/>
  70. </antcall>
  71. <xslt basedir="$d2a.basedir"
  72. destdir="$d2a.temp"
  73. force="true"
  74. in="${d2a.new_ant_project}"
  75. out="${d2a.new_ant_project.write.xml}"
  76. style="${d2a.ditamap.write.xsl}">
  77. <factory name="net.sf.saxon.TransformerFactoryImpl">
  78. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  79. <attribute name="http://saxon.sf.net/feature/initialMode"
  80. value="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita-to-ant/d2a.xsd}new_ant_project.write.xml"/>
  81. <attribute name="http://saxon.sf.net/feature/dtd-validation-recoverable"
  82. value="true"/>
  83. </factory>
  84. <param expression="${d2a.basedir}"
  85. name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita-to-ant/d2a.xsd}basedir"/>
  86. <param expression="${d2a.repository}"
  87. name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita-to-ant/d2a.xsd}repository"/>
  88. <param expression="${d2a.temp}"
  89. name="{http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita-to-ant/d2a.xsd}temp"/>
  90. <param name="d2a.ditamap.INPUT" expression="${d2a.ditamap.INPUT}"/>
  91. <param name="d2a.new_module.INPUT" expression="${d2a.new_module.INPUT}"/>
  92. <param name="WPS_Functions.basedir" expression="${WPS_Functions.basedir}"/>
  93. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  94. <xmlcatalog refid="dita-ot.dtd.catalog"/>
  95. </xslt>
  96. <exec executable="open">
  97. <arg file="${d2a.new_ant_project.write.xml}"/>
  98. </exec>
  99. </target>
  100. </project>