build_recurse_ant.xsl 198 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357
  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:gml="http://www.opengis.net/gml"
  5. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  6. xmlns:xlink="http://www.w3.org/1999/xlink"
  7. xmlns:p5_default_db="https://biuro.biall-net.pl/wfs/default_db"
  8. xmlns:default_db="https://biuro.biall-net.pl/wfs/default_db"
  9. xmlns:wfs="http://www.opengis.net/wfs"
  10. xmlns:ogc="http://www.opengis.net/ogc"
  11. xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
  12. xmlns:p5_tr_map="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/procesy5_translate_map.xsd"
  13. xmlns:p5opr="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd"
  14. exclude-result-prefixes="xs"
  15. version="2.0">
  16. <xsl:output indent="yes" />
  17. <xsl:strip-space elements="*"/>
  18. <!-- Copyright BIALL-NET sp. z o.o. 2017-03-01 by Arkadiusz Binder wszelkie prawa zastrzeżone -->
  19. <!-- @2017-03-01 modyfikacja dla potrzeb CRM_PROCES_tree - sa bledy-->
  20. <xsl:include href="get_all_xsd.xsl"/>
  21. <!--<xsl:include href="escaped_html_to_xml.xsl"/>-->
  22. <!--
  23. <property name="url" value="${url}"/> - to point what is record/table to download
  24. <property name="uuid" value="${uuid}"/> it is automatically also set to enable uinque transaction and to allow to save data with user
  25. <property name="passwordBase64Basic" value="${passwordBase64Basic}"/> - this is also set - to enable communicate with API -
  26. <property name="DwebRootUrl" value="${$webRootUrl}"/> - this is the place where script is localized to easyli to target user GUI by href to generated output -->
  27. <!-- variables to be set first by GUI first_request from executing API (php -> bash)-->
  28. <xsl:param name="uuid" required="yes" /> <!-- pewnie bedziemy ignorowac i dzialac na bazie ${'wfs_output'} ktory juz jest tempfilem -->
  29. <xsl:param name="passwordBase64Basic" required="yes" />
  30. <!--<xsl:param name="url" />-->
  31. <xsl:param name="webRootUrl" />
  32. <xsl:param name="basedir" required="yes"/> <!-- aktualny katalog gdzie znajduja sie pliki temp -->
  33. <xsl:param name="recurse_ant_basedir" required="yes"/> <!-- aktualny katalog gdzie znajduja sie pliki temp -->
  34. <xsl:param name="recurse_ant_basedir.temp" required="yes"/>
  35. <xsl:param name="recurse_ant" required="yes"/> <!-- for <property name="default_db:recurse_ant" value="${default_db:recurse_ant}"/>-->
  36. <!--<xsl:param name="out_task.dita"/>--> <!-- nazwa temp docelowego zrodla do wykonania pliku pdf -->
  37. <!--<xsl:param name="current_leaf.dita" required="yes"/>--> <!-- nazwa aktualnego przetowarzenia .dita - najpierw main_build_recurse_ant.dita potem przechodzi w 1.1.root_x2f_IN7_DZIENNIK_KORESP.1.dita.xml -->
  38. <!--<xsl:param name="wfs_output" select="concat('temp/wfs_output.',$uuid)"/>-->
  39. <!-- jak parametr jest to znaczy, ze przetwarzamy -->
  40. <xsl:param name="wfs_output" required="no"/> <!-- potem wfs_output.xml jak sciagnie nazwa temp sciagniecia z api xml forsowana przez pierwsze sciagniecie -->
  41. <xsl:param name="api_url" required="yes"/>
  42. <!--<xsl:param name="namespace_prefix" select="'p5_default_db'"/>-->
  43. <xsl:param name="typeName" required="yes" /> <!-- to be set initially ex: p5_default_db:IN7_DZIENNIK_KORESP -->
  44. <xsl:param name="xpath" required="yes" /> <!-- to be set initially ex: ID -->
  45. <xsl:param name="xpath_value" required="yes" /> <!-- to be set ex: 1000 -->
  46. <xsl:param name="loop_xpath" required="yes"/> <!-- sciezka do zapisywania xmli w przetwarzaniu plikow default root -->
  47. <xsl:param name="loop_xpath_save" required="yes"/> <!-- przekazany z template match="RelatedFeature" mode="after_first_ant_assing_vars_childs" -->
  48. <!-- static project variables as default styles.dita/xsl and names-->
  49. <xsl:param name="main_build_recurse_ant.dita" select="'main_build_recurse_ant.dita'"/>
  50. <xsl:param name="xml_id_parent" select="@xml_id"/>
  51. <xsl:param name="build_recurse_ant.xsl" required="yes"/>
  52. <xsl:param name="temp" required="yes"/>
  53. <xsl:param name="builds_to_ant.xsl" required="yes"/>
  54. <xsl:param name="cookie_curl_option" required="yes"/>
  55. <xsl:param name="loop_path_recurs" required="yes" /> <!-- loop path dla gromadzenia plikow dla RelatedFeatureLoop do przetworzen w rekurencji - domysmnie pusty, potem sie dobudowuje po wyzwoleniu anta w glab -->
  56. <xsl:param name="ignore_maxOccurs_0" select="false()"/>
  57. <xsl:param name="xpath_query"/>
  58. <xsl:param name="xpath_query.xsl" required="yes"/>
  59. <xsl:param name="empty.xml" required="yes"/>
  60. <xsl:param name="simpleSchema_dir" required="yes"/>
  61. <!--<xsl:param name="default_db_xml_cache.public" required="yes"/>-->
  62. <xsl:param name="ant-launcher.jar"/>
  63. <xsl:param name="loop_path_recurs_xpath"/><!-- todo do querowania filtrem do zbudowania sciezka obiektu xpath -->
  64. <xsl:param name="build_check_java_process_count.xml" required="yes"/>
  65. <xsl:param name="parallel_java_process_max" required="yes"/>
  66. <xsl:param name="feature_pos" select="1"/> <!-- TODO DEBUG TESTING from PARALLER -->
  67. <xsl:param name="parallel_pos" required="yes"/>
  68. <xsl:param name="debug_xsl_in_filename" required="yes" /> <!-- TODO DEBUG TESTING -->
  69. <xsl:param name="process_locks"/>
  70. <xsl:param name="get_wfs" required="yes"/>
  71. <xsl:param name="debug_xsl_out_filename" required="yes" />
  72. <xsl:param name="debug" select="1"/>
  73. <xsl:param name="recurse_ant_basedir.recurse_cache" />
  74. <xsl:param name="build_recurse_ant_cache_control.xsl" />
  75. <xsl:param name="typeNameRoot" required="yes"/><!-- to cache purpose - to allow child elements cache created to be named from this typeNameRoot -->
  76. <xsl:param name="input_obj_fid_forced"/><!-- to force by build_root.xml (loop) -->
  77. <xsl:param name="p5opr:detect_objects_parent_relations.local" required="yes"/>
  78. <!--<xsl:variable name="temp_current">
  79. <xsl:choose>
  80. <xsl:when test="$temp='temp'">
  81. <xsl:value-of select="concat($recurse_ant_basedir,'/',$temp)"/>
  82. </xsl:when>
  83. <xsl:otherwise>
  84. <xsl:value-of select="concat('temp/',$loop_path_recurs)"/>
  85. </xsl:otherwise>
  86. </xsl:choose>
  87. </xsl:variable>-->
  88. <!-- second step fist loop - with data -->
  89. <!--<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 -->
  90. <!-- opis dzialania template dla przetwarzania wezlow na podstawie schematu i budowania zagniezdzonego pliku xml z
  91. instancjami na podstawie tego samego schematu
  92. wyzwolenie inicjalizujace z build.xml buduje "wyzwolenie glowne" gdzie na output daje wynikowy build.
  93. system wyzwala dwa etapy
  94. wyzwolenie glowne - do okreslenia zaleznosci wezla i zbudowania zapytania o dane
  95. wyzwolenie after_first_ant_assing_vars - do podstawienia danych z wyzwolenia poprzedniego oraz przygotowania build "dla kolejnego X" do wyzwolenia glownego
  96. wyzwolenie glowne - szuka pierwszego RelatedFeature, ktore zawsze domyslnie jest na poczatku template, potem w nim grzebie - jak znajdzie - wchodzi w dol
  97. w ramach tego wyzwolenia przygotowuje task dla biezecego przygotowania ant_build - mode ant_target
  98. w ramach tego wyzwolenia juz musi przeanalizowac jakie sa dalsze zadania do wyzwolenia "dla kolejnego X' ant_build -
  99. mode place_subant (jest okazja do zrobienia builda) do poprawy zagniezdzenia - co robi na podstawie szukania plikow w kontekscie wyzwolenia after_first_ant_assing_vars
  100. wyzwolenie after_first_ant_assing_vars - to wyzwile
  101. to wyzwolenie podstawia dane do dita.vals.xml w celu zlozenia pliku wyjsciowego
  102. to wyzwolenie powinno juz zrobic ant_buildy "dla kolejnego X'
  103. to wyzwolenie korzysta z apply-templates wyzwolenia glownego, w celu przygotowania ant_build
  104. -->
  105. <xsl:template match="*">
  106. <xsl:param name="typeName" select="$typeName" />
  107. <xsl:param name="xpath" select="$xpath" />
  108. <xsl:param name="xpath_value" select="$xpath_value" />
  109. <xsl:param name="loop_xpath" select="$loop_xpath"/>
  110. <xsl:param name="loop_xpath_save" select="$loop_xpath_save"/><!-- tutaj zapisal sie build z wezla z parent -->
  111. <xsl:param name="input_obj_with_xpath" /> <!-- przekazany z template match="RelatedFeature" mode="after_first_ant_assing_vars_childs" -->
  112. <xsl:param name="feature_pos" select="$feature_pos"/> <!-- przekazany z template match="RelatedFeature" mode="after_first_ant_assing_vars_childs"-->
  113. <xsl:param name="loop_path_recurs" select="$loop_path_recurs"/> <!-- przekazany z RelatedFeatureLoop z mode="after_first_ant_assing_vars_childs" -->
  114. <xsl:param name="loop_path_recurs_xpath" select="concat($loop_path_recurs_xpath,'/',@typeName,'[',$feature_pos,']')"/> <!-- todo do querowania filtrem do zbudowania sciezka obiektu xpath -->
  115. <xsl:param name="feature_pos_parent" select="1"/> <!-- @2017-04 bledy z nadpisywaniem dodajemy zapis do przetwarzania na $temp}/{$uuid}.build_{$loop_xpath}.{$feature_pos_parent}.{$feature_pos}.xml -->
  116. <xsl:param name="input_obj_fid">
  117. <empty/>
  118. </xsl:param>
  119. <!--<xsl:variable name="input_obj_fid">
  120. <xsl:choose>
  121. <xsl:when test="$input_obj_fid/@fid">
  122. <xsl:copy-of select="$input_obj_fid"/>
  123. </xsl:when>
  124. <xsl:otherwise>
  125. <empty>
  126. <xsl:attribute name="fid" select="$input_obj_fid_forced"/>
  127. </empty>
  128. </xsl:otherwise>
  129. </xsl:choose>
  130. </xsl:variable>-->
  131. <!-- powinien byc nadany z after_first_ant_assign_vars/... ale moze nie za pierwszym razem -->
  132. <xsl:choose>
  133. <xsl:when test="name()='RelatedFeature'">
  134. <xsl:variable name="RelatedFeatureCount" select="last()"/>
  135. <xsl:variable name="RelatedFeaturePos" select="position()"/> <!-- bylo bug @2017-04 position() -->
  136. <xsl:variable name="featureID_name" select="substring-after($typeName,':')"/>
  137. <xsl:if test="$debug &gt; 2"><xsl:message>#58 bylo $loop_xpath=<xsl:value-of select="$loop_xpath"/>; $basedir=<xsl:value-of select="$basedir"/>; </xsl:message></xsl:if>
  138. <xsl:variable name="loop_xpath_real" select="$loop_xpath"/>
  139. <xsl:variable name="loop_xpath">
  140. <xsl:choose>
  141. <xsl:when test="$loop_xpath='root'">
  142. <xsl:value-of select="concat(@xml_id,'.',$feature_pos)"/> <!-- limit path out ,'.',$featureID_name - TODO czy tak moze byc dla merge ? @2017-04 bylo concat($loop_xpath,'_x2f_.',@xml_id,'.',$featureID_name) -->
  143. </xsl:when>
  144. <xsl:otherwise><xsl:value-of select="$loop_xpath"/></xsl:otherwise>
  145. </xsl:choose>
  146. </xsl:variable>
  147. <xsl:variable name="typeName_dita" select="@typeName"/>
  148. <xsl:variable name="typeNameRealResource">
  149. <!-- override in case of different real resource by filtered resource -->
  150. <xsl:choose>
  151. <xsl:when test="@typeNameRealResource"><xsl:value-of select="@typeNameRealResource"/></xsl:when>
  152. <xsl:otherwise><xsl:value-of select="$typeName_dita"/></xsl:otherwise>
  153. </xsl:choose>
  154. </xsl:variable>
  155. <xsl:variable name="featureID_name_dita" select="substring-after($typeName_dita,':')"/>
  156. <xsl:variable name="xml_id" select="@xml_id"/>
  157. <!--<xsl:variable name="wfs_output" select="concat($uuid,'.',$loop_xpath,'_x2f_',$featureID_name)"/>-->
  158. <xsl:variable name="wfs_output" select="$loop_xpath"/> <!-- bylo concat($uuid,'.',$loop_xpath) -->
  159. <!--<xsl:variable name="wfs_output.xml" select="concat($wfs_output,'.',position(),'.xml')"/>-->
  160. <xsl:variable name="wfs_output.xml" select="concat($wfs_output,'.',$feature_pos_parent,'.',$parallel_pos,'.xml')"/>
  161. <xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.dita.xml')"/>
  162. <!--<xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.',position(),'.','.dita.xml')"/>-->
  163. <!-- dane z oczekiwanego template .dita -->
  164. <xsl:variable name="xpath_dita">
  165. <xsl:choose>
  166. <xsl:when test=" string-length($xpath) &gt;0">
  167. <xsl:value-of select="$xpath"/>
  168. <xsl:if test="$debug &gt; 2"><xsl:message>#121 narzucam $xpath=(<xsl:value-of select="$xpath"/>) z wyzwolenia build.xml </xsl:message></xsl:if>
  169. </xsl:when>
  170. <xsl:otherwise><xsl:value-of select="@xpath"/></xsl:otherwise>
  171. </xsl:choose>
  172. </xsl:variable>
  173. <xsl:variable name="xpath_value_dita">
  174. <xsl:choose>
  175. <xsl:when test="@xpath_value">
  176. <!--<xsl:variable name="xpath_value_tokens" select="tokenize(@xpath_value,'/')"/>-->
  177. <!--<xsl:value-of select="'todo zapytanie xpath do przetworzenia'"/>-->
  178. <!--<xsl:copy-of select="$xpath_value_tokens"></xsl:copy-of>-->
  179. <!--<xsl:message>#67 probuje ustalic dla featureID_name=<xsl:value-of select="$featureID_name"/>; wartosc z @xpath_value=<xsl:value-of select="@xpath_value"/>; $input_obj_with_xpath/node()[@xpath="ID_BILLING_OWNER"] =<xsl:value-of select="$input_obj_with_xpath/node()[@xpath='ID_BILLING_OWNER']"/>; </xsl:message>-->
  180. <xsl:if test="$debug &gt; 2"><xsl:message>#67.1 $input_obj_with_xpath: <xsl:copy-of select="$input_obj_with_xpath"/> </xsl:message></xsl:if>
  181. <!--<xsl:variable name="xpath_value_token">-->
  182. <xsl:call-template name="xpath_filter_apply">
  183. <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
  184. <xsl:with-param name="xpath" select="@xpath"/>
  185. <xsl:with-param name="xpath_value" select="@xpath_value"/>
  186. </xsl:call-template>
  187. <!--</xsl:variable>-->
  188. <!--<xsl:message>#73 ustalam na <xsl:value-of select="$xpath_value_token/node()[1]/text()"/>;</xsl:message>-->
  189. <!--<xsl:value-of select="$xpath_value_token/node()[1]/text()"/>-->
  190. <!--<xsl:value-of select="$xpath_value_token"/>-->
  191. </xsl:when>
  192. <xsl:when test="string-length($xpath_value) &gt;0">
  193. <xsl:if test="$debug &gt; 2"><xsl:message>#67.0 $xpath_value=(<xsl:value-of select="$xpath_value"/>); narzucone pewnie z wyzwolenia build.xml</xsl:message></xsl:if>
  194. <xsl:value-of select="$xpath_value"/>
  195. </xsl:when>
  196. <xsl:otherwise>
  197. <xsl:value-of select="$xpath_value"/><!-- parametr z template narzuca wartosc -->
  198. </xsl:otherwise>
  199. </xsl:choose>
  200. </xsl:variable>
  201. <xsl:if test="$debug &gt; 2"><xsl:message>#71 wstawiam projekt $feature_pos=<xsl:value-of select="$feature_pos"/>; $loop_xpath=<xsl:value-of select="$loop_xpath"/>; </xsl:message></xsl:if>
  202. <project basedir="{$recurse_ant_basedir}" name="get_related_feature{$loop_xpath_real}" default="get_related_feature_run_child_ant_if{$loop_xpath_real}">
  203. <!--
  204. get_related_feature_run_child_ant{$loop_xpath_real} - domyslny przed 2017-03-28-->
  205. <!-- get_related_feature_run_child_ant{$loop_xpath_real} -->
  206. <xsl:comment>RelatedFeatureCount:<xsl:value-of select="count(*)"/></xsl:comment>
  207. <xsl:if test="$debug &gt; 1"><echo>
  208. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #197 LEAF RelatedFeature PROJECT BEGIN RUN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  209. | @xml_id is <xsl:value-of select="@xml_id"/> ; $feature_pos_parent is <xsl:value-of select="$feature_pos_parent"/>
  210. | $debug_xsl_in_filename = <xsl:value-of select="$debug_xsl_in_filename"/> ;
  211. | $debug_xsl_out_filename = <xsl:value-of select="$debug_xsl_out_filename"/> ;
  212. | $typeName_dita = <xsl:value-of select="$typeName_dita"/> ; $typeNameRealResource = <xsl:value-of select="$typeNameRealResource"/> ;
  213. | $xpath_value_dita = <xsl:value-of select="$xpath_value_dita"/>; $xpath_value = <xsl:value-of select="$xpath_value"/>; $xpath_dita = <xsl:value-of select="$xpath_dita"/>;
  214. | $temp is = <xsl:value-of select="$temp"/> ;
  215. | $loop_xpath = <xsl:value-of select="$loop_xpath"/>
  216. | $loop_path_recurs = <xsl:value-of select="$loop_path_recurs"/>
  217. | $feature_pos_parent= <xsl:value-of select="$feature_pos_parent"/>; $feature_pos=<xsl:value-of select="$feature_pos"/>; position()= <xsl:value-of select="position()"/>; $parallel_pos= <xsl:value-of select="$parallel_pos"/> ; ($)parallel_pos= ${parallel_pos}
  218. | $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
  219. | ANT Uruchamiam $loop_xpath_real <xsl:value-of select="$loop_xpath_real"/>;
  220. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  221. </echo></xsl:if>
  222. <!--<xsl:variable name="typeName" select='replace($typeName,"&quot;","")'/>--><!-- oczyszczenie z apostrofow -->
  223. <xsl:element name="property">
  224. <xsl:attribute name="name" select="'uuid'"/>
  225. <xsl:attribute name="value" select="$uuid"/>
  226. </xsl:element>
  227. <xsl:element name="property">
  228. <xsl:attribute name="name" select="'passwordBase64Basic'"/>
  229. <xsl:attribute name="value" select="$passwordBase64Basic"/>
  230. </xsl:element>
  231. <xsl:element name="property">
  232. <xsl:attribute name="name" select="'php_session_id'"/>
  233. <xsl:attribute name="value" select="$cookie_curl_option"/>
  234. </xsl:element>
  235. <!--<xsl:element name="property">
  236. <xsl:attribute name="name" select="'url'"/>
  237. <xsl:attribute name="value" select="$url"/>
  238. </xsl:element>-->
  239. <xsl:element name="property">
  240. <xsl:attribute name="name" select="'webRootUrl'"/>
  241. <xsl:attribute name="value" select="$webRootUrl"/>
  242. </xsl:element>
  243. <xsl:element name="property">
  244. <xsl:attribute name="name" select="'build_recurse_ant.xsl'"/>
  245. <xsl:attribute name="value" select="$build_recurse_ant.xsl"/>
  246. </xsl:element>
  247. <xsl:element name="property">
  248. <xsl:attribute name="name" select="'temp'"/>
  249. <xsl:attribute name="value" select="$temp"/>
  250. </xsl:element>
  251. <xsl:element name="property">
  252. <xsl:attribute name="name" select="'builds_to_ant.xsl'"/>
  253. <xsl:attribute name="value" select="$builds_to_ant.xsl"/>
  254. </xsl:element>
  255. <xsl:element name="property">
  256. <xsl:attribute name="name" select="'loop_path_recurs'"/>
  257. <xsl:attribute name="value" select="$loop_path_recurs"/>
  258. </xsl:element>
  259. <xsl:element name="property">
  260. <xsl:attribute name="name" select="'xpath_query'"/>
  261. <xsl:attribute name="value" select="$xpath_query"/>
  262. </xsl:element>
  263. <xsl:element name="property">
  264. <xsl:attribute name="name" select="'ignore_maxOccurs_0'"/>
  265. <xsl:attribute name="value" select="$ignore_maxOccurs_0"/>
  266. </xsl:element>
  267. <xsl:element name="property">
  268. <xsl:attribute name="name" select="'default_db:recurse_ant_basedir'"/>
  269. <xsl:attribute name="value" select="'.'"/>
  270. </xsl:element>
  271. <property name="simpleSchema_dir" value="{$simpleSchema_dir}"/>
  272. <property name="default_db_xml_cache.public" value="{$default_db_xml_cache.public}"/>
  273. <property name="temp" value="{$temp}"/>
  274. <property name="ant-launcher.jar" value="{$ant-launcher.jar}"/>
  275. <property name="loop_path_recurs_xpath" value="{$loop_path_recurs_xpath}"/>
  276. <property name="default_db:recurse_ant" value="{$recurse_ant}"/>
  277. <property name="build_check_java_process_count.xml" value="{$build_check_java_process_count.xml}"/>
  278. <property name="parallel_java_process_max" value="{$parallel_java_process_max}"/>
  279. <property name="feature_pos_parent" value="{$feature_pos_parent}"/>
  280. <property name="parallel_pos" value="{$parallel_pos}"/>
  281. <property name="get_wfs" location="{$get_wfs}"/>
  282. <property name="default_db:recurse_ant_basedir.recurse_cache" location="{$recurse_ant_basedir.recurse_cache}"/>
  283. <property name="build_recurse_ant_cache_control.xsl" value="{$build_recurse_ant_cache_control.xsl}"/>
  284. <property name="typeNameRoot" value="{$typeNameRoot}"/>
  285. <property name="input_obj_fid_forced" value="{$input_obj_fid/@fid}"/>
  286. <property name="external_schema_table.path" value="{$external_schema_table.path}"/>
  287. <xsl:comment>
  288. #224 Important variables:
  289. typeName=<xsl:value-of select="$typeName"/>;
  290. xpath=<xsl:value-of select="$xpath"/>;
  291. xpath_value=<xsl:value-of select="$xpath_value"/>;
  292. $passwordBase64Basic=<xsl:value-of select="$passwordBase64Basic"/>
  293. $typeName_dita= <xsl:value-of select="$typeName_dita"/>
  294. $featureID_name_dita= <xsl:value-of select="$featureID_name_dita"/>
  295. $wfs_output= <xsl:value-of select="$wfs_output"/>
  296. $wfs_output.xml= <xsl:value-of select="$wfs_output.xml"/>
  297. $wfs_output.dita= <xsl:value-of select="$wfs_output.dita"/>
  298. $xpath_dita= <xsl:value-of select="$xpath_dita"/>
  299. $xpath_value_dita= <xsl:value-of select="$xpath_value_dita"/>
  300. $ignore_maxOccurs= <xsl:value-of select="$ignore_maxOccurs_0"/> ; @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>
  301. $xpath_query=<xsl:value-of select="$xpath_query"/>;
  302. $feature_pos_parent=<xsl:value-of select="$feature_pos_parent"/>;
  303. $debug_xsl_in_filename = <xsl:value-of select="$debug_xsl_in_filename"/> ;
  304. $debug_xsl_out_filename = <xsl:value-of select="$debug_xsl_out_filename"/> ;
  305. $loop_path_recurs = <xsl:value-of select="$loop_path_recurs"/> ;
  306. $typeNameRoot = <xsl:value-of select="$typeNameRoot"/> ;
  307. $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
  308. $input_obj_fid_forced = <xsl:value-of select="$input_obj_fid_forced"/> ; was renamed to <xsl:value-of select="$input_obj_fid/@fid"/>
  309. </xsl:comment>
  310. <tempfile suffix=".xml" destdir="{$process_locks}" deleteonexit="yes" createfile="yes" prefix="RelatedFeature_{@xml_id}_{$featureID_name_dita}_{$feature_pos_parent}_{$feature_pos}">
  311. <xsl:attribute name="property" select="concat('builds_to_ant_lock_proj',$loop_path_recurs,$loop_xpath)"/>
  312. </tempfile>
  313. <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
  314. <xsl:if test="$debug &gt; 1"><echo> #302 waliduje xpath_query dla $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>; </echo></xsl:if>
  315. <target name="get_related_feature_run_child_ant_check{$loop_xpath_real}">
  316. <mkdir dir="{$temp}/{$loop_xpath}"/>
  317. <!--<xsl:element name="tempfile">
  318. <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos)"/>
  319. <xsl:attribute name="deleteonexit" select="'no'"/>
  320. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  321. <xsl:attribute name="suffix" select="'.xml'"/>
  322. <xsl:attribute name="prefix" select="concat('.__test_featureID_name_dita_',$featureID_name_dita,$feature_pos_parent,'.',$feature_pos)"/>
  323. </xsl:element>-->
  324. <!--<xsl:element name="echoxml">
  325. <xsl:attribute name="file" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos,'}')"/>
  326. <xsl:element name="{$featureID_name_dita}">
  327. <xsl:attribute name="position" select="position()"/></xsl:element><!-\- bylo bug @2017-04 position() -\->
  328. </xsl:element>-->
  329. <xsl:element name="tempfile">
  330. <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml',$feature_pos_parent,$feature_pos)"/>
  331. <xsl:attribute name="deleteonexit" select="'no'"/>
  332. <xsl:attribute name="destdir" select="$temp"/>
  333. <xsl:attribute name="suffix" select="'.xml'"/>
  334. <xsl:attribute name="prefix" select="concat('.__test_featureID_name_dita_out_',$featureID_name_dita,$feature_pos_parent,'.',$feature_pos)"/>
  335. </xsl:element>
  336. <xsl:element name="echoxml">
  337. <xsl:attribute name="file" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml',$feature_pos_parent,$feature_pos,'}')"/>
  338. <xpath_query_test>OK</xpath_query_test>
  339. </xsl:element>
  340. <!--<echo>#380 processing $xpath_query.xsl in <xsl:value-of select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos,'}')"/></echo>-->
  341. <!--<xmlvalidate lenient="true">
  342. <xsl:attribute name="file" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos,'}')"/>
  343. </xmlvalidate>-->
  344. <!--<xsl:element name="xslt">
  345. <!-\-<xsl:attribute name="basedir" select="'./'"/>-\->
  346. <xsl:attribute name="style" select="$xpath_query.xsl"/>
  347. <xsl:attribute name="in" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos,'}')"/>
  348. <!-\-<xsl:attribute name="destdir" select="'./'"/>-\->
  349. <xsl:attribute name="out" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml',$feature_pos_parent,$feature_pos,'}')"/>
  350. <factory name="net.sf.saxon.TransformerFactoryImpl">
  351. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  352. <attribute name="http://saxon.sf.net/feature/initialMode" value="xpath_query_test"/>
  353. </factory>
  354. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  355. <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
  356. </xsl:element>-->
  357. <!-- running another java env transform for safety -->
  358. <!--<java>
  359. <xsl:attribute name="jar" select="'/opt/local/share/java/saxon9he.jar'"/>
  360. <!-\-<xsl:attribute name="classname" select="'org.apache.tools.ant.Main'"/>-\->
  361. <xsl:attribute name="dir" select="concat($temp,'/',$loop_xpath,'/')"/>
  362. <xsl:attribute name="fork" select="'true'"/>
  363. <xsl:attribute name="clonevm" select="'false'"/>
  364. <xsl:attribute name="newenvironment" select="'true'"/>
  365. <xsl:attribute name="failonerror" select="'true'"/>
  366. <!-\-<xsl:attribute name="resultproperty" select="concat(.,'_resprop')"/>-\->
  367. <!-\-<xsl:attribute name="output" select="concat(.,'_out.log')"/>-\->
  368. <xsl:element name="arg">
  369. <xsl:attribute name="line" select="concat('-s:${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos,'}')"/>
  370. </xsl:element>
  371. <xsl:element name="arg">
  372. <xsl:attribute name="line" select="concat('-o:${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml',$feature_pos_parent,$feature_pos,'}')"/>
  373. </xsl:element>
  374. <arg line="-xsl:{$xpath_query.xsl}"/>
  375. <arg line="-im:xpath_query_test"/>
  376. </java>-->
  377. <xsl:if test="$debug &gt; 1"> <echo>#394 after not processing $xpath_query.xsl in <xsl:value-of select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos,'}')"/></echo></xsl:if>
  378. <xsl:element name="loadfile">
  379. <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile.xml',$feature_pos_parent,$feature_pos)"/>
  380. <xsl:attribute name="srcfile" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml',$feature_pos_parent,$feature_pos,'}')"/>
  381. </xsl:element>
  382. <condition taskname="get_related_feature_run_child_ant_if{$loop_xpath_real}">
  383. <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile_check.xml',$feature_pos_parent,$feature_pos)"/>
  384. <xsl:element name="contains">
  385. <xsl:attribute name="string" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile.xml',$feature_pos_parent,$feature_pos,'}')"/>
  386. <xsl:attribute name="substring" select="'OK'"/>
  387. </xsl:element>
  388. </condition>
  389. </target>
  390. <delete quiet="true">
  391. <xsl:attribute name="file" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos,'}')"/>
  392. </delete>
  393. <delete quiet="true">
  394. <xsl:attribute name="file" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml',$feature_pos_parent,$feature_pos,'}')"/>
  395. </delete>
  396. <target name="get_related_feature_run_child_ant_if{$loop_xpath_real}" depends="get_related_feature_run_child_ant_check{$loop_xpath_real}">
  397. <xsl:attribute name="if" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile_check.xml',$feature_pos_parent,$feature_pos,'}')"/>
  398. <antcall target="get_related_feature_run_child_ant{$loop_xpath_real}"/>
  399. </target>
  400. <!-- EOF dajemy wpis o walidacji danego feature pod katem xpath_query -->
  401. <xsl:apply-templates mode="ant_target" select=".">
  402. <xsl:with-param name="typeName_dita" select="$typeName_dita"/>
  403. <xsl:with-param name="featureID_name_dita" select="$featureID_name_dita"/>
  404. <xsl:with-param name="wfs_output" select="$wfs_output"/>
  405. <xsl:with-param name="wfs_output.xml" select="$wfs_output.xml"/>
  406. <xsl:with-param name="wfs_output.dita" select="$wfs_output.dita"/>
  407. <xsl:with-param name="xpath" select="$xpath"/>
  408. <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
  409. <xsl:with-param name="featureID_name" select="$featureID_name"/>
  410. <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
  411. <xsl:with-param name="RelatedFeatureCount" select="$RelatedFeatureCount"/>
  412. <xsl:with-param name="RelatedFeaturePos" select="$RelatedFeaturePos"/>
  413. <xsl:with-param name="typeName" select="$typeName"/>
  414. <xsl:with-param name="xpath_value" select="$xpath_value"/>
  415. <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
  416. <xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
  417. <!--<xsl:with-param name="loop_xpath_save" select="$loop_xpath_save"/>-->
  418. <xsl:with-param name="xml_id" select="$xml_id"/>
  419. <!--<xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>-->
  420. <xsl:with-param name="feature_pos" select="$feature_pos"/>
  421. <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
  422. <xsl:with-param name="typeNameRealResource" select="$typeNameRealResource"/>
  423. <xsl:with-param name="loop_path_recurs_xpath" select="$loop_path_recurs_xpath"/>
  424. <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/> <!-- @2017-04 dodanie do przetwarzania result-document href="{$temp}/{@xml_id}.{$uuid}.{$feature_pos}/build_root.xml -->
  425. <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
  426. <xsl:with-param name="default_db.instance.xml" select="$default_db.instance.xml"/>
  427. <xsl:with-param name="detect_resource_type.local" select="$detect_resource_type.local"/>
  428. <xsl:with-param name="p5opr:detect_objects_parent_relations.local" select="$p5opr:detect_objects_parent_relations.local"/>
  429. <xsl:with-param name="vrtfNamespaces.xml" select="$vrtfNamespaces.xml"/>
  430. <xsl:with-param name="default_db_targetNamespace_detect_string" select="$default_db_targetNamespace_detect_string"/>
  431. <xsl:with-param name="zasob_id_db_targetNamespace_detect_string" select="$zasob_id_db_targetNamespace_detect_string"/>
  432. </xsl:apply-templates>
  433. <!-- na koniec przetwarzania kazdego z wezlow, podmieniamy xsl biezacy wezel -->
  434. <xsl:comment>template match="RelatedFeature" mode="after_first_ant_assing_vars_childs"
  435. robi result-document href="build_{$loop_xpath}.{$uuid}.xml
  436. wiec powinnismy uruchomic ant ten plik w ciemno znajac jego nizsze wezly</xsl:comment>
  437. <xsl:variable name="featureID_name_child" select="substring-after($typeName,':')"/>
  438. <!--<xsl:variable name="loop_xpath_child" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>-->
  439. <xsl:element name="target">
  440. <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant',$loop_xpath_real)"/>
  441. <xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos,$loop_xpath_real)"/>
  442. <!--<xsl:choose>
  443. <xsl:when test=".//(RelatedFeature|RelatedFeatureRoot)">
  444. <xsl:for-each select=".//RelatedFeature[ not(child::node()/name()='RelatedFeature')]">
  445. <xsl:variable name="loop_xpath_child_ant" select="concat($loop_xpath_save,'_x2f_.',@xml_id,'.',$featureID_name)"/>
  446. <xsl:message>#148 ustalamy $loop_xpath_child_ant=<xsl:value-of select="$loop_xpath_child_ant"/></xsl:message>
  447. <!-\- <xsl:element name="target">
  448. <xsl:attribute name="name" select="$loop_xpath_child_ant"/><!-\\-'get_related_feature_run_child_ant'-\\->
  449. <xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos)"/>-\->
  450. <!-\-<ant antfile="temp/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.xml" dir="."/>-\->
  451. <ant antfile="temp/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml" dir="."/>
  452. <!-\-</xsl:element>-\->
  453. <xsl:if test=" position()=last()">
  454. <xsl:comment>Tu task z related</xsl:comment>
  455. </xsl:if>
  456. </xsl:for-each>
  457. </xsl:when>
  458. <xsl:otherwise>
  459. <xsl:comment>#135 nie ma wiecej //RelatedFeature</xsl:comment>
  460. <!-\-<xsl:element name="target">
  461. <xsl:attribute name="name" select="'get_related_feature_run_child_ant'"/>
  462. <xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos)"/>
  463. </xsl:element>-\->
  464. </xsl:otherwise>
  465. </xsl:choose>-->
  466. <!-- wstawienie subanta dla biezacych dzieci only -->
  467. <tempfile prefix=".builds_to_ant_set_parallel_java_process_max_xsl" suffix=".xml" destdir="{$temp}" >
  468. <xsl:attribute name="property" select="concat('builds_to_ant_set_parallel_java_process_max_xsl',$loop_path_recurs,$loop_xpath_real)"/>
  469. </tempfile>
  470. <ant antfile="{$build_check_java_process_count.xml}">
  471. <xsl:attribute name="output" select="concat('${builds_to_ant_set_parallel_java_process_max_xsl',$loop_path_recurs,$loop_xpath_real,'}')"/>
  472. <property name="builds_to_ant_set_parallel_java_process_max">
  473. <xsl:attribute name="value" select="concat('${builds_to_ant_set_parallel_java_process_max_xsl',$loop_path_recurs,$loop_xpath_real,'}')"/>
  474. </property>
  475. <property name="process_locks" value="{$process_locks}"/>
  476. </ant>
  477. <loadfile>
  478. <xsl:attribute name="property" select="concat('builds_to_ant_set_parallel_java_process_max_loadfile_xsl',$loop_path_recurs,$loop_xpath_real)"/>
  479. <xsl:attribute name="srcfile" select="concat('${builds_to_ant_set_parallel_java_process_max_xsl',$loop_path_recurs,$loop_xpath_real,'}')"/>
  480. </loadfile>
  481. <delete quiet="true">
  482. <xsl:attribute name="file" select="concat('${builds_to_ant_set_parallel_java_process_max_xsl',$loop_path_recurs,$loop_xpath_real,'}')"/>
  483. </delete>
  484. <parallel>
  485. <xsl:attribute name="threadcount" select="concat('${builds_to_ant_set_parallel_java_process_max_loadfile_xsl',$loop_path_recurs,$loop_xpath_real,'}')"/>
  486. <xsl:apply-templates mode="place_subant">
  487. <xsl:with-param name="uuid" select="$uuid"/>
  488. <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
  489. <xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
  490. <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
  491. <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
  492. <xsl:with-param name="featureID_name_dita" select="$featureID_name_dita"/>
  493. <xsl:with-param name="loop_path_recurs_xpath" select="$loop_path_recurs_xpath"/>
  494. <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/>
  495. <xsl:with-param name="feature_pos" select="$feature_pos"/>
  496. <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
  497. <xsl:with-param name="default_db.instance.xml" select="$default_db.instance.xml"/>
  498. <xsl:with-param name="detect_resource_type.local" select="$detect_resource_type.local"/>
  499. <xsl:with-param name="p5opr:detect_objects_parent_relations.local" select="$p5opr:detect_objects_parent_relations.local"/>
  500. <xsl:with-param name="vrtfNamespaces.xml" select="$vrtfNamespaces.xml"/>
  501. <xsl:with-param name="default_db_targetNamespace_detect_string" select="$default_db_targetNamespace_detect_string"/>
  502. <xsl:with-param name="zasob_id_db_targetNamespace_detect_string" select="$zasob_id_db_targetNamespace_detect_string"/>
  503. <!-- debug only below CACHE -->
  504. <xsl:with-param name="typeName_dita" select="$typeName_dita"/>
  505. <!--<xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>-->
  506. <!--<xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>-->
  507. </xsl:apply-templates>
  508. </parallel>
  509. <xsl:if test="$debug &gt; 1"><echo>
  510. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #197 LEAF RelatedFeature PROJECT FINISH RUN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  511. | $debug_xsl_in_filename = <xsl:value-of select="$debug_xsl_in_filename"/> ;
  512. | $debug_xsl_out_filename = <xsl:value-of select="$debug_xsl_out_filename"/> ;
  513. | @xml_id is <xsl:value-of select="@xml_id"/> ; wfs_output.xml = <xsl:value-of select="$wfs_output.xml"/>; $wfs_output.dita = <xsl:value-of select="$wfs_output.dita"/>;
  514. | $feature_pos_parent= <xsl:value-of select="$feature_pos_parent"/>; $feature_pos= <xsl:value-of select="$feature_pos"/>; position()= <xsl:value-of select="position()"/>
  515. | $temp is = <xsl:value-of select="$temp"/> ;
  516. | $loop_xpath = <xsl:value-of select="$loop_xpath"/> projekt <xsl:value-of select="$loop_xpath_real"/>;
  517. | ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>; $feature_pos_parent= <xsl:value-of select="$feature_pos_parent"/>;
  518. | $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
  519. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  520. </echo></xsl:if>
  521. </xsl:element>
  522. <!-- na koniec przetwarzania danego zaglebienia uruchamiamy calosc ponownie do kolejnego zaglebienia -->
  523. <!-- task do polaczenia zaglebien -->
  524. <!-- jak nie ma zaglebien to generujemy pdf i dajemy uzytkownikowi linka -->
  525. <delete quiet="true">
  526. <xsl:attribute name="file" select="concat('${builds_to_ant_lock_proj',$loop_path_recurs,$loop_xpath,'}')"/>
  527. </delete>
  528. </project>
  529. </xsl:when>
  530. <xsl:when test="name()='RelatedFeatureLoop'">
  531. <xsl:if test="$debug &gt; 2"><xsl:message>%%%%%%%%%%%%%%%%%%%%%% 255 Creating BUILD for RelatedFeatureLoop - which will be try to execute child ant in loop_path=xml_id(<xsl:value-of select="@xml_id"/>)</xsl:message></xsl:if>
  532. <xsl:variable name="RelatedFeatureCount" select="last()"/>
  533. <xsl:variable name="RelatedFeaturePos" select="position()"/>
  534. <xsl:variable name="featureID_name" select="substring-after($typeName,':')"/>
  535. <xsl:variable name="loop_xpath_real" select="$loop_xpath"/>
  536. <xsl:variable name="loop_xpath">
  537. <xsl:choose>
  538. <xsl:when test="$loop_xpath='root'">
  539. <!--bylo <xsl:value-of select="concat($loop_xpath,'_x2f_.',@xml_id,'.',$featureID_name)"/>-->
  540. <xsl:value-of select="concat($loop_xpath,'/',@xml_id,'.',$feature_pos)"/> <!-- loop path too long ,'.',$featureID_name -->
  541. </xsl:when>
  542. <xsl:otherwise><xsl:value-of select="$loop_xpath"/></xsl:otherwise>
  543. </xsl:choose>
  544. </xsl:variable>
  545. <xsl:variable name="typeName_dita" select="@typeName"/>
  546. <xsl:variable name="typeNameRealResource">
  547. <!-- override in case of different real resource by filtered resource -->
  548. <xsl:choose>
  549. <xsl:when test="@typeNameRealResource"><xsl:value-of select="@typeNameRealResource"/></xsl:when>
  550. <xsl:otherwise><xsl:value-of select="@typeName"/></xsl:otherwise>
  551. </xsl:choose>
  552. </xsl:variable>
  553. <xsl:variable name="featureID_name_dita" select="substring-after($typeName_dita,':')"/>
  554. <xsl:variable name="xml_id" select="@xml_id"/>
  555. <xsl:variable name="wfs_output" select="concat($uuid,'.',$loop_xpath)"/>
  556. <xsl:variable name="wfs_output.xml" select="concat($wfs_output,'.xml')"/>
  557. <xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.dita.xml')"/>
  558. <xsl:variable name="xpath_dita" select="@xpath"/>
  559. <xsl:variable name="xpath_value_dita">
  560. <xsl:choose>
  561. <xsl:when test="@xpath_value">
  562. <xsl:if test="$debug &gt; 2"><xsl:message>%%%%%%%%%%%%%%%%%%%%%% #265.1 $input_obj_with_xpath: <xsl:copy-of select="$input_obj_with_xpath"/> </xsl:message></xsl:if>
  563. <xsl:call-template name="xpath_filter_apply">
  564. <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
  565. <xsl:with-param name="xpath" select="@xpath"/>
  566. <xsl:with-param name="xpath_value" select="@xpath_value"/>
  567. </xsl:call-template>
  568. </xsl:when>
  569. <xsl:otherwise>
  570. <xsl:value-of select="$xpath_value"/><!-- parametr z template narzuca wartosc -->
  571. </xsl:otherwise>
  572. </xsl:choose>
  573. </xsl:variable>
  574. <xsl:comment>
  575. RelatedFeatureLoop: #344
  576. $loop_xpath_real =<xsl:value-of select="$loop_xpath_real"/> ;
  577. $typeName_dita= <xsl:value-of select="$typeName_dita"/>
  578. $featureID_name_dita= <xsl:value-of select="$featureID_name_dita"/>
  579. $wfs_output= <xsl:value-of select="$wfs_output"/>
  580. $wfs_output.xml= <xsl:value-of select="$wfs_output.xml"/>
  581. $wfs_output.dita= <xsl:value-of select="$wfs_output.dita"/>
  582. $xpath_dita= <xsl:value-of select="$xpath_dita"/>
  583. $xpath_value_dita= <xsl:value-of select="$xpath_value_dita"/>
  584. $ignore_maxOccurs= <xsl:value-of select="$ignore_maxOccurs_0"/> ; @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>
  585. $xpath_query=<xsl:value-of select="$xpath_query"/>;
  586. $debug_xsl_in_filename = <xsl:value-of select="$debug_xsl_in_filename"/> ;
  587. $debug_xsl_out_filename = <xsl:value-of select="$debug_xsl_out_filename"/> ;
  588. $parallel_pos = <xsl:value-of select="$parallel_pos"/> ;
  589. $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
  590. $input_obj_fid_forced = <xsl:value-of select="$input_obj_fid_forced"/> ;
  591. </xsl:comment>
  592. <project basedir="{$recurse_ant_basedir.temp}{$loop_path_recurs}"> <!-- name="get_related_feature{$loop_xpath_real}_{$loop_path_recurs} --> <!-- get_related_feature_run_child_ant{$loop_xpath_real}_{$loop_path_recurs -->
  593. <xsl:attribute name="name" select="concat('get_related_feature',$loop_xpath,'_',$loop_path_recurs,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  594. <xsl:attribute name="default" select="concat('get_related_feature_run_child_ant_if_query_',$loop_xpath,'_',$loop_path_recurs,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/> <!-- get_related_feature_run_child_ant_if_query_{$loop_xpath_real}_{$loop_path_recurs} -->
  595. <!-- default przed 2017-03-28 concat('get_related_feature_run_child_ant_if_query_',$loop_xpath_real,'_',$loop_path_recurs)
  596. get_related_feature_run_child_ant{$loop_xpath_real}_{$loop_path_recurs} -->
  597. <xsl:comment>RelatedFeatureCount:<xsl:value-of select="count(*)"/></xsl:comment>
  598. <xsl:if test="$debug &gt; 1"><echo>
  599. ?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?- #550 RelatedFeatureLoop BEGIN RUN TRY TRY TRY -?-?-?-?-?-?-?-?-?-?-?-?-?
  600. | @xml_id is <xsl:value-of select="@xml_id"/> ; $parallel_pos = <xsl:value-of select="$parallel_pos"/> ; $parallel_pos= <xsl:value-of select="$parallel_pos"/>; $$parallel_pos = ${parallel_pos}
  601. ? $temp is = <xsl:value-of select="$temp"/> ;
  602. | ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>;
  603. ? $loop_xpath_real = <xsl:value-of select="$loop_xpath_real"/>;
  604. | $loop_xpath = <xsl:value-of select="$loop_xpath"/> ;
  605. | $loop_path_recurs = <xsl:value-of select="$loop_path_recurs"/> ;
  606. ? $debug_xsl_in_filename = <xsl:value-of select="$debug_xsl_in_filename"/> ;
  607. | $debug_xsl_out_filename = <xsl:value-of select="$debug_xsl_out_filename"/> ;
  608. ?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?
  609. </echo></xsl:if>
  610. <xsl:if test="$debug &gt; 1"><echo> ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>; projekt <xsl:value-of select="$loop_xpath_real"/>; </echo></xsl:if>
  611. <!--<xsl:variable name="typeName" select='replace($typeName,"&quot;","")'/>--><!-- oczyszczenie z apostrofow -->
  612. <xsl:element name="property">
  613. <xsl:attribute name="name" select="'uuid'"/>
  614. <xsl:attribute name="value" select="$uuid"/>
  615. </xsl:element>
  616. <xsl:element name="property">
  617. <xsl:attribute name="name" select="'passwordBase64Basic'"/>
  618. <xsl:attribute name="value" select="$passwordBase64Basic"/>
  619. </xsl:element>
  620. <xsl:element name="property">
  621. <xsl:attribute name="name" select="'php_session_id'"/>
  622. <xsl:attribute name="value" select="$cookie_curl_option"/>
  623. </xsl:element>
  624. <xsl:element name="property">
  625. <xsl:attribute name="name" select="'php_session_id_tested'"/>
  626. <xsl:attribute name="value" select="$cookie_curl_option"/>
  627. </xsl:element>
  628. <!--<xsl:element name="property">
  629. <xsl:attribute name="name" select="'url'"/>
  630. <xsl:attribute name="value" select="$url"/>
  631. </xsl:element>-->
  632. <xsl:element name="property">
  633. <xsl:attribute name="name" select="'webRootUrl'"/>
  634. <xsl:attribute name="value" select="$webRootUrl"/>
  635. </xsl:element>
  636. <xsl:element name="property"> <!--- powinien miec domyslnie sciezke narzucona-->
  637. <xsl:attribute name="name" select="'build_recurse_ant.xsl'"/>
  638. <xsl:attribute name="value" select="$build_recurse_ant.xsl"/>
  639. </xsl:element>
  640. <!--<xsl:element name="property"> <!-\-\- powinien miec domyslnie narzucona sciezke-\->
  641. <xsl:attribute name="name" select="'temp'"/>
  642. <xsl:attribute name="value" select="$temp"/>
  643. </xsl:element>-->
  644. <xsl:element name="property"><!-- - powinien miec sciezke domyslnie narzucona-->
  645. <xsl:attribute name="name" select="'builds_to_ant.xsl'"/>
  646. <xsl:attribute name="value" select="$builds_to_ant.xsl"/>
  647. </xsl:element>
  648. <property name="typeName" value="{$typeName}"/>
  649. <property name="xpath" value="{$xpath_dita}"/>
  650. <property name="xpath_value" value="{$xpath_value_dita}"/>
  651. <!-- DtypeName=p5_default_db:CRM_PROCES -Dxpath=ID -Dxpath_value=5247 -->
  652. <property name="loop_path_recurs" value="{$loop_path_recurs}"/>
  653. <xsl:element name="property">
  654. <xsl:attribute name="name" select="'xpath_query'"/>
  655. <xsl:attribute name="value" select="$xpath_query"/>
  656. </xsl:element>
  657. <xsl:element name="property">
  658. <xsl:attribute name="name" select="'ignore_maxOccurs_0'"/>
  659. <xsl:attribute name="value" select="$ignore_maxOccurs_0"/>
  660. </xsl:element>
  661. <xsl:element name="property">
  662. <xsl:attribute name="name" select="'default_db:recurse_ant_basedir'"/>
  663. <xsl:attribute name="value" select="$recurse_ant_basedir"/>
  664. </xsl:element>
  665. <xsl:element name="property">
  666. <xsl:attribute name="name" select="'default_db:recurse_ant'"/>
  667. <xsl:attribute name="value" select="$recurse_ant"/>
  668. </xsl:element>
  669. <xsl:element name="property">
  670. <xsl:attribute name="name" select="'default_db:recurse_ant_basedir.temp'"/>
  671. <xsl:attribute name="value" select="$recurse_ant_basedir.temp"/>
  672. </xsl:element>
  673. <property name="simpleSchema_dir" value="{$simpleSchema_dir}"/>
  674. <property name="default_db_xml_cache.public" value="{$default_db_xml_cache.public}"/>
  675. <!--bylo przed @2017-04 - poprawiam bo sie zapetla niepotrzebnie - tempa doklei wyzwolony ant do ${default_db:recurse_ant_basedir.temp}${loop_path_recurs}-->
  676. <xsl:element name="property">
  677. <xsl:attribute name="name" select="'temp'"/>
  678. <xsl:attribute name="value" select="concat($recurse_ant_basedir.temp,$loop_path_recurs)"/>
  679. </xsl:element>
  680. <!--<xsl:element name="property">
  681. <xsl:attribute name="name" select="'temp'"/>
  682. <xsl:attribute name="value" select="$temp"/>
  683. </xsl:element>-->
  684. <property name="ant-launcher.jar" value="{$ant-launcher.jar}"/>
  685. <property name="loop_path_recurs_xpath" value="{$loop_path_recurs_xpath}"/>
  686. <property name="build_check_java_process_count.xml" value="{$build_check_java_process_count.xml}"/>
  687. <property name="parallel_java_process_max" value="{$parallel_java_process_max}"/>
  688. <property name="feature_pos_parent" value="{$feature_pos_parent}"/> <!-- @2017-04 fixing leaf parallel conflict -->
  689. <property name="parallel_pos" value="{$parallel_pos}"/>
  690. <property name="process_locks" value="{$process_locks}"/>
  691. <property name="get_wfs" location="{$get_wfs}"/>
  692. <property name="default_db:recurse_ant_basedir.recurse_cache" location="{$recurse_ant_basedir.recurse_cache}"/>
  693. <property name="build_recurse_ant_cache_control.xsl" value="{$build_recurse_ant_cache_control.xsl}"/>
  694. <property name="typeNameRoot" value="{$typeNameRoot}"/>
  695. <property name="input_obj_fid_forced" value="{$input_obj_fid/@fid}"/>
  696. <property name="external_schema_table.path" value="{$external_schema_table.path}"/>
  697. <property name="default_db.instance.xml" value="{$default_db.instance.xml}"/>
  698. <xsl:comment>
  699. #555 Important variables:
  700. typeName=<xsl:value-of select="$typeName"/>;
  701. xpath=<xsl:value-of select="$xpath"/>;
  702. xpath_value=<xsl:value-of select="$xpath_value"/>;
  703. $passwordBase64Basic=<xsl:value-of select="$passwordBase64Basic"/>
  704. $feature_pos_parent" <xsl:value-of select="$feature_pos_parent"/>
  705. $typeNameRoot <xsl:value-of select="$typeNameRoot"/>
  706. $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
  707. </xsl:comment>
  708. <!--<xsl:apply-templates mode="ant_target" select=".">
  709. <xsl:with-param name="typeName_dita" select="$typeName_dita"/>
  710. <xsl:with-param name="featureID_name_dita" select="$featureID_name_dita"/>
  711. <xsl:with-param name="wfs_output" select="$wfs_output"/>
  712. <xsl:with-param name="wfs_output.xml" select="$wfs_output.xml"/>
  713. <xsl:with-param name="wfs_output.dita" select="$wfs_output.dita"/>
  714. <xsl:with-param name="xpath" select="$xpath"/>
  715. <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
  716. <xsl:with-param name="featureID_name" select="$featureID_name"/>
  717. <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
  718. <xsl:with-param name="RelatedFeatureCount" select="$RelatedFeatureCount"/>
  719. <xsl:with-param name="RelatedFeaturePos" select="$RelatedFeaturePos"/>
  720. <xsl:with-param name="typeName" select="$typeName"/>
  721. <xsl:with-param name="xpath_value" select="$xpath_value"/>
  722. <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
  723. <xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
  724. <!-\-<xsl:with-param name="loop_xpath_save" select="$loop_xpath_save"/>-\->
  725. <xsl:with-param name="xml_id" select="$xml_id"/>
  726. <!-\-<xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>-\->
  727. <xsl:with-param name="feature_pos" select="$feature_pos"/>
  728. <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
  729. </xsl:apply-templates>-->
  730. <!-- na koniec przetwarzania kazdego z wezlow, podmieniamy xsl biezacy wezel -->
  731. <xsl:comment>template match="RelatedFeature" mode="after_first_ant_assing_vars_childs"
  732. robi result-document href="build_{$loop_xpath}.{$uuid}.xml
  733. wiec powinnismy uruchomic ant ten plik w ciemno znajac jego nizsze wezly</xsl:comment>
  734. <xsl:variable name="featureID_name_child" select="substring-after($typeName,':')"/>
  735. <!--<xsl:variable name="loop_xpath_child" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>-->
  736. <xsl:if test="$debug &gt; 2"><xsl:message>%%%%%%%%%%%%%%%%%%%%%% #142 ustalamy maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; </xsl:message></xsl:if>
  737. <tempfile suffix=".xml" destdir="{$process_locks}" deleteonexit="yes" createfile="yes" prefix="RelatedFeatureLoop_{@xml_id}_{$featureID_name_dita}_{$feature_pos_parent}_{$feature_pos}_{$parallel_pos}">
  738. <xsl:attribute name="property" select="concat('process_lock_loop',$loop_xpath,'_',$loop_path_recurs,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  739. </tempfile>
  740. <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
  741. <xsl:if test="$debug &gt; 1"><echo> #592 waliduje xpath_query dla $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>; </echo></xsl:if>
  742. <mkdir dir="{$temp}/{$loop_xpath}"/>
  743. <target>
  744. <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant_if_query_test',$loop_xpath,'_',$loop_path_recurs,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  745. <xsl:element name="tempfile">
  746. <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  747. <xsl:attribute name="deleteonexit" select="'no'"/>
  748. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  749. <xsl:attribute name="suffix" select="'.xml'"/>
  750. <xsl:attribute name="prefix" select="concat('.__test_featureID_name_dita_',$featureID_name_dita,@xml_id,$feature_pos_parent,'.',$feature_pos,'.',$parallel_pos)"/>
  751. </xsl:element>
  752. <xsl:element name="echoxml">
  753. <xsl:attribute name="file" select="concat('${get_related_feature_run_child_ant_xpath_test_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  754. <xsl:element name="{$featureID_name_dita}"><xsl:attribute name="position" select="position()"/><xsl:attribute name="loop_path_recurs_xpath" select="$loop_path_recurs_xpath"/></xsl:element>
  755. </xsl:element>
  756. <xsl:element name="tempfile">
  757. <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test_out_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  758. <xsl:attribute name="deleteonexit" select="'no'"/>
  759. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  760. <xsl:attribute name="suffix" select="'.xml'"/>
  761. <xsl:attribute name="prefix" select="concat('.__test_featureID_name_dita_out_',$featureID_name_dita,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  762. </xsl:element>
  763. <xsl:element name="echoxml">
  764. <xsl:attribute name="file" select="concat('${get_related_feature_run_child_ant_xpath_test_out_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  765. <xpath_query_test>OK</xpath_query_test>
  766. </xsl:element>
  767. <!--<sleep>
  768. <xsl:attribute name="milliseconds" select="concat($parallel_pos,'000')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
  769. </sleep>-->
  770. <!--<sleep>
  771. <xsl:attribute name="milliseconds" select="concat('${parallel_pos}','000')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
  772. </sleep>-->
  773. <!--<echo>#739 processing $xpath_query.xsl in <xsl:value-of select="concat('${get_related_feature_run_child_ant_xpath_test_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/></echo>-->
  774. <!--<exec executable="cat">
  775. <arg><xsl:attribute name="line" select="concat('${get_related_feature_run_child_ant_xpath_test_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/></arg>
  776. </exec>-->
  777. <!--<xsl:element name="xslt">
  778. <!-\-<xsl:attribute name="basedir" select="concat($temp,'/',$loop_xpath)"/>-\->
  779. <xsl:attribute name="style" select="$xpath_query.xsl"/>
  780. <xsl:attribute name="in" select="$empty.xml"/>
  781. <!-\-<xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>-\->
  782. <xsl:attribute name="out" select="concat('${get_related_feature_run_child_ant_xpath_test_out_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  783. <factory name="net.sf.saxon.TransformerFactoryImpl">
  784. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  785. <attribute name="http://saxon.sf.net/feature/initialTemplate" value="input"/>
  786. </factory>
  787. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  788. <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
  789. <param name="input">
  790. <xsl:attribute name="expression" select="concat('${get_related_feature_run_child_ant_xpath_test_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  791. </param>
  792. </xsl:element>-->
  793. <!--<xsl:element name="xslt">
  794. <!-\-<xsl:attribute name="basedir" select="concat($temp,'/',$loop_xpath)"/>-\->
  795. <xsl:attribute name="style" select="$xpath_query.xsl"/>
  796. <xsl:attribute name="in" select="concat('${get_related_feature_run_child_ant_xpath_test_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  797. <!-\-<xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>-\->
  798. <xsl:attribute name="out" select="concat('${get_related_feature_run_child_ant_xpath_test_out_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  799. <xsl:attribute name="reloadstylesheet" select="'true'"/>
  800. <factory name="net.sf.saxon.TransformerFactoryImpl">
  801. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  802. <attribute name="http://saxon.sf.net/feature/initialMode" value="xpath_query_test"/>
  803. </factory>
  804. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  805. <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
  806. </xsl:element>-->
  807. <xsl:if test="$debug &gt; 1"><echo>#754 EOF NOT processing $xpath_query.xsl in <xsl:value-of select="concat('${get_related_feature_run_child_ant_xpath_test',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/></echo></xsl:if>
  808. <xsl:element name="loadfile">
  809. <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test_loadfile_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  810. <xsl:attribute name="srcfile" select="concat('${get_related_feature_run_child_ant_xpath_test_out_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  811. </xsl:element>
  812. <!--<echo>#633 test NOT xpath_query.xsl ${<xsl:value-of select="concat('get_related_feature_run_child_ant_xpath_test_loadfile_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>} ;</echo>-->
  813. <condition>
  814. <xsl:attribute name="taskname" select="concat('get_related_feature_run_child_ant_if_query_',$loop_xpath,'_',$loop_path_recurs,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  815. <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test_loadfile_check',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  816. <xsl:element name="contains">
  817. <xsl:attribute name="string" select="concat('${get_related_feature_run_child_ant_xpath_test_loadfile_proj',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  818. <xsl:attribute name="substring" select="'OK'"/>
  819. </xsl:element>
  820. </condition>
  821. </target>
  822. <target>
  823. <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant_if_query_',$loop_xpath,'_',$loop_path_recurs,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  824. <xsl:attribute name="depends" select="concat('get_related_feature_run_child_ant_if_query_test',$loop_xpath,'_',$loop_path_recurs,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  825. <xsl:attribute name="if" select="concat('${get_related_feature_run_child_ant_xpath_test_loadfile_check',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  826. <antcall > <!-- target="get_related_feature_run_child_ant{$loop_xpath}_{$loop_path_recurs}" -->
  827. <xsl:attribute name="target" select="concat('get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  828. </antcall>
  829. </target>
  830. <!-- EOF dajemy wpis o walidacji danego feature pod katem xpath_query -->
  831. <!-- warunek dla ograniczenia zapetlenia TODO do optymalizacji aby nie potrzebnie nie robilo zapytania czy jest wezel zaglebiony -->
  832. <xsl:element name="target">
  833. <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,'_check',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/> <!-- concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_check') -->
  834. <!--<tempfile property="test_child_curl_ouptut.xml"/>--> <!-- todo deleteonexit=yes -->
  835. <!--<xsl:element name="tempfile">
  836. <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)" />
  837. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  838. <xsl:attribute name="prefix" select="'.test_if_exec_child_ant-'"/>
  839. <xsl:attribute name="suffix" select="'.xml'"/>
  840. </xsl:element>-->
  841. <xsl:element name="property">
  842. <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)" />
  843. <xsl:attribute name="location" select="concat($temp,'/',$loop_xpath,'/.test_if_exec_child_ant.xml')"/>
  844. </xsl:element>
  845. <xsl:variable name="OGC_Filter">
  846. <xsl:call-template name="simpleTypeMakeOgcFilter_merge">
  847. <xsl:with-param name="simpleTypeMakeOgcFilter" select="simpleTypeMakeOgcFilter"/>
  848. <xsl:with-param name="RelatedFilter" select="RelatedFilter"/>
  849. <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
  850. <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
  851. </xsl:call-template>
  852. </xsl:variable>
  853. <xsl:variable name="url">
  854. <xsl:value-of select="$api_url"/>/default_db/?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=<xsl:value-of select="$typeNameRealResource"/>&amp;SRSNAME=EPSG:3003&amp;resultType=hits<xsl:value-of select="$OGC_Filter"/>
  855. </xsl:variable>
  856. <!--<echo>
  857. (-)(-)(-)(-)(-) #722 exec curl for $typeNameRealResource=<xsl:value-of select="$typeNameRealResource"/>
  858. (-)(-)(-)(-)(-) and $xpath_dita=<xsl:value-of select="$xpath_dita"/>; $xpath_value=<xsl:value-of select="$xpath_value"/>; and $xpath_value_dita=<xsl:value-of select="$xpath_value_dita"/>;
  859. (-)(-)(-)(-)(-) $url=<xsl:value-of select="$url"/>;
  860. (-)(-)(-)(-)(-) $wfs_output.xml = <xsl:value-of select="concat('${get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
  861. </echo>-->
  862. <ant antfile="{$get_wfs}" target="GetXmlByUrlVerifyRetry" >
  863. <property name="output">
  864. <xsl:attribute name="value" select="concat('${get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  865. </property>
  866. <property name="url" value="{$url}"/>
  867. <property name="cookie_curl_option" value="{$cookie_curl_option}"/>
  868. </ant>
  869. <!--<xsl:element name="exec">
  870. <xsl:attribute name="executable" select="'curl'"/>
  871. <xsl:attribute name="output" select="concat('${get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  872. <xsl:attribute name="errorproperty" select="'wfs_error'"/>
  873. <xsl:attribute name="resultproperty" select="'wfs_result'"/>
  874. <xsl:element name="arg">
  875. <xsl:attribute name="line"> <xsl:value-of select="$cookie_curl_option"/> "<xsl:value-of select="$url"/>"</xsl:attribute>
  876. </xsl:element>
  877. <xsl:element name="arg">
  878. <xsl:attribute name="line">-\-connect-timeout 5</xsl:attribute>
  879. </xsl:element>
  880. <xsl:element name="arg">
  881. <xsl:attribute name="line">-\-max-time 240</xsl:attribute>
  882. </xsl:element>
  883. <xsl:element name="arg">
  884. <xsl:attribute name="line">-\-retry 5</xsl:attribute>
  885. </xsl:element>
  886. <xsl:element name="arg">
  887. <xsl:attribute name="line">-\-retry-max-time 1200</xsl:attribute>
  888. </xsl:element>
  889. </xsl:element>-->
  890. <xsl:element name="loadfile">
  891. <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,'_msg',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  892. <xsl:attribute name="srcFile" select="concat('${get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,'_temp',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')" />
  893. </xsl:element>
  894. <xsl:if test="$debug &gt; 1"><echo> #752 $msg ${<xsl:value-of select="concat('get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,'_msg',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>}
  895. check curl if child exists: <xsl:value-of select="$api_url"/>
  896. result Hits <xsl:value-of select="concat('${get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,'_msg',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  897. </echo></xsl:if>
  898. <xsl:element name="condition">
  899. <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,'_test',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  900. <xsl:attribute name="taskname" select="concat('get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  901. <xsl:element name="contains">
  902. <xsl:attribute name="string" select="concat('${get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,'_msg',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  903. <xsl:attribute name="substring" select="'numberMatched=&quot;0&quot;'"/>
  904. </xsl:element>
  905. </xsl:element>
  906. </xsl:element>
  907. <!--<target name="check_if_child">
  908. <exec executable="curl"
  909. output="/Users/a.binder/Documents/biuro.biall-net.pl-gitlab-se-2015-02-16.git/SE/schema/ant-url_action/default_db.crm_proces/CRM_PROCES_tree/temp/d3e16/prezes1.root_x2f_.d3e1.CRM_PROCES_x2f_.d3e21.CRM_PROCES.1.1.xml_exists"
  910. errorproperty="wfs_error"
  911. resultproperty="wfs_result">
  912. <arg line=" -b /Users/a.binder/Documents/biuro.biall-net.pl-gitlab-se-2015-02-16.git/SE/schema/ant-url_action/default_db.crm_proces/CRM_PROCES_tree/temp/prezes1.cookie &#34;https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db/?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=p5_default_db:CRM_PROCES&amp;SRSNAME=EPSG:3003&amp;Filter=&lt;ogc:Filter&gt;&lt;ogc:And&gt;&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;IID&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;995&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;&lt;ogc:Or&gt;&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;TYPE&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;PROCES&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;&lt;/ogc:Or&gt;&lt;/ogc:And&gt;&lt;/ogc:Filter&gt;&#34;"/>
  913. </exec>
  914. <loadfile property="msg" srcFile="/Users/a.binder/Documents/biuro.biall-net.pl-gitlab-se-2015-02-16.git/SE/schema/ant-url_action/default_db.crm_proces/CRM_PROCES_tree/temp/d3e16/prezes1.root_x2f_.d3e1.CRM_PROCES_x2f_.d3e21.CRM_PROCES.1.1.xml_exists" />
  915. <echo> MSG to ${msg} </echo>
  916. <condition property="test" taskname="get_related_feature_run_child_antroot_x2f_.d3e1.CRM_PROCES_x2f_.d3e16.CRM_PROCES_/d3e16" >
  917. <contains string="${msg}" substring="featureMember"/>
  918. </condition>
  919. </target>-->
  920. <xsl:element name="target">
  921. <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  922. <xsl:attribute name="depends" select="concat('get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,'_check',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  923. <xsl:attribute name="unless" select="concat('${get_related_feature_run_child_ant',$loop_xpath,'_',$loop_path_recurs,'_test',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  924. <xsl:if test="$debug &gt; 1"><echo>
  925. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- #810 RelatedFeatureLoop LEAF STARTING RUN -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  926. | @xml_id is <xsl:value-of select="@xml_id"/> ;
  927. * $temp is = <xsl:value-of select="$temp"/> ;
  928. | ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>;
  929. * $loop_xpath_real <xsl:value-of select="$loop_xpath_real"/>;
  930. | $loop_path_recurs = <xsl:value-of select="$loop_path_recurs"/>
  931. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  932. </echo></xsl:if>
  933. <delete quiet="true">
  934. <xsl:attribute name="file" select="concat('${process_lock_loop',$loop_xpath,'_',$loop_path_recurs,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  935. </delete>
  936. <ant antfile="{$recurse_ant_basedir}/build_recurse_ant.xml" target="xml_recursed_from_tr_map" inheritall="true" />
  937. <xsl:if test="$debug &gt; 1"><echo>
  938. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- #821 RelatedFeatureLoop FIHISHED RUN -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  939. | @xml_id is <xsl:value-of select="@xml_id"/> ;
  940. * $temp is = <xsl:value-of select="$temp"/> ;
  941. | ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>;
  942. * $loop_xpath_real <xsl:value-of select="$loop_xpath_real"/>;
  943. | $loop_path_recurs = <xsl:value-of select="$loop_path_recurs"/>
  944. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  945. </echo></xsl:if>
  946. </xsl:element>
  947. <!-- na koniec przetwarzania danego zaglebienia uruchamiamy calosc ponownie do kolejnego zaglebienia -->
  948. <!-- task do polaczenia zaglebien -->
  949. <!-- jak nie ma zaglebien to generujemy pdf i dajemy uzytkownikowi linka -->
  950. <xsl:if test="$debug &gt; 2"><xsl:message>%%%%%%%%%%%%%%%%%%%%%% #871 END OF BUILDING BUILD_ROOT for RelatedFeatureLOOP </xsl:message></xsl:if>
  951. </project>
  952. </xsl:when>
  953. <xsl:otherwise>
  954. <xsl:comment>#723 child nodes</xsl:comment>
  955. <xsl:apply-templates mode="child_nodes"/>
  956. </xsl:otherwise>
  957. </xsl:choose>
  958. </xsl:template>
  959. <!-- trzeba przetwarzac child_nodes do pierwszego napotkania RelatedFeature -->
  960. <xsl:template mode="child_nodes" match="*">
  961. <xsl:copy-of select="."/>
  962. <xsl:comment>#732 eof copy . (mode=child_nodes match=*)</xsl:comment>
  963. </xsl:template>
  964. <!--<xsl:template mode="child_nodes" match="simpleTypeMakeOgcFilter">
  965. <xsl:message>#266 bypassing temporary simpleTypeMakeOgcFilter of problem with output </xsl:message>
  966. </xsl:template>-->
  967. <xsl:template mode="place_subant" match="RelatedFeature">
  968. <xsl:param name="uuid" required="yes"/>
  969. <xsl:param name="loop_xpath" required="yes"/>
  970. <xsl:param name="loop_xpath_real" required="yes"/>
  971. <xsl:param name="featureID_name_dita" required="yes"/>
  972. <xsl:param name="loop_path_recurs_xpath" required="yes"/>
  973. <xsl:param name="feature_pos_parent" required="yes"/>
  974. <xsl:param name="feature_pos" required="yes"/>
  975. <xsl:param name="input_obj_fid" />
  976. <xsl:param name="typeName_dita"/> <!-- debug cache only -->
  977. <xsl:param name="xpath_value_dita"/>
  978. <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
  979. <xsl:if test="$debug &gt; 1"><echo>#684 dajemy wpis o walidacji danego feature pod katem xpath_query dla $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/> </echo></xsl:if>
  980. <!--<sleep>
  981. <xsl:attribute name="milliseconds" select="concat($parallel_pos,'0')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
  982. </sleep>-->
  983. <!--<sleep>
  984. <xsl:attribute name="milliseconds" select="concat('${parallel_pos}','0')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
  985. </sleep>-->
  986. <sequential>
  987. <xsl:comment>begin mode="place_subant" match="RelatedFeature"</xsl:comment>
  988. <mkdir dir="{$temp}/{$loop_xpath}"/>
  989. <!--<property>
  990. <xsl:attribute name="name" select="concat('builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos)"/>
  991. <xsl:attribute name="location" select="concat($temp,'/',$loop_xpath,'/.builds_to_ant-loop_test_featureID_name_dita_fixed_',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'.',$featureID_name_dita)"/>
  992. </property>-->
  993. <xsl:element name="tempfile">
  994. <xsl:attribute name="property" select="concat('builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'.',$parallel_pos)"/>
  995. <xsl:attribute name="deleteonexit" select="'no'"/>
  996. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  997. <xsl:attribute name="suffix" select="'.xml'"/>
  998. <xsl:attribute name="prefix" select="concat('.${uuid}.builds_to_ant-loop_test_featureID_name_dita_',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'.',$parallel_pos)"/>
  999. </xsl:element>
  1000. <!--<xsl:element name="echoxml">
  1001. <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1002. <EMPTY_FILE>NO_DATA</EMPTY_FILE>
  1003. </xsl:element>-->
  1004. <xsl:element name="echoxml">
  1005. <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'.',$parallel_pos,'}')"/>
  1006. <xsl:element name="{$featureID_name_dita}"><xsl:attribute name="position" select="position()"/><xsl:attribute name="loop_path_recurs_xpath" select="$loop_path_recurs_xpath"/></xsl:element>
  1007. </xsl:element>
  1008. <xsl:element name="tempfile">
  1009. <xsl:attribute name="property" select="concat('builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos)"/>
  1010. <xsl:attribute name="deleteonexit" select="'no'"/>
  1011. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  1012. <xsl:attribute name="suffix" select="'.xml'"/>
  1013. <xsl:attribute name="prefix" select="concat('.${uuid}.builds_to_ant-loop_test_featureID_name_dita_out',@xml_id,'.',$feature_pos_parent,'.',$feature_pos)"/>
  1014. </xsl:element>
  1015. <xsl:element name="echoxml">
  1016. <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1017. <xpath_query_test>OK</xpath_query_test>
  1018. </xsl:element>
  1019. <xsl:if test="$debug &gt; 1"><echo>#921 NOT processing $xpath_query.xsl in <xsl:value-of select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'.',$parallel_pos,'}')"/></echo></xsl:if>
  1020. <!--<xmlvalidate lenient="true">
  1021. <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'.',$parallel_pos,'}')"/>
  1022. </xmlvalidate>-->
  1023. <!--<java>
  1024. <xsl:attribute name="jar" select="'/opt/local/share/java/saxon9he.jar'"/>
  1025. <!-\-<xsl:attribute name="classname" select="'org.apache.tools.ant.Main'"/>-\->
  1026. <xsl:attribute name="dir" select="concat($temp,'/',$loop_xpath,'/')"/>
  1027. <xsl:attribute name="fork" select="'true'"/>
  1028. <xsl:attribute name="clonevm" select="'false'"/>
  1029. <xsl:attribute name="newenvironment" select="'true'"/>
  1030. <xsl:attribute name="failonerror" select="'true'"/>
  1031. <!-\-<xsl:attribute name="resultproperty" select="concat(.,'_resprop')"/>-\->
  1032. <!-\-<xsl:attribute name="output" select="concat(.,'_out.log')"/>-\->
  1033. <xsl:element name="arg">
  1034. <xsl:attribute name="line" select="concat('-s:${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'.',$parallel_pos,'}')"/>
  1035. </xsl:element>
  1036. <xsl:element name="arg">
  1037. <xsl:attribute name="line" select="concat('-o:${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1038. </xsl:element>
  1039. <arg line="-xsl:{$xpath_query.xsl}"/>
  1040. <arg line="-im:xpath_query_test"/>
  1041. </java>-->
  1042. <!--<xsl:element name="xslt">
  1043. <!-\-<xsl:attribute name="basedir" select="concat($temp,'/',$loop_xpath)"/>-\->
  1044. <xsl:attribute name="style" select="$xpath_query.xsl"/>
  1045. <xsl:attribute name="in" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'.',$parallel_pos,'}')"/>
  1046. <!-\-<xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>-\->
  1047. <xsl:attribute name="out" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1048. <!-\- <xsl:attribute name="failOnError" select="'false'"/> <!-\\- todo debug problems -\\->
  1049. <xsl:attribute name="failOnTransformationError" select="'false'"/> <!-\\- todo debug problems -\\->
  1050. <xsl:attribute name="failOnNoResources" select="'false'"/>-\->
  1051. <xsl:attribute name="force" select="'true'"/>
  1052. <factory name="net.sf.saxon.TransformerFactoryImpl">
  1053. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  1054. <attribute name="http://saxon.sf.net/feature/initialMode" value="xpath_query_test"/>
  1055. </factory>
  1056. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  1057. <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
  1058. </xsl:element>-->
  1059. <!--<echo>#936 EOF processing $xpath_query.xsl in <xsl:value-of select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/></echo>-->
  1060. <!-- wygenerujemy liste ant -->
  1061. <xsl:if test="$debug &gt; 1"><echo>
  1062. #686 ^_^_^_^_^_^_^_ Searching leaf build for $feature_pos_parent = <xsl:value-of select="$feature_pos_parent"/> ; $feature_pos = <xsl:value-of select="$feature_pos"/> ;
  1063. ^_^_^_^_^_^_^_ $featureID_name_dita <xsl:value-of select="$featureID_name_dita"/> ; substring-after(@typeName,':') = <xsl:value-of select=" substring-after(@typeName,':')"/> ;
  1064. ^_^_^_^_^_^_^_ @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; @xml_id = <xsl:value-of select="@xml_id"/> ;
  1065. ^_^_^_^_^_^_^_ ant szukam fileset id=builds_to_ant w <xsl:value-of select="concat($temp,'/',$loop_xpath)"/> includes="<xsl:value-of select="concat(@xml_id,'.*.',substring-after(@typeName,':'))"/>"
  1066. </echo></xsl:if>
  1067. <dirset id="builds_to_ant{$loop_path_recurs}{$loop_xpath_real}{@xml_id}.{$feature_pos_parent}.{$feature_pos}" dir="{$temp}/{$loop_xpath}" includes="{@xml_id}.*" /> <!-- loop path too long .{substring-after(@typeName,':')} -->
  1068. <property name="builds_to_ant{$loop_path_recurs}{$loop_xpath_real}{@xml_id}.{$feature_pos_parent}.{$feature_pos}" refid="builds_to_ant{$loop_path_recurs}{$loop_xpath_real}{@xml_id}.{$feature_pos_parent}.{$feature_pos}"/>
  1069. <!--<tempfile property="builds_to_ant.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.builds_to_ant-"/>-->
  1070. <xsl:element name="tempfile">
  1071. <xsl:attribute name="property" select="concat('builds_to_ant.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos)"/>
  1072. <xsl:attribute name="deleteonexit" select="'no'"/>
  1073. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  1074. <xsl:attribute name="suffix" select="'.xml'"/>
  1075. <xsl:attribute name="prefix" select="concat('.${uuid}.builds_to_ant-',@xml_id,'.',$feature_pos_parent,'.',$feature_pos)"/>
  1076. </xsl:element>
  1077. <!--<tempfile property="builds_to_ant_file.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.build_to_ant_file-"/>-->
  1078. <xsl:element name="tempfile">
  1079. <xsl:attribute name="property" select="concat('builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos)"/>
  1080. <xsl:attribute name="deleteonexit" select="'no'"/>
  1081. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  1082. <xsl:attribute name="suffix" select="'.xml'"/>
  1083. <xsl:attribute name="prefix" select="concat('.${uuid}.build_to_ant_file-',@xml_id,'.',$feature_pos_parent,'.',$feature_pos)"/>
  1084. </xsl:element>
  1085. <xsl:if test="$debug &gt; 1"><echo>#235 ant do: builds_to_ant.xml=${builds_to_ant_file.xml} mode="place_subant" match="RelatedFeature" </echo></xsl:if>
  1086. <!--<echoxml file="'${builds_to_ant.xml}'"><builds_to_ant>${builds_to_ant}</builds_to_ant></echoxml>-->
  1087. <xsl:element name="echoxml">
  1088. <xsl:attribute name="file" select="concat('${builds_to_ant.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1089. <builds_to_ant>${builds_to_ant<xsl:value-of select="concat($loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos)"/>}</builds_to_ant>
  1090. </xsl:element>
  1091. <xsl:element name="xslt">
  1092. <!--<xsl:attribute name="basedir" select="$temp"/>-->
  1093. <xsl:attribute name="style" select="$builds_to_ant.xsl"/>
  1094. <xsl:attribute name="in" select="concat('${builds_to_ant.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1095. <!--<xsl:attribute name="destdir" select="$temp"/>-->
  1096. <xsl:attribute name="out" select="concat('${builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1097. <factory name="net.sf.saxon.TransformerFactoryImpl">
  1098. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  1099. <!--<attribute name="http://saxon.sf.net/feature/initialMode"
  1100. value="after_first_ant_assing_vars"/>-->
  1101. </factory>
  1102. <param name="temp" expression="{$temp}"/> <!-- TODO czy to zadziala @2017-04 -->
  1103. <param name="loop_xpath_real" expression="{$loop_xpath_real}{@xml_id}"/>
  1104. <param name="loop_path_recurs" expression="{$loop_path_recurs}"/>
  1105. <param name="loop_xpath" expression="{$loop_xpath}"/>
  1106. <param name="xpath_query_test.xml">
  1107. <xsl:attribute name="expression" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1108. </param>
  1109. <param name="build_check_java_process_count.xml" expression="{$build_check_java_process_count.xml}"/>
  1110. <param name="parallel_java_process_max" expression="{$parallel_java_process_max}"/>
  1111. <!--<param name="recurse_ant_basedir" expression="{$recurse_ant_basedir}"/>-->
  1112. <!--<xsl:element name="param">
  1113. <xsl:attribute name="name" select="'default_antfile'"/>
  1114. <xsl:attribute name="expression" select="concat($temp,'/',$builds_to_ant_file.xml"/>
  1115. </xsl:element>-->
  1116. <param name="default_antfile" expression="{$temp}/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml"/><!-- TODO czy to potrzebne? -->
  1117. <param name="xpath_query" expression="{$xpath_query}"/> <!-- limit related TODO -->
  1118. <!--<param name="xpath_query.xsl" expression="{$xpath_query.xsl}"/>-->
  1119. <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
  1120. <param name="ant-launcher.jar" expression="{$ant-launcher.jar}"/>
  1121. <param name="process_locks" expression="{$process_locks}"/>
  1122. <param name="uuid" expression="{$uuid}"/>
  1123. <param name="xml_id" expression="{@xml_id}"/>
  1124. <param name="typeNameRoot" expression="{$typeNameRoot}"/>
  1125. <param name="recurse_ant_basedir.recurse_cache" expression="{$recurse_ant_basedir.recurse_cache}"/>
  1126. <param name="feature_pos_parent" expression="{$feature_pos_parent}"/>
  1127. <param name="feature_pos" expression="{$feature_pos}"/>
  1128. <param name="external_schema_table.path" expression="{$external_schema_table.path}"/>
  1129. <param name="default_db.instance.xml" expression="{$default_db.instance.xml}"/>
  1130. <param name="detect_resource_type.local" expression="${detect_resource_type.local}"/>
  1131. <param expression="${detect_objects_parent_relations.local}">
  1132. <xsl:attribute name="name" select="'{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd}detect_objects_parent_relations.local'"/>
  1133. </param>
  1134. <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
  1135. <param name="default_db_targetNamespace_detect_string" expression="${default_db_targetNamespace_detect_string}"/>
  1136. <param name="zasob_id_db_targetNamespace_detect_string" expression="${zasob_id_db_targetNamespace_detect_string}"/>
  1137. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  1138. </xsl:element>
  1139. <!-- delete tempfiles -->
  1140. <delete quiet="true">
  1141. <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1142. </delete>
  1143. <delete quiet="true">
  1144. <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1145. </delete>
  1146. <delete quiet="true">
  1147. <xsl:attribute name="file" select="concat('${builds_to_ant.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1148. </delete>
  1149. <delete quiet="true">
  1150. <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1151. </delete>
  1152. <!--<ant antfile="{$temp}/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml" dir="."/>-->
  1153. <xsl:element name="ant">
  1154. <xsl:attribute name="inheritall" select="'false'"/>
  1155. <xsl:attribute name="antfile" select="concat('${builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1156. </xsl:element>
  1157. <!-- running as java for safe maxfiles -->
  1158. <!--<java>
  1159. <xsl:attribute name="jar" select="$ant-launcher.jar"/>
  1160. <!-\-<xsl:attribute name="classname" select="'org.apache.tools.ant.Main'"/>-\->
  1161. <!-\-<xsl:attribute name="dir" select="'${basedir}'"/>-\->
  1162. <xsl:attribute name="fork" select="'true'"/>
  1163. <xsl:attribute name="clonevm" select="'false'"/>
  1164. <xsl:attribute name="failonerror" select="'true'"/>
  1165. <!-\-<xsl:attribute name="append" select="'false'"/>-\->
  1166. <!-\-<xsl:attribute name="resultproperty" select="concat(.,'_resprop')"/>-\->
  1167. <!-\-<xsl:attribute name="output" select="concat($temp,'/',.,'_out.log')"/>-\->
  1168. <arg value="-buildfile"/>
  1169. <arg value="{$temp}/{$loop_xpath}/{.}/build.xml">
  1170. <xsl:attribute name="value" select="concat('${builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1171. </arg>
  1172. </java>-->
  1173. <delete quiet="true">
  1174. <xsl:attribute name="file" select="concat('${builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
  1175. </delete>
  1176. <!--<ant antfile="{$temp}/${builds_to_ant_file.xml}" dir="."/>-->
  1177. <xsl:comment>end mode="place_subant" match="RelatedFeature"</xsl:comment>
  1178. </sequential>
  1179. </xsl:template>
  1180. <xsl:template mode="place_subant" match="RelatedFeatureLoop">
  1181. <xsl:param name="uuid" required="yes"/>
  1182. <xsl:param name="loop_xpath" required="yes"/>
  1183. <xsl:param name="loop_xpath_real" required="yes"/>
  1184. <xsl:param name="xpath_dita" required="yes"/>
  1185. <xsl:param name="xpath_value_dita" required="yes"/>
  1186. <xsl:param name="featureID_name_dita" required="yes"/>
  1187. <xsl:param name="loop_path_recurs_xpath" required="yes"/>
  1188. <xsl:param name="feature_pos_parent" required="yes"/> <!-- todo fixing conflict from parent leaf -->
  1189. <xsl:param name="feature_pos" required="yes"/>
  1190. <xsl:param name="input_obj_fid" required="yes"/>
  1191. <xsl:param name="typeName_dita" required="yes"/>
  1192. <!--<xsl:param name="loop_path_recurs" required="yes"/>-->
  1193. <!-- wygenerujemy liste ant -->
  1194. <sequential>
  1195. <xsl:comment>
  1196. #590 LOOP BEGIN ; @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; </xsl:comment>
  1197. <xsl:if test="$debug &gt; 1"><echo>
  1198. $ $ $ $ $ #1001 match RelatedFeatureLoop mode place_subant $$$$$
  1199. $ #523 match RelatedFeatureLoop @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; ant bede odpalac w podkatalogu:@xml_id=(<xsl:value-of select="@xml_id"/>)
  1200. $ $featureID_name_dita= <xsl:value-of select="$featureID_name_dita"/>; $xpath_dita = <xsl:value-of select="$xpath_dita"/> $xpath_value_dita= <xsl:value-of select="$xpath_value_dita"/>
  1201. $ $feature_pos = <xsl:value-of select="$feature_pos"/>; $feature_pos_parent=<xsl:value-of select="$feature_pos_parent"/> ;
  1202. $ $loop_xpath = <xsl:value-of select="$loop_xpath"/>; $loop_path_recurs= <xsl:value-of select="$loop_path_recurs"/>;
  1203. $ loop_xpath_real = <xsl:value-of select="$loop_xpath_real"/> ;
  1204. $ przy FeatureLoop przy zapisie w (_1598 RelatedFeatureLoop jest okazja do zrobienia bilda /build_root.xml) $feature_pos_parent przechodzi w $feature_pos TUTAJ!
  1205. $ $temp = <xsl:value-of select="$temp"/> ;
  1206. $ position()= <xsl:value-of select="position()"/> ; $parallel_pos=<xsl:value-of select="$parallel_pos"/>; ($)parallel_pos=${parallel_pos} ;
  1207. $ $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
  1208. </echo></xsl:if>
  1209. <xsl:if test="$debug &gt; 2"><xsl:message>#591 todo executing by exec instead of ant without inheritAll because it's looping!!! </xsl:message></xsl:if>
  1210. <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
  1211. <xsl:if test="$debug &gt; 2"><echo>#684 dajemy wpis o walidacji danego feature pod katem xpath_query $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>; </echo></xsl:if>
  1212. <mkdir dir="{$temp}/{$loop_xpath}"/>
  1213. <!--<xsl:element name="tempfile">
  1214. <xsl:attribute name="property" select="concat('builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  1215. <xsl:attribute name="deleteonexit" select="'no'"/>
  1216. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  1217. <xsl:attribute name="suffix" select="'.xml'"/>
  1218. <xsl:attribute name="prefix" select="concat('.${uuid}.builds_to_ant-loop_test_featureID_name_dita',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'.',$parallel_pos)"/>
  1219. </xsl:element>-->
  1220. <property>
  1221. <xsl:attribute name="name" select="concat('builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  1222. <xsl:attribute name="location" select="concat($temp,'/',$loop_xpath,'/builds_to_ant-loop_test_featureID_name_dita_fixed_',@xml_id,'_',$feature_pos_parent,'_',$feature_pos,'_',$featureID_name_dita,$parallel_pos,'.xml')"/>
  1223. </property>
  1224. <!--<xsl:comment>#1067 secondary the same file </xsl:comment>-->
  1225. <!--<property>
  1226. <xsl:attribute name="name" select="concat('builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'_SECOND')"/>
  1227. <xsl:attribute name="location" select="concat($temp,'/',$loop_xpath,'/.builds_to_ant-loop_test_featureID_name_dita_fixed_',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'.',$featureID_name_dita,$parallel_pos,'_SECOND.xml')"/>
  1228. </property>-->
  1229. <xsl:if test="$debug &gt; 2"><echo> #1056 fixed builds_to_ant-loop_test_featureID_name_dita_fixed: <xsl:value-of select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/> ; </echo></xsl:if>
  1230. <!-- <sleep>
  1231. <xsl:attribute name="milliseconds" select="concat($parallel_pos,'00')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
  1232. </sleep>
  1233. <sleep>
  1234. <xsl:attribute name="milliseconds" select="concat('${parallel_pos}','00')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
  1235. </sleep>-->
  1236. <!-- fixed file property test due error -->
  1237. <!--<xsl:element name="echoxml">
  1238. <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1239. <EMPTY_FILE>NO_DATA</EMPTY_FILE>
  1240. </xsl:element>-->
  1241. <!-- second forced -->
  1242. <xsl:element name="echoxml">
  1243. <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1244. <xsl:element name="{$featureID_name_dita}"><xsl:attribute name="position" select="position()"/><xsl:attribute name="loop_path_recurs_xpath" select="$loop_path_recurs_xpath"/></xsl:element>
  1245. </xsl:element>
  1246. <xsl:element name="tempfile">
  1247. <xsl:attribute name="property" select="concat('builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  1248. <xsl:attribute name="deleteonexit" select="'no'"/>
  1249. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  1250. <xsl:attribute name="suffix" select="'.xml'"/>
  1251. <xsl:attribute name="prefix" select="concat('.${uuid}.builds_to_ant-loop_test_featureID_name_dita_out',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  1252. </xsl:element>
  1253. <!-- debug style! -->
  1254. <!--<xsl:element name="tempfile">
  1255. <xsl:attribute name="property" select="concat('builds_to_ant__test_query__featureID_name_xpath.xsl',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  1256. <xsl:attribute name="deleteonexit" select="'no'"/>
  1257. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  1258. <xsl:attribute name="suffix" select="'.xsl'"/>
  1259. <xsl:attribute name="prefix" select="concat('.${uuid}.builds_to_ant-loop_test_featureID_name_xpath.xsl',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  1260. </xsl:element>-->
  1261. <!--<copyfile src="{$xpath_query.xsl}">
  1262. <xsl:attribute name="dest" select="concat('${builds_to_ant__test_query__featureID_name_xpath.xsl',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1263. </copyfile>-->
  1264. <xsl:element name="echoxml">
  1265. <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1266. <xpath_query_test>OK</xpath_query_test>
  1267. </xsl:element>
  1268. <!-- debug error ostatni /Users/a.binder/Documents/xmlschema_procesy5/src-xmlschema/public_html/WPS_Functions/default_db/recurse_ant/temp/PROCES_TREE_PID_0_20-1939_limit/d29821e1.1.PROCES_TREE/d29821e56852.10.PROCES_GROUP_1/d29821e63879.12.PROCES_INIT/d29821e63909.5.PROCES/.PROCES_TREE_PID_0_20-1939_limit.builds_to_ant-loop_test_featureID_name_ditad29821e63949.12.5863323145.xml -->
  1269. <!--<sleep>
  1270. <xsl:attribute name="milliseconds" select="concat($parallel_pos,'00')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
  1271. </sleep>-->
  1272. <!--<sleep>
  1273. <xsl:attribute name="milliseconds" select="concat('${parallel_pos}','00')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
  1274. </sleep>-->
  1275. <!--<waitfor >
  1276. <available >
  1277. <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1278. </available>
  1279. </waitfor>-->
  1280. <xsl:if test="$debug &gt; 2"><echo>#1056 NOT processing $xpath_query.xsl in <xsl:value-of select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/></echo></xsl:if>
  1281. <!--<exec executable="cat">
  1282. <arg><xsl:attribute name="line" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/></arg>
  1283. </exec>-->
  1284. <!--<xsl:element name="xslt">
  1285. <!-\-<xsl:attribute name="basedir" select="concat($temp,'/',$loop_xpath)"/>-\->
  1286. <xsl:attribute name="style" select="$xpath_query.xsl"/>
  1287. <xsl:attribute name="in" select="$empty.xml"/>
  1288. <!-\-<xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>-\->
  1289. <xsl:attribute name="out" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1290. <!-\-<xsl:attribute name="failOnError" select="'false'"/>-\-> <!-\- todo debug problems -\->
  1291. <!-\-<xsl:attribute name="failOnTransformationError" select="'false'"/>-\-> <!-\- todo debug problems -\->
  1292. <!-\-<xsl:attribute name="failOnNoResources" select="'false'"/>-\->
  1293. <xsl:attribute name="force" select="'true'"/>
  1294. <factory name="net.sf.saxon.TransformerFactoryImpl">
  1295. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  1296. <attribute name="http://saxon.sf.net/feature/initialTemplate" value="input"/>
  1297. </factory>
  1298. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  1299. <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
  1300. <param name="input">
  1301. <xsl:attribute name="expression" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1302. </param>
  1303. </xsl:element>-->
  1304. <!--<xsl:element name="xslt">
  1305. <!-\-<xsl:attribute name="basedir" select="concat($temp,'/',$loop_xpath)"/>-\->
  1306. <xsl:attribute name="style" select="$xpath_query.xsl"/>
  1307. <xsl:attribute name="in" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1308. <!-\-<xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>-\->
  1309. <xsl:attribute name="out" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1310. <!-\-<xsl:attribute name="failOnError" select="'false'"/>-\-> <!-\- todo debug problems -\->
  1311. <!-\-<xsl:attribute name="failOnTransformationError" select="'false'"/>-\-> <!-\- todo debug problems -\->
  1312. <!-\-<xsl:attribute name="failOnNoResources" select="'false'"/>-\->
  1313. <xsl:attribute name="force" select="'true'"/>
  1314. <xsl:attribute name="reloadstylesheet" select="'true'"/>
  1315. <factory name="net.sf.saxon.TransformerFactoryImpl">
  1316. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  1317. <attribute name="http://saxon.sf.net/feature/initialMode" value="xpath_query_test"/>
  1318. </factory>
  1319. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  1320. <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
  1321. </xsl:element>-->
  1322. <delete quiet="true">
  1323. <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1324. </delete>
  1325. <!--<xsl:element name="xslt">
  1326. <xsl:attribute name="basedir" select="concat($temp,'/',$loop_xpath)"/>
  1327. <xsl:attribute name="style" select="$xpath_query.xsl"/>
  1328. <xsl:attribute name="in" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1329. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  1330. <xsl:attribute name="out" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1331. <!-\-<xsl:attribute name="failOnError" select="'false'"/>-\-> <!-\- todo debug problems -\->
  1332. <!-\-<xsl:attribute name="failOnTransformationError" select="'false'"/>-\-> <!-\- todo debug problems -\->
  1333. <!-\-<xsl:attribute name="failOnNoResources" select="'false'"/>-\->
  1334. <!-\-<xsl:attribute name="force" select="'true'"/>-\->
  1335. <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
  1336. </xsl:element>-->
  1337. <!-- DEBUG <loadfile>
  1338. <xsl:attribute name="property" select="concat('builds_to_ant__test_query__featureID_name_dita.xml_loadfile',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita)"/>
  1339. <xsl:attribute name="srcfile" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,'}')"/>
  1340. </loadfile>
  1341. <echo>#1056 processing $xpath_query.xsl in <xsl:value-of select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,'}')"/>
  1342. FileContents: <xsl:value-of select="concat('${builds_to_ant__test_query__featureID_name_dita.xml_loadfile',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,'}')"/>
  1343. </echo>-->
  1344. <xsl:if test="$debug &gt; 1"><echo>#1071 EOF processing $xpath_query.xsl in <xsl:value-of select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/></echo></xsl:if>
  1345. <!-- Lista do wyzwolenia dzieci w podkalagach na bazie params-->
  1346. <xsl:if test="$debug &gt; 1"><echo> #596 ant szukam dirset/fileset id=builds_to_ant w <xsl:value-of select="concat($temp,'/',$loop_xpath,'/',@xml_id,'.*/build_root.xml')"/></echo></xsl:if> <!-- loop path too long .',$featureID_name_dita,' -->
  1347. <dirset id="builds_to_ant{$loop_path_recurs}{$loop_xpath}{@xml_id}.{$feature_pos_parent}.{$feature_pos}{$featureID_name_dita}{$parallel_pos}" dir="{$temp}/{$loop_xpath}" includes="{@xml_id}.*" /> <!-- loop path too long .{$featureID_name_dita} -->
  1348. <property name="builds_to_ant{$loop_path_recurs}{$loop_xpath}{@xml_id}.{$feature_pos_parent}.{$feature_pos}{$featureID_name_dita}{$parallel_pos}" refid="builds_to_ant{$loop_path_recurs}{$loop_xpath}{@xml_id}.{$feature_pos_parent}.{$feature_pos}{$featureID_name_dita}{$parallel_pos}"/>
  1349. <!--<tempfile property="builds_to_ant.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.builds_to_ant-"/>-->
  1350. <xsl:element name="tempfile">
  1351. <xsl:attribute name="property" select="concat('builds_to_ant.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  1352. <xsl:attribute name="deleteonexit" select="'no'"/>
  1353. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  1354. <xsl:attribute name="suffix" select="'.xml'"/>
  1355. <xsl:attribute name="prefix" select="concat('.${uuid}.builds_to_ant-loop-',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  1356. </xsl:element>
  1357. <!--<tempfile property="builds_to_ant_file.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.build_to_ant_file-"/>-->
  1358. <xsl:element name="tempfile">
  1359. <xsl:attribute name="property" select="concat('builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  1360. <xsl:attribute name="deleteonexit" select="'no'"/>
  1361. <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
  1362. <xsl:attribute name="suffix" select="'.xml'"/>
  1363. <xsl:attribute name="prefix" select="concat('.${uuid}.build_to_ant_file-loop-',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
  1364. </xsl:element>
  1365. <xsl:if test="$debug &gt; 2"><echo>#615 ant do: builds_to_ant.xml=${builds_to_ant_file.xml} mode="place_subant" match="RelatedFeatureLoop" </echo></xsl:if>
  1366. <!--<echoxml file="'${builds_to_ant.xml}'"><builds_to_ant>${builds_to_ant}</builds_to_ant></echoxml>-->
  1367. <xsl:element name="echoxml">
  1368. <xsl:attribute name="file" select="concat('${builds_to_ant.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1369. <builds_to_ant>${builds_to_ant<xsl:value-of select="concat($loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>}</builds_to_ant>
  1370. </xsl:element>
  1371. <xsl:element name="xslt">
  1372. <xsl:attribute name="basedir" select="$temp"/>
  1373. <xsl:attribute name="style" select="$builds_to_ant.xsl"/>
  1374. <xsl:attribute name="in" select="concat('${builds_to_ant.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1375. <xsl:attribute name="destdir" select="$temp"/>
  1376. <xsl:attribute name="out" select="concat('${builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1377. <factory name="net.sf.saxon.TransformerFactoryImpl">
  1378. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  1379. <attribute name="http://saxon.sf.net/feature/initialMode" value="exec"/>
  1380. </factory>
  1381. <param name="temp" expression="{$temp}"/>
  1382. <param name="loop_xpath_real" expression="{$loop_xpath_real}"/>
  1383. <param name="loop_path_recurs" expression="{$loop_path_recurs}"/>
  1384. <param name="feature_pos" expression="{$feature_pos}"/>
  1385. <param name="feature_pos_parent" expression="{$feature_pos_parent}"/>
  1386. <param name="loop_xpath" expression="{$loop_xpath}"/>
  1387. <param name="xpath_query_test.xml">
  1388. <xsl:attribute name="expression" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1389. </param>
  1390. <!--<xsl:element name="param">
  1391. <xsl:attribute name="name" select="'default_antfile'"/>
  1392. <xsl:attribute name="expression" select="concat($temp,'/',$builds_to_ant_file.xml"/>
  1393. </xsl:element>-->
  1394. <param name="default_antfile" expression="{$temp}/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml"/> <!-- TODO czy to potrzebne raczej bledne -->
  1395. <param name="xpath_query" expression="{$xpath_query}"/>
  1396. <!--<param name="xpath_query.xsl" expression="{$xpath_query.xsl}"/>-->
  1397. <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
  1398. <param name="ant-launcher.jar" expression="{$ant-launcher.jar}"/>
  1399. <param name="build_check_java_process_count.xml" expression="{$build_check_java_process_count.xml}"/>
  1400. <param name="parallel_java_process_max" expression="{$parallel_java_process_max}"/>
  1401. <param name="process_locks" expression="{$process_locks}"/>
  1402. <param name="uuid" expression="{$uuid}"/>
  1403. <param name="xml_id" expression="{@xml_id}"/>
  1404. <param name="typeNameRoot" expression="{$typeNameRoot}"/>
  1405. <param name="recurse_ant_basedir.recurse_cache" expression="{$recurse_ant_basedir.recurse_cache}"/>
  1406. <param name="external_schema_table.path" expression="{$external_schema_table.path}"/>
  1407. <param name="default_db.instance.xml" expression="{$default_db.instance.xml}"/>
  1408. <param name="detect_resource_type.local" expression="${detect_resource_type.local}"/>
  1409. <param expression="${detect_objects_parent_relations.local}">
  1410. <xsl:attribute name="name" select="'{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd}detect_objects_parent_relations.local'"/>
  1411. </param>
  1412. <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
  1413. <param name="default_db_targetNamespace_detect_string" expression="${default_db_targetNamespace_detect_string}"/>
  1414. <param name="zasob_id_db_targetNamespace_detect_string" expression="${zasob_id_db_targetNamespace_detect_string}"/>
  1415. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  1416. </xsl:element>
  1417. <xsl:if test="$debug &gt; 2"><echo> #1153 Loop executing antfile <xsl:value-of select="concat('${builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/></echo></xsl:if>
  1418. <xsl:element name="ant">
  1419. <xsl:attribute name="inheritall" select="'false'"/>
  1420. <xsl:attribute name="antfile" select="concat('${builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
  1421. </xsl:element>
  1422. <!-- EOF Lista do wyzwolenia dzieci -->
  1423. <!--<exec command="/opt/local/bin/ant" dir="{$temp}" failifexecutionfails="true">
  1424. <!-\-<arg line="-f ${builds_to_ant_file.xml}"/>-\->
  1425. <xsl:element name="arg">
  1426. <xsl:attribute name="line" select="concat('-f ',@xml_id,'/',$uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.1.xml')"/>
  1427. </xsl:element>
  1428. </exec>-->
  1429. <!--<xsl:element name="ant">
  1430. <xsl:attribute name="antfile" select="concat($temp,'/',@xml_id,'/',$uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.1.xml')"/>
  1431. <xsl:attribute name="inheritAll" select="'false'"/>
  1432. <xsl:attribute name="inheritRefs" select="'false'"/>
  1433. <property name="xpath" value="{$xpath_dita}"/>
  1434. <property name="xpath_value_dita" value="{$xpath_value_dita}"/>
  1435. </xsl:element>-->
  1436. <!--<ant antfile="{$temp}/${builds_to_ant_file.xml}" dir="."/>-->
  1437. <xsl:comment>#590 LOOP END
  1438. </xsl:comment>
  1439. </sequential>
  1440. </xsl:template>
  1441. <xsl:template mode="place_subant" match="*">
  1442. <xsl:param name="uuid" required="yes"/>
  1443. <xsl:param name="loop_xpath" required="yes"/>
  1444. <xsl:param name="loop_xpath_real" required="yes"/>
  1445. <xsl:param name="xpath_dita" required="yes"/>
  1446. <xsl:param name="xpath_value_dita" required="yes"/>
  1447. <xsl:param name="featureID_name_dita" required="yes"/>
  1448. <xsl:param name="loop_path_recurs_xpath" required="yes"/>
  1449. <xsl:param name="feature_pos_parent" required="yes"/>
  1450. <xsl:param name="feature_pos" required="yes"/>
  1451. <xsl:param name="input_obj_fid" required="yes"/>
  1452. <xsl:param name="typeName_dita" required="yes"/><!-- debug cache only -->
  1453. <!--<xsl:param name="loop_path_recurs" required="yes"/>-->
  1454. <!--<xsl:param name="loop_path_recurs" required="yes"/>-->
  1455. <xsl:apply-templates mode="place_subant">
  1456. <xsl:with-param name="uuid" select="$uuid"/>
  1457. <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
  1458. <xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
  1459. <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
  1460. <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
  1461. <xsl:with-param name="featureID_name_dita" select="$featureID_name_dita"/>
  1462. <xsl:with-param name="loop_path_recurs_xpath" select="$loop_path_recurs_xpath"/>
  1463. <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/>
  1464. <xsl:with-param name="feature_pos" select="$feature_pos"/>
  1465. <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
  1466. <xsl:with-param name="typeName_dita" select="$typeName_dita"/> <!-- debug cache only -->
  1467. <xsl:with-param name="default_db.instance.xml" select="$default_db.instance.xml"/>
  1468. <xsl:with-param name="detect_resource_type.local" select="$detect_resource_type.local"/>
  1469. <xsl:with-param name="p5opr:detect_objects_parent_relations.local" select="$p5opr:detect_objects_parent_relations.local"/>
  1470. <xsl:with-param name="vrtfNamespaces.xml" select="$vrtfNamespaces.xml"/>
  1471. <xsl:with-param name="default_db_targetNamespace_detect_string" select="$default_db_targetNamespace_detect_string"/>
  1472. <xsl:with-param name="zasob_id_db_targetNamespace_detect_string" select="$zasob_id_db_targetNamespace_detect_string"/>
  1473. <!--<xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>-->
  1474. <!--<xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>-->
  1475. </xsl:apply-templates>
  1476. </xsl:template>
  1477. <xsl:template mode="place_subant" match="text()|comment()"/>
  1478. <xsl:template name="xpath_filter_apply"> <!-- do przetworzenia filtra na podstawie danych wezla poprzedniego $input_obj_with_xpath oraz podanych parametrow @xpath i @xpath_value -->
  1479. <xsl:param name="input_obj_with_xpath" required="yes"/>
  1480. <xsl:param name="xpath" required="yes"/>
  1481. <xsl:param name="xpath_value" required="yes"/>
  1482. <xsl:variable name="xpath_value_token">
  1483. <xsl:for-each select=" tokenize($xpath_value,'/')">
  1484. <xsl:if test="$debug &gt; 2"><xsl:message>#341 znalazlem dla=<xsl:value-of select="."/>; ; <xsl:value-of select="$input_obj_with_xpath/node()[@xpath=current()]"/></xsl:message></xsl:if>
  1485. <xsl:if test="$input_obj_with_xpath/node()[@xpath=current()]">
  1486. <xsl:copy-of select="$input_obj_with_xpath/node()[@xpath=current()]"/>
  1487. </xsl:if><!-- todo to jest bledne ale dziala tymczasowo-->
  1488. </xsl:for-each>
  1489. </xsl:variable>
  1490. <xsl:if test="$debug &gt; 2"><xsl:message>#345 ustalam na <xsl:value-of select="$xpath_value_token/node()[1]/text()"/>;</xsl:message></xsl:if>
  1491. <!--<xsl:value-of select="$xpath_value_token/node()[1]/text()"/>-->
  1492. <xsl:value-of select="$xpath_value_token"/>
  1493. </xsl:template>
  1494. <xsl:template match="RelatedFeature" mode="ant_target" >
  1495. <xsl:param name="typeName_dita" required="yes"/>
  1496. <xsl:param name="featureID_name_dita" required="yes"/>
  1497. <xsl:param name="wfs_output" required="yes"/>
  1498. <xsl:param name="wfs_output.xml" required="yes"/>
  1499. <xsl:param name="wfs_output.dita" required="yes"/>
  1500. <xsl:param name="xpath_dita" required="yes"/>
  1501. <xsl:param name="xpath_value_dita" required="yes"/>
  1502. <xsl:param name="xpath" required="yes"/>
  1503. <xsl:param name="featureID_name" required="yes"/>
  1504. <xsl:param name="RelatedFeatureCount" required="yes"/>
  1505. <xsl:param name="RelatedFeaturePos" required="yes"/>
  1506. <xsl:param name="typeName" required="yes"/>
  1507. <xsl:param name="xpath_value" required="yes"/>
  1508. <xsl:param name="loop_xpath" required="yes"/>
  1509. <!--<xsl:param name="loop_xpath_save" required="yes"/>-->
  1510. <xsl:param name="xml_id" required="yes"/>
  1511. <xsl:param name="feature_pos" required="yes"/>
  1512. <xsl:param name="loop_xpath_real" required="yes"/>
  1513. <xsl:param name="input_obj_with_xpath" required="yes"/>
  1514. <xsl:param name="typeNameRealResource" required="yes"/>
  1515. <xsl:param name="loop_path_recurs_xpath" required="yes"/>
  1516. <xsl:param name="input_obj_fid" required="yes"/>
  1517. <xsl:choose>
  1518. <xsl:when test="$wfs_output"/>
  1519. <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>
  1520. </xsl:choose>
  1521. <!-- template do przetworzenia dity w celu wykrycia:
  1522. <RelatedFeature xpath="ID_BILLING_OWNER" typeName="p5_default_db:BILLING_OWNER">
  1523. <ph>Nadawca:</ph><br/>
  1524. <ph xpath="name1"/><br/>
  1525. <ph xpath="name2"/><br/>
  1526. <ph xpath="miasto"/><br/>
  1527. <ph xpath="nr_rach"/><br/>
  1528. <ph xpath="BILLING_OWNER_EMAIL"/><br/>
  1529. </RelatedFeature>
  1530. i wyrzucenia z tego pierwszego zadania ANT do otrzymania niezbednego .xml w celu jego podstawienia pod dite
  1531. w celu pozniejszego ponownego wyzwolenia tego template az do zakonczenia cyklu finalnego.
  1532. Template powinien budować projekt ant do wyzwolenia z odpowiednimi parametrami dalszymi
  1533. -->
  1534. <!-- sprawdzamy czy template pasuje do zadania wyzwolenia czy xpath=xpath_dita oraz czy typeName=typeName_dita-->
  1535. <xsl:choose>
  1536. <xsl:when test="string($featureID_name)=string($featureID_name_dita)"> <!-- bylo string($xpath_dita)= string($xpath) - ale nie jest to konieczne przy recurse ! - jest to bledne zalozenie -->
  1537. <!-- calculate query to api default_db/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=p5_default_db:IN7_DZIENNIK_KORESP&SRSNAME=EPSG:3003&featureID=IN7_DZIENNIK_KORESP.1000'-->
  1538. <!--<property name="OGC_Filter">%26lt;ogc:Filter%26gt;%26lt;ogc:PropertyIsNull%26gt;%26lt;ogc:PropertyName%26gt;the_geom%26lt;/ogc:PropertyName%26gt;%26lt;/ogc:PropertyIsNull%26gt;%26lt;/ogc:Filter%26gt;</property>-->
  1539. <!--<xsl:variable name="OGC_Filter">&amp;Filter=&lt;ogc:Filter&gt;&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="$xpath_dita"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="$xpath_value_dita"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;&lt;/ogc:Filter&gt;</xsl:variable>-->
  1540. <!--<xsl:variable name="OGC_Filter">
  1541. <xsl:choose>
  1542. <xsl:when test="RelatedFilter"><xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="RelatedFilter" copy-namespaces="no"/></xsl:message>&amp;Filter=&lt;ogc:Filter&gt;&lt;ogc:And&gt;&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="$xpath_dita"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="$xpath_value_dita"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;<xsl:for-each select="RelatedFilter">&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="@xpath"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="@xpath_value"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;</xsl:for-each>&lt;/ogc:And&gt;&lt;/ogc:Filter&gt;</xsl:when>
  1543. <xsl:otherwise>&amp;Filter=&lt;ogc:Filter&gt;&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="$xpath_dita"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="$xpath_value_dita"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;&lt;/ogc:Filter&gt;</xsl:otherwise>
  1544. </xsl:choose>
  1545. </xsl:variable>-->
  1546. <xsl:variable name="OGC_Filter">
  1547. <xsl:call-template name="simpleTypeMakeOgcFilter_merge">
  1548. <xsl:with-param name="simpleTypeMakeOgcFilter" select="simpleTypeMakeOgcFilter"/>
  1549. <xsl:with-param name="RelatedFilter" select="RelatedFilter"/>
  1550. <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
  1551. <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
  1552. </xsl:call-template>
  1553. </xsl:variable>
  1554. <xsl:if test="$debug &gt; 2"><xsl:message>#410 final OGC_Filter is <xsl:value-of select="$OGC_Filter"/>;</xsl:message></xsl:if>
  1555. <xsl:variable name="url">
  1556. <!--<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"/>-->
  1557. <xsl:value-of select="$api_url"/>/default_db/?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GetFeature&amp;TYPENAME=<xsl:value-of select="$typeNameRealResource"/>&amp;SRSNAME=EPSG:3003<xsl:value-of select="$OGC_Filter"/>
  1558. </xsl:variable>
  1559. <xsl:element name="target">
  1560. <xsl:attribute name="name" select="concat('get_related_feature_test_if_output.xml.',position(),$loop_xpath_real)"/>
  1561. <xsl:attribute name="if" select="concat('${get_related_feature_test_if_output.xml.',position(),$loop_xpath_real,'}')"/>
  1562. <fail message="#1243 ERROR IN PROCESSING FUNCTION TO BE FIXED!! already created $wfs_output.xml {$temp}/{$wfs_output.xml} "/>
  1563. </xsl:element>
  1564. <xsl:element name="target">
  1565. <xsl:attribute name="name" select="concat('get_related_feature_test_if_vals.dita.',position(),$loop_xpath_real)"/>
  1566. <xsl:attribute name="if" select="concat('${get_related_feature_test_if_vals.dita.',position(),$loop_xpath_real,'}')"/>
  1567. <fail message="#1248 ERROR IN PROCESSING FUNCTION TO BE FIXED!! already created $wfs_output.dita {$temp}/{$wfs_output.dita} "/>
  1568. </xsl:element>
  1569. <xsl:element name="target">
  1570. <xsl:attribute name="name" select="concat('get_related_feature.',position(),$loop_xpath_real)"/>
  1571. <xsl:choose>
  1572. <xsl:when test="$RelatedFeatureCount=$RelatedFeaturePos"/>
  1573. <xsl:otherwise>
  1574. <xsl:attribute name="depends" select="concat('get_related_feature.',position()-1),$loop_xpath_real"/>
  1575. </xsl:otherwise>
  1576. </xsl:choose>
  1577. <xsl:if test="$debug &gt; 1"><echo>
  1578. ()()()()()()() $debug_xsl_in_filename = <xsl:value-of select="$debug_xsl_in_filename"/>
  1579. ()()()()()()() $debug_xsl_out_filename = <xsl:value-of select="$debug_xsl_out_filename"/>
  1580. ()()()()()()() #1084 exec curl for $typeNameRealResource=<xsl:value-of select="$typeNameRealResource"/>
  1581. ()()()()()()() $feature_pos = <xsl:value-of select="$feature_pos"/> ; position() = <xsl:value-of select="position()"/>; $parallel_pos = <xsl:value-of select="$parallel_pos"/> ;
  1582. ()()()()()()() and $xpath_dita=<xsl:value-of select="$xpath_dita"/>; $xpath_value=<xsl:value-of select="$xpath_value"/>; and $xpath_value_dita=<xsl:value-of select="$xpath_value_dita"/>;
  1583. ()()()()()()() $url=<xsl:value-of select="$url"/>;
  1584. ()()()()()()() $temp = <xsl:value-of select="$temp"/> ;
  1585. ()()()()()()() $loop_xpath_real = <xsl:value-of select="$loop_xpath_real"/>;
  1586. ()()()()()()() $loop_xpath = <xsl:value-of select="$loop_xpath"/>;
  1587. ()()()()()()() $wfs_output.xml = <xsl:value-of select="concat($temp,'/',$wfs_output.xml)"/>
  1588. ()()()()()()() oczekiwany $wfs_output.dita do przetworzenia nizej ( z result-document) = <xsl:value-of select="$wfs_output.dita"/> ;
  1589. </echo></xsl:if>
  1590. <condition> <!-- sprawdzenie czy jest juz przypadkiem wytworzony output - BLAD PRZETWARZANIA -->
  1591. <xsl:attribute name="taskname" select="concat('get_related_feature_test_if_output.xml.',position(),$loop_xpath_real)"/>
  1592. <xsl:attribute name="property" select="concat('get_related_feature_test_if_output.xml.',position(),$loop_xpath_real)"/>
  1593. <available>
  1594. <xsl:attribute name="file" select="concat($temp,'/',$wfs_output.xml)"/>
  1595. </available>
  1596. </condition>
  1597. <antcall> <!-- sprawdzenie czy jest juz przypadkiem wytworzony output - BLAD PRZETWARZANIA -->
  1598. <xsl:attribute name="target" select="concat('get_related_feature_test_if_output.xml.',position(),$loop_xpath_real)"/>
  1599. </antcall>
  1600. <!--<tempfile property="out_task.dita" deleteonexit="no" destdir="temp"/>-->
  1601. <!--<tempfile property="wfs_output" deleteonexit="no" destdir="temp" suffix=".xml" />-->
  1602. <ant antfile="{$get_wfs}" target="GetXmlByUrlVerifyRetry" >
  1603. <property name="output" value="{$temp}/{$wfs_output.xml}"/>
  1604. <property name="url" value="{$url}"/>
  1605. <property name="cookie_curl_option" value="{$cookie_curl_option}"/>
  1606. </ant>
  1607. <!--<xsl:element name="exec">
  1608. <xsl:attribute name="executable" select="'curl'"/>
  1609. <xsl:attribute name="output" select="concat($temp,'/',$wfs_output.xml)"/>
  1610. <xsl:attribute name="errorproperty" select="'wfs_error'"/>
  1611. <xsl:attribute name="resultproperty" select="'wfs_result'"/>
  1612. <xsl:element name="arg">
  1613. <!-\-<xsl:attribute name="line" select='concat("-H ","&amp;Authorization: Basic ",$passwordBase64Basic," ",$url)'/>-\->
  1614. <!-\-<xsl:attribute name="line">-H 'Authorization: Basic <xsl:value-of select="$passwordBase64Basic"/>' "<xsl:value-of select="$url"/>"</xsl:attribute>-\->
  1615. <xsl:attribute name="line"> <xsl:value-of select="$cookie_curl_option"/> "<xsl:value-of select="$url"/>"</xsl:attribute>
  1616. </xsl:element>
  1617. <xsl:element name="arg">
  1618. <xsl:attribute name="line">-\-connect-timeout 5</xsl:attribute>
  1619. </xsl:element>
  1620. <xsl:element name="arg">
  1621. <xsl:attribute name="line">-\-max-time 240</xsl:attribute>
  1622. </xsl:element>
  1623. <xsl:element name="arg">
  1624. <xsl:attribute name="line">-\-retry 5</xsl:attribute>
  1625. </xsl:element>
  1626. <xsl:element name="arg">
  1627. <xsl:attribute name="line">-\-retry-max-time 1200</xsl:attribute>
  1628. </xsl:element>
  1629. </xsl:element>-->
  1630. <xsl:choose>
  1631. <xsl:when test="position()=last()">
  1632. <xsl:comment>antcall target="build_recurse_ant.<xsl:value-of select="position()+1"/>.xml"</xsl:comment>
  1633. </xsl:when>
  1634. <xsl:otherwise>
  1635. <antcall target="build_recurse_ant.{position()+1}.xml"/>
  1636. </xsl:otherwise>
  1637. </xsl:choose>
  1638. <xsl:if test="$debug &gt; 1"><echo>#1119 related .dita.xml template is: $temp(/)$wfs_output.dita=<xsl:value-of select="$temp"/> (/) <xsl:value-of select="$wfs_output.dita"/>; do przetwarzania na podstawie: $wfs_output.xml=<xsl:value-of select="$wfs_output.xml"/>;
  1639. $temp is <xsl:value-of select="$temp"/>;</echo></xsl:if>
  1640. <xsl:comment> teraz podmieniamy dane z otrzymanego xmla do pliku dita aby potem zrobic polaczony plik w kolejnym wyzwoleniu ant</xsl:comment>
  1641. <!--<delete file="{$temp}/{$wfs_output.dita}.vals.dita"/> modified to condition test - shouldnt be before! -->
  1642. <!--<exec executable="ls">
  1643. <arg line="-al"/>
  1644. <arg><xsl:attribute name="line" select="concat($temp,'/',$wfs_output.xml)"/></arg>
  1645. </exec>-->
  1646. <condition> <!-- sprawdzenie czy jest juz przypadkiem wytworzony output - BLAD PRZETWARZANIA -->
  1647. <xsl:attribute name="taskname" select="concat('get_related_feature_test_if_vals.dita.',position(),$loop_xpath_real)"/>
  1648. <xsl:attribute name="property" select="concat('get_related_feature_test_if_vals.dita.',position(),$loop_xpath_real)"/>
  1649. <available >
  1650. <xsl:attribute name="file" select="concat($temp,'/',$wfs_output.dita)"/>
  1651. </available>
  1652. </condition>
  1653. <xslt basedir="." style="{$build_recurse_ant.xsl}" in="{$temp}/{$wfs_output.dita}" destdir="./" out="{$temp}/{$wfs_output.dita}.vals.dita" >
  1654. <factory name="net.sf.saxon.TransformerFactoryImpl">
  1655. <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
  1656. <attribute name="http://saxon.sf.net/feature/initialMode" value="after_first_ant_assing_vars"/>
  1657. </factory>
  1658. <classpath location="/opt/local/share/java/saxon9he.jar"/>
  1659. <param name="wfs_output" expression="{$temp}/{$wfs_output.xml}"/>
  1660. <param name="xpath" expression="{$xpath}" /> <!-- kontrolnie - nie potrzebne -->
  1661. <param name="xpath_value" expression="{$xpath_value}" /> <!-- kontrolnie - nie potrzebne -->
  1662. <param name="loop_xpath" expression="{$loop_xpath}"/>
  1663. <param name="loop_xpath_save" expression="{$loop_xpath_save}"/>
  1664. <param name="typeName" expression="{$typeName}"/><!-- kontrolnie - nie potrzebne -->
  1665. <param name="uuid" expression="{$uuid}"/>
  1666. <param name="basedir" expression="{$basedir}"/>
  1667. <param name="recurse_ant_basedir" expression="{$recurse_ant_basedir}"/>
  1668. <param name="recurse_ant_basedir.temp" expression="{$recurse_ant_basedir.temp}"/>
  1669. <param name="recurse_ant" expression="{$recurse_ant}"/>
  1670. <param name="build_recurse_ant.xsl" expression="{$build_recurse_ant.xsl}"/>
  1671. <param name="passwordBase64Basic" expression="{$passwordBase64Basic}"/>
  1672. <param name="feature_pos" expression="{$feature_pos}"/> <!-- aby wsadzic nr wezla do $wfs_output.dita.vals.dita -->
  1673. <param name="temp" expression="{$temp}"/>
  1674. <param name="builds_to_ant.xsl" expression="{$builds_to_ant.xsl}"/>
  1675. <param name="cookie_curl_option" expression="{$cookie_curl_option}"/>
  1676. <param name="api_url" expression="{$api_url}"/>
  1677. <param name="loop_path_recurs" expression="{$loop_path_recurs}"/>
  1678. <param name="ignore_maxOccurs_0" expression="{$ignore_maxOccurs_0}"/>
  1679. <param name="xpath_query" expression="{$xpath_query}"/>
  1680. <param name="xpath_query.xsl" expression="{$xpath_query.xsl}"/>
  1681. <param name="empty.xml" expression="{$empty.xml}"/>
  1682. <param name="simpleSchema_dir" expression="{$simpleSchema_dir}"/>
  1683. <param name="default_db_xml_cache.public" expression="{$default_db_xml_cache.public}"/>
  1684. <param name="ant-launcher.jar" expression="{$ant-launcher.jar}"/>
  1685. <param name="loop_path_recurs_xpath" expression="{$loop_path_recurs_xpath}"/>
  1686. <param name="build_check_java_process_count.xml" expression="{$build_check_java_process_count.xml}"/>
  1687. <param name="parallel_java_process_max" expression="{$parallel_java_process_max}"/>
  1688. <param name="debug_xsl_in_filename" expression="{$temp}/{$wfs_output.dita}"/>
  1689. <param name="debug_xsl_out_filename" expression="{$temp}/{$wfs_output.dita}.vals.dita"/>
  1690. <param name="parallel_pos">
  1691. <xsl:attribute name="expression" select="'${parallel_pos}'"/>
  1692. </param>
  1693. <param name="process_locks" expression="{$process_locks}"/>
  1694. <param name="get_wfs" expression="{$get_wfs}"/>
  1695. <param name="recurse_ant_basedir.recurse_cache" expression="{$recurse_ant_basedir.recurse_cache}"/>
  1696. <param name="build_recurse_ant_cache_control.xsl" expression="{$build_recurse_ant_cache_control.xsl}"/>
  1697. <param name="typeNameRoot" expression="{$typeNameRoot}"/>
  1698. <param name="external_schema_table.path" expression="{$external_schema_table.path}"/>
  1699. <param name="default_db.instance.xml" expression="{$default_db.instance.xml}"/>
  1700. <param name="detect_resource_type.local" expression="${detect_resource_type.local}"/>
  1701. <param expression="${detect_objects_parent_relations.local}">
  1702. <xsl:attribute name="name" select="'{http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd}detect_objects_parent_relations.local'"/>
  1703. </param>
  1704. <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
  1705. <param name="default_db_targetNamespace_detect_string" expression="${default_db_targetNamespace_detect_string}"/>
  1706. <param name="zasob_id_db_targetNamespace_detect_string" expression="${zasob_id_db_targetNamespace_detect_string}"/>
  1707. </xslt>
  1708. </xsl:element>
  1709. <!-- zapisujemy wynik naszego biezacego przetwarzania dita element nizej do kolejnego przejechania z ant wyniku dla podstawienia danych -->
  1710. <!-- blad - result jest po tym template -->
  1711. <xsl:if test="$debug &gt; 2"><xsl:message> +++++ #276 $feature_pos=<xsl:value-of select="$feature_pos"/>; $xml_id=<xsl:value-of select="$xml_id"/>;
  1712. +++++ $temp is <xsl:value-of select="$temp"/> ;
  1713. +++++ writing $wfs_output.dita to <xsl:value-of select="$wfs_output.dita"/>;
  1714. +++++ $temp/$wfs_output.dita = <xsl:value-of select="concat($temp,'/',$wfs_output.dita)"/>
  1715. </xsl:message></xsl:if>
  1716. <!-- ten plik moze byc raz bo zawiera tylko mape do przeksztalcenia danego wezla -->
  1717. <xsl:result-document href="{$temp}/{$wfs_output.dita}">
  1718. <xsl:comment>current $feature_pos=<xsl:value-of select="$feature_pos"/>; $loop_xpath=<xsl:value-of select="$loop_xpath"/>;</xsl:comment>
  1719. <!--<xsl:copy-of select="."/>-->
  1720. <xsl:element name="{name()}">
  1721. <xsl:copy-of select="@*"/>
  1722. <xsl:attribute name="feature_pos" select="$feature_pos"/>
  1723. <xsl:copy-of select="./*" exclude-result-prefixes="#all" copy-namespaces="no"/>
  1724. </xsl:element>
  1725. </xsl:result-document>
  1726. <!--<xsl:choose>
  1727. <xsl:when test="$feature_pos=1"><xsl:message>#327 propably first unaviable (<xsl:value-of select="$wfs_output.dita"/>) - writing</xsl:message>
  1728. <xsl:result-document href="{$wfs_output.dita}">
  1729. <xsl:comment>current $loop_xpath=<xsl:value-of select="$loop_xpath"/>;</xsl:comment>
  1730. <xsl:copy-of select="."/></xsl:result-document>
  1731. </xsl:when>
  1732. <xsl:otherwise>
  1733. <xsl:message>#227.1 probably exists file:<xsl:value-of select="$wfs_output.dita"/>; - bypassing </xsl:message>
  1734. </xsl:otherwise>
  1735. </xsl:choose>-->
  1736. </xsl:when>
  1737. <xsl:otherwise>
  1738. <error>
  1739. <xsl:attribute name="xpath" select="$xpath"/>
  1740. <xsl:attribute name="xpath_dita" select="$xpath_dita"/>
  1741. <xsl:attribute name="xpath_value" select="$xpath_value"/>
  1742. <xsl:attribute name="xpath_value_dita" select="$xpath_value_dita"/>
  1743. <xsl:attribute name="typeName" select="$typeName"/>
  1744. <xsl:attribute name="typeName_dita" select="$typeName_dita"/>
  1745. <xsl:attribute name="featureID_name" select="$featureID_name"/>
  1746. <xsl:attribute name="featureID_name_dita" select="$featureID_name_dita"/>
  1747. <echo message="OUTPUT__START"/>
  1748. <echo>
  1749. Current template doesnt fit the requested data - TODO search for another template! string($xpath_dita)(<xsl:value-of select="$xpath_dita"/>) != string($xpath)(<xsl:value-of select="$xpath"/>) and string($featureID_name)(<xsl:value-of select="$featureID_name"/>) !=string($featureID_name_dita)(<xsl:value-of select="$featureID_name_dita"/>)
  1750. </echo>
  1751. <echo message="OUTPUT__END"/>
  1752. </error>
  1753. </xsl:otherwise>
  1754. </xsl:choose>
  1755. </xsl:template>
  1756. <xsl:template name="simpleTypeMakeOgcFilter_merge"><!-- do zrobienia polaczonego filtru OGC -->
  1757. <xsl:param name="simpleTypeMakeOgcFilter" required="yes"/>
  1758. <xsl:param name="xpath_dita" required="yes"/>
  1759. <xsl:param name="xpath_value_dita" required="yes"/>
  1760. <xsl:param name="RelatedFilter"/>
  1761. <xsl:if test="$debug &gt; 2"><xsl:message>#1754 name="simpleTypeMakeOgcFilter_merge"
  1762. $simpleTypeMakeOgcFilter = <xsl:copy-of select="$simpleTypeMakeOgcFilter"></xsl:copy-of>
  1763. $xpath_dita = <xsl:copy-of select="$xpath_dita"/>
  1764. $xpath_value_dita = <xsl:copy-of select="$xpath_value_dita"/>
  1765. #EOF
  1766. </xsl:message>
  1767. </xsl:if>
  1768. <!--&amp;Filter=&lt;ogc:Filter&gt;&lt;ogc:And&gt;<xsl:choose><xsl:when test="$RelatedFilter"><xsl:if test="$debug &gt; 2"><xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="$RelatedFilter" copy-namespaces="no"/></xsl:message></xsl:if>&lt;ogc:And&gt;&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="$xpath_dita"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="$xpath_value_dita"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;<xsl:for-each select="$RelatedFilter">&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="@xpath"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="@xpath_value"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;</xsl:for-each>&lt;/ogc:And&gt;</xsl:when><xsl:otherwise>&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="$xpath_dita"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="$xpath_value_dita"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;</xsl:otherwise></xsl:choose><xsl:if test="$simpleTypeMakeOgcFilter">&lt;ogc:Or&gt;<xsl:if test="count($simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo) &gt; 1">&lt;ogc:Or&gt;</xsl:if><xsl:for-each select="$simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo">&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="ogc:PropertyName/text()"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="ogc:Literal/text()"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;</xsl:for-each>&lt;/ogc:Or&gt;<xsl:if test="count($simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo) &gt; 1">&lt;/ogc:Or&gt;</xsl:if></xsl:if>&lt;/ogc:And&gt;&lt;/ogc:Filter&gt;-->
  1769. <!-- &amp;Filter=&lt;ogc:Filter&gt;&lt;ogc:And&gt;<xsl:choose>
  1770. <xsl:when test="$RelatedFilter"><xsl:if test="$debug &gt; 2">
  1771. <xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="$RelatedFilter" copy-namespaces="no"/></xsl:message>
  1772. </xsl:if>&lt;ogc:And&gt;&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="$xpath_dita"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="$xpath_value_dita"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;<xsl:for-each select="$RelatedFilter">&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="@xpath"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;<xsl:value-of select="@xpath_value"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;</xsl:for-each>&lt;/ogc:And&gt;</xsl:when><xsl:otherwise>&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="$xpath_dita"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;
  1773. <xsl:value-of select="$xpath_value_dita"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;</xsl:otherwise></xsl:choose><xsl:if test="$simpleTypeMakeOgcFilter">&lt;ogc:Or&gt;<xsl:if test="count($simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo) &gt; 1">&lt;ogc:Or&gt;</xsl:if>
  1774. <xsl:for-each select="$simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo">&lt;ogc:PropertyIsEqualTo&gt;&lt;ogc:PropertyName&gt;<xsl:value-of select="ogc:PropertyName/text()"/>&lt;/ogc:PropertyName&gt;&lt;ogc:Literal&gt;
  1775. <xsl:value-of select="ogc:Literal/text()"/>&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsEqualTo&gt;</xsl:for-each>&lt;/ogc:Or&gt;<xsl:if test="count($simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo) &gt; 1">
  1776. &lt;/ogc:Or&gt;</xsl:if></xsl:if>&lt;/ogc:And&gt;&lt;/ogc:Filter&gt;
  1777. -->
  1778. <!--<RelatedFilter xpath="PARENT_ID" xpath_value=""/>-->
  1779. <xsl:value-of select="'&amp;Filter=&lt;ogc:Filter&gt;'"/>
  1780. <xsl:variable name="Filter">
  1781. <And>
  1782. <xsl:for-each select="$RelatedFilter">
  1783. <ogc:PropertyIsEqualTo>
  1784. <ogc:PropertyName><xsl:value-of select="@xpath"/></ogc:PropertyName>
  1785. <ogc:Literal><xsl:value-of select="@xpath_value"/></ogc:Literal>
  1786. </ogc:PropertyIsEqualTo>
  1787. </xsl:for-each>
  1788. <ogc:PropertyIsEqualTo>
  1789. <ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName>
  1790. <ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal>
  1791. </ogc:PropertyIsEqualTo>
  1792. <And>
  1793. <xsl:for-each select="$simpleTypeMakeOgcFilter/*">
  1794. <xsl:copy-of select="."/>
  1795. </xsl:for-each>
  1796. </And>
  1797. </And>
  1798. </xsl:variable>
  1799. <xsl:apply-templates select="$Filter" mode="simpleTypeMakeOgcFilter_merge_apply"/>
  1800. <xsl:value-of select="'&lt;/ogc:Filter&gt;'"/>
  1801. </xsl:template>
  1802. <xsl:template match="And" mode="simpleTypeMakeOgcFilter_merge_apply">
  1803. <xsl:choose>
  1804. <xsl:when test="child::node()">
  1805. <xsl:value-of select="'&lt;ogc:And&gt;'"/>
  1806. <xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_apply"/>
  1807. <xsl:value-of select="'&lt;/ogc:And&gt;'"/>
  1808. </xsl:when>
  1809. </xsl:choose>
  1810. </xsl:template>
  1811. <xsl:template match="*" mode="simpleTypeMakeOgcFilter_merge_apply" xpath-default-namespace="http://www.opengis.net/ogc">
  1812. <xsl:value-of select="concat('&lt;',name(),'&gt;')"/>
  1813. <xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_apply"/>
  1814. <xsl:value-of select="concat('&lt;/',name(),'&gt;')"/>
  1815. </xsl:template>
  1816. <xsl:template match="text()" mode="simpleTypeMakeOgcFilter_merge_apply">
  1817. <xsl:value-of select="."/>
  1818. </xsl:template>
  1819. <!-- second step from local ant leaf -->
  1820. <!-- wyzwalane przez http://saxon.sf.net/feature/initialMode w template match="RelatedFeature" mode ant_target ,
  1821. ktore jest wyzwalane w match="*" bez mode , ktore jest inicjowane przez niniejszy template w kolejnym wyzwoleniu
  1822. dostajemy na input {$temp}/{$wfs_output.dita} a na output {$temp}/{$wfs_output.dita}.vals.dita - co powinno zawierac podstawione zmienne z @xpath
  1823. nazwy z match="*" not(mode):
  1824. name="wfs_output.xml" select="concat($wfs_output,'.',position(),'.',$feature_pos,'.xml')
  1825. name="wfs_output.dita" select="concat($wfs_output,'.',position(),'.',$feature_pos,'.dita.xml')
  1826. -->
  1827. <xsl:template match="RelatedFeature" mode="after_first_ant_assing_vars">
  1828. <xsl:param name="loop_xpath" select="$loop_xpath"/>
  1829. <RelatedFeatureRoot>
  1830. <xsl:if test="$debug &gt; 2"><xsl:message>
  1831. {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} #1348 after_first_ant_assing_vars @feature_pos=<xsl:value-of select="@feature_pos"/> &gt;$feature_pos_parent; @xml_id=<xsl:value-of select="@xml_id"/>; templ match RelatedFeature mode after_first_ant_assing_vars dla @typeName=<xsl:value-of select="@typeName"/>;
  1832. {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} $debug_xsl_in_filename= <xsl:value-of select="$debug_xsl_in_filename"/>
  1833. {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} $debug_xsl_out_filename= <xsl:value-of select="$debug_xsl_out_filename"/>
  1834. {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} try to open $wfs_output=doc(<xsl:value-of select="$wfs_output"/>); </xsl:message></xsl:if>
  1835. <!-- first assign xpath to features from -->
  1836. <xsl:variable name="wfs_output_nodes" select="doc($wfs_output)"/>
  1837. <xsl:variable name="current_RelatedFeature" select="*"/>
  1838. <xsl:variable name="xml_id" select="@xml_id"/>
  1839. <xsl:variable name="feature_pos_parent" select="@feature_pos"/>
  1840. <!--<input_obj_with_xpath_debug>
  1841. <xsl:copy-of select="$wfs_output_nodes"/>
  1842. </input_obj_with_xpath_debug>-->
  1843. <xsl:if test="$debug &gt; 2"><xsl:message>
  1844. {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} #354 count($wfs_output_nodes//gml:featureMember) <xsl:value-of select="count($wfs_output_nodes//gml:featureMember)"/></xsl:message></xsl:if>
  1845. <!-- tutaj jest blad przetwarzania ze wrzuca po rekordzie do kolumny - trzeba przetworzyc dla kazdego feature member -->
  1846. <xsl:for-each select="$wfs_output_nodes//gml:featureMember">
  1847. <xsl:if test="$debug &gt; 2"><xsl:message>
  1848. {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} #1466 foreach from $wfs_output=<xsl:value-of select="$wfs_output"/>
  1849. {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} @fid=<xsl:value-of select="*/@fid"/>; position()=<xsl:value-of select="position()"/>; </xsl:message></xsl:if>
  1850. <xsl:variable name="input_obj_with_xpath">
  1851. <xsl:apply-templates mode="after_first_ant_assing_xpath" select="node()/*"/> <!-- zeby nie wstawial do xpath nazwy feature - IN7_DZIENNIK_KORESP/ID itp -->
  1852. </xsl:variable>
  1853. <xsl:variable name="input_obj_fid" select="*"/> <!-- dla wykrycia @fid -->
  1854. <!--<input_obj_with_xpath_debug>
  1855. <xsl:attribute name="xpath" select="$xpath"/>
  1856. <!-\-<xsl:attribute name="xpath_dita" select="$xpath_dita"/>-\->
  1857. <xsl:attribute name="xpath_value" select="$xpath_value"/>
  1858. <!-\-<xsl:attribute name="xpath_value_dita" select="$xpath_value_dita"/>-\->
  1859. <xsl:attribute name="typeName" select="$typeName"/>
  1860. <!-\-<xsl:attribute name="typeName_dita" select="$typeName_dita"/>-\->
  1861. <!-\-<xsl:attribute name="featureID_name" select="$featureID_name"/>-\->
  1862. <!-\-<xsl:attribute name="featureID_name_dita" select="$featureID_name_dita"/>-\->
  1863. <xsl:copy-of select="$input_obj_with_xpath"/>
  1864. </input_obj_with_xpath_debug>-->
  1865. <!--<input_node_debug>
  1866. <xsl:copy-of select="."/>
  1867. </input_node_debug>-->
  1868. <!-- DEBUG CACHE instances creation/testing moment 2017-07-06 -->
  1869. <!--<xsl:result-document href="{$temp}/{$loop_xpath}/fid_{$input_obj_fid/@fid}">
  1870. <DEBUG_CACHE>
  1871. <xsl:copy-of select="$input_obj_fid/@fid"/>
  1872. </DEBUG_CACHE>
  1873. </xsl:result-document>-->
  1874. <xsl:apply-templates mode="after_first_ant_assing_vars_childs" select="$current_RelatedFeature">
  1875. <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
  1876. <xsl:with-param name="xml_id_parent" select="$xml_id"/>
  1877. <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
  1878. <xsl:with-param name="feature_pos" select="position()"/><!-- wiecej features z relacji dokladamy pozycje -->
  1879. <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/> <!-- @2017-04 byly nadpisywane informacje - trzeba dorzucic jeszcze $feature_pos_parent w nazwie przetwarzania -->
  1880. <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
  1881. </xsl:apply-templates>
  1882. <!-- cache tasks ? -->
  1883. </xsl:for-each>
  1884. <xsl:if test="$debug &gt; 2"><xsl:message>
  1885. {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} #1499 EOF foreach from #1466 from $wfs_output=<xsl:value-of select="$wfs_output"/></xsl:message></xsl:if>
  1886. </RelatedFeatureRoot>
  1887. </xsl:template>
  1888. <xsl:template match="wfs:FeatureCollection|gml:featureMember" mode="after_first_ant_assing_xpath">
  1889. <xsl:apply-templates mode="after_first_ant_assing_xpath"/>
  1890. </xsl:template>
  1891. <xsl:template mode="after_first_ant_assing_xpath" match="*">
  1892. <xsl:param name="curr_xpath"/>
  1893. <xsl:param name="loop_xpath" select="$loop_xpath"/>
  1894. <xsl:choose>
  1895. <xsl:when test="name()=$typeName">
  1896. <xsl:apply-templates mode="after_first_ant_assing_xpath">
  1897. <xsl:with-param name="curr_xpath" select="$curr_xpath"/>
  1898. <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
  1899. </xsl:apply-templates>
  1900. </xsl:when>
  1901. <xsl:otherwise>
  1902. <xsl:variable name="curr_xpath_tmpl">
  1903. <xsl:choose>
  1904. <xsl:when test="$curr_xpath=''">
  1905. <xsl:value-of select="local-name()"/> <!-- bylo local-name() - trzeba dorzucic xpath przechodzacy aby budowal sie w kwestii -->
  1906. </xsl:when>
  1907. <xsl:otherwise>
  1908. <xsl:value-of select="concat($curr_xpath,'/',local-name())"/>
  1909. </xsl:otherwise>
  1910. </xsl:choose>
  1911. </xsl:variable>
  1912. <!--<xsl:variable name="curr_xpath_tmpl" select="'asdf'"/>-->
  1913. <xsl:element name="{name()}">
  1914. <xsl:attribute name="xpath" select="$curr_xpath_tmpl"/>
  1915. <xsl:for-each select="@*">
  1916. <xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute>
  1917. </xsl:for-each>
  1918. <xsl:value-of select="text()"/>
  1919. <xsl:apply-templates mode="after_first_ant_assing_xpath">
  1920. <xsl:with-param name="curr_xpath" select="$curr_xpath_tmpl"/>
  1921. </xsl:apply-templates>
  1922. </xsl:element>
  1923. </xsl:otherwise>
  1924. </xsl:choose>
  1925. </xsl:template>
  1926. <xsl:template match="text()" mode="after_first_ant_assing_xpath"/>
  1927. <xsl:template match="simpleTypeMakeOgcFilter" mode="after_first_ant_assing_vars_childs">
  1928. <xsl:if test="$debug &gt; 2"><xsl:message>#621 bypassing simpleTypeMakeOgcFilter in after_first_ant_assing_vars_childs</xsl:message></xsl:if>
  1929. </xsl:template>
  1930. <!-- przetwarzanie kolejne w celu podstawienia wartosci i wystawienia build dla kolejnych wezlow - problem z obsluga rownorzednie zagniezdzonych wezlow poprzez inne wezly -->
  1931. <xsl:template match="*" mode="after_first_ant_assing_vars_childs">
  1932. <xsl:param name="xml_id_parent" required="yes"/>
  1933. <xsl:param name="loop_xpath" required="yes"/>
  1934. <xsl:param name="input_obj_with_xpath" required="yes"/>
  1935. <xsl:param name="feature_pos" required="yes"/>
  1936. <xsl:param name="feature_pos_parent" required="yes"/>
  1937. <xsl:param name="input_obj_fid" required="no"/>
  1938. <xsl:for-each select=".">
  1939. <xsl:choose>
  1940. <!--<xsl:when test="node()='topic'">asdad</xsl:when>-->
  1941. <!--<xsl:when test="name()='RelatedFeature'">
  1942. <xsl:for-each select="data/apiname[@base='PROCES_INCLUDE']">
  1943. <xsl:apply-templates mode="PROCES_INCLUDE">
  1944. <xsl:with-param name="ID_PROCES" select="text()"/>
  1945. </xsl:apply-templates>
  1946. </xsl:for-each>
  1947. </xsl:when>-->
  1948. <!--<xsl:when test="name()='data-about'">
  1949. <xsl:for-each select="data/apiname[@base='PROCES_INCLUDE']">
  1950. <xsl:apply-templates mode="PROCES_INCLUDE">
  1951. <xsl:with-param name="ID_PROCES" select="text()"/>
  1952. </xsl:apply-templates>
  1953. </xsl:for-each>
  1954. </xsl:when>-->
  1955. <xsl:when test="1=2"/>
  1956. <xsl:otherwise>
  1957. <xsl:element name="{name()}">
  1958. <xsl:if test="$input_obj_fid">
  1959. <!--<xsl:attribute name="input_obj_fid_name" select="$input_obj_fid/name()"/>-->
  1960. <xsl:attribute name="fid" select="$input_obj_fid/@fid"/>
  1961. </xsl:if>
  1962. <!--<xsl:copy-of select="namespace::node()"/>-->
  1963. <xsl:for-each select="@*">
  1964. <xsl:choose>
  1965. <xsl:when test="name()='xpath'">
  1966. <!--<xsl:attribute name="xpath_parsed" select="."/>-->
  1967. <!--1:<xsl:value-of select="$parent_obj//node()[@system_cache__appinfo:xpath=$xpath]/text()"/>-->
  1968. <!--<xsl:value-of select="$parent_obj//node()[local-name()=$xpath]/text()"/>-->
  1969. <!--V:<xsl:value-of select="$xpath"/>-->
  1970. </xsl:when>
  1971. <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
  1972. </xsl:choose>
  1973. </xsl:for-each>
  1974. <xsl:choose>
  1975. <xsl:when test="@xpath">
  1976. <!--<xsl:variable name="escaped_html_to_xml">
  1977. <xsl:call-template name="system_cache__appinfo:escaped_html_to_xml">
  1978. <xsl:with-param name="html" select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/text()"/>
  1979. </xsl:call-template>
  1980. </xsl:variable>-->
  1981. <!--<xsl:variable name="enter_to_ph">
  1982. <xsl:apply-templates mode="enter_to_ph" select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]">
  1983. <xsl:with-param name="count" select="count($input_obj_with_xpath/node()[local-name()=current()/@xpath])"/>
  1984. <xsl:with-param name="element" select="name()"/>
  1985. <!-\-<xsl:with-param name="xpath_token_filter" select="@xpath_token_filter"/>-\-><!-\- mozliwosc wybrania pierwszego wyrazu np ' ' -\->
  1986. <!-\-<xsl:with-param name="xpath_token" select="@xpath_token"/>-\-><!-\- mozliwosc wybrania pierwszego wyrazu np 1 -\->
  1987. </xsl:apply-templates>
  1988. </xsl:variable>-->
  1989. <xsl:variable name="enter_to_ph">
  1990. <xsl:choose>
  1991. <xsl:when test="@xpath_token_filter and @xpath_token ">
  1992. <!-- implementacja filtra dla czegos oddzielonego parametrem -->
  1993. <xsl:variable name="xpath_token_filter" select="tokenize($input_obj_with_xpath/node()[local-name()=current()/@xpath],@xpath_token_filter)"/>
  1994. <xsl:for-each select=" tokenize(@xpath_token,' ')">
  1995. <xsl:variable name="xpath_token" select="number(.)"/>
  1996. <xsl:copy-of select="$xpath_token_filter[$xpath_token]"></xsl:copy-of>
  1997. </xsl:for-each>
  1998. </xsl:when>
  1999. <xsl:when test="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/*">
  2000. <xsl:copy-of select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/*"/>
  2001. </xsl:when>
  2002. <xsl:otherwise>
  2003. <xsl:copy-of select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/text()"/>
  2004. </xsl:otherwise>
  2005. </xsl:choose>
  2006. </xsl:variable>
  2007. <xsl:copy-of select="$enter_to_ph"/>
  2008. </xsl:when>
  2009. </xsl:choose>
  2010. <!--<xsl:comment>#1938 value of text()</xsl:comment>-->
  2011. <xsl:value-of select="text()"/>
  2012. <xsl:apply-templates mode="after_first_ant_assing_vars_childs">
  2013. <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
  2014. <xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>
  2015. <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
  2016. <xsl:with-param name="feature_pos" select="$feature_pos"/>
  2017. <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/>
  2018. <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
  2019. </xsl:apply-templates>
  2020. </xsl:element>
  2021. </xsl:otherwise>
  2022. </xsl:choose>
  2023. </xsl:for-each>
  2024. </xsl:template>
  2025. <xsl:template match="RelatedFeature" mode="after_first_ant_assing_vars_childs">
  2026. <xsl:if test="$debug &gt; 2"><xsl:message>#1638 ignored @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; @typeName=<xsl:value-of select="@typeName"/>; @xml_id=<xsl:value-of select="@xml_id"/>; </xsl:message></xsl:if>
  2027. </xsl:template> <!-- to disable ignored maxOccurs=0 -->
  2028. <xsl:template match="RelatedFeature[not(@system_cache__appinfo:maxOccurs='0') or not($ignore_maxOccurs_0)]" mode="after_first_ant_assing_vars_childs">
  2029. <xsl:param name="input_obj_with_xpath" required="yes"/>
  2030. <xsl:param name="xml_id_parent" required="yes"/>
  2031. <xsl:param name="loop_xpath" select="$loop_xpath"/>
  2032. <xsl:param name="feature_pos" required="yes"/>
  2033. <xsl:param name="feature_pos_parent" required="yes"/>
  2034. <xsl:param name="input_obj_fid" required="yes"/>
  2035. <xsl:if test="$debug &gt; 2"><xsl:message>#411 $feature_pos=<xsl:value-of select="$feature_pos"/>; mode after_first_ant_assing_vars_childs bylo $loop_xpath=<xsl:value-of select="$loop_xpath"/>;</xsl:message></xsl:if>
  2036. <!-- jest okazja do zrobienia bilda aby sciagnal rzeczy nizej -->
  2037. <xsl:variable name="featureID_name" select="substring-after(@typeName,':')"/>
  2038. <xsl:variable name="xml_id" select="@xml_id"/>
  2039. <xsl:variable name="loop_xpath" select="concat($loop_xpath,'/',$xml_id,'.',$feature_pos)"/> <!-- loop path too long ,'.',$featureID_name -->
  2040. <!--<xsl:variable name="loop_xpath_save" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>--> <!-- tutaj zapisal sie build z wezla z parent -->
  2041. <!--<debug_358_RelatedFeature>
  2042. <xsl:copy-of select="$input_obj_with_xpath"/>
  2043. </debug_358_RelatedFeature>-->
  2044. <!--<xsl:variable name="feature_pos">
  2045. <xsl:choose>
  2046. <xsl:when test="$feature_pos=1"/>
  2047. <xsl:otherwise><xsl:value-of select="$feature_pos"/></xsl:otherwise>
  2048. </xsl:choose>
  2049. </xsl:variable>-->
  2050. <xsl:variable name="test_xpath_query">
  2051. <xsl:call-template name="test_xpath_query">
  2052. <xsl:with-param name="featureID_name_dita" select="$featureID_name"/>
  2053. <xsl:with-param name="ignore_maxOccurs_0" select="$ignore_maxOccurs_0"/>
  2054. <xsl:with-param name="system_cache__appinfo:maxOccurs" select="@system_cache__appinfo:maxOccurs"/>
  2055. <xsl:with-param name="xpath_query" select="$xpath_query"/>
  2056. </xsl:call-template>
  2057. </xsl:variable>
  2058. <xsl:choose>
  2059. <xsl:when test="$test_xpath_query='1'">
  2060. <xsl:if test="$debug &gt; 2"><xsl:message>[][][][][]\/\/\/\/\/\/\/\/\/\/\/ #1540 jest okazja do zrobienia bilda $feature_pos_parent = <xsl:value-of select="$feature_pos_parent"/> ; $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"/>; match=RelatedFeature mode=after_first_ant_assing_vars_childs </xsl:message></xsl:if>
  2061. <xsl:if test="$debug &gt; 2"><xsl:message>[][][][][]\/\/\/\/\/\/\/\/\/\/\/ #1541 WRITING RelatedFeature to <xsl:value-of select="concat($temp,'/',$loop_xpath,'/build.xml')"/> ; \/\/\/\/\/\/\/\/\/\/[][][][][][][][] </xsl:message></xsl:if>
  2062. <xsl:choose>
  2063. <xsl:when test=" doc-available(concat($temp,'/',$loop_xpath,'/build.xml'))"> <!-- bylo : doc-available(concat($temp,'/',$uuid,'.build_',$loop_xpath,'.',$feature_pos_parent,'.',$feature_pos,'.xml')) zmieniamy strukture przetwarzania add $feature_pos_parent -->
  2064. <xsl:message terminate="yes">[][][][][]\/\/\/\/\/\/\/\/\/\/\/ ERROR ERROR previous file exists - SOME ERROR IN LEAF PROCESSING OCCURED! </xsl:message>
  2065. </xsl:when>
  2066. <xsl:otherwise>
  2067. <xsl:if test="$debug &gt; 2"><xsl:message>[][][][][]\/\/\/\/\/\/\/\/\/\/\/ OK no previous file exists ;-) </xsl:message></xsl:if>
  2068. </xsl:otherwise>
  2069. </xsl:choose>
  2070. <xsl:result-document href="{$temp}/{$loop_xpath}/build.xml">
  2071. <xsl:apply-templates select=".">
  2072. <xsl:with-param name="typeName" select="@typeName"/>
  2073. <xsl:with-param name="xpath" select="@xpath"/>
  2074. <xsl:with-param name="xpath_value" select="@xpath_value"/>
  2075. <!--<xsl:with-param name="loop_xpath_save" select="$loop_xpath"/>-->
  2076. <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
  2077. <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
  2078. <xsl:with-param name="wfs_output" select="concat($uuid,'.',$loop_xpath)" />
  2079. <xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>
  2080. <xsl:with-param name="feature_pos" select="$feature_pos"/>
  2081. <xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>
  2082. <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/>
  2083. <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
  2084. <!--<xsl:with-param name="wfs_output.xml" />-->
  2085. </xsl:apply-templates>
  2086. </xsl:result-document>
  2087. <xsl:element name="RelatedFeature">
  2088. <xsl:copy-of select="@*"/>
  2089. <xsl:attribute name="featureID_name" select="$featureID_name"/>
  2090. <xsl:attribute name="loop_xpath" select="$loop_xpath"/>
  2091. <xsl:attribute name="feature_pos" select="$feature_pos"/>
  2092. <xsl:attribute name="feature_pos_parent" select="$feature_pos_parent"/>
  2093. <xsl:attribute name="fid" select="$input_obj_fid/@fid"/>
  2094. </xsl:element>
  2095. </xsl:when>
  2096. <xsl:otherwise>
  2097. <xsl:if test="$debug &gt; 2"><xsl:message terminate="no">#389b
  2098. #
  2099. #
  2100. #
  2101. BYPASSED BY $test_xpath_query=<xsl:value-of select="$test_xpath_query"/>; 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
  2102. #
  2103. #</xsl:message></xsl:if>
  2104. </xsl:otherwise>
  2105. </xsl:choose>
  2106. </xsl:template>
  2107. <xsl:template match="RelatedFeatureLoop" mode="after_first_ant_assing_vars_childs">
  2108. <xsl:if test="$debug &gt; 2"><xsl:message>#1718 ignored @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; @typeName=<xsl:value-of select="@typeName"/>; @xml_id=<xsl:value-of select="@xml_id"/>; </xsl:message></xsl:if>
  2109. </xsl:template>
  2110. <xsl:template match="RelatedFeatureLoop[not(@system_cache__appinfo:maxOccurs='0') or not($ignore_maxOccurs_0)]" mode="after_first_ant_assing_vars_childs">
  2111. <xsl:param name="input_obj_with_xpath" required="yes"/>
  2112. <xsl:param name="xml_id_parent" required="yes"/>
  2113. <xsl:param name="loop_xpath" select="$loop_xpath"/>
  2114. <xsl:param name="feature_pos" required="yes"/>
  2115. <xsl:param name="feature_pos_parent" required="yes"/>
  2116. <xsl:param name="input_obj_fid" required="yes"/>
  2117. <xsl:if test="$debug &gt; 2"><xsl:message>#411-817 $feature_pos=<xsl:value-of select="$feature_pos"/>; mode after_first_ant_assing_vars_childs bylo $loop_xpath=<xsl:value-of select="$loop_xpath"/>;</xsl:message></xsl:if>
  2118. <!-- jest okazja do zrobienia bilda aby sciagnal rzeczy nizej -->
  2119. <xsl:variable name="featureID_name" select="substring-after(@typeName,':')"/>
  2120. <xsl:variable name="xml_id" select="@xml_id"/>
  2121. <xsl:variable name="loop_xpath" select="concat($loop_xpath,'/',$xml_id,'.',$feature_pos)"/><!-- limit path ,'.',$featureID_name -->
  2122. <!--<xsl:variable name="loop_xpath_save" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>--> <!-- tutaj zapisal sie build z wezla z parent -->
  2123. <!--<debug_358_RelatedFeature>
  2124. <xsl:copy-of select="$input_obj_with_xpath"/>
  2125. </debug_358_RelatedFeature>-->
  2126. <!--<xsl:variable name="feature_pos">
  2127. <xsl:choose>
  2128. <xsl:when test="$feature_pos=1"/>
  2129. <xsl:otherwise><xsl:value-of select="$feature_pos"/></xsl:otherwise>
  2130. </xsl:choose>
  2131. </xsl:variable>-->
  2132. <xsl:variable name="loop_path_recurs">
  2133. <xsl:choose>
  2134. <xsl:when test=" string-length($loop_path_recurs) &lt;1">
  2135. <xsl:value-of select="concat('/',$loop_xpath)"/> <!-- bylo $feature_pos , concat('/',@xml_id,'.',$uuid,'.',$feature_pos_parent,'.',$feature_pos) -->
  2136. </xsl:when>
  2137. <xsl:otherwise><xsl:value-of select="concat($loop_path_recurs,'/',$loop_xpath)"/></xsl:otherwise>
  2138. </xsl:choose>
  2139. </xsl:variable>
  2140. <xsl:if test="$debug &gt; 2"><xsl:message>
  2141. \/\/\/\/\/\/\/\/\/\/\/ #1598 RelatedFeatureLoop jest okazja do zrobienia bilda $feature_pos_parent=<xsl:value-of select="$feature_pos_parent"/> $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"/>; match=RelatedFeature mode=after_first_ant_assing_vars_childs
  2142. \/\/\/\/\/\/\/\/\/\/\/ $debug_xsl_in_filename= <xsl:value-of select="$debug_xsl_in_filename"/>
  2143. \/\/\/\/\/\/\/\/\/\/\/ $debug_xsl_out_filename= <xsl:value-of select="$debug_xsl_out_filename"/>
  2144. \/\/\/\/\/\/\/\/\/\/\/ @fid=<xsl:value-of select="*/@fid"/>; position()=<xsl:value-of select="position()"/>; $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
  2145. \/\/\/\/\/\/\/\/\/\/\/ to <xsl:value-of select="concat($temp,'/',$loop_xpath,'/build_root.xml')"/></xsl:message></xsl:if>
  2146. <xsl:variable name="test_xpath_query">
  2147. <xsl:call-template name="test_xpath_query">
  2148. <xsl:with-param name="featureID_name_dita" select="$featureID_name"/>
  2149. <xsl:with-param name="ignore_maxOccurs_0" select="$ignore_maxOccurs_0"/>
  2150. <xsl:with-param name="system_cache__appinfo:maxOccurs" select="@system_cache__appinfo:maxOccurs"/>
  2151. <xsl:with-param name="xpath_query" select="$xpath_query"/>
  2152. </xsl:call-template>
  2153. </xsl:variable>
  2154. <xsl:choose>
  2155. <xsl:when test="$test_xpath_query='1'">
  2156. <xsl:choose>
  2157. <xsl:when test=" doc-available(concat($temp,'/',$loop_xpath,'/build_root.xml'))">
  2158. <xsl:message terminate="yes">/\/\/\/\/\/\/ #1687 ERRROR is already created <xsl:value-of select="concat($temp,'/',$loop_xpath,'/build_root.xml')"/> PROBLEM IN PROCESSING TO BE FIXED IN ENGINE!!! </xsl:message>
  2159. </xsl:when>
  2160. <xsl:otherwise>
  2161. <xsl:if test="$debug &gt; 2"><xsl:message>\/\/\/\/\/\/\/\/\/\/\/ 1615 WRITING RelatedFeatureLoop to <xsl:value-of select="concat($temp,'/',$loop_xpath,'/build_root.xml')"/> ; \/\/\/\/\/\/\/\/\/\/ </xsl:message></xsl:if>
  2162. <xsl:result-document href="{$temp}/{$loop_xpath}/build_root.xml" >
  2163. <xsl:apply-templates select=".">
  2164. <xsl:with-param name="typeName" select="@typeName"/>
  2165. <xsl:with-param name="xpath" select="@xpath"/>
  2166. <xsl:with-param name="xpath_value" select="@xpath_value"/>
  2167. <!--<xsl:with-param name="loop_xpath_save" select="$loop_xpath"/>-->
  2168. <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
  2169. <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
  2170. <xsl:with-param name="wfs_output" select="concat($uuid,'.',$loop_xpath)" /><!-- Not used TODO disable -->
  2171. <xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>
  2172. <xsl:with-param name="feature_pos" select="$feature_pos"/>
  2173. <xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>
  2174. <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/>
  2175. <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
  2176. <!--<xsl:with-param name="wfs_output.xml" />-->
  2177. </xsl:apply-templates>
  2178. </xsl:result-document>
  2179. <xsl:element name="RelatedFeatureLoop">
  2180. <xsl:copy-of select="@*"/>
  2181. <xsl:attribute name="featureID_name" select="$featureID_name"/>
  2182. <xsl:attribute name="loop_xpath" select="$loop_xpath"/>
  2183. <xsl:attribute name="loop_path_recurs" select="$loop_path_recurs"/>
  2184. <xsl:attribute name="feature_pos_parent" select="$feature_pos_parent"/> <!-- TODO nie wiemy czy to tu bedzie potrzebne @2017-04 byly nadpisywane informacje - trzeba dorzucic jeszcze $feature_pos_parent w nazwie przetwarzania -->
  2185. <xsl:attribute name="fid" select="$input_obj_fid/@fid"/>
  2186. </xsl:element>
  2187. </xsl:otherwise>
  2188. </xsl:choose>
  2189. </xsl:when>
  2190. <xsl:otherwise>
  2191. <xsl:if test="$debug &gt; 2"><xsl:message terminate="no">#1263
  2192. #
  2193. #
  2194. #
  2195. BYPASSED BY $test_xpath_query=<xsl:value-of select="$test_xpath_query"/>; 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
  2196. #
  2197. #</xsl:message></xsl:if>
  2198. </xsl:otherwise>
  2199. </xsl:choose>
  2200. </xsl:template>
  2201. <xsl:template match="text()" mode="after_first_ant_assing_vars_childs"/>
  2202. <xsl:template match="comment()" mode="after_first_ant_assing_vars_childs"/>
  2203. <!-- pozbieranie do kupy wszystkich xmli i zlozenie dity -->
  2204. <xsl:template name="test_xpath_query">
  2205. <!-- to verify if retrieve some node based on user requested tree limit filter -->
  2206. <xsl:param name="ignore_maxOccurs_0" required="yes"/>
  2207. <xsl:param name="xpath_query" required="yes"/>
  2208. <xsl:param name="featureID_name_dita" required="yes"/>
  2209. <xsl:param name="system_cache__appinfo:maxOccurs" required="yes"/>
  2210. <xsl:if test="$debug &gt; 2"><xsl:message>#1290 $system_cache__appinfo:maxOccurs=<xsl:value-of select="$system_cache__appinfo:maxOccurs"/>; $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>; $xpath_query=<xsl:value-of select="$xpath_query"/>; </xsl:message></xsl:if>
  2211. <xsl:if test="$ignore_maxOccurs_0"><xsl:if test="$debug &gt; 2"><xsl:message terminate="no">#1344 test igrnore is true()=<xsl:value-of select="$ignore_maxOccurs_0"/>;</xsl:message></xsl:if></xsl:if>
  2212. <xsl:variable name="TestMaxOccurs">
  2213. <xsl:choose>
  2214. <xsl:when test="$system_cache__appinfo:maxOccurs='0' and $ignore_maxOccurs_0"></xsl:when>
  2215. <xsl:otherwise>1</xsl:otherwise>
  2216. </xsl:choose>
  2217. </xsl:variable>
  2218. <xsl:value-of select="$TestMaxOccurs"/>
  2219. </xsl:template>
  2220. </xsl:stylesheet>