Просмотр исходного кода

Merge branch 'master' of bn.git:plabudda/se

Piotr Labudda 9 лет назад
Родитель
Сommit
e1542478df

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

@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<RelatedFeature xpath="ID"  typeName="p5_default_db:ADMIN_USERS"
+  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/>
+              <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>

+ 53 - 0
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/CRM_PROCES.dita

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<RelatedFeature xpath="ID"  typeName="p5_default_db:CRM_PROCES"
+  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="CRM_PROCES_tree" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:topic.xsd">
+  <title><ph>Proces nr </ph><ph xpath="PARENT_ID"/><ph>-</ph><ph xpath="ID"/>
+    <ph>z dnia</ph>
+    <ph xpath="A_RECORD_CREATE_DATE"/> <ph>/</ph> <ph xpath="A_RECORD_UPDATE_DATE"/></title>
+  <body>
+    <p> Opis <ph xpath="DESC"></ph></p>
+    <p> Opis pelny <ph xpath="OPIS"></ph></p>
+    <p><b>Powiazane wskazniki (inne dokumenty w sprawie)</b></p>
+    <p>
+      <table>
+        <tgroup cols="6">
+          <thead>
+            <row>
+              <entry>OPIS_ZASOB</entry>
+              <entry>TYP</entry>
+              <entry>ID_PRZYPADEK</entry>
+              <entry>ZASOB ID</entry>
+              <entry>ZASOB TYPE</entry>
+              <entry>ZASOB DESC</entry>
+            </row>
+          </thead>
+          <tbody>
+            <RelatedFeature xpath="ID_PROCES" xpath_value="../ID" typeName="p5_default_db:CRM_WSKAZNIK">  
+              <row>
+                <entry xpath="OPIS_ZASOB" />
+                <entry xpath="TYP"/>
+                <entry xpath="ID_PRZYPADEK"/>
+                  <RelatedFeature xpath="ID" xpath_value="../ID_ZASOB" typeName="p5_default_db:CRM_LISTA_ZASOBOW">  
+                      <entry xpath="ID" />
+                      <entry xpath="TYPE"/>
+                     <entry xpath="DESC"/>
+                    <RelatedFeature xpath="ID" xpath_value="../ID_ZASOB" typeName="p5_default_db:CRM_LISTA_ZASOBOW">  
+                      <entry xpath="ID" />
+                      <entry xpath="TYPE"/>
+                      <entry xpath="DESC"/>
+                    </RelatedFeature>
+                  </RelatedFeature>
+              </row>
+            </RelatedFeature>
+          </tbody>
+        </tgroup>
+      </table>
+    </p> 
+  </body>
+</topic>
+</RelatedFeature>

+ 88 - 0
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/DEVICES.dita

@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<RelatedFeature xpath="ID"  typeName="p5_default_db:DEVICES"
+  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>
+    </title>
+  <body>    
+    <p><b>Wyposażenia</b></p>
+    <p>
+      
+      <table>
+        <tgroup cols="5">
+          <thead>
+            <row>
+              <entry>poz</entry>
+              <entry>ID</entry>
+              <entry>TYP</entry>
+              <entry>s/n</entry>
+              <entry>koszt</entry>
+            </row>
+          </thead>
+          <tbody>
+            <row>
+              <entry>-</entry>
+              <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>---</entry>
+                <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>------</entry>
+                  <entry xpath="ID" >Parent</entry>
+                  <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>---------</entry>
+                    <entry xpath="ID" >Parent</entry>
+                    <entry xpath="T_DEVICE_TYPE"/>
+                    <entry xpath="T_DEVICE_SERIAL"/>
+                    <entry xpath="F_BILL_COST"/>
+                  </row>
+                </RelatedFeature>
+              </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>

+ 136 - 0
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/IN7_MK_BAZA_DYSTRYBUCJI.dita

@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<RelatedFeature xpath="ID"  typeName="p5_default_db:IN7_MK_BAZA_DYSTRYBUCJI"
+  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 sprawy dla </ph><ph xpath="P_ID"/><ph>-</ph><ph xpath="ID"/>
+    </title>
+  <body>    
+    
+    <p><ph>Opis</ph><ph xpath="M_DIST_DESC"/></p>
+    <p><ph>Firma</ph><ph xpath="M_DISTRIBUTOR"/></p>
+    <p><ph>Notatki</ph><ph xpath="L_APPOITMENT_INFO"/><ph> </ph> <ph xpath="L_APPOITMENT_DATE"/></p>
+    
+    
+    <p><b>podsprawy</b></p>
+    <p>
+      <table>
+        <tgroup cols="5">
+          <thead>
+            <row>
+              <entry>poz</entry>
+              <entry>ID</entry>
+              <entry>TYP</entry>
+              <entry>s/n</entry>
+              <entry>koszt</entry>
+            </row>
+          </thead>
+          <tbody>
+            <row>
+              <entry/>
+              <entry/>
+              <entry/>
+              <entry/>
+              <entry/>
+            </row>
+            <RelatedFeature xpath="P_ID" xpath_value="../ID" typeName="p5_default_db:IN7_MK_BAZA_DYSTRYBUCJI">  <!-- test sciagniecia powiazanych pism do sprawy -->
+              <row>
+                <entry>---</entry>
+                <entry xpath="ID" />
+                <entry xpath="M_DIST_DESC"/>
+                <entry xpath="M_DISTRIBUTOR"/>
+                <entry xpath="L_APPOITMENT_INFO"/>
+              </row>
+              <RelatedFeature xpath="P_ID" xpath_value="../ID" typeName="p5_default_db:IN7_MK_BAZA_DYSTRYBUCJI">  <!-- test sciagniecia powiazanych pism do sprawy -->
+                <row>
+                  <entry>------</entry>
+                  <entry xpath="ID" />
+                  <entry xpath="M_DIST_DESC"/>
+                  <entry xpath="M_DISTRIBUTOR"/>
+                  <entry xpath="L_APPOITMENT_INFO"/>
+                </row>
+                <RelatedFeature xpath="P_ID" xpath_value="../ID" typeName="p5_default_db:PROBLEMS">  <!-- test sciagniecia powiazanych pism do sprawy -->
+                  <row>
+                    <entry>---------</entry>
+                    <entry xpath="ID" />
+                    <entry xpath="M_DIST_DESC"/>
+                    <entry xpath="M_DISTRIBUTOR"/>
+                    <entry xpath="L_APPOITMENT_INFO"/>
+                  </row>
+                </RelatedFeature>
+              </RelatedFeature>
+            </RelatedFeature>
+          </tbody>
+        </tgroup>
+      </table>
+    </p> 
+    
+    
+    <p><b>zadania</b></p>
+    <p>
+      <table>
+        <tgroup cols="5">
+          <thead>
+            <row>
+              <entry>poz</entry>
+              <entry>ID</entry>
+              <entry>status</entry>
+              <entry>opis</entry>
+              <entry>kto</entry>
+            </row>
+          </thead>
+          <tbody>
+            <row>
+              <entry/>
+              <entry/>
+              <entry/>
+              <entry/>
+              <entry/>
+            </row>
+            <RelatedFeature xpath="ID_PROJECT" xpath_value="../ID" typeName="p5_default_db:PROBLEMS">  <!-- test sciagniecia powiazanych pism do sprawy -->
+              <row>
+                <entry>---</entry>
+                <entry xpath="ID" />
+                <entry xpath="A_STATUS"/>
+                <entry xpath="A_PROBLEM_DESC"/>
+                <entry xpath="L_APPOITMENT_USER"/>
+              </row>
+              <RelatedFeature xpath="PARENT_ID" xpath_value="../ID" typeName="p5_default_db:PROBLEMS">  <!-- test sciagniecia powiazanych pism do sprawy -->
+                <row>
+                  <entry>------</entry>
+                  <entry xpath="ID" >Parent</entry>
+                  <entry xpath="A_STATUS"/>
+                  <entry xpath="A_PROBLEM_DESC"/>
+                  <entry xpath="L_APPOITMENT_USER"/>
+                </row>
+                <RelatedFeature xpath="PARENT_ID" xpath_value="../ID" typeName="p5_default_db:PROBLEMS">  <!-- test sciagniecia powiazanych pism do sprawy -->
+                  <row>
+                    <entry>---------</entry>
+                    <entry xpath="ID" >Parent</entry>
+                    <entry xpath="A_STATUS"/>
+                    <entry xpath="A_PROBLEM_DESC"/>
+                    <entry xpath="L_APPOITMENT_USER"/>
+                  </row>
+                </RelatedFeature>
+              </RelatedFeature>
+            </RelatedFeature>
+          </tbody>
+        </tgroup>
+      </table>
+    </p> 
+    
+  
+    
+  </body>
+  
+  <!--<topic id="topic_e22_jwx_yx">
+    <title>title2</title>
+    <body>
+      <p>body topic2</p>
+    </body>
+  </topic>-->
+</topic>
+</RelatedFeature>

