a.binder пре 9 година
родитељ
комит
856227165a

+ 73 - 0
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/ADMIN_USERS.dita

@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<RelatedFeature xpath="ID"  typeName="p5_default_db:IN7_DZIENNIK_KORESP"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+  xsi:noNamespaceSchemaLocation="../../../default_db_xml_cache.public/topicProcesy5.xsd">
+  <!-- oznacza to refa z w $var=ID_BILLING_OWNER jest FeatureID=BILLING_OWNER.$var do sciagniecia z p5_default_db:BILLING_OWNER -->
+  <!--https://biuro.biall-net.pl/SE/version-git/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/out/null400667363.pdf-->
+<topic id="untitled4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:topic.xsd">
+  <title><ph>Dane wyposazenia dla </ph><ph xpath="ID"/><ph>-</ph><ph xpath="ADM_NAME"/>
+    </title>
+  <body>    
+    <p><b>Wyposażenia</b></p>
+    <p>
+      <table>
+        <tgroup cols="4">
+          <thead>
+            <row>
+              <entry>ID</entry>
+              <entry>TYP</entry>
+              <entry>s/n</entry>
+              <entry>koszt</entry>
+            </row>
+          </thead>
+          <tbody>
+            <row>
+              <entry/>
+              <entry/>
+              <entry/>
+            </row>
+            <RelatedFeature xpath="ADMIN_USERS_ID" xpath_value="../ID" typeName="p5_default_db:DEVICES">  <!-- test sciagniecia powiazanych pism do sprawy -->
+              <row>
+                <entry xpath="ID" />
+                <entry xpath="T_DEVICE_TYPE"/>
+                <entry xpath="T_DEVICE_SERIAL"/>
+                <entry xpath="F_BILL_COST"/>
+              </row>
+              <RelatedFeature xpath="PARENT_ID" xpath_value="../ID" typeName="p5_default_db:DEVICES">  <!-- test sciagniecia powiazanych pism do sprawy -->
+                <row>
+                  <entry xpath="ID" >Parent</entry>
+                  <entry xpath="T_DEVICE_TYPE"/>
+                  <entry xpath="T_DEVICE_SERIAL"/>
+                  <entry xpath="F_BILL_COST"/>
+                </row>
+              </RelatedFeature>
+            </RelatedFeature>
+          </tbody>
+        </tgroup>
+      </table>
+    </p> 
+   <!-- <data-about>
+      <data><apiname base="PROCES_INCLUDE">1607</apiname></data>
+    </data-about>-->
+    <!--<simpletable id="simpletable_uym_ps1_zy">
+      <strow>
+        <stentry>
+          <RelatedFeature xpath="ID" xpath_value="../ID_BILLING_OWNER" typeName="p5_default_db:BILLING_OWNER"></RelatedFeature>
+          
+        </stentry>
+        <stentry>
+        </stentry>
+      </strow>
+    </simpletable>-->
+    
+  </body>
+  
+  <!--<topic id="topic_e22_jwx_yx">
+    <title>title2</title>
+    <body>
+      <p>body topic2</p>
+    </body>
+  </topic>-->
+</topic>
+</RelatedFeature>