+ 0 - 35
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/Test_z_getfeature_do_parse.xml

@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP xmlns:default_db__x3A__IN7_DZIENNIK_KORESP="https://biuro.biall-net.pl/wfs/default_db/table/IN7_DZIENNIK_KORESP.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://biuro.biall-net.pl/wfs/default_db/table/IN7_DZIENNIK_KORESP.xsd ../IN7_DZIENNIK_KORESP.xsd" fid="IN7_DZIENNIK_KORESP.58939">
-<default_db__x3A__IN7_DZIENNIK_KORESP:ID>58939</default_db__x3A__IN7_DZIENNIK_KORESP:ID>
-<default_db__x3A__IN7_DZIENNIK_KORESP:COST_OF_SHIPMENT>0.00</default_db__x3A__IN7_DZIENNIK_KORESP:COST_OF_SHIPMENT>
-<default_db__x3A__IN7_DZIENNIK_KORESP:COST_VALUE>200.00</default_db__x3A__IN7_DZIENNIK_KORESP:COST_VALUE>
-<default_db__x3A__IN7_DZIENNIK_KORESP:INCOME_VALUE>0.00</default_db__x3A__IN7_DZIENNIK_KORESP:INCOME_VALUE>
-<default_db__x3A__IN7_DZIENNIK_KORESP:path>0-489-390</default_db__x3A__IN7_DZIENNIK_KORESP:path>
-<default_db__x3A__IN7_DZIENNIK_KORESP:P_ID>0</default_db__x3A__IN7_DZIENNIK_KORESP:P_ID>
-<default_db__x3A__IN7_DZIENNIK_KORESP:A_STATUS>NORMAL</default_db__x3A__IN7_DZIENNIK_KORESP:A_STATUS>
-<default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP>IN</default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP>
-<default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_RODZAJ>ZWYKLY</default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_RODZAJ>
-<default_db__x3A__IN7_DZIENNIK_KORESP:K_DATA_OTRZYMANEJ_KORESP>2016-10-27</default_db__x3A__IN7_DZIENNIK_KORESP:K_DATA_OTRZYMANEJ_KORESP>
-<default_db__x3A__IN7_DZIENNIK_KORESP:K_DATA_OTRZYM_KORESP>2016-11-02</default_db__x3A__IN7_DZIENNIK_KORESP:K_DATA_OTRZYM_KORESP>
-<default_db__x3A__IN7_DZIENNIK_KORESP:K_NR_OTRZYM_KORESP>120/10/2016/F</default_db__x3A__IN7_DZIENNIK_KORESP:K_NR_OTRZYM_KORESP>
-<default_db__x3A__IN7_DZIENNIK_KORESP:ID_BILLING_USERS>0</default_db__x3A__IN7_DZIENNIK_KORESP:ID_BILLING_USERS>
-<default_db__x3A__IN7_DZIENNIK_KORESP:K_OD_KOGO>DIAMENT Sp.z o.o </default_db__x3A__IN7_DZIENNIK_KORESP:K_OD_KOGO>
-<default_db__x3A__IN7_DZIENNIK_KORESP:OD_KOGO_ADRES>ul.Grunwaldzka 212 80-266 Gdansk</default_db__x3A__IN7_DZIENNIK_KORESP:OD_KOGO_ADRES>
-<default_db__x3A__IN7_DZIENNIK_KORESP:K_ZAWARTOS>Faktura za serwis urządzenia klimatyzacyjnego </default_db__x3A__IN7_DZIENNIK_KORESP:K_ZAWARTOS>
-<default_db__x3A__IN7_DZIENNIK_KORESP:ID_PROJECT>390</default_db__x3A__IN7_DZIENNIK_KORESP:ID_PROJECT>
-<default_db__x3A__IN7_DZIENNIK_KORESP:K_ZNAK_REFERENTA>p.r</default_db__x3A__IN7_DZIENNIK_KORESP:K_ZNAK_REFERENTA>
-<default_db__x3A__IN7_DZIENNIK_KORESP:L_APPOITMENT_DATE>2016-11-10 14:49</default_db__x3A__IN7_DZIENNIK_KORESP:L_APPOITMENT_DATE>
-<default_db__x3A__IN7_DZIENNIK_KORESP:L_APPOITMENT_USER>anna.wieclaw</default_db__x3A__IN7_DZIENNIK_KORESP:L_APPOITMENT_USER>
-<default_db__x3A__IN7_DZIENNIK_KORESP:T_TELBOX_NEIGHBOUR_IN_ID>2792</default_db__x3A__IN7_DZIENNIK_KORESP:T_TELBOX_NEIGHBOUR_IN_ID>
-<default_db__x3A__IN7_DZIENNIK_KORESP:ID_ZASOB>0</default_db__x3A__IN7_DZIENNIK_KORESP:ID_ZASOB>
-<default_db__x3A__IN7_DZIENNIK_KORESP:CRM_LISTA_ZASOBOW_ID>0</default_db__x3A__IN7_DZIENNIK_KORESP:CRM_LISTA_ZASOBOW_ID>
-<default_db__x3A__IN7_DZIENNIK_KORESP:ID_DEVICE>0</default_db__x3A__IN7_DZIENNIK_KORESP:ID_DEVICE>
-<default_db__x3A__IN7_DZIENNIK_KORESP:T_TELBOX_NEIGHBOUR_IN_ID_NEW>0</default_db__x3A__IN7_DZIENNIK_KORESP:T_TELBOX_NEIGHBOUR_IN_ID_NEW>
-<default_db__x3A__IN7_DZIENNIK_KORESP:ID_ZASOB_NEW>0</default_db__x3A__IN7_DZIENNIK_KORESP:ID_ZASOB_NEW>
-<default_db__x3A__IN7_DZIENNIK_KORESP:A_RECORD_CREATE_DATE>2016-11-03 14:46:00</default_db__x3A__IN7_DZIENNIK_KORESP:A_RECORD_CREATE_DATE>
-<default_db__x3A__IN7_DZIENNIK_KORESP:A_RECORD_CREATE_AUTHOR>adrian.kasprzak</default_db__x3A__IN7_DZIENNIK_KORESP:A_RECORD_CREATE_AUTHOR>
-<default_db__x3A__IN7_DZIENNIK_KORESP:A_RECORD_UPDATE_DATE>2016-11-03 15:00:00</default_db__x3A__IN7_DZIENNIK_KORESP:A_RECORD_UPDATE_DATE>
-<default_db__x3A__IN7_DZIENNIK_KORESP:A_RECORD_UPDATE_AUTHOR>adrian.kasprzak</default_db__x3A__IN7_DZIENNIK_KORESP:A_RECORD_UPDATE_AUTHOR>
-<default_db__x3A__IN7_DZIENNIK_KORESP:A_CLASSIFIED>27_BIALL-NET</default_db__x3A__IN7_DZIENNIK_KORESP:A_CLASSIFIED>
-<default_db__x3A__IN7_DZIENNIK_KORESP:A_ADM_COMPANY>27_BIALL-NET</default_db__x3A__IN7_DZIENNIK_KORESP:A_ADM_COMPANY>
-</default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP>

+ 50 - 9
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/build.xml

@@ -47,18 +47,15 @@
     <property name="default_db_xml_cache.public" value="../../../default_db_xml_cache.public"/> <!-- katalog z xsl z projektu src-xmlschema.git -->
     <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="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"/>
+    <property name="builds_to_ant.xsl" value="${default_db_xml_cache.public}/builds_to_ant.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"/>
     <!--<tempfile property="wfs_output" deleteonexit="no"  destdir="temp"  suffix=".xml" />-->
     
     
-    
- 
-    
     <target name="install_folders">
         <mkdir dir="${temp}"/>
         <mkdir dir="${out}"/>
@@ -66,9 +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"/>
@@ -77,6 +106,15 @@
         </xslt>
     </target>
    
+   
+    <target name="clean_temp_dir" description="URL_TASK Target clean_temp_dir">
+        <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-->
     <target name="build_recurse_ant.xml" depends="main_build_recurse_ant.dita_with_id">
@@ -112,6 +150,8 @@
             <param name="current_leaf.dita" expression="${main_build_recurse_ant.dita_with_id}"/>
             <param name="basedir" expression="${basedir}"/>
             <param name="build_recurse_ant.xsl" expression="${build_recurse_ant.xsl}"/>
+            <param name="temp" expression="${temp}"/>
+            <param name="builds_to_ant.xsl" expression="${builds_to_ant.xsl}"/>
         </xslt>
         <!--<import file="${build_recurse_ant.xml}"/>-->
         <ant  antfile="${build_recurse_ant.xml}" dir="."/>
@@ -128,6 +168,7 @@
             <!--<param name="main_build_recurse_ant.dita" expression="${main_build_recurse_ant.dita}"/>-->
             <param name="uuid" expression="${uuid}"/>
             <param name="basedir" expression="${basedir}"/>
+            <param name="temp" expression="${temp}"/>
         </xslt>
         <echo> zapisalem plik gotowy do utworzenia dita do ${out_task.dita}. </echo>
     </target>
@@ -151,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=".">

+ 2 - 0
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-get-wfs-xml/build.xml

@@ -45,6 +45,8 @@
         <echo message="ERROR__END"/>
     </target>
 
+    
+    
     <target name="DescribeFeatureType" description="URL_TASK Target DescribeFeatureType">
         <exec executable="curl" outputproperty="wfs_output" errorproperty="wfs_error" resultproperty="wfs_result">
             <arg line="-H 'Authorization: Basic ${passwordBase64Basic}' ${url}&amp;REQUEST=DescribeFeatureType"/>

+ 167 - 33
SE/schema/default_db_xml_cache.public/build_recurse_ant.xsl

@@ -14,6 +14,9 @@
     <xsl:strip-space elements="*"/>
     
     
+    <!-- Copyright BIALL-NET sp. z o.o. 2017-03-01 wszelkie prawa zastrzeżone -->
+    <!-- @2017-03-01 modyfikacja dla potrzeb CRM_PROCES_tree - sa bledy-->
+    
     <xsl:include href="escaped_html_to_xml.xsl"/>
     <!--
     <property name="url" value="${url}"/> - to point what is record/table to download
@@ -45,6 +48,8 @@
     
     <xsl:param name="xml_id_parent" select="@xml_id"/>
     <xsl:param name="build_recurse_ant.xsl" required="yes"/>
+    <xsl:param name="temp" select="'temp'"/>
+    <xsl:param name="builds_to_ant.xsl" required="yes"/>
     <!-- second step fist loop - with data -->
     <!--<xsl:param name="wfs_output.xml"/>--> <!-- to be set in second step by ant build generated by this style to fill by its data childs -->
     