+ 91 - 0
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/IN7_DZIENNIK_KORESP.dita

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<RelatedFeature xpath="ID"  typeName="p5_default_db:IN7_DZIENNIK_KORESP"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+  xsi:noNamespaceSchemaLocation="../../../default_db_xml_cache.public/topicProcesy5.xsd">
+  <!-- oznacza to refa z w $var=ID_BILLING_OWNER jest FeatureID=BILLING_OWNER.$var do sciagniecia z p5_default_db:BILLING_OWNER -->
+  <!--https://biuro.biall-net.pl/SE/version-git/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/out/null400667363.pdf-->
+<topic id="untitled4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:topic.xsd">
+  <title><ph>Pismo nr </ph><ph xpath="ID_PROJECT"/><ph>-</ph><ph xpath="ID"/>
+    <ph>z dnia</ph>
+    <ph xpath="K_DATA_OTRZYMANEJ_KORESP"/></title>
+  <body>
+    <simpletable id="simpletable_uym_ps1_zy">
+      <strow>
+        <stentry>
+          <RelatedFeature xpath="ID" xpath_value="../ID_BILLING_OWNER" typeName="p5_default_db:BILLING_OWNER"><!-- oznacza to refa z w $var=ID_BILLING_OWNER jest FeatureID=BILLING_OWNER.$var do sciagniecia z p5_default_db:BILLING_OWNER -->
+            <p>Nadawca:</p><ph/>
+            <p xpath="name1"/><ph/>
+            <p xpath="name2"/><ph/>
+            <p xpath="miasto"/><ph/>
+            <p xpath="nr_rach"/><ph/>
+            <p xpath="BILLING_OWNER_EMAIL"/><ph/>
+        </RelatedFeature></stentry>
+        <stentry>
+          <p>Odbiorca:</p><ph/>
+          <p xpath="K_OD_KOGO"/><ph/>
+          <p xpath="OD_KOGO_ADRES"/><ph/>
+          <p xpath="K_NR_OTRZYM_KORESP"/><ph/>
+          <p xpath="K_NR_OTRZYM_KORESP"/><ph/>
+        </stentry>
+      </strow>
+    </simpletable>
+    
+    <p><b>Temat: <ph/><ph xpath="K_ZAWARTOS"/></b></p>
+  
+ 
+    <p>Tresc: </p>
+    <p xpath="K_ZAWARTOSC_HTML">
+    </p>
+    <p><b>Powiazane elementy (inne dokumenty w sprawie)</b></p>
+    <p>
+      <table>
+        <tgroup cols="3">
+          <thead>
+            <row>
+              <entry>ID</entry>
+              <entry>Data</entry>
+              <entry>Temat</entry>
+            </row>
+          </thead>
+          <tbody>
+            <row>
+              <entry/>
+              <entry/>
+              <entry/>
+            </row>
+            <RelatedFeature xpath="ID_PROJECT" xpath_value="../ID_PROJECT" typeName="p5_default_db:IN7_DZIENNIK_KORESP">  <!-- test sciagniecia powiazanych pism do sprawy -->
+              <row>
+                <entry xpath="ID" />
+                <entry xpath="K_DATA_OTRZYMANEJ_KORESP"/>
+                <entry xpath="K_ZAWARTOS"/>
+              </row>
+            </RelatedFeature>
+          </tbody>
+        </tgroup>
+      </table>
+    </p> 
+   <!-- <data-about>
+      <data><apiname base="PROCES_INCLUDE">1607</apiname></data>
+    </data-about>-->
+    <!--<simpletable id="simpletable_uym_ps1_zy">
+      <strow>
+        <stentry>
+          <RelatedFeature xpath="ID" xpath_value="../ID_BILLING_OWNER" typeName="p5_default_db:BILLING_OWNER"></RelatedFeature>
+          
+        </stentry>
+        <stentry>
+        </stentry>
+      </strow>
+    </simpletable>-->
+    
+  </body>
+  
+  <!--<topic id="topic_e22_jwx_yx">
+    <title>title2</title>
+    <body>
+      <p>body topic2</p>
+    </body>
+  </topic>-->
+</topic>
+</RelatedFeature>

+ 40 - 5
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/build.xml

@@ -48,9 +48,8 @@
     <property name="build_recurse_ant.xsl" value="${default_db_xml_cache.public}/build_recurse_ant.xsl"/>
     <property name="build_recurse_ant_merge_dita_from_temp.xsl" value="${default_db_xml_cache.public}/build_recurse_ant_merge_dita_from_temp.xsl"/>
     <property name="builds_to_ant.xsl" value="${default_db_xml_cache.public}/builds_to_ant.xsl"/>