@@ -55,12 +60,14 @@
         <xsl:param name="loop_xpath" select="$loop_xpath"/>
         <xsl:param name="loop_xpath_save" select="$loop_xpath_save"/><!-- tutaj zapisal sie build z wezla z parent -->
         <xsl:param name="input_obj_with_xpath" /> <!-- przekazany z template  match="RelatedFeature" mode="after_first_ant_assing_vars_childs" -->
+        <xsl:param name="feature_pos"  select="1"/> <!-- przekazany z  template  match="RelatedFeature" mode="after_first_ant_assing_vars_childs"-->
         <xsl:choose>
             <xsl:when test="name()='RelatedFeature'">
                 <xsl:variable name="RelatedFeatureCount" select="last()"/>
                 <xsl:variable name="RelatedFeaturePos" select="position()"/>
                 <xsl:variable name="featureID_name" select="substring-after($typeName,':')"/>
                 <xsl:message>#58 bylo $loop_xpath=<xsl:value-of select="$loop_xpath"/>; $basedir=<xsl:value-of select="$basedir"/>; </xsl:message>
+                <xsl:variable name="loop_xpath_real" select="$loop_xpath"/>
                 <xsl:variable name="loop_xpath">
                     <xsl:choose>
                         <xsl:when test="$loop_xpath='root'">
@@ -75,9 +82,8 @@
                 <!--<xsl:variable name="wfs_output" select="concat($uuid,'.',$loop_xpath,'_x2f_',$featureID_name)"/>-->
                 <xsl:variable name="wfs_output" select="concat($uuid,'.',$loop_xpath)"/>
                 <!--<xsl:variable name="wfs_output.xml" select="concat($wfs_output,'.',position(),'.xml')"/>-->
-                <xsl:variable name="wfs_output.xml" select="concat($wfs_output,'.',position(),'.xml')"/>
-                
-                <xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.',position(),'.dita.xml')"/>
+                <xsl:variable name="wfs_output.xml" select="concat($wfs_output,'.',position(),'.',$feature_pos,'.xml')"/>
+                <xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.',position(),'.',$feature_pos,'.dita.xml')"/>
                 <!--<xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.',position(),'.','.dita.xml')"/>-->
                 <!-- dane z oczekiwanego template .dita -->
                 <xsl:variable name="xpath_dita" select="@xpath"/>
@@ -106,9 +112,10 @@
                         </xsl:otherwise>
                     </xsl:choose>
                 </xsl:variable>
-                <xsl:message>#71 wstawiam projekt $loop_xpath=<xsl:value-of select="$loop_xpath"/>; </xsl:message>
-                <project basedir="../." name="get_related_feature" default="get_related_feature_run_child_ant">
+                <xsl:message>#71 wstawiam projekt $feature_pos=<xsl:value-of select="$feature_pos"/>; $loop_xpath=<xsl:value-of select="$loop_xpath"/>; </xsl:message>
+                <project basedir="../." name="get_related_feature{$loop_xpath_real}" default="get_related_feature_run_child_ant{$loop_xpath_real}">
                     <xsl:comment>RelatedFeatureCount:<xsl:value-of select="count(*)"/></xsl:comment>
+                    <echo> ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>; projekt <xsl:value-of select="$loop_xpath_real"/>; </echo>
                     <!--<xsl:variable name="typeName" select='replace($typeName,"&quot;","")'/>--><!-- oczyszczenie z apostrofow -->
                     <xsl:element name="property">
                         <xsl:attribute name="name" select="'uuid'"/>
@@ -126,6 +133,18 @@
                         <xsl:attribute name="name" select="'webRootUrl'"/>
                         <xsl:attribute name="value" select="$webRootUrl"/>
                     </xsl:element>
+                    <xsl:element name="property">
+                        <xsl:attribute name="name" select="'build_recurse_ant.xsl'"/>
+                        <xsl:attribute name="value" select="$build_recurse_ant.xsl"/>
+                    </xsl:element>
+                    <xsl:element name="property">
+                        <xsl:attribute name="name" select="'temp'"/>
+                        <xsl:attribute name="value" select="$temp"/>
+                    </xsl:element>
+                    <xsl:element name="property">
+                        <xsl:attribute name="name" select="'builds_to_ant.xsl'"/>
+                        <xsl:attribute name="value" select="$builds_to_ant.xsl"/>
+                    </xsl:element>
                     <xsl:comment>
                         Important variables:
                         typeName=<xsl:value-of select="$typeName"/>;
@@ -133,8 +152,7 @@
                         xpath_value=<xsl:value-of select="$xpath_value"/>;
                         $passwordBase64Basic=<xsl:value-of select="$passwordBase64Basic"/>
                     </xsl:comment>
-                    
-                    
+
                     <xsl:apply-templates mode="ant_target" select=".">
                         <xsl:with-param name="typeName_dita" select="$typeName_dita"/>
                         <xsl:with-param name="featureID_name_dita" select="$featureID_name_dita"/>
@@ -150,9 +168,11 @@
                         <xsl:with-param name="typeName" select="$typeName"/>
                         <xsl:with-param name="xpath_value" select="$xpath_value"/>
                         <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
+                        <xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
                         <!--<xsl:with-param name="loop_xpath_save" select="$loop_xpath_save"/>-->
                         <xsl:with-param name="xml_id" select="$xml_id"/>
                         <!--<xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>-->
+                        <xsl:with-param name="feature_pos"   select="$feature_pos"/>
                     </xsl:apply-templates>
                     <!-- na koniec przetwarzania kazdego z wezlow, podmieniamy xsl biezacy wezel -->
                     
@@ -164,20 +184,20 @@
                     <xsl:variable name="loop_xpath_child" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>
                     <xsl:message>#142 ustalamy $loop_xpath_child=<xsl:value-of select="$loop_xpath_child"/></xsl:message>
                     <xsl:element name="target">
-                        <xsl:attribute name="name" select="'get_related_feature_run_child_ant'"/>
-                        <xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos)"/>
-                    <xsl:choose>
+                        <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant',$loop_xpath_real)"/>
+                        <xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos,$loop_xpath_real)"/>
+                    <!--<xsl:choose>
                         <xsl:when test=".//(RelatedFeature|RelatedFeatureRoot)">
-                            <xsl:for-each select=".//RelatedFeature">
+                            <xsl:for-each select=".//RelatedFeature[ not(child::node()/name()='RelatedFeature')]">
                                 <xsl:variable name="loop_xpath_child_ant" select="concat($loop_xpath_save,'_x2f_.',@xml_id,'.',$featureID_name)"/>
                                 <xsl:message>#148 ustalamy $loop_xpath_child_ant=<xsl:value-of select="$loop_xpath_child_ant"/></xsl:message>
-                               <!-- <xsl:element name="target">
-                                    <xsl:attribute name="name" select="$loop_xpath_child_ant"/><!-\-'get_related_feature_run_child_ant'-\->
-                                    <xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos)"/>-->
-                                <!--<ant antfile="temp/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.xml" dir="."/>-->
-                                <ant antfile="temp/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.xml" dir="."/>
+                               <!-\- <xsl:element name="target">
+                                    <xsl:attribute name="name" select="$loop_xpath_child_ant"/><!-\\-'get_related_feature_run_child_ant'-\\->
+                                    <xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos)"/>-\->
+                                <!-\-<ant antfile="temp/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.xml" dir="."/>-\->
+                                <ant antfile="temp/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml" dir="."/>
                                 
-                                <!--</xsl:element>-->
+                                <!-\-</xsl:element>-\->
                                 <xsl:if test=" position()=last()">
                                     <xsl:comment>Tu task z related</xsl:comment>
                                 </xsl:if>
@@ -185,19 +205,24 @@
                         </xsl:when>
                         <xsl:otherwise>
                             <xsl:comment>#135 nie ma wiecej //RelatedFeature</xsl:comment>
-                            <!--<xsl:element name="target">
+                            <!-\-<xsl:element name="target">
                                 <xsl:attribute name="name" select="'get_related_feature_run_child_ant'"/>
                                 <xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos)"/>
-                            </xsl:element>-->
+                            </xsl:element>-\->
                         </xsl:otherwise>
-                    </xsl:choose>
+                    </xsl:choose>-->
+                        <!-- wstawienie subanta dla biezacych dzieci only -->
+                        <xsl:apply-templates mode="place_subant">
+                            <xsl:with-param name="uuid" select="$uuid"/>
+                            <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
+                            <xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
+                        </xsl:apply-templates>
                     </xsl:element>
                     <!-- na koniec przetwarzania danego zaglebienia uruchamiamy calosc ponownie do kolejnego zaglebienia -->
                     
                     <!-- task do polaczenia zaglebien -->
                     
                     <!-- jak nie ma zaglebien to generujemy pdf i dajemy uzytkownikowi linka  -->
-                    
                 </project>
             </xsl:when>
             <xsl:otherwise>
@@ -207,6 +232,81 @@
     </xsl:template>
     
     
+    
+    <xsl:template mode="place_subant" match="RelatedFeature">
+        <xsl:param name="uuid" required="yes"/>
+        <xsl:param name="loop_xpath" required="yes"/>
+        <xsl:param name="loop_xpath_real" required="yes"/>
+        <!-- wygenerujemy liste ant -->
+        
+        <echo> #235 ant szukam fileset id=builds_to_ant w <xsl:value-of select="concat($uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.*.xml')"/> </echo>
+        <fileset id="builds_to_ant{$loop_xpath_real}" dir="temp" includes="{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.*.xml" />
+        
+        <property name="builds_to_ant{$loop_xpath_real}" refid="builds_to_ant{$loop_xpath_real}"/>
+        <!--<tempfile property="builds_to_ant.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.builds_to_ant-"/>-->
+        <xsl:element name="tempfile">
+            <xsl:attribute name="property" select="concat('builds_to_ant.xml',$loop_xpath_real)"/>
+            <xsl:attribute name="deleteonexit" select="'no'"/>
+            <xsl:attribute name="destdir" select="'temp'"/>
+            <xsl:attribute name="suffix" select="'.xml'"/>
+            <xsl:attribute name="prefix" select="'${uuid}.builds_to_ant-'"/>
+        </xsl:element>
+        <!--<tempfile property="builds_to_ant_file.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.build_to_ant_file-"/>-->
+        <xsl:element name="tempfile">
+            <xsl:attribute name="property" select="concat('builds_to_ant_file.xml',$loop_xpath_real)"/>
+            <xsl:attribute name="deleteonexit" select="'no'"/>
+            <xsl:attribute name="destdir" select="'temp'"/>
+            <xsl:attribute name="suffix" select="'.xml'"/>
+            <xsl:attribute name="prefix" select="'${uuid}.build_to_ant_file-'"/>
+        </xsl:element>
+        <echo>#235 ant do: builds_to_ant.xml=${builds_to_ant_file.xml} mode="place_subant" match="RelatedFeature" </echo>
+        <!--<echoxml file="'${builds_to_ant.xml}'"><builds_to_ant>${builds_to_ant}</builds_to_ant></echoxml>-->
+        <xsl:element name="echoxml">
+            <xsl:attribute name="file" select="concat('${builds_to_ant.xml',$loop_xpath_real,'}')"/>
+            <builds_to_ant>${builds_to_ant<xsl:value-of select="$loop_xpath_real"/>}</builds_to_ant>
+        </xsl:element>
+        <xsl:element name="xslt">
+            <xsl:attribute name="basedir" select="'./'"/>
+            <xsl:attribute name="style" select="$builds_to_ant.xsl"/>
+            <xsl:attribute name="in" select="concat('${builds_to_ant.xml',$loop_xpath_real,'}')"/>
+            <xsl:attribute name="destdir" select="'./'"/>
+            <xsl:attribute name="out" select="concat('${builds_to_ant_file.xml',$loop_xpath_real,'}')"/>
+            <factory name="net.sf.saxon.TransformerFactoryImpl">
+                <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
+                <!--<attribute name="http://saxon.sf.net/feature/initialMode"
+               value="after_first_ant_assing_vars"/>-->
+            </factory>
+            
+            <param name="temp" expression="{$temp}"/>
+            <param name="loop_xpath_real" expression="{$loop_xpath_real}"/>
+            <!--<xsl:element name="param">
+                <xsl:attribute name="name" select="'default_antfile'"/>
+                <xsl:attribute name="expression" select="concat($temp,'/',$builds_to_ant_file.xml"/>
+            </xsl:element>-->
+            <param name="default_antfile" expression="{$temp}/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml"/>
+            <classpath location="/opt/local/share/java/saxon9he.jar"/>
+        </xsl:element>
+        
+        <!--<ant antfile="{$temp}/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml" dir="."/>-->
+        
+        <xsl:element name="ant">
+            <xsl:attribute name="antfile" select="concat('${builds_to_ant_file.xml',$loop_xpath_real,'}')"/>
+        </xsl:element>
+        <!--<ant antfile="{$temp}/${builds_to_ant_file.xml}" dir="."/>-->
+        
+    </xsl:template>
+    <xsl:template mode="place_subant" match="*">
+        <xsl:param name="uuid" required="yes"/>
+        <xsl:param name="loop_xpath" required="yes"/>
+        <xsl:param name="loop_xpath_real" required="yes"/>
+        <xsl:apply-templates mode="place_subant">
+            <xsl:with-param name="uuid" select="$uuid"/>
+            <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
+            <xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
+        </xsl:apply-templates>
+    </xsl:template>
+    <xsl:template mode="place_subant" match="text()|comment()"/>
+    
     <xsl:template mode="child_nodes" match="*">
         <xsl:copy-of select="."/>
     </xsl:template>
@@ -229,6 +329,8 @@
         <xsl:param name="loop_xpath"  required="yes"/>
         <!--<xsl:param name="loop_xpath_save"  required="yes"/>-->
         <xsl:param name="xml_id"  required="yes"/>
+        <xsl:param name="feature_pos"   required="yes"/>
+        <xsl:param name="loop_xpath_real" required="yes"/>
         <xsl:choose>
             <xsl:when test="$wfs_output"/>
             <xsl:otherwise><xsl:message terminate="yes">Not required param wfs_output - nazwa temp sciagniecia z api xml forsowana przez pierwsze sciagniecie - to set by next parraler step in ant build  </xsl:message></xsl:otherwise>
@@ -261,13 +363,12 @@
                          <!--<xsl:value-of select="$api_url"/>/default_db/?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=<xsl:value-of select="$typeName_dita"/>&amp;SRSNAME=EPSG:3003&amp;featureID=<xsl:value-of select="$featureID_name_dita"/>.<xsl:value-of select="$xpath_value_dita"/>-->
                          <xsl:value-of select="$api_url"/>/default_db/?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=<xsl:value-of select="$typeName_dita"/>&amp;SRSNAME=EPSG:3003<xsl:value-of select="$OGC_Filter"/>
                      </xsl:variable>
-
                             <xsl:element name="target">
-                                <xsl:attribute name="name" select="concat('get_related_feature.',position())"/>
+                                <xsl:attribute name="name" select="concat('get_related_feature.',position(),$loop_xpath_real)"/>
                                 <xsl:choose>
                                     <xsl:when test="$RelatedFeatureCount=$RelatedFeaturePos"/>
                                     <xsl:otherwise>
-                                        <xsl:attribute name="depends" select="concat('get_related_feature.',position()-1)"/>
+                                        <xsl:attribute name="depends" select="concat('get_related_feature.',position()-1),$loop_xpath_real"/>
                                     </xsl:otherwise>
                                 </xsl:choose>
                                 
@@ -298,7 +399,7 @@
                                     </xsl:choose>
                                     <echo> related .dita.xml template is: $wfs_output.dita=<xsl:value-of select="$wfs_output.dita"/>; do przetwarzania na podstawie: $wfs_output.xml=<xsl:value-of select="$wfs_output.xml"/>;</echo>
                                     <xsl:comment> teraz podmieniamy dane z otrzymanego xmla do pliku dita aby potem zrobic polaczony plik  w kolejnym wyzwoleniu ant</xsl:comment>
-                                    <!--<delete file="temp/{$wfs_output.dita}.vals.dita"/>-->
+                                    <delete file="temp/{$wfs_output.dita}.vals.dita"/>
                                     <xslt basedir="./" style="{$build_recurse_ant.xsl}" in="temp/{$wfs_output.dita}"  destdir="./" out="temp/{$wfs_output.dita}.vals.dita" >
                                             <factory name="net.sf.saxon.TransformerFactoryImpl">    
                                                 <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
@@ -315,15 +416,36 @@
                                             <param name="basedir" expression="{$basedir}"/>
                                             <param name="build_recurse_ant.xsl" expression="{$build_recurse_ant.xsl}"/>
                                             <param name="passwordBase64Basic" expression="{$passwordBase64Basic}"/>
+                                            <param name="feature_pos" expression="{$feature_pos}"/> <!-- aby wsadzic nr wezla do $wfs_output.dita.vals.dita -->
+                                            <param name="build_recurse_ant.xsl" expression="{$build_recurse_ant.xsl}"/>
+                                            <param name="temp" expression="{$temp}"/>
+                                            <param name="builds_to_ant.xsl" expression="{$builds_to_ant.xsl}"/>
                                     </xslt>
                             </xsl:element>
                         <!-- zapisujemy wynik naszego biezacego przetwarzania dita element nizej do kolejnego przejechania z ant wyniku dla podstawienia danych  -->
                         <!-- blad - result jest po tym template -->
-                     <xsl:message>#276  $xml_id=<xsl:value-of select="$xml_id"/>; writing $wfs_output.dita to <xsl:value-of select="$wfs_output.dita"/>;</xsl:message>
-                     <xsl:result-document href="{$wfs_output.dita}">
-                         <xsl:comment>current $loop_xpath=<xsl:value-of select="$loop_xpath"/>;</xsl:comment>
-                         <xsl:copy-of select="."/></xsl:result-document>
-                 </xsl:when>
+                        <xsl:message>#276  $feature_pos=<xsl:value-of select="$feature_pos"/>; $xml_id=<xsl:value-of select="$xml_id"/>; writing $wfs_output.dita to <xsl:value-of select="$wfs_output.dita"/>;</xsl:message>
+                             <!-- ten plik moze byc raz bo zawiera tylko mape do przeksztalcenia danego wezla -->
+                            <xsl:result-document href="{$wfs_output.dita}">
+                                <xsl:comment>current $feature_pos=<xsl:value-of select="$feature_pos"/>; $loop_xpath=<xsl:value-of select="$loop_xpath"/>;</xsl:comment>
+                                <!--<xsl:copy-of select="."/>-->
+                                <xsl:element name="{name()}">
+                                    <xsl:copy-of select="@*"/>
+                                    <xsl:attribute name="feature_pos" select="$feature_pos"/>
+                                    <xsl:copy-of select="./*" exclude-result-prefixes="#all" copy-namespaces="no"/>
+                                </xsl:element>
+                            </xsl:result-document>
+                            <!--<xsl:choose>
+                                <xsl:when test="$feature_pos=1"><xsl:message>#327 propably first unaviable (<xsl:value-of select="$wfs_output.dita"/>) - writing</xsl:message>
+                                    <xsl:result-document href="{$wfs_output.dita}">
+                                        <xsl:comment>current $loop_xpath=<xsl:value-of select="$loop_xpath"/>;</xsl:comment>
+                                        <xsl:copy-of select="."/></xsl:result-document>
+                                </xsl:when>
+                                <xsl:otherwise>
+                                    <xsl:message>#227.1 probably exists file:<xsl:value-of select="$wfs_output.dita"/>; - bypassing </xsl:message>
+                                </xsl:otherwise>
+                            </xsl:choose>-->
+                     </xsl:when>
                  <xsl:otherwise>
                      <error>
                          <xsl:attribute name="xpath" select="$xpath"/>
@@ -334,7 +456,11 @@
                          <xsl:attribute name="typeName_dita" select="$typeName_dita"/>
                          <xsl:attribute name="featureID_name" select="$featureID_name"/>
                          <xsl:attribute name="featureID_name_dita" select="$featureID_name_dita"/>
-                         Current template doesnt fit the requested data - TODO search for another template!
+                         <echo message="OUTPUT__START"/>
+                                <echo>
+                                Current template doesnt fit the requested data - TODO search for another template!
+                                </echo>
+                         <echo message="OUTPUT__END"/>
                      </error>
                  </xsl:otherwise>
              </xsl:choose>
@@ -443,8 +569,15 @@
         <!--<debug_358_RelatedFeature>
             <xsl:copy-of select="$input_obj_with_xpath"/>
         </debug_358_RelatedFeature>-->
-        <xsl:message>#389  jest okazja do zrobienia bilda $xml_id_parent=<xsl:value-of select="$xml_id_parent"/>; $xml_id=<xsl:value-of select="$xml_id"/>;  result-document=<xsl:value-of select="concat($uuid,'.build_',$loop_xpath,'.xml')"/> match=RelatedFeature mode=after_first_ant_assing_vars_childs  </xsl:message>
-        <xsl:result-document href="{$uuid}.build_{$loop_xpath}.xml">
+        <!--<xsl:variable name="feature_pos">
+            <xsl:choose>
+                <xsl:when test="$feature_pos=1"/>
+                <xsl:otherwise><xsl:value-of select="$feature_pos"/></xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>-->
+        <xsl:message>#389  jest okazja do zrobienia bilda $feature_pos=<xsl:value-of select="$feature_pos"/> $xml_id_parent=<xsl:value-of select="$xml_id_parent"/>; $xml_id=<xsl:value-of select="$xml_id"/>;  result-document=<xsl:value-of select="concat($uuid,'.build_',$loop_xpath,'.xml')"/> match=RelatedFeature mode=after_first_ant_assing_vars_childs  </xsl:message>
+            
+        <xsl:result-document href="{$uuid}.build_{$loop_xpath}.{$feature_pos}.xml">
             <xsl:apply-templates select=".">
                 <xsl:with-param name="typeName" select="@typeName"/>
                 <xsl:with-param name="xpath" select="@xpath"/>
@@ -454,6 +587,7 @@
                 <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
                 <xsl:with-param name="wfs_output" select="concat($uuid,'.',$loop_xpath)" />
                 <xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>
+                <xsl:with-param name="feature_pos"   select="$feature_pos"/>
                 <!--<xsl:with-param name="wfs_output.xml" />-->
             </xsl:apply-templates>
         </xsl:result-document>

+ 96 - 13
SE/schema/default_db_xml_cache.public/build_recurse_ant_merge_dita_from_temp.xsl

@@ -13,57 +13,140 @@
     
     <xsl:param name="uuid" required="yes"/>
     <xsl:param name="basedir" required="yes"/>
+    <xsl:param name="temp" required="yes"/>
     
     <!-- template do zlaczenia wszystkich xmli z danymi z dita 
     description="z plikow temp/$uuid.* buduje $out_task.dita " -->
     
     
+    
+    
+    <xsl:template name="get_childs_rows">
+        <xsl:param name="element-filename"  required="yes"/> <!-- prezes1.root_x2f_.d1e1.CRM_PROCES_x2f_.d1e46.CRM_WSKAZNIK_x2f_.d1e51.CRM_LISTA_ZASOBOW.1. -->
+        <xsl:param name="path2collection" select="concat($temp,'/')"/> <!-- $basedir,'/' -->
+        <xsl:variable name="path">
+            <xsl:value-of select="concat($path2collection,'?select=',$element-filename,'*.dita.xml.vals.dita')"/> <!-- $element-filename,'-->
+        </xsl:variable>
+        <xsl:message>#30 otwieram kolekcje $path=<xsl:value-of select="$path"/>; </xsl:message>
+        
+        <!--<xsl:variable name="docs" select="collection($path)"/>-->
+        <!--<xsl:variable name="docs" select="collection($path)"/>-->
+        <!--<xsl:for-each select="$docs">
+            <xsl:message>#35 test - cos jest <xsl:value-of select="name()"/></xsl:message>
+            <xsl:copy-of select="."/>
+        </xsl:for-each>-->
+        <xsl:copy-of select="collection($path)"/>
+
+    </xsl:template>
+    
+    
+    
+    <xsl:template match="*" mode="root">
+        <xsl:param name="loop_xpath"/>
+        <xsl:element name="{name()}">
+            <xsl:copy-of select="@*"/>
+            <xsl:apply-templates>
+                <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
+            </xsl:apply-templates>
+        </xsl:element>
+    </xsl:template>
+    
+    
     <xsl:template match="RelatedFeature">
         <!-- podstawamy dane z xml na podstawie path -->
         <xsl:param name="loop_xpath" select="'root'"/>
+        <xsl:param name="feature_pos_child"  select="1"/> <!-- pierwsze wyzwolenie narzuca 1 - kolejne sa z related -->
+        <xsl:variable name="xml_id" select="@xml_id"/>
         <xsl:variable name="RelatedFeaturePos" select="position()"/>
         <xsl:variable name="featureID_name" select="substring-after(@typeName,':')"/>
-        <xsl:variable name="xml_id" select="@xml_id"/>
+        
         <xsl:variable name="loop_xpath" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>
 
-        <xsl:message>#26 odpalam loop_xpath=<xsl:value-of select="$loop_xpath"/>.dita.xml.vals.dita;</xsl:message>
+        <xsl:message>#26 odpalam $feature_pos_child=<xsl:value-of select="$feature_pos_child"/>; loop_xpath=<xsl:value-of select="$loop_xpath"/>.dita.xml.vals.dita;</xsl:message>
         <!--<debug26>
             Will try to put file=<xsl:value-of select="concat($uuid,'.',$loop_xpath,$featureID_name,'.',$RelatedFeaturePos,'.dita.xml.vals.dita')"/>;
         </debug26>-->