-    <property name="main_build_recurse_ant.dita" value="main_build_recurse_ant.dita"/>
-    <property name="main_build_recurse_ant.dita_with_id" value="${temp}/${main_build_recurse_ant.dita}.with_id.xml"/>
-    <property name="main_build_recurse_ant.dita_with_id.xsl" value="${default_db_xml_cache.public}/main_build_recurse_ant.dita_with_id.xsl"/>
+    
+    
     <!--<tempfile property="uuid" deleteonexit="yes"/>-->
     <tempfile property="out_task.dita" deleteonexit="no"  destdir="temp"/>
     <tempfile property="out_task.dita.final" deleteonexit="no"  destdir="temp"/>
@@ -64,8 +63,41 @@
         <chmod  dir="${out}" perm="ugo+rwx"/>
     </target>
 
+
+    <target name="set_dita" >
+        
+        <!--<property name="main_build_recurse_ant.dita" value="main_build_recurse_ant.dita"/>-->
+        
+        <exec  executable="bash" dir="." outputproperty="main_build_recurse_ant.dita_sed">
+            <arg value="-c"/>
+            <arg value="echo ${typeName} |sed 's/.*://'"/>
+        </exec>
+        <regexp pattern=""/>
+        
+        <property name="main_build_recurse_ant.dita" value="${main_build_recurse_ant.dita_sed}.dita"/>
+        <echo> Ustawiam $main_build_recurse_ant.dita na ${main_build_recurse_ant.dita} ;  </echo>
+        
+        <property name="main_build_recurse_ant.dita_with_id" value="${temp}/${main_build_recurse_ant.dita}.with_id.xml"/>
+        <property name="main_build_recurse_ant.dita_with_id.xsl" value="${default_db_xml_cache.public}/main_build_recurse_ant.dita_with_id.xsl"/>
+        <condition property="test_if_dita" taskname="check_dita" >
+            <available file="${main_build_recurse_ant.dita}"/>  
+        </condition>
+    </target>
+    
+    
+    
+    <target name="check_dita" depends="set_dita" if="${test_if_dita}">
+        <echo> testujemy czy jest dita</echo>
+        <antcall target="build_recurse_ant_merge_dita_from_temp.xsl"/>
+    </target>
+    
+    <target name="info_brak_dita" unless="$test_if_dita}">
+        <echo message="OUTPUT__START"/>   
+        <echo>&lt;br&gt;Brakuje druku dla powiązanego obiektu ${main_build_recurse_ant.dita} &lt;/br&gt;</echo>         
+        <echo message="OUTPUT__END"/>
+    </target>
    
-    <target name="main_build_recurse_ant.dita_with_id">
+    <target name="main_build_recurse_ant.dita_with_id"  if="${test_if_dita}">
         <xslt basedir="./" style="${main_build_recurse_ant.dita_with_id.xsl}" in="${main_build_recurse_ant.dita}"  destdir="./" out="${main_build_recurse_ant.dita_with_id}" >
             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
@@ -79,6 +111,9 @@
         <delete>
             <fileset dir="${temp}"/>
         </delete>        
+        <echo message="OUTPUT__START"/>   
+        <echo>&lt;br&gt;Skasowano pliki tymczasowe&lt;/br&gt;</echo>         
+        <echo message="OUTPUT__END"/>
     </target>
 
     <!-- wygenerowanie ant builda do sciagniecia niezbednego elementu na podstawie template main.dita i tam zagniezdzonego RelatedFeature-->
@@ -157,7 +192,7 @@
     </target>-->
 
 
-    <target name="buildpdf_recursed" depends="build_recurse_ant_merge_dita_from_temp.xsl">
+    <target name="buildpdf_recursed" depends="check_dita,info_brak_dita" if="${test_if_dita}">
        
         <property name="dita.dir" location="/Library/Server/Web/Data/Sites/Default/SE/stuff/dita-ot-2.3.3/bin/dita"/>
         <exec executable="${dita.dir}" dir=".">