-        <xsl:variable name="dita_fragment" select="doc(concat($basedir,'/temp/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.dita.xml.vals.dita'))"/>
+        <!--<xsl:variable name="dita_fragment" select="doc(concat($basedir,'/temp/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.dita.xml.vals.dita'))"/>-->
         
-        <xsl:apply-templates mode="RelatedFeature" select="$dita_fragment/RelatedFeatureRoot/*">
-            <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
-        </xsl:apply-templates>
+        <xsl:variable name="dita_fragment">
+            <xsl:choose>
+                <xsl:when test=" doc-available(concat($basedir,'/',$temp,'/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.',$feature_pos_child,'.dita.xml.vals.dita'))">
+                    <xsl:copy-of select="doc(concat($basedir,'/',$temp,'/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.',$feature_pos_child,'.dita.xml.vals.dita'))"/>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:comment>#78 INFO no Related leaf xml file <xsl:value-of select="concat($basedir,'/temp/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.',$feature_pos_child,'.dita.xml.vals.dita')"/>;</xsl:comment>
+                    <xsl:message>#78 INFO no Related leaf xml file <xsl:value-of select="concat($basedir,'/temp/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.',$feature_pos_child,'.dita.xml.vals.dita')"/></xsl:message>
+                </xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        <!--<xsl:variable name="dita_fragment" select="doc(concat($basedir,'/temp/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.',$feature_pos_child,'.dita.xml.vals.dita'))"/>-->
+        <!--<xsl:variable name="dita_fragment">
+            <xsl:call-template name="get_childs_rows">
+                <xsl:with-param name="element-filename" select="concat($uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.')"/>
+            </xsl:call-template>
+        </xsl:variable>-->
+         
+        <!--<debug_RelatedFeature>
+            <xsl:copy-of select="$dita_fragment"/>
+        </debug_RelatedFeature>-->
+        
+        <xsl:for-each select="$dita_fragment">
+            <xsl:apply-templates mode="RelatedFeature" select="$dita_fragment/RelatedFeatureRoot/*">
+                <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
+            </xsl:apply-templates>
+        </xsl:for-each>
     </xsl:template>
     
-    <xsl:template mode="RelatedFeature" match="RelatedFeature">
+    <xsl:template mode="RelatedFeature" match="*">
         <xsl:param name="loop_xpath" required="yes"/>
-        <xsl:apply-templates select=".">
-            <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
-        </xsl:apply-templates>
+        <!--<xsl:element name="{name()}">-->
+            <!--<xsl:copy-of select="@*"/>-->
+            <!--<xsl:apply-templates select="@*"/>-->
+            <xsl:message>#94 ustalam $feature_pos_child=<xsl:value-of select="position()"/>; dla <xsl:value-of select="name()"/></xsl:message>
+            <xsl:apply-templates mode="RelatedFeatureChild" select=".">
+                <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
+                <xsl:with-param name="feature_pos_child" select="position()"/>
+            </xsl:apply-templates>
+        <!--</xsl:element>-->
     </xsl:template>
     
-    <xsl:template mode="RelatedFeature" match="*">
+    <xsl:template mode="RelatedFeatureChild" match="*">
         <xsl:param name="loop_xpath" required="yes"/>
+        <xsl:param name="feature_pos_child" required="yes"/>
         <xsl:element name="{name()}">
             <!--<xsl:copy-of select="@*"/>-->
             <xsl:apply-templates select="@*"/>
-            <xsl:apply-templates mode="RelatedFeature">
+            <xsl:apply-templates mode="RelatedFeatureChild">
                 <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
+                <xsl:with-param name="feature_pos_child" select="$feature_pos_child"/>
             </xsl:apply-templates>
         </xsl:element>
     </xsl:template>
     
+    <xsl:template mode="RelatedFeatureChild" match="RelatedFeature">
+        <xsl:param name="loop_xpath" required="yes"/>
+        <xsl:param name="feature_pos_child" required="yes"/>
+        <xsl:apply-templates select=".">
+            <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
+            <xsl:with-param name="feature_pos_child" select="$feature_pos_child"/>
+        </xsl:apply-templates>
+    </xsl:template>
+    
+    
+    
     
   
     
-    <xsl:template match="*">
+    
+    
+    <xsl:template match="*" >
         <xsl:param name="loop_xpath"/>
+        <xsl:param name="feature_pos_child" required="yes"/>
         <xsl:element name="{name()}">
             <xsl:copy-of select="@*"/>
             <xsl:apply-templates>
                 <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
+                <xsl:with-param name="feature_pos_child" select="$feature_pos_child"/>
             </xsl:apply-templates>
         </xsl:element>
     </xsl:template>

+ 46 - 0
SE/schema/default_db_xml_cache.public/builds_to_ant.xsl

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+    <!-- template do zbudowania listy podzadan na podsatwie <fileset id="builds_to_ant" dir="temp" includes="prezes1.build_root_x2f_.d1e1.CRM_PROCES_x2f_.d1e46.CRM_WSKAZNIK_x2f_.d1e51.CRM_LISTA_ZASOBOW.*" />  -->
+    
+    <xsl:output indent="yes"/>
+    <xsl:strip-space elements="*"/>
+    
+    <xsl:param name="temp" required="yes"/>
+    <xsl:param name="default_antfile"/>
+    <!--<xsl:param name="loop_xpath" required="yes"/>-->
+    <xsl:param name="loop_xpath_real" required="yes"/>
+    <xsl:template match="builds_to_ant">
+        <project xmlns:gml="http://www.opengis.net/gml"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xmlns:xlink="http://www.w3.org/1999/xlink"
+            xmlns:p5_default_db="https://biuro.biall-net.pl/wfs/default_db"
+            xmlns:wfs="http://www.opengis.net/wfs"
+            xmlns:ogc="http://www.opengis.net/ogc"
+            xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+            basedir="../."
+            name="builds_to_ant_proj{$loop_xpath_real}"
+            default="builds_to_ant{$loop_xpath_real}">
+            <target name="builds_to_ant{$loop_xpath_real}">
+                <xsl:comment> default_antfile: <xsl:value-of select="$default_antfile"/> ; </xsl:comment>
+                
+            <xsl:for-each select="tokenize(.,';')">
+                <echo>
+                    #
+                    #    
+                    #
+                    #
+                        builds_to_ant - za chwile uruchomie antfile  temp/<xsl:value-of select="."/>;
+                    #
+                    #
+                </echo>
+                <ant antfile="{$temp}/{.}" dir="."/>
+            </xsl:for-each>
+            </target>
+        </project>
+    </xsl:template>
+    
+</xsl:stylesheet>