| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:gml="http://www.opengis.net/gml"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:p5_default_db="https://biuro.biall-net.pl/wfs/default_db"
- xmlns:default_db="https://biuro.biall-net.pl/wfs/default_db"
- xmlns:wfs="http://www.opengis.net/wfs"
- xmlns:ogc="http://www.opengis.net/ogc"
- xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
- xmlns:p5_tr_map="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/procesy5_translate_map.xsd"
- xmlns:p5opr="http://biuro.biall-net.pl/xmlschema_procesy5/system_cache/object_parent_relations/object_parent_relations.xsd"
- exclude-result-prefixes="xs"
- version="2.0">
- <xsl:output indent="yes" />
- <xsl:strip-space elements="*"/>
-
-
- <!-- Copyright BIALL-NET sp. z o.o. 2017-03-01 by Arkadiusz Binder wszelkie prawa zastrzeżone -->
- <!-- @2017-03-01 modyfikacja dla potrzeb CRM_PROCES_tree - sa bledy-->
-
- <xsl:include href="get_all_xsd.xsl"/>
-
-
- <!--<xsl:include href="escaped_html_to_xml.xsl"/>-->
-
- <!--
- <property name="url" value="${url}"/> - to point what is record/table to download
- <property name="uuid" value="${uuid}"/> it is automatically also set to enable uinque transaction and to allow to save data with user
- <property name="passwordBase64Basic" value="${passwordBase64Basic}"/> - this is also set - to enable communicate with API -
- <property name="DwebRootUrl" value="${$webRootUrl}"/> - this is the place where script is localized to easyli to target user GUI by href to generated output -->
-
- <!-- variables to be set first by GUI first_request from executing API (php -> bash)-->
- <xsl:param name="uuid" required="yes" /> <!-- pewnie bedziemy ignorowac i dzialac na bazie ${'wfs_output'} ktory juz jest tempfilem -->
- <xsl:param name="passwordBase64Basic" required="yes" />
- <!--<xsl:param name="url" />-->
- <xsl:param name="webRootUrl" />
- <xsl:param name="basedir" required="yes"/> <!-- aktualny katalog gdzie znajduja sie pliki temp -->
- <xsl:param name="recurse_ant_basedir" required="yes"/> <!-- aktualny katalog gdzie znajduja sie pliki temp -->
-
-
- <xsl:param name="recurse_ant_basedir.temp" required="yes"/>
- <xsl:param name="recurse_ant" required="yes"/> <!-- for <property name="default_db:recurse_ant" value="${default_db:recurse_ant}"/>-->
-
-
- <!--<xsl:param name="out_task.dita"/>--> <!-- nazwa temp docelowego zrodla do wykonania pliku pdf -->
- <!--<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 -->
- <!--<xsl:param name="wfs_output" select="concat('temp/wfs_output.',$uuid)"/>-->
- <!-- jak parametr jest to znaczy, ze przetwarzamy -->
- <xsl:param name="wfs_output" required="no"/> <!-- potem wfs_output.xml jak sciagnie nazwa temp sciagniecia z api xml forsowana przez pierwsze sciagniecie -->
- <xsl:param name="api_url" required="yes"/>
- <!--<xsl:param name="namespace_prefix" select="'p5_default_db'"/>-->
- <xsl:param name="typeName" required="yes" /> <!-- to be set initially ex: p5_default_db:IN7_DZIENNIK_KORESP -->
- <xsl:param name="xpath" required="yes" /> <!-- to be set initially ex: ID -->
- <xsl:param name="xpath_value" required="yes" /> <!-- to be set ex: 1000 -->
- <xsl:param name="loop_xpath" required="yes"/> <!-- sciezka do zapisywania xmli w przetwarzaniu plikow default root -->
- <xsl:param name="loop_xpath_save" required="yes"/> <!-- przekazany z template match="RelatedFeature" mode="after_first_ant_assing_vars_childs" -->
- <!-- static project variables as default styles.dita/xsl and names-->
- <xsl:param name="main_build_recurse_ant.dita" select="'main_build_recurse_ant.dita'"/>
-
- <xsl:param name="xml_id_parent" select="@xml_id"/>
- <xsl:param name="build_recurse_ant.xsl" required="yes"/>
- <xsl:param name="temp" required="yes"/>
- <xsl:param name="builds_to_ant.xsl" required="yes"/>
- <xsl:param name="cookie_curl_option" required="yes"/>
- <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 -->
- <xsl:param name="ignore_maxOccurs_0" select="false()"/>
- <xsl:param name="xpath_query"/>
- <xsl:param name="xpath_query.xsl" required="yes"/>
- <xsl:param name="empty.xml" required="yes"/>
- <xsl:param name="simpleSchema_dir" required="yes"/>
- <!--<xsl:param name="default_db_xml_cache.public" required="yes"/>-->
- <xsl:param name="ant-launcher.jar"/>
- <xsl:param name="loop_path_recurs_xpath"/><!-- todo do querowania filtrem do zbudowania sciezka obiektu xpath -->
- <xsl:param name="build_check_java_process_count.xml" required="yes"/>
- <xsl:param name="parallel_java_process_max" required="yes"/>
- <xsl:param name="feature_pos" select="1"/> <!-- TODO DEBUG TESTING from PARALLER -->
- <xsl:param name="parallel_pos" required="yes"/>
- <xsl:param name="debug_xsl_in_filename" required="yes" /> <!-- TODO DEBUG TESTING -->
- <xsl:param name="process_locks"/>
- <xsl:param name="get_wfs" required="yes"/>
- <xsl:param name="debug_xsl_out_filename" required="yes" />
- <xsl:param name="debug" select="1"/>
- <xsl:param name="recurse_ant_basedir.recurse_cache" />
- <xsl:param name="build_recurse_ant_cache_control.xsl" />
- <xsl:param name="typeNameRoot" required="yes"/><!-- to cache purpose - to allow child elements cache created to be named from this typeNameRoot -->
- <xsl:param name="input_obj_fid_forced"/><!-- to force by build_root.xml (loop) -->
- <xsl:param name="p5opr:detect_objects_parent_relations.local" required="yes"/>
- <!--<xsl:variable name="temp_current">
- <xsl:choose>
- <xsl:when test="$temp='temp'">
- <xsl:value-of select="concat($recurse_ant_basedir,'/',$temp)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat('temp/',$loop_path_recurs)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>-->
-
- <!-- second step fist loop - with data -->
- <!--<xsl:param name="wfs_output.xml"/>--> <!-- to be set in second step by ant build generated by this style to fill by its data childs -->
-
-
- <!-- opis dzialania template dla przetwarzania wezlow na podstawie schematu i budowania zagniezdzonego pliku xml z
- instancjami na podstawie tego samego schematu
-
- wyzwolenie inicjalizujace z build.xml buduje "wyzwolenie glowne" gdzie na output daje wynikowy build.
-
- system wyzwala dwa etapy
- wyzwolenie glowne - do okreslenia zaleznosci wezla i zbudowania zapytania o dane
- wyzwolenie after_first_ant_assing_vars - do podstawienia danych z wyzwolenia poprzedniego oraz przygotowania build "dla kolejnego X" do wyzwolenia glownego
-
-
- wyzwolenie glowne - szuka pierwszego RelatedFeature, ktore zawsze domyslnie jest na poczatku template, potem w nim grzebie - jak znajdzie - wchodzi w dol
- w ramach tego wyzwolenia przygotowuje task dla biezecego przygotowania ant_build - mode ant_target
- w ramach tego wyzwolenia juz musi przeanalizowac jakie sa dalsze zadania do wyzwolenia "dla kolejnego X' ant_build -
- 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
-
- wyzwolenie after_first_ant_assing_vars - to wyzwile
- to wyzwolenie podstawia dane do dita.vals.xml w celu zlozenia pliku wyjsciowego
- to wyzwolenie powinno juz zrobic ant_buildy "dla kolejnego X'
- to wyzwolenie korzysta z apply-templates wyzwolenia glownego, w celu przygotowania ant_build
- -->
-
-
-
- <xsl:template match="*">
- <xsl:param name="typeName" select="$typeName" />
- <xsl:param name="xpath" select="$xpath" />
- <xsl:param name="xpath_value" select="$xpath_value" />
- <xsl:param name="loop_xpath" select="$loop_xpath"/>
- <xsl:param name="loop_xpath_save" select="$loop_xpath_save"/><!-- tutaj zapisal sie build z wezla z parent -->
- <xsl:param name="input_obj_with_xpath" /> <!-- przekazany z template match="RelatedFeature" mode="after_first_ant_assing_vars_childs" -->
- <xsl:param name="feature_pos" select="$feature_pos"/> <!-- przekazany z template match="RelatedFeature" mode="after_first_ant_assing_vars_childs"-->
- <xsl:param name="loop_path_recurs" select="$loop_path_recurs"/> <!-- przekazany z RelatedFeatureLoop z mode="after_first_ant_assing_vars_childs" -->
- <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 -->
- <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 -->
- <xsl:param name="input_obj_fid">
- <empty/>
- </xsl:param>
-
- <!--<xsl:variable name="input_obj_fid">
- <xsl:choose>
- <xsl:when test="$input_obj_fid/@fid">
- <xsl:copy-of select="$input_obj_fid"/>
- </xsl:when>
- <xsl:otherwise>
- <empty>
- <xsl:attribute name="fid" select="$input_obj_fid_forced"/>
- </empty>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>-->
-
- <!-- powinien byc nadany z after_first_ant_assign_vars/... ale moze nie za pierwszym razem -->
- <xsl:choose>
- <xsl:when test="name()='RelatedFeature'">
- <xsl:variable name="RelatedFeatureCount" select="last()"/>
- <xsl:variable name="RelatedFeaturePos" select="position()"/> <!-- bylo bug @2017-04 position() -->
- <xsl:variable name="featureID_name" select="substring-after($typeName,':')"/>
- <xsl:if test="$debug > 2"><xsl:message>#58 bylo $loop_xpath=<xsl:value-of select="$loop_xpath"/>; $basedir=<xsl:value-of select="$basedir"/>; </xsl:message></xsl:if>
- <xsl:variable name="loop_xpath_real" select="$loop_xpath"/>
- <xsl:variable name="loop_xpath">
- <xsl:choose>
- <xsl:when test="$loop_xpath='root'">
- <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) -->
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="$loop_xpath"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="typeName_dita" select="@typeName"/>
- <xsl:variable name="typeNameRealResource">
- <!-- override in case of different real resource by filtered resource -->
- <xsl:choose>
- <xsl:when test="@typeNameRealResource"><xsl:value-of select="@typeNameRealResource"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="$typeName_dita"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="featureID_name_dita" select="substring-after($typeName_dita,':')"/>
- <xsl:variable name="xml_id" select="@xml_id"/>
- <!--<xsl:variable name="wfs_output" select="concat($uuid,'.',$loop_xpath,'_x2f_',$featureID_name)"/>-->
- <xsl:variable name="wfs_output" select="$loop_xpath"/> <!-- bylo concat($uuid,'.',$loop_xpath) -->
- <!--<xsl:variable name="wfs_output.xml" select="concat($wfs_output,'.',position(),'.xml')"/>-->
- <xsl:variable name="wfs_output.xml" select="concat($wfs_output,'.',$feature_pos_parent,'.',$parallel_pos,'.xml')"/>
- <xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.dita.xml')"/>
- <!--<xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.',position(),'.','.dita.xml')"/>-->
- <!-- dane z oczekiwanego template .dita -->
- <xsl:variable name="xpath_dita">
- <xsl:choose>
- <xsl:when test=" string-length($xpath) >0">
- <xsl:value-of select="$xpath"/>
- <xsl:if test="$debug > 2"><xsl:message>#121 narzucam $xpath=(<xsl:value-of select="$xpath"/>) z wyzwolenia build.xml </xsl:message></xsl:if>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="@xpath"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="xpath_value_dita">
- <xsl:choose>
- <xsl:when test="@xpath_value">
- <!--<xsl:variable name="xpath_value_tokens" select="tokenize(@xpath_value,'/')"/>-->
- <!--<xsl:value-of select="'todo zapytanie xpath do przetworzenia'"/>-->
- <!--<xsl:copy-of select="$xpath_value_tokens"></xsl:copy-of>-->
- <!--<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>-->
- <xsl:if test="$debug > 2"><xsl:message>#67.1 $input_obj_with_xpath: <xsl:copy-of select="$input_obj_with_xpath"/> </xsl:message></xsl:if>
- <!--<xsl:variable name="xpath_value_token">-->
- <xsl:call-template name="xpath_filter_apply">
- <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
- <xsl:with-param name="xpath" select="@xpath"/>
- <xsl:with-param name="xpath_value" select="@xpath_value"/>
- </xsl:call-template>
- <!--</xsl:variable>-->
- <!--<xsl:message>#73 ustalam na <xsl:value-of select="$xpath_value_token/node()[1]/text()"/>;</xsl:message>-->
- <!--<xsl:value-of select="$xpath_value_token/node()[1]/text()"/>-->
- <!--<xsl:value-of select="$xpath_value_token"/>-->
- </xsl:when>
- <xsl:when test="string-length($xpath_value) >0">
- <xsl:if test="$debug > 2"><xsl:message>#67.0 $xpath_value=(<xsl:value-of select="$xpath_value"/>); narzucone pewnie z wyzwolenia build.xml</xsl:message></xsl:if>
- <xsl:value-of select="$xpath_value"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$xpath_value"/><!-- parametr z template narzuca wartosc -->
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="$debug > 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>
- <project basedir="{$recurse_ant_basedir}" name="get_related_feature{$loop_xpath_real}" default="get_related_feature_run_child_ant_if{$loop_xpath_real}">
- <!--
- get_related_feature_run_child_ant{$loop_xpath_real} - domyslny przed 2017-03-28-->
- <!-- get_related_feature_run_child_ant{$loop_xpath_real} -->
- <xsl:comment>RelatedFeatureCount:<xsl:value-of select="count(*)"/></xsl:comment>
- <xsl:if test="$debug > 1"><echo>
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #197 LEAF RelatedFeature PROJECT BEGIN RUN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- | @xml_id is <xsl:value-of select="@xml_id"/> ; $feature_pos_parent is <xsl:value-of select="$feature_pos_parent"/>
- | $debug_xsl_in_filename = <xsl:value-of select="$debug_xsl_in_filename"/> ;
- | $debug_xsl_out_filename = <xsl:value-of select="$debug_xsl_out_filename"/> ;
- | $typeName_dita = <xsl:value-of select="$typeName_dita"/> ; $typeNameRealResource = <xsl:value-of select="$typeNameRealResource"/> ;
- | $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"/>;
- | $temp is = <xsl:value-of select="$temp"/> ;
- | $loop_xpath = <xsl:value-of select="$loop_xpath"/>
- | $loop_path_recurs = <xsl:value-of select="$loop_path_recurs"/>
- | $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}
- | $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
- | ANT Uruchamiam $loop_xpath_real <xsl:value-of select="$loop_xpath_real"/>;
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- </echo></xsl:if>
- <!--<xsl:variable name="typeName" select='replace($typeName,""","")'/>--><!-- oczyszczenie z apostrofow -->
- <xsl:element name="property">
- <xsl:attribute name="name" select="'uuid'"/>
- <xsl:attribute name="value" select="$uuid"/>
- </xsl:element>
- <xsl:element name="property">
- <xsl:attribute name="name" select="'passwordBase64Basic'"/>
- <xsl:attribute name="value" select="$passwordBase64Basic"/>
- </xsl:element>
- <xsl:element name="property">
- <xsl:attribute name="name" select="'php_session_id'"/>
- <xsl:attribute name="value" select="$cookie_curl_option"/>
- </xsl:element>
- <!--<xsl:element name="property">
- <xsl:attribute name="name" select="'url'"/>
- <xsl:attribute name="value" select="$url"/>
- </xsl:element>-->
- <xsl:element name="property">
- <xsl:attribute name="name" select="'webRootUrl'"/>
- <xsl:attribute name="value" select="$webRootUrl"/>
- </xsl:element>
- <xsl:element name="property">
- <xsl:attribute name="name" select="'build_recurse_ant.xsl'"/>
- <xsl:attribute name="value" select="$build_recurse_ant.xsl"/>
- </xsl:element>
- <xsl:element name="property">
- <xsl:attribute name="name" select="'temp'"/>
- <xsl:attribute name="value" select="$temp"/>
- </xsl:element>
- <xsl:element name="property">
- <xsl:attribute name="name" select="'builds_to_ant.xsl'"/>
- <xsl:attribute name="value" select="$builds_to_ant.xsl"/>
- </xsl:element>
- <xsl:element name="property">
- <xsl:attribute name="name" select="'loop_path_recurs'"/>
- <xsl:attribute name="value" select="$loop_path_recurs"/>
- </xsl:element>
-
- <xsl:element name="property">
- <xsl:attribute name="name" select="'xpath_query'"/>
- <xsl:attribute name="value" select="$xpath_query"/>
- </xsl:element>
-
- <xsl:element name="property">
- <xsl:attribute name="name" select="'ignore_maxOccurs_0'"/>
- <xsl:attribute name="value" select="$ignore_maxOccurs_0"/>
- </xsl:element>
- <xsl:element name="property">
- <xsl:attribute name="name" select="'default_db:recurse_ant_basedir'"/>
- <xsl:attribute name="value" select="'.'"/>
- </xsl:element>
-
- <property name="simpleSchema_dir" value="{$simpleSchema_dir}"/>
- <property name="default_db_xml_cache.public" value="{$default_db_xml_cache.public}"/>
-
- <property name="temp" value="{$temp}"/>
- <property name="ant-launcher.jar" value="{$ant-launcher.jar}"/>
- <property name="loop_path_recurs_xpath" value="{$loop_path_recurs_xpath}"/>
-
- <property name="default_db:recurse_ant" value="{$recurse_ant}"/>
- <property name="build_check_java_process_count.xml" value="{$build_check_java_process_count.xml}"/>
- <property name="parallel_java_process_max" value="{$parallel_java_process_max}"/>
- <property name="feature_pos_parent" value="{$feature_pos_parent}"/>
- <property name="parallel_pos" value="{$parallel_pos}"/>
- <property name="get_wfs" location="{$get_wfs}"/>
- <property name="default_db:recurse_ant_basedir.recurse_cache" location="{$recurse_ant_basedir.recurse_cache}"/>
- <property name="build_recurse_ant_cache_control.xsl" value="{$build_recurse_ant_cache_control.xsl}"/>
- <property name="typeNameRoot" value="{$typeNameRoot}"/>
- <property name="input_obj_fid_forced" value="{$input_obj_fid/@fid}"/>
- <property name="external_schema_table.path" value="{$external_schema_table.path}"/>
- <xsl:comment>
- #224 Important variables:
- typeName=<xsl:value-of select="$typeName"/>;
- xpath=<xsl:value-of select="$xpath"/>;
- xpath_value=<xsl:value-of select="$xpath_value"/>;
- $passwordBase64Basic=<xsl:value-of select="$passwordBase64Basic"/>
- $typeName_dita= <xsl:value-of select="$typeName_dita"/>
- $featureID_name_dita= <xsl:value-of select="$featureID_name_dita"/>
- $wfs_output= <xsl:value-of select="$wfs_output"/>
- $wfs_output.xml= <xsl:value-of select="$wfs_output.xml"/>
- $wfs_output.dita= <xsl:value-of select="$wfs_output.dita"/>
- $xpath_dita= <xsl:value-of select="$xpath_dita"/>
- $xpath_value_dita= <xsl:value-of select="$xpath_value_dita"/>
- $ignore_maxOccurs= <xsl:value-of select="$ignore_maxOccurs_0"/> ; @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>
- $xpath_query=<xsl:value-of select="$xpath_query"/>;
- $feature_pos_parent=<xsl:value-of select="$feature_pos_parent"/>;
- $debug_xsl_in_filename = <xsl:value-of select="$debug_xsl_in_filename"/> ;
- $debug_xsl_out_filename = <xsl:value-of select="$debug_xsl_out_filename"/> ;
- $loop_path_recurs = <xsl:value-of select="$loop_path_recurs"/> ;
- $typeNameRoot = <xsl:value-of select="$typeNameRoot"/> ;
- $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
- $input_obj_fid_forced = <xsl:value-of select="$input_obj_fid_forced"/> ; was renamed to <xsl:value-of select="$input_obj_fid/@fid"/>
- </xsl:comment>
- <tempfile suffix=".xml" destdir="{$process_locks}" deleteonexit="yes" createfile="yes" prefix="RelatedFeature_{@xml_id}_{$featureID_name_dita}_{$feature_pos_parent}_{$feature_pos}">
- <xsl:attribute name="property" select="concat('builds_to_ant_lock_proj',$loop_path_recurs,$loop_xpath)"/>
- </tempfile>
-
-
- <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
- <xsl:if test="$debug > 1"><echo> #302 waliduje xpath_query dla $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>; </echo></xsl:if>
-
-
-
- <target name="get_related_feature_run_child_ant_check{$loop_xpath_real}">
-
- <mkdir dir="{$temp}/{$loop_xpath}"/>
- <!--<xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('.__test_featureID_name_dita_',$featureID_name_dita,$feature_pos_parent,'.',$feature_pos)"/>
- </xsl:element>-->
- <!--<xsl:element name="echoxml">
- <xsl:attribute name="file" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos,'}')"/>
- <xsl:element name="{$featureID_name_dita}">
- <xsl:attribute name="position" select="position()"/></xsl:element><!-\- bylo bug @2017-04 position() -\->
- </xsl:element>-->
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml',$feature_pos_parent,$feature_pos)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('.__test_featureID_name_dita_out_',$featureID_name_dita,$feature_pos_parent,'.',$feature_pos)"/>
- </xsl:element>
- <xsl:element name="echoxml">
- <xsl:attribute name="file" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml',$feature_pos_parent,$feature_pos,'}')"/>
- <xpath_query_test>OK</xpath_query_test>
- </xsl:element>
- <!--<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>-->
- <!--<xmlvalidate lenient="true">
- <xsl:attribute name="file" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos,'}')"/>
- </xmlvalidate>-->
- <!--<xsl:element name="xslt">
- <!-\-<xsl:attribute name="basedir" select="'./'"/>-\->
- <xsl:attribute name="style" select="$xpath_query.xsl"/>
- <xsl:attribute name="in" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos,'}')"/>
- <!-\-<xsl:attribute name="destdir" select="'./'"/>-\->
- <xsl:attribute name="out" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml',$feature_pos_parent,$feature_pos,'}')"/>
- <factory name="net.sf.saxon.TransformerFactoryImpl">
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
- <attribute name="http://saxon.sf.net/feature/initialMode" value="xpath_query_test"/>
- </factory>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
- </xsl:element>-->
- <!-- running another java env transform for safety -->
-
- <!--<java>
- <xsl:attribute name="jar" select="'/opt/local/share/java/saxon9he.jar'"/>
- <!-\-<xsl:attribute name="classname" select="'org.apache.tools.ant.Main'"/>-\->
- <xsl:attribute name="dir" select="concat($temp,'/',$loop_xpath,'/')"/>
- <xsl:attribute name="fork" select="'true'"/>
- <xsl:attribute name="clonevm" select="'false'"/>
- <xsl:attribute name="newenvironment" select="'true'"/>
- <xsl:attribute name="failonerror" select="'true'"/>
- <!-\-<xsl:attribute name="resultproperty" select="concat(.,'_resprop')"/>-\->
- <!-\-<xsl:attribute name="output" select="concat(.,'_out.log')"/>-\->
- <xsl:element name="arg">
- <xsl:attribute name="line" select="concat('-s:${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos,'}')"/>
- </xsl:element>
- <xsl:element name="arg">
- <xsl:attribute name="line" select="concat('-o:${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml',$feature_pos_parent,$feature_pos,'}')"/>
- </xsl:element>
- <arg line="-xsl:{$xpath_query.xsl}"/>
- <arg line="-im:xpath_query_test"/>
- </java>-->
-
- <xsl:if test="$debug > 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>
- <xsl:element name="loadfile">
- <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile.xml',$feature_pos_parent,$feature_pos)"/>
- <xsl:attribute name="srcfile" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml',$feature_pos_parent,$feature_pos,'}')"/>
- </xsl:element>
- <condition taskname="get_related_feature_run_child_ant_if{$loop_xpath_real}">
- <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile_check.xml',$feature_pos_parent,$feature_pos)"/>
- <xsl:element name="contains">
- <xsl:attribute name="string" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile.xml',$feature_pos_parent,$feature_pos,'}')"/>
- <xsl:attribute name="substring" select="'OK'"/>
- </xsl:element>
- </condition>
- </target>
- <delete quiet="true">
- <xsl:attribute name="file" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml',$feature_pos_parent,$feature_pos,'}')"/>
- </delete>
- <delete quiet="true">
- <xsl:attribute name="file" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml',$feature_pos_parent,$feature_pos,'}')"/>
- </delete>
- <target name="get_related_feature_run_child_ant_if{$loop_xpath_real}" depends="get_related_feature_run_child_ant_check{$loop_xpath_real}">
- <xsl:attribute name="if" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile_check.xml',$feature_pos_parent,$feature_pos,'}')"/>
- <antcall target="get_related_feature_run_child_ant{$loop_xpath_real}"/>
- </target>
- <!-- EOF dajemy wpis o walidacji danego feature pod katem xpath_query -->
-
-
- <xsl:apply-templates mode="ant_target" select=".">
- <xsl:with-param name="typeName_dita" select="$typeName_dita"/>
- <xsl:with-param name="featureID_name_dita" select="$featureID_name_dita"/>
- <xsl:with-param name="wfs_output" select="$wfs_output"/>
- <xsl:with-param name="wfs_output.xml" select="$wfs_output.xml"/>
- <xsl:with-param name="wfs_output.dita" select="$wfs_output.dita"/>
- <xsl:with-param name="xpath" select="$xpath"/>
- <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
- <xsl:with-param name="featureID_name" select="$featureID_name"/>
- <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
- <xsl:with-param name="RelatedFeatureCount" select="$RelatedFeatureCount"/>
- <xsl:with-param name="RelatedFeaturePos" select="$RelatedFeaturePos"/>
- <xsl:with-param name="typeName" select="$typeName"/>
- <xsl:with-param name="xpath_value" select="$xpath_value"/>
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
- <xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
- <!--<xsl:with-param name="loop_xpath_save" select="$loop_xpath_save"/>-->
- <xsl:with-param name="xml_id" select="$xml_id"/>
- <!--<xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>-->
- <xsl:with-param name="feature_pos" select="$feature_pos"/>
- <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
- <xsl:with-param name="typeNameRealResource" select="$typeNameRealResource"/>
- <xsl:with-param name="loop_path_recurs_xpath" select="$loop_path_recurs_xpath"/>
- <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 -->
- <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
- <xsl:with-param name="default_db.instance.xml" select="$default_db.instance.xml"/>
- <xsl:with-param name="detect_resource_type.local" select="$detect_resource_type.local"/>
- <xsl:with-param name="p5opr:detect_objects_parent_relations.local" select="$p5opr:detect_objects_parent_relations.local"/>
- <xsl:with-param name="vrtfNamespaces.xml" select="$vrtfNamespaces.xml"/>
- <xsl:with-param name="default_db_targetNamespace_detect_string" select="$default_db_targetNamespace_detect_string"/>
- <xsl:with-param name="zasob_id_db_targetNamespace_detect_string" select="$zasob_id_db_targetNamespace_detect_string"/>
- </xsl:apply-templates>
- <!-- na koniec przetwarzania kazdego z wezlow, podmieniamy xsl biezacy wezel -->
-
- <xsl:comment>template match="RelatedFeature" mode="after_first_ant_assing_vars_childs"
- robi result-document href="build_{$loop_xpath}.{$uuid}.xml
- wiec powinnismy uruchomic ant ten plik w ciemno znajac jego nizsze wezly</xsl:comment>
- <xsl:variable name="featureID_name_child" select="substring-after($typeName,':')"/>
-
- <!--<xsl:variable name="loop_xpath_child" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>-->
-
- <xsl:element name="target">
- <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant',$loop_xpath_real)"/>
- <xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos,$loop_xpath_real)"/>
- <!--<xsl:choose>
- <xsl:when test=".//(RelatedFeature|RelatedFeatureRoot)">
- <xsl:for-each select=".//RelatedFeature[ not(child::node()/name()='RelatedFeature')]">
- <xsl:variable name="loop_xpath_child_ant" select="concat($loop_xpath_save,'_x2f_.',@xml_id,'.',$featureID_name)"/>
- <xsl:message>#148 ustalamy $loop_xpath_child_ant=<xsl:value-of select="$loop_xpath_child_ant"/></xsl:message>
- <!-\- <xsl:element name="target">
- <xsl:attribute name="name" select="$loop_xpath_child_ant"/><!-\\-'get_related_feature_run_child_ant'-\\->
- <xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos)"/>-\->
- <!-\-<ant antfile="temp/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.xml" dir="."/>-\->
- <ant antfile="temp/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml" dir="."/>
-
- <!-\-</xsl:element>-\->
- <xsl:if test=" position()=last()">
- <xsl:comment>Tu task z related</xsl:comment>
- </xsl:if>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:comment>#135 nie ma wiecej //RelatedFeature</xsl:comment>
- <!-\-<xsl:element name="target">
- <xsl:attribute name="name" select="'get_related_feature_run_child_ant'"/>
- <xsl:attribute name="depends" select="concat('get_related_feature.',$RelatedFeaturePos)"/>
- </xsl:element>-\->
- </xsl:otherwise>
- </xsl:choose>-->
- <!-- wstawienie subanta dla biezacych dzieci only -->
- <tempfile prefix=".builds_to_ant_set_parallel_java_process_max_xsl" suffix=".xml" destdir="{$temp}" >
- <xsl:attribute name="property" select="concat('builds_to_ant_set_parallel_java_process_max_xsl',$loop_path_recurs,$loop_xpath_real)"/>
- </tempfile>
- <ant antfile="{$build_check_java_process_count.xml}">
- <xsl:attribute name="output" select="concat('${builds_to_ant_set_parallel_java_process_max_xsl',$loop_path_recurs,$loop_xpath_real,'}')"/>
- <property name="builds_to_ant_set_parallel_java_process_max">
- <xsl:attribute name="value" select="concat('${builds_to_ant_set_parallel_java_process_max_xsl',$loop_path_recurs,$loop_xpath_real,'}')"/>
- </property>
- <property name="process_locks" value="{$process_locks}"/>
- </ant>
- <loadfile>
- <xsl:attribute name="property" select="concat('builds_to_ant_set_parallel_java_process_max_loadfile_xsl',$loop_path_recurs,$loop_xpath_real)"/>
- <xsl:attribute name="srcfile" select="concat('${builds_to_ant_set_parallel_java_process_max_xsl',$loop_path_recurs,$loop_xpath_real,'}')"/>
- </loadfile>
- <delete quiet="true">
- <xsl:attribute name="file" select="concat('${builds_to_ant_set_parallel_java_process_max_xsl',$loop_path_recurs,$loop_xpath_real,'}')"/>
- </delete>
- <parallel>
- <xsl:attribute name="threadcount" select="concat('${builds_to_ant_set_parallel_java_process_max_loadfile_xsl',$loop_path_recurs,$loop_xpath_real,'}')"/>
- <xsl:apply-templates mode="place_subant">
- <xsl:with-param name="uuid" select="$uuid"/>
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
- <xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
- <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
- <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
- <xsl:with-param name="featureID_name_dita" select="$featureID_name_dita"/>
- <xsl:with-param name="loop_path_recurs_xpath" select="$loop_path_recurs_xpath"/>
- <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/>
- <xsl:with-param name="feature_pos" select="$feature_pos"/>
- <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
- <xsl:with-param name="default_db.instance.xml" select="$default_db.instance.xml"/>
- <xsl:with-param name="detect_resource_type.local" select="$detect_resource_type.local"/>
- <xsl:with-param name="p5opr:detect_objects_parent_relations.local" select="$p5opr:detect_objects_parent_relations.local"/>
- <xsl:with-param name="vrtfNamespaces.xml" select="$vrtfNamespaces.xml"/>
- <xsl:with-param name="default_db_targetNamespace_detect_string" select="$default_db_targetNamespace_detect_string"/>
- <xsl:with-param name="zasob_id_db_targetNamespace_detect_string" select="$zasob_id_db_targetNamespace_detect_string"/>
-
- <!-- debug only below CACHE -->
- <xsl:with-param name="typeName_dita" select="$typeName_dita"/>
- <!--<xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>-->
- <!--<xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>-->
- </xsl:apply-templates>
- </parallel>
- <xsl:if test="$debug > 1"><echo>
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #197 LEAF RelatedFeature PROJECT FINISH RUN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- | $debug_xsl_in_filename = <xsl:value-of select="$debug_xsl_in_filename"/> ;
- | $debug_xsl_out_filename = <xsl:value-of select="$debug_xsl_out_filename"/> ;
- | @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"/>;
- | $feature_pos_parent= <xsl:value-of select="$feature_pos_parent"/>; $feature_pos= <xsl:value-of select="$feature_pos"/>; position()= <xsl:value-of select="position()"/>
- | $temp is = <xsl:value-of select="$temp"/> ;
- | $loop_xpath = <xsl:value-of select="$loop_xpath"/> projekt <xsl:value-of select="$loop_xpath_real"/>;
- | ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>; $feature_pos_parent= <xsl:value-of select="$feature_pos_parent"/>;
- | $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- </echo></xsl:if>
- </xsl:element>
- <!-- na koniec przetwarzania danego zaglebienia uruchamiamy calosc ponownie do kolejnego zaglebienia -->
-
- <!-- task do polaczenia zaglebien -->
-
- <!-- jak nie ma zaglebien to generujemy pdf i dajemy uzytkownikowi linka -->
- <delete quiet="true">
- <xsl:attribute name="file" select="concat('${builds_to_ant_lock_proj',$loop_path_recurs,$loop_xpath,'}')"/>
- </delete>
- </project>
- </xsl:when>
- <xsl:when test="name()='RelatedFeatureLoop'">
- <xsl:if test="$debug > 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>
- <xsl:variable name="RelatedFeatureCount" select="last()"/>
- <xsl:variable name="RelatedFeaturePos" select="position()"/>
- <xsl:variable name="featureID_name" select="substring-after($typeName,':')"/>
- <xsl:variable name="loop_xpath_real" select="$loop_xpath"/>
- <xsl:variable name="loop_xpath">
- <xsl:choose>
- <xsl:when test="$loop_xpath='root'">
- <!--bylo <xsl:value-of select="concat($loop_xpath,'_x2f_.',@xml_id,'.',$featureID_name)"/>-->
- <xsl:value-of select="concat($loop_xpath,'/',@xml_id,'.',$feature_pos)"/> <!-- loop path too long ,'.',$featureID_name -->
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="$loop_xpath"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="typeName_dita" select="@typeName"/>
- <xsl:variable name="typeNameRealResource">
- <!-- override in case of different real resource by filtered resource -->
- <xsl:choose>
- <xsl:when test="@typeNameRealResource"><xsl:value-of select="@typeNameRealResource"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="@typeName"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="featureID_name_dita" select="substring-after($typeName_dita,':')"/>
- <xsl:variable name="xml_id" select="@xml_id"/>
- <xsl:variable name="wfs_output" select="concat($uuid,'.',$loop_xpath)"/>
- <xsl:variable name="wfs_output.xml" select="concat($wfs_output,'.xml')"/>
- <xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.dita.xml')"/>
- <xsl:variable name="xpath_dita" select="@xpath"/>
- <xsl:variable name="xpath_value_dita">
- <xsl:choose>
- <xsl:when test="@xpath_value">
- <xsl:if test="$debug > 2"><xsl:message>%%%%%%%%%%%%%%%%%%%%%% #265.1 $input_obj_with_xpath: <xsl:copy-of select="$input_obj_with_xpath"/> </xsl:message></xsl:if>
- <xsl:call-template name="xpath_filter_apply">
- <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
- <xsl:with-param name="xpath" select="@xpath"/>
- <xsl:with-param name="xpath_value" select="@xpath_value"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$xpath_value"/><!-- parametr z template narzuca wartosc -->
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:comment>
- RelatedFeatureLoop: #344
- $loop_xpath_real =<xsl:value-of select="$loop_xpath_real"/> ;
- $typeName_dita= <xsl:value-of select="$typeName_dita"/>
- $featureID_name_dita= <xsl:value-of select="$featureID_name_dita"/>
- $wfs_output= <xsl:value-of select="$wfs_output"/>
- $wfs_output.xml= <xsl:value-of select="$wfs_output.xml"/>
- $wfs_output.dita= <xsl:value-of select="$wfs_output.dita"/>
- $xpath_dita= <xsl:value-of select="$xpath_dita"/>
- $xpath_value_dita= <xsl:value-of select="$xpath_value_dita"/>
- $ignore_maxOccurs= <xsl:value-of select="$ignore_maxOccurs_0"/> ; @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>
- $xpath_query=<xsl:value-of select="$xpath_query"/>;
- $debug_xsl_in_filename = <xsl:value-of select="$debug_xsl_in_filename"/> ;
- $debug_xsl_out_filename = <xsl:value-of select="$debug_xsl_out_filename"/> ;
- $parallel_pos = <xsl:value-of select="$parallel_pos"/> ;
- $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
- $input_obj_fid_forced = <xsl:value-of select="$input_obj_fid_forced"/> ;
- </xsl:comment>
-
-
- <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 -->
- <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)"/>
- <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} -->
- <!-- default przed 2017-03-28 concat('get_related_feature_run_child_ant_if_query_',$loop_xpath_real,'_',$loop_path_recurs)
- get_related_feature_run_child_ant{$loop_xpath_real}_{$loop_path_recurs} -->
- <xsl:comment>RelatedFeatureCount:<xsl:value-of select="count(*)"/></xsl:comment>
-
- <xsl:if test="$debug > 1"><echo>
- ?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?- #550 RelatedFeatureLoop BEGIN RUN TRY TRY TRY -?-?-?-?-?-?-?-?-?-?-?-?-?
- | @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}
- ? $temp is = <xsl:value-of select="$temp"/> ;
- | ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>;
- ? $loop_xpath_real = <xsl:value-of select="$loop_xpath_real"/>;
- | $loop_xpath = <xsl:value-of select="$loop_xpath"/> ;
- | $loop_path_recurs = <xsl:value-of select="$loop_path_recurs"/> ;
- ? $debug_xsl_in_filename = <xsl:value-of select="$debug_xsl_in_filename"/> ;
- | $debug_xsl_out_filename = <xsl:value-of select="$debug_xsl_out_filename"/> ;
- ?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?
- </echo></xsl:if>
-
- <xsl:if test="$debug > 1"><echo> ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>; projekt <xsl:value-of select="$loop_xpath_real"/>; </echo></xsl:if>
- <!--<xsl:variable name="typeName" select='replace($typeName,""","")'/>--><!-- oczyszczenie z apostrofow -->
- <xsl:element name="property">
- <xsl:attribute name="name" select="'uuid'"/>
- <xsl:attribute name="value" select="$uuid"/>
- </xsl:element>
- <xsl:element name="property">
- <xsl:attribute name="name" select="'passwordBase64Basic'"/>
- <xsl:attribute name="value" select="$passwordBase64Basic"/>
- </xsl:element>
- <xsl:element name="property">
- <xsl:attribute name="name" select="'php_session_id'"/>
- <xsl:attribute name="value" select="$cookie_curl_option"/>
- </xsl:element>
- <xsl:element name="property">
- <xsl:attribute name="name" select="'php_session_id_tested'"/>
- <xsl:attribute name="value" select="$cookie_curl_option"/>
- </xsl:element>
- <!--<xsl:element name="property">
- <xsl:attribute name="name" select="'url'"/>
- <xsl:attribute name="value" select="$url"/>
- </xsl:element>-->
- <xsl:element name="property">
- <xsl:attribute name="name" select="'webRootUrl'"/>
- <xsl:attribute name="value" select="$webRootUrl"/>
- </xsl:element>
- <xsl:element name="property"> <!--- powinien miec domyslnie sciezke narzucona-->
- <xsl:attribute name="name" select="'build_recurse_ant.xsl'"/>
- <xsl:attribute name="value" select="$build_recurse_ant.xsl"/>
- </xsl:element>
- <!--<xsl:element name="property"> <!-\-\- powinien miec domyslnie narzucona sciezke-\->
- <xsl:attribute name="name" select="'temp'"/>
- <xsl:attribute name="value" select="$temp"/>
- </xsl:element>-->
- <xsl:element name="property"><!-- - powinien miec sciezke domyslnie narzucona-->
- <xsl:attribute name="name" select="'builds_to_ant.xsl'"/>
- <xsl:attribute name="value" select="$builds_to_ant.xsl"/>
- </xsl:element>
- <property name="typeName" value="{$typeName}"/>
- <property name="xpath" value="{$xpath_dita}"/>
- <property name="xpath_value" value="{$xpath_value_dita}"/>
- <!-- DtypeName=p5_default_db:CRM_PROCES -Dxpath=ID -Dxpath_value=5247 -->
- <property name="loop_path_recurs" value="{$loop_path_recurs}"/>
-
- <xsl:element name="property">
- <xsl:attribute name="name" select="'xpath_query'"/>
- <xsl:attribute name="value" select="$xpath_query"/>
- </xsl:element>
-
- <xsl:element name="property">
- <xsl:attribute name="name" select="'ignore_maxOccurs_0'"/>
- <xsl:attribute name="value" select="$ignore_maxOccurs_0"/>
- </xsl:element>
-
- <xsl:element name="property">
- <xsl:attribute name="name" select="'default_db:recurse_ant_basedir'"/>
- <xsl:attribute name="value" select="$recurse_ant_basedir"/>
- </xsl:element>
- <xsl:element name="property">
- <xsl:attribute name="name" select="'default_db:recurse_ant'"/>
- <xsl:attribute name="value" select="$recurse_ant"/>
- </xsl:element>
- <xsl:element name="property">
- <xsl:attribute name="name" select="'default_db:recurse_ant_basedir.temp'"/>
- <xsl:attribute name="value" select="$recurse_ant_basedir.temp"/>
- </xsl:element>
-
- <property name="simpleSchema_dir" value="{$simpleSchema_dir}"/>
- <property name="default_db_xml_cache.public" value="{$default_db_xml_cache.public}"/>
-
-
- <!--bylo przed @2017-04 - poprawiam bo sie zapetla niepotrzebnie - tempa doklei wyzwolony ant do ${default_db:recurse_ant_basedir.temp}${loop_path_recurs}-->
- <xsl:element name="property">
- <xsl:attribute name="name" select="'temp'"/>
- <xsl:attribute name="value" select="concat($recurse_ant_basedir.temp,$loop_path_recurs)"/>
- </xsl:element>
- <!--<xsl:element name="property">
- <xsl:attribute name="name" select="'temp'"/>
- <xsl:attribute name="value" select="$temp"/>
- </xsl:element>-->
- <property name="ant-launcher.jar" value="{$ant-launcher.jar}"/>
- <property name="loop_path_recurs_xpath" value="{$loop_path_recurs_xpath}"/>
- <property name="build_check_java_process_count.xml" value="{$build_check_java_process_count.xml}"/>
- <property name="parallel_java_process_max" value="{$parallel_java_process_max}"/>
- <property name="feature_pos_parent" value="{$feature_pos_parent}"/> <!-- @2017-04 fixing leaf parallel conflict -->
- <property name="parallel_pos" value="{$parallel_pos}"/>
- <property name="process_locks" value="{$process_locks}"/>
- <property name="get_wfs" location="{$get_wfs}"/>
- <property name="default_db:recurse_ant_basedir.recurse_cache" location="{$recurse_ant_basedir.recurse_cache}"/>
- <property name="build_recurse_ant_cache_control.xsl" value="{$build_recurse_ant_cache_control.xsl}"/>
- <property name="typeNameRoot" value="{$typeNameRoot}"/>
- <property name="input_obj_fid_forced" value="{$input_obj_fid/@fid}"/>
- <property name="external_schema_table.path" value="{$external_schema_table.path}"/>
- <property name="default_db.instance.xml" value="{$default_db.instance.xml}"/>
- <xsl:comment>
- #555 Important variables:
- typeName=<xsl:value-of select="$typeName"/>;
- xpath=<xsl:value-of select="$xpath"/>;
- xpath_value=<xsl:value-of select="$xpath_value"/>;
- $passwordBase64Basic=<xsl:value-of select="$passwordBase64Basic"/>
- $feature_pos_parent" <xsl:value-of select="$feature_pos_parent"/>
- $typeNameRoot <xsl:value-of select="$typeNameRoot"/>
- $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
- </xsl:comment>
- <!--<xsl:apply-templates mode="ant_target" select=".">
- <xsl:with-param name="typeName_dita" select="$typeName_dita"/>
- <xsl:with-param name="featureID_name_dita" select="$featureID_name_dita"/>
- <xsl:with-param name="wfs_output" select="$wfs_output"/>
- <xsl:with-param name="wfs_output.xml" select="$wfs_output.xml"/>
- <xsl:with-param name="wfs_output.dita" select="$wfs_output.dita"/>
- <xsl:with-param name="xpath" select="$xpath"/>
- <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
- <xsl:with-param name="featureID_name" select="$featureID_name"/>
- <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
- <xsl:with-param name="RelatedFeatureCount" select="$RelatedFeatureCount"/>
- <xsl:with-param name="RelatedFeaturePos" select="$RelatedFeaturePos"/>
- <xsl:with-param name="typeName" select="$typeName"/>
- <xsl:with-param name="xpath_value" select="$xpath_value"/>
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
- <xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
- <!-\-<xsl:with-param name="loop_xpath_save" select="$loop_xpath_save"/>-\->
- <xsl:with-param name="xml_id" select="$xml_id"/>
- <!-\-<xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>-\->
- <xsl:with-param name="feature_pos" select="$feature_pos"/>
- <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
- </xsl:apply-templates>-->
- <!-- na koniec przetwarzania kazdego z wezlow, podmieniamy xsl biezacy wezel -->
- <xsl:comment>template match="RelatedFeature" mode="after_first_ant_assing_vars_childs"
- robi result-document href="build_{$loop_xpath}.{$uuid}.xml
- wiec powinnismy uruchomic ant ten plik w ciemno znajac jego nizsze wezly</xsl:comment>
- <xsl:variable name="featureID_name_child" select="substring-after($typeName,':')"/>
- <!--<xsl:variable name="loop_xpath_child" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>-->
- <xsl:if test="$debug > 2"><xsl:message>%%%%%%%%%%%%%%%%%%%%%% #142 ustalamy maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; </xsl:message></xsl:if>
-
- <tempfile suffix=".xml" destdir="{$process_locks}" deleteonexit="yes" createfile="yes" prefix="RelatedFeatureLoop_{@xml_id}_{$featureID_name_dita}_{$feature_pos_parent}_{$feature_pos}_{$parallel_pos}">
- <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)"/>
- </tempfile>
-
- <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
- <xsl:if test="$debug > 1"><echo> #592 waliduje xpath_query dla $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>; </echo></xsl:if>
- <mkdir dir="{$temp}/{$loop_xpath}"/>
- <target>
- <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)"/>
- <xsl:element name="tempfile">
- <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)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('.__test_featureID_name_dita_',$featureID_name_dita,@xml_id,$feature_pos_parent,'.',$feature_pos,'.',$parallel_pos)"/>
- </xsl:element>
- <xsl:element name="echoxml">
- <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,'}')"/>
- <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>
- </xsl:element>
- <xsl:element name="tempfile">
- <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)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <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)"/>
- </xsl:element>
- <xsl:element name="echoxml">
- <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,'}')"/>
- <xpath_query_test>OK</xpath_query_test>
- </xsl:element>
- <!--<sleep>
- <xsl:attribute name="milliseconds" select="concat($parallel_pos,'000')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
- </sleep>-->
- <!--<sleep>
- <xsl:attribute name="milliseconds" select="concat('${parallel_pos}','000')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
- </sleep>-->
- <!--<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>-->
- <!--<exec executable="cat">
- <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>
- </exec>-->
- <!--<xsl:element name="xslt">
- <!-\-<xsl:attribute name="basedir" select="concat($temp,'/',$loop_xpath)"/>-\->
- <xsl:attribute name="style" select="$xpath_query.xsl"/>
- <xsl:attribute name="in" select="$empty.xml"/>
- <!-\-<xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>-\->
- <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,'}')"/>
- <factory name="net.sf.saxon.TransformerFactoryImpl">
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
- <attribute name="http://saxon.sf.net/feature/initialTemplate" value="input"/>
- </factory>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
- <param name="input">
- <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,'}')"/>
- </param>
- </xsl:element>-->
- <!--<xsl:element name="xslt">
- <!-\-<xsl:attribute name="basedir" select="concat($temp,'/',$loop_xpath)"/>-\->
- <xsl:attribute name="style" select="$xpath_query.xsl"/>
- <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,'}')"/>
- <!-\-<xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>-\->
- <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,'}')"/>
- <xsl:attribute name="reloadstylesheet" select="'true'"/>
- <factory name="net.sf.saxon.TransformerFactoryImpl">
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
- <attribute name="http://saxon.sf.net/feature/initialMode" value="xpath_query_test"/>
- </factory>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
- </xsl:element>-->
- <xsl:if test="$debug > 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>
- <xsl:element name="loadfile">
- <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)"/>
- <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,'}')"/>
- </xsl:element>
- <!--<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>-->
- <condition>
- <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)"/>
- <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)"/>
- <xsl:element name="contains">
- <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,'}')"/>
- <xsl:attribute name="substring" select="'OK'"/>
- </xsl:element>
- </condition>
- </target>
- <target>
- <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)"/>
- <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)"/>
- <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,'}')"/>
- <antcall > <!-- target="get_related_feature_run_child_ant{$loop_xpath}_{$loop_path_recurs}" -->
- <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)"/>
- </antcall>
-
- </target>
- <!-- EOF dajemy wpis o walidacji danego feature pod katem xpath_query -->
-
-
-
-
- <!-- warunek dla ograniczenia zapetlenia TODO do optymalizacji aby nie potrzebnie nie robilo zapytania czy jest wezel zaglebiony -->
-
- <xsl:element name="target">
- <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') -->
- <!--<tempfile property="test_child_curl_ouptut.xml"/>--> <!-- todo deleteonexit=yes -->
- <!--<xsl:element name="tempfile">
- <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)" />
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="prefix" select="'.test_if_exec_child_ant-'"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- </xsl:element>-->
- <xsl:element name="property">
- <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)" />
- <xsl:attribute name="location" select="concat($temp,'/',$loop_xpath,'/.test_if_exec_child_ant.xml')"/>
- </xsl:element>
- <xsl:variable name="OGC_Filter">
- <xsl:call-template name="simpleTypeMakeOgcFilter_merge">
- <xsl:with-param name="simpleTypeMakeOgcFilter" select="simpleTypeMakeOgcFilter"/>
- <xsl:with-param name="RelatedFilter" select="RelatedFilter"/>
- <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
- <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="url">
- <xsl:value-of select="$api_url"/>/default_db/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=<xsl:value-of select="$typeNameRealResource"/>&SRSNAME=EPSG:3003&resultType=hits<xsl:value-of select="$OGC_Filter"/>
- </xsl:variable>
- <!--<echo>
- (-)(-)(-)(-)(-) #722 exec curl for $typeNameRealResource=<xsl:value-of select="$typeNameRealResource"/>
- (-)(-)(-)(-)(-) 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"/>;
- (-)(-)(-)(-)(-) $url=<xsl:value-of select="$url"/>;
- (-)(-)(-)(-)(-) $wfs_output.xml = <xsl:value-of select="concat('${get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
- </echo>-->
- <ant antfile="{$get_wfs}" target="GetXmlByUrlVerifyRetry" >
- <property name="output">
- <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,'}')"/>
- </property>
- <property name="url" value="{$url}"/>
- <property name="cookie_curl_option" value="{$cookie_curl_option}"/>
- </ant>
- <!--<xsl:element name="exec">
- <xsl:attribute name="executable" select="'curl'"/>
- <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,'}')"/>
- <xsl:attribute name="errorproperty" select="'wfs_error'"/>
- <xsl:attribute name="resultproperty" select="'wfs_result'"/>
- <xsl:element name="arg">
- <xsl:attribute name="line"> <xsl:value-of select="$cookie_curl_option"/> "<xsl:value-of select="$url"/>"</xsl:attribute>
- </xsl:element>
- <xsl:element name="arg">
- <xsl:attribute name="line">-\-connect-timeout 5</xsl:attribute>
- </xsl:element>
- <xsl:element name="arg">
- <xsl:attribute name="line">-\-max-time 240</xsl:attribute>
- </xsl:element>
- <xsl:element name="arg">
- <xsl:attribute name="line">-\-retry 5</xsl:attribute>
- </xsl:element>
- <xsl:element name="arg">
- <xsl:attribute name="line">-\-retry-max-time 1200</xsl:attribute>
- </xsl:element>
- </xsl:element>-->
-
- <xsl:element name="loadfile">
- <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)"/>
- <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,'}')" />
- </xsl:element>
- <xsl:if test="$debug > 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)"/>}
- check curl if child exists: <xsl:value-of select="$api_url"/>
- 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,'}')"/>
- </echo></xsl:if>
- <xsl:element name="condition">
- <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)"/>
- <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)"/>
- <xsl:element name="contains">
- <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,'}')"/>
- <xsl:attribute name="substring" select="'numberMatched="0"'"/>
- </xsl:element>
- </xsl:element>
- </xsl:element>
- <!--<target name="check_if_child">
- <exec executable="curl"
- 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"
- errorproperty="wfs_error"
- resultproperty="wfs_result">
- <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 "https://biuro.biall-net.pl/SE/version-git/wfs-data.php/default_db/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=p5_default_db:CRM_PROCES&SRSNAME=EPSG:3003&Filter=<ogc:Filter><ogc:And><ogc:PropertyIsEqualTo><ogc:PropertyName>IID</ogc:PropertyName><ogc:Literal>995</ogc:Literal></ogc:PropertyIsEqualTo><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>TYPE</ogc:PropertyName><ogc:Literal>PROCES</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Or></ogc:And></ogc:Filter>""/>
- </exec>
- <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" />
- <echo> MSG to ${msg} </echo>
- <condition property="test" taskname="get_related_feature_run_child_antroot_x2f_.d3e1.CRM_PROCES_x2f_.d3e16.CRM_PROCES_/d3e16" >
- <contains string="${msg}" substring="featureMember"/>
- </condition>
- </target>-->
-
- <xsl:element name="target">
- <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)"/>
- <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)"/>
- <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,'}')"/>
- <xsl:if test="$debug > 1"><echo>
- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- #810 RelatedFeatureLoop LEAF STARTING RUN -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
- | @xml_id is <xsl:value-of select="@xml_id"/> ;
- * $temp is = <xsl:value-of select="$temp"/> ;
- | ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>;
- * $loop_xpath_real <xsl:value-of select="$loop_xpath_real"/>;
- | $loop_path_recurs = <xsl:value-of select="$loop_path_recurs"/>
- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
- </echo></xsl:if>
- <delete quiet="true">
- <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,'}')"/>
- </delete>
- <ant antfile="{$recurse_ant_basedir}/build_recurse_ant.xml" target="xml_recursed_from_tr_map" inheritall="true" />
- <xsl:if test="$debug > 1"><echo>
- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- #821 RelatedFeatureLoop FIHISHED RUN -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
- | @xml_id is <xsl:value-of select="@xml_id"/> ;
- * $temp is = <xsl:value-of select="$temp"/> ;
- | ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>;
- * $loop_xpath_real <xsl:value-of select="$loop_xpath_real"/>;
- | $loop_path_recurs = <xsl:value-of select="$loop_path_recurs"/>
- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
- </echo></xsl:if>
- </xsl:element>
- <!-- na koniec przetwarzania danego zaglebienia uruchamiamy calosc ponownie do kolejnego zaglebienia -->
- <!-- task do polaczenia zaglebien -->
- <!-- jak nie ma zaglebien to generujemy pdf i dajemy uzytkownikowi linka -->
- <xsl:if test="$debug > 2"><xsl:message>%%%%%%%%%%%%%%%%%%%%%% #871 END OF BUILDING BUILD_ROOT for RelatedFeatureLOOP </xsl:message></xsl:if>
- </project>
- </xsl:when>
- <xsl:otherwise>
- <xsl:comment>#723 child nodes</xsl:comment>
- <xsl:apply-templates mode="child_nodes"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <!-- trzeba przetwarzac child_nodes do pierwszego napotkania RelatedFeature -->
- <xsl:template mode="child_nodes" match="*">
- <xsl:copy-of select="."/>
- <xsl:comment>#732 eof copy . (mode=child_nodes match=*)</xsl:comment>
- </xsl:template>
-
- <!--<xsl:template mode="child_nodes" match="simpleTypeMakeOgcFilter">
- <xsl:message>#266 bypassing temporary simpleTypeMakeOgcFilter of problem with output </xsl:message>
- </xsl:template>-->
-
- <xsl:template mode="place_subant" match="RelatedFeature">
- <xsl:param name="uuid" required="yes"/>
- <xsl:param name="loop_xpath" required="yes"/>
- <xsl:param name="loop_xpath_real" required="yes"/>
- <xsl:param name="featureID_name_dita" required="yes"/>
- <xsl:param name="loop_path_recurs_xpath" required="yes"/>
- <xsl:param name="feature_pos_parent" required="yes"/>
- <xsl:param name="feature_pos" required="yes"/>
- <xsl:param name="input_obj_fid" />
- <xsl:param name="typeName_dita"/> <!-- debug cache only -->
- <xsl:param name="xpath_value_dita"/>
- <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
- <xsl:if test="$debug > 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>
- <!--<sleep>
- <xsl:attribute name="milliseconds" select="concat($parallel_pos,'0')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
- </sleep>-->
- <!--<sleep>
- <xsl:attribute name="milliseconds" select="concat('${parallel_pos}','0')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
- </sleep>-->
-
- <sequential>
- <xsl:comment>begin mode="place_subant" match="RelatedFeature"</xsl:comment>
- <mkdir dir="{$temp}/{$loop_xpath}"/>
- <!--<property>
- <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)"/>
- <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)"/>
- </property>-->
- <xsl:element name="tempfile">
- <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)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('.${uuid}.builds_to_ant-loop_test_featureID_name_dita_',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'.',$parallel_pos)"/>
- </xsl:element>
- <!--<xsl:element name="echoxml">
- <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,'}')"/>
- <EMPTY_FILE>NO_DATA</EMPTY_FILE>
- </xsl:element>-->
- <xsl:element name="echoxml">
- <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,'}')"/>
- <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>
- </xsl:element>
- <xsl:element name="tempfile">
- <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)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('.${uuid}.builds_to_ant-loop_test_featureID_name_dita_out',@xml_id,'.',$feature_pos_parent,'.',$feature_pos)"/>
- </xsl:element>
- <xsl:element name="echoxml">
- <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,'}')"/>
- <xpath_query_test>OK</xpath_query_test>
- </xsl:element>
- <xsl:if test="$debug > 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>
- <!--<xmlvalidate lenient="true">
- <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,'}')"/>
- </xmlvalidate>-->
- <!--<java>
- <xsl:attribute name="jar" select="'/opt/local/share/java/saxon9he.jar'"/>
- <!-\-<xsl:attribute name="classname" select="'org.apache.tools.ant.Main'"/>-\->
- <xsl:attribute name="dir" select="concat($temp,'/',$loop_xpath,'/')"/>
- <xsl:attribute name="fork" select="'true'"/>
- <xsl:attribute name="clonevm" select="'false'"/>
- <xsl:attribute name="newenvironment" select="'true'"/>
- <xsl:attribute name="failonerror" select="'true'"/>
- <!-\-<xsl:attribute name="resultproperty" select="concat(.,'_resprop')"/>-\->
- <!-\-<xsl:attribute name="output" select="concat(.,'_out.log')"/>-\->
- <xsl:element name="arg">
- <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,'}')"/>
- </xsl:element>
- <xsl:element name="arg">
- <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,'}')"/>
- </xsl:element>
- <arg line="-xsl:{$xpath_query.xsl}"/>
- <arg line="-im:xpath_query_test"/>
- </java>-->
- <!--<xsl:element name="xslt">
- <!-\-<xsl:attribute name="basedir" select="concat($temp,'/',$loop_xpath)"/>-\->
- <xsl:attribute name="style" select="$xpath_query.xsl"/>
- <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,'}')"/>
- <!-\-<xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>-\->
- <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,'}')"/>
- <!-\- <xsl:attribute name="failOnError" select="'false'"/> <!-\\- todo debug problems -\\->
- <xsl:attribute name="failOnTransformationError" select="'false'"/> <!-\\- todo debug problems -\\->
- <xsl:attribute name="failOnNoResources" select="'false'"/>-\->
- <xsl:attribute name="force" select="'true'"/>
- <factory name="net.sf.saxon.TransformerFactoryImpl">
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
- <attribute name="http://saxon.sf.net/feature/initialMode" value="xpath_query_test"/>
- </factory>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
- </xsl:element>-->
-
-
-
- <!--<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>-->
- <!-- wygenerujemy liste ant -->
- <xsl:if test="$debug > 1"><echo>
- #686 ^_^_^_^_^_^_^_ Searching leaf build for $feature_pos_parent = <xsl:value-of select="$feature_pos_parent"/> ; $feature_pos = <xsl:value-of select="$feature_pos"/> ;
- ^_^_^_^_^_^_^_ $featureID_name_dita <xsl:value-of select="$featureID_name_dita"/> ; substring-after(@typeName,':') = <xsl:value-of select=" substring-after(@typeName,':')"/> ;
- ^_^_^_^_^_^_^_ @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; @xml_id = <xsl:value-of select="@xml_id"/> ;
- ^_^_^_^_^_^_^_ 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,':'))"/>"
- </echo></xsl:if>
- <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,':')} -->
- <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}"/>
- <!--<tempfile property="builds_to_ant.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.builds_to_ant-"/>-->
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat('builds_to_ant.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('.${uuid}.builds_to_ant-',@xml_id,'.',$feature_pos_parent,'.',$feature_pos)"/>
- </xsl:element>
- <!--<tempfile property="builds_to_ant_file.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.build_to_ant_file-"/>-->
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat('builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('.${uuid}.build_to_ant_file-',@xml_id,'.',$feature_pos_parent,'.',$feature_pos)"/>
- </xsl:element>
- <xsl:if test="$debug > 1"><echo>#235 ant do: builds_to_ant.xml=${builds_to_ant_file.xml} mode="place_subant" match="RelatedFeature" </echo></xsl:if>
- <!--<echoxml file="'${builds_to_ant.xml}'"><builds_to_ant>${builds_to_ant}</builds_to_ant></echoxml>-->
- <xsl:element name="echoxml">
- <xsl:attribute name="file" select="concat('${builds_to_ant.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
- <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>
- </xsl:element>
- <xsl:element name="xslt">
- <!--<xsl:attribute name="basedir" select="$temp"/>-->
- <xsl:attribute name="style" select="$builds_to_ant.xsl"/>
- <xsl:attribute name="in" select="concat('${builds_to_ant.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
- <!--<xsl:attribute name="destdir" select="$temp"/>-->
- <xsl:attribute name="out" select="concat('${builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
- <factory name="net.sf.saxon.TransformerFactoryImpl">
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
- <!--<attribute name="http://saxon.sf.net/feature/initialMode"
- value="after_first_ant_assing_vars"/>-->
- </factory>
- <param name="temp" expression="{$temp}"/> <!-- TODO czy to zadziala @2017-04 -->
- <param name="loop_xpath_real" expression="{$loop_xpath_real}{@xml_id}"/>
- <param name="loop_path_recurs" expression="{$loop_path_recurs}"/>
- <param name="loop_xpath" expression="{$loop_xpath}"/>
- <param name="xpath_query_test.xml">
- <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,'}')"/>
- </param>
- <param name="build_check_java_process_count.xml" expression="{$build_check_java_process_count.xml}"/>
- <param name="parallel_java_process_max" expression="{$parallel_java_process_max}"/>
- <!--<param name="recurse_ant_basedir" expression="{$recurse_ant_basedir}"/>-->
-
- <!--<xsl:element name="param">
- <xsl:attribute name="name" select="'default_antfile'"/>
- <xsl:attribute name="expression" select="concat($temp,'/',$builds_to_ant_file.xml"/>
- </xsl:element>-->
- <param name="default_antfile" expression="{$temp}/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml"/><!-- TODO czy to potrzebne? -->
- <param name="xpath_query" expression="{$xpath_query}"/> <!-- limit related TODO -->
- <!--<param name="xpath_query.xsl" expression="{$xpath_query.xsl}"/>-->
- <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
- <param name="ant-launcher.jar" expression="{$ant-launcher.jar}"/>
- <param name="process_locks" expression="{$process_locks}"/>
- <param name="uuid" expression="{$uuid}"/>
- <param name="xml_id" expression="{@xml_id}"/>
- <param name="typeNameRoot" expression="{$typeNameRoot}"/>
- <param name="recurse_ant_basedir.recurse_cache" expression="{$recurse_ant_basedir.recurse_cache}"/>
- <param name="feature_pos_parent" expression="{$feature_pos_parent}"/>
- <param name="feature_pos" expression="{$feature_pos}"/>
- <param name="external_schema_table.path" expression="{$external_schema_table.path}"/>
- <param name="default_db.instance.xml" expression="{$default_db.instance.xml}"/>
-
- <param name="detect_resource_type.local" expression="${detect_resource_type.local}"/>
- <param expression="${detect_objects_parent_relations.local}">
- <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'"/>
- </param>
- <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
- <param name="default_db_targetNamespace_detect_string" expression="${default_db_targetNamespace_detect_string}"/>
- <param name="zasob_id_db_targetNamespace_detect_string" expression="${zasob_id_db_targetNamespace_detect_string}"/>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- </xsl:element>
- <!-- delete tempfiles -->
- <delete quiet="true">
- <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,'}')"/>
- </delete>
- <delete quiet="true">
- <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,'}')"/>
- </delete>
- <delete quiet="true">
- <xsl:attribute name="file" select="concat('${builds_to_ant.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
- </delete>
- <delete quiet="true">
- <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,'}')"/>
- </delete>
-
- <!--<ant antfile="{$temp}/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml" dir="."/>-->
- <xsl:element name="ant">
- <xsl:attribute name="inheritall" select="'false'"/>
- <xsl:attribute name="antfile" select="concat('${builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
- </xsl:element>
- <!-- running as java for safe maxfiles -->
- <!--<java>
- <xsl:attribute name="jar" select="$ant-launcher.jar"/>
- <!-\-<xsl:attribute name="classname" select="'org.apache.tools.ant.Main'"/>-\->
- <!-\-<xsl:attribute name="dir" select="'${basedir}'"/>-\->
- <xsl:attribute name="fork" select="'true'"/>
- <xsl:attribute name="clonevm" select="'false'"/>
- <xsl:attribute name="failonerror" select="'true'"/>
- <!-\-<xsl:attribute name="append" select="'false'"/>-\->
- <!-\-<xsl:attribute name="resultproperty" select="concat(.,'_resprop')"/>-\->
- <!-\-<xsl:attribute name="output" select="concat($temp,'/',.,'_out.log')"/>-\->
- <arg value="-buildfile"/>
- <arg value="{$temp}/{$loop_xpath}/{.}/build.xml">
- <xsl:attribute name="value" select="concat('${builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
- </arg>
- </java>-->
- <delete quiet="true">
- <xsl:attribute name="file" select="concat('${builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath_real,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'}')"/>
- </delete>
- <!--<ant antfile="{$temp}/${builds_to_ant_file.xml}" dir="."/>-->
- <xsl:comment>end mode="place_subant" match="RelatedFeature"</xsl:comment>
- </sequential>
- </xsl:template>
-
- <xsl:template mode="place_subant" match="RelatedFeatureLoop">
- <xsl:param name="uuid" required="yes"/>
- <xsl:param name="loop_xpath" required="yes"/>
- <xsl:param name="loop_xpath_real" required="yes"/>
- <xsl:param name="xpath_dita" required="yes"/>
- <xsl:param name="xpath_value_dita" required="yes"/>
- <xsl:param name="featureID_name_dita" required="yes"/>
- <xsl:param name="loop_path_recurs_xpath" required="yes"/>
- <xsl:param name="feature_pos_parent" required="yes"/> <!-- todo fixing conflict from parent leaf -->
- <xsl:param name="feature_pos" required="yes"/>
- <xsl:param name="input_obj_fid" required="yes"/>
- <xsl:param name="typeName_dita" required="yes"/>
- <!--<xsl:param name="loop_path_recurs" required="yes"/>-->
- <!-- wygenerujemy liste ant -->
-
- <sequential>
- <xsl:comment>
- #590 LOOP BEGIN ; @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; </xsl:comment>
- <xsl:if test="$debug > 1"><echo>
- $ $ $ $ $ #1001 match RelatedFeatureLoop mode place_subant $$$$$
- $ #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"/>)
- $ $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"/>
- $ $feature_pos = <xsl:value-of select="$feature_pos"/>; $feature_pos_parent=<xsl:value-of select="$feature_pos_parent"/> ;
- $ $loop_xpath = <xsl:value-of select="$loop_xpath"/>; $loop_path_recurs= <xsl:value-of select="$loop_path_recurs"/>;
- $ loop_xpath_real = <xsl:value-of select="$loop_xpath_real"/> ;
- $ przy FeatureLoop przy zapisie w (_1598 RelatedFeatureLoop jest okazja do zrobienia bilda /build_root.xml) $feature_pos_parent przechodzi w $feature_pos TUTAJ!
- $ $temp = <xsl:value-of select="$temp"/> ;
- $ position()= <xsl:value-of select="position()"/> ; $parallel_pos=<xsl:value-of select="$parallel_pos"/>; ($)parallel_pos=${parallel_pos} ;
- $ $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
- </echo></xsl:if>
- <xsl:if test="$debug > 2"><xsl:message>#591 todo executing by exec instead of ant without inheritAll because it's looping!!! </xsl:message></xsl:if>
-
-
- <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
- <xsl:if test="$debug > 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>
- <mkdir dir="{$temp}/{$loop_xpath}"/>
- <!--<xsl:element name="tempfile">
- <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)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('.${uuid}.builds_to_ant-loop_test_featureID_name_dita',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,'.',$parallel_pos)"/>
- </xsl:element>-->
-
- <property>
- <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)"/>
- <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')"/>
- </property>
- <!--<xsl:comment>#1067 secondary the same file </xsl:comment>-->
- <!--<property>
- <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')"/>
- <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')"/>
- </property>-->
- <xsl:if test="$debug > 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>
- <!-- <sleep>
- <xsl:attribute name="milliseconds" select="concat($parallel_pos,'00')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
- </sleep>
- <sleep>
- <xsl:attribute name="milliseconds" select="concat('${parallel_pos}','00')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
- </sleep>-->
- <!-- fixed file property test due error -->
-
- <!--<xsl:element name="echoxml">
- <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,'}')"/>
- <EMPTY_FILE>NO_DATA</EMPTY_FILE>
- </xsl:element>-->
-
- <!-- second forced -->
- <xsl:element name="echoxml">
- <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,'}')"/>
- <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>
- </xsl:element>
- <xsl:element name="tempfile">
- <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)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <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)"/>
- </xsl:element>
- <!-- debug style! -->
- <!--<xsl:element name="tempfile">
- <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)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="suffix" select="'.xsl'"/>
- <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)"/>
- </xsl:element>-->
-
- <!--<copyfile src="{$xpath_query.xsl}">
- <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,'}')"/>
- </copyfile>-->
-
- <xsl:element name="echoxml">
- <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,'}')"/>
- <xpath_query_test>OK</xpath_query_test>
- </xsl:element>
- <!-- 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 -->
- <!--<sleep>
- <xsl:attribute name="milliseconds" select="concat($parallel_pos,'00')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
- </sleep>-->
- <!--<sleep>
- <xsl:attribute name="milliseconds" select="concat('${parallel_pos}','00')"/> <!-\- to sleep different time for each parallel task exec - ERROR -\->
- </sleep>-->
- <!--<waitfor >
- <available >
- <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,'}')"/>
- </available>
- </waitfor>-->
- <xsl:if test="$debug > 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>
- <!--<exec executable="cat">
- <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>
- </exec>-->
- <!--<xsl:element name="xslt">
- <!-\-<xsl:attribute name="basedir" select="concat($temp,'/',$loop_xpath)"/>-\->
- <xsl:attribute name="style" select="$xpath_query.xsl"/>
- <xsl:attribute name="in" select="$empty.xml"/>
- <!-\-<xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>-\->
- <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,'}')"/>
- <!-\-<xsl:attribute name="failOnError" select="'false'"/>-\-> <!-\- todo debug problems -\->
- <!-\-<xsl:attribute name="failOnTransformationError" select="'false'"/>-\-> <!-\- todo debug problems -\->
- <!-\-<xsl:attribute name="failOnNoResources" select="'false'"/>-\->
- <xsl:attribute name="force" select="'true'"/>
- <factory name="net.sf.saxon.TransformerFactoryImpl">
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
- <attribute name="http://saxon.sf.net/feature/initialTemplate" value="input"/>
- </factory>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
- <param name="input">
- <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,'}')"/>
- </param>
- </xsl:element>-->
- <!--<xsl:element name="xslt">
- <!-\-<xsl:attribute name="basedir" select="concat($temp,'/',$loop_xpath)"/>-\->
- <xsl:attribute name="style" select="$xpath_query.xsl"/>
- <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,'}')"/>
- <!-\-<xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>-\->
- <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,'}')"/>
- <!-\-<xsl:attribute name="failOnError" select="'false'"/>-\-> <!-\- todo debug problems -\->
- <!-\-<xsl:attribute name="failOnTransformationError" select="'false'"/>-\-> <!-\- todo debug problems -\->
- <!-\-<xsl:attribute name="failOnNoResources" select="'false'"/>-\->
- <xsl:attribute name="force" select="'true'"/>
- <xsl:attribute name="reloadstylesheet" select="'true'"/>
- <factory name="net.sf.saxon.TransformerFactoryImpl">
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
- <attribute name="http://saxon.sf.net/feature/initialMode" value="xpath_query_test"/>
- </factory>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
- </xsl:element>-->
- <delete quiet="true">
- <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,'}')"/>
- </delete>
-
- <!--<xsl:element name="xslt">
- <xsl:attribute name="basedir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="style" select="$xpath_query.xsl"/>
- <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,'}')"/>
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <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,'}')"/>
- <!-\-<xsl:attribute name="failOnError" select="'false'"/>-\-> <!-\- todo debug problems -\->
- <!-\-<xsl:attribute name="failOnTransformationError" select="'false'"/>-\-> <!-\- todo debug problems -\->
- <!-\-<xsl:attribute name="failOnNoResources" select="'false'"/>-\->
- <!-\-<xsl:attribute name="force" select="'true'"/>-\->
- <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
- </xsl:element>-->
- <!-- DEBUG <loadfile>
- <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)"/>
- <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,'}')"/>
- </loadfile>
- <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,'}')"/>
- 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,'}')"/>
- </echo>-->
- <xsl:if test="$debug > 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>
- <!-- Lista do wyzwolenia dzieci w podkalagach na bazie params-->
- <xsl:if test="$debug > 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,' -->
- <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} -->
- <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}"/>
- <!--<tempfile property="builds_to_ant.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.builds_to_ant-"/>-->
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat('builds_to_ant.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('.${uuid}.builds_to_ant-loop-',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
- </xsl:element>
- <!--<tempfile property="builds_to_ant_file.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.build_to_ant_file-"/>-->
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat('builds_to_ant_file.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($temp,'/',$loop_xpath)"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('.${uuid}.build_to_ant_file-loop-',@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos)"/>
- </xsl:element>
- <xsl:if test="$debug > 2"><echo>#615 ant do: builds_to_ant.xml=${builds_to_ant_file.xml} mode="place_subant" match="RelatedFeatureLoop" </echo></xsl:if>
- <!--<echoxml file="'${builds_to_ant.xml}'"><builds_to_ant>${builds_to_ant}</builds_to_ant></echoxml>-->
- <xsl:element name="echoxml">
- <xsl:attribute name="file" select="concat('${builds_to_ant.xml',$loop_path_recurs,$loop_xpath,@xml_id,'.',$feature_pos_parent,'.',$feature_pos,$featureID_name_dita,$parallel_pos,'}')"/>
- <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>
- </xsl:element>
- <xsl:element name="xslt">
- <xsl:attribute name="basedir" select="$temp"/>
- <xsl:attribute name="style" select="$builds_to_ant.xsl"/>
- <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,'}')"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <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,'}')"/>
- <factory name="net.sf.saxon.TransformerFactoryImpl">
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
- <attribute name="http://saxon.sf.net/feature/initialMode" value="exec"/>
- </factory>
- <param name="temp" expression="{$temp}"/>
- <param name="loop_xpath_real" expression="{$loop_xpath_real}"/>
- <param name="loop_path_recurs" expression="{$loop_path_recurs}"/>
- <param name="feature_pos" expression="{$feature_pos}"/>
- <param name="feature_pos_parent" expression="{$feature_pos_parent}"/>
- <param name="loop_xpath" expression="{$loop_xpath}"/>
- <param name="xpath_query_test.xml">
- <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,'}')"/>
- </param>
- <!--<xsl:element name="param">
- <xsl:attribute name="name" select="'default_antfile'"/>
- <xsl:attribute name="expression" select="concat($temp,'/',$builds_to_ant_file.xml"/>
- </xsl:element>-->
- <param name="default_antfile" expression="{$temp}/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml"/> <!-- TODO czy to potrzebne raczej bledne -->
- <param name="xpath_query" expression="{$xpath_query}"/>
- <!--<param name="xpath_query.xsl" expression="{$xpath_query.xsl}"/>-->
- <param name="featureID_name_dita" expression="{$featureID_name_dita}"/>
- <param name="ant-launcher.jar" expression="{$ant-launcher.jar}"/>
- <param name="build_check_java_process_count.xml" expression="{$build_check_java_process_count.xml}"/>
- <param name="parallel_java_process_max" expression="{$parallel_java_process_max}"/>
- <param name="process_locks" expression="{$process_locks}"/>
- <param name="uuid" expression="{$uuid}"/>
- <param name="xml_id" expression="{@xml_id}"/>
- <param name="typeNameRoot" expression="{$typeNameRoot}"/>
- <param name="recurse_ant_basedir.recurse_cache" expression="{$recurse_ant_basedir.recurse_cache}"/>
- <param name="external_schema_table.path" expression="{$external_schema_table.path}"/>
- <param name="default_db.instance.xml" expression="{$default_db.instance.xml}"/>
-
- <param name="detect_resource_type.local" expression="${detect_resource_type.local}"/>
- <param expression="${detect_objects_parent_relations.local}">
- <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'"/>
- </param>
- <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
- <param name="default_db_targetNamespace_detect_string" expression="${default_db_targetNamespace_detect_string}"/>
- <param name="zasob_id_db_targetNamespace_detect_string" expression="${zasob_id_db_targetNamespace_detect_string}"/>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- </xsl:element>
- <xsl:if test="$debug > 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>
- <xsl:element name="ant">
- <xsl:attribute name="inheritall" select="'false'"/>
- <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,'}')"/>
- </xsl:element>
-
- <!-- EOF Lista do wyzwolenia dzieci -->
-
- <!--<exec command="/opt/local/bin/ant" dir="{$temp}" failifexecutionfails="true">
- <!-\-<arg line="-f ${builds_to_ant_file.xml}"/>-\->
- <xsl:element name="arg">
- <xsl:attribute name="line" select="concat('-f ',@xml_id,'/',$uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.1.xml')"/>
- </xsl:element>
- </exec>-->
- <!--<xsl:element name="ant">
- <xsl:attribute name="antfile" select="concat($temp,'/',@xml_id,'/',$uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.1.xml')"/>
- <xsl:attribute name="inheritAll" select="'false'"/>
- <xsl:attribute name="inheritRefs" select="'false'"/>
- <property name="xpath" value="{$xpath_dita}"/>
- <property name="xpath_value_dita" value="{$xpath_value_dita}"/>
- </xsl:element>-->
- <!--<ant antfile="{$temp}/${builds_to_ant_file.xml}" dir="."/>-->
- <xsl:comment>#590 LOOP END
- </xsl:comment>
- </sequential>
- </xsl:template>
-
- <xsl:template mode="place_subant" match="*">
- <xsl:param name="uuid" required="yes"/>
- <xsl:param name="loop_xpath" required="yes"/>
- <xsl:param name="loop_xpath_real" required="yes"/>
- <xsl:param name="xpath_dita" required="yes"/>
- <xsl:param name="xpath_value_dita" required="yes"/>
- <xsl:param name="featureID_name_dita" required="yes"/>
- <xsl:param name="loop_path_recurs_xpath" required="yes"/>
- <xsl:param name="feature_pos_parent" required="yes"/>
- <xsl:param name="feature_pos" required="yes"/>
- <xsl:param name="input_obj_fid" required="yes"/>
- <xsl:param name="typeName_dita" required="yes"/><!-- debug cache only -->
- <!--<xsl:param name="loop_path_recurs" required="yes"/>-->
-
- <!--<xsl:param name="loop_path_recurs" required="yes"/>-->
- <xsl:apply-templates mode="place_subant">
- <xsl:with-param name="uuid" select="$uuid"/>
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
- <xsl:with-param name="loop_xpath_real" select="$loop_xpath_real"/>
- <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
- <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
- <xsl:with-param name="featureID_name_dita" select="$featureID_name_dita"/>
- <xsl:with-param name="loop_path_recurs_xpath" select="$loop_path_recurs_xpath"/>
- <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/>
- <xsl:with-param name="feature_pos" select="$feature_pos"/>
- <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
- <xsl:with-param name="typeName_dita" select="$typeName_dita"/> <!-- debug cache only -->
- <xsl:with-param name="default_db.instance.xml" select="$default_db.instance.xml"/>
-
- <xsl:with-param name="detect_resource_type.local" select="$detect_resource_type.local"/>
- <xsl:with-param name="p5opr:detect_objects_parent_relations.local" select="$p5opr:detect_objects_parent_relations.local"/>
- <xsl:with-param name="vrtfNamespaces.xml" select="$vrtfNamespaces.xml"/>
- <xsl:with-param name="default_db_targetNamespace_detect_string" select="$default_db_targetNamespace_detect_string"/>
- <xsl:with-param name="zasob_id_db_targetNamespace_detect_string" select="$zasob_id_db_targetNamespace_detect_string"/>
- <!--<xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>-->
- <!--<xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>-->
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template mode="place_subant" match="text()|comment()"/>
-
-
- <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 -->
- <xsl:param name="input_obj_with_xpath" required="yes"/>
- <xsl:param name="xpath" required="yes"/>
- <xsl:param name="xpath_value" required="yes"/>
- <xsl:variable name="xpath_value_token">
- <xsl:for-each select=" tokenize($xpath_value,'/')">
- <xsl:if test="$debug > 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>
- <xsl:if test="$input_obj_with_xpath/node()[@xpath=current()]">
- <xsl:copy-of select="$input_obj_with_xpath/node()[@xpath=current()]"/>
- </xsl:if><!-- todo to jest bledne ale dziala tymczasowo-->
- </xsl:for-each>
- </xsl:variable>
- <xsl:if test="$debug > 2"><xsl:message>#345 ustalam na <xsl:value-of select="$xpath_value_token/node()[1]/text()"/>;</xsl:message></xsl:if>
- <!--<xsl:value-of select="$xpath_value_token/node()[1]/text()"/>-->
- <xsl:value-of select="$xpath_value_token"/>
- </xsl:template>
-
-
- <xsl:template match="RelatedFeature" mode="ant_target" >
- <xsl:param name="typeName_dita" required="yes"/>
- <xsl:param name="featureID_name_dita" required="yes"/>
- <xsl:param name="wfs_output" required="yes"/>
- <xsl:param name="wfs_output.xml" required="yes"/>
- <xsl:param name="wfs_output.dita" required="yes"/>
- <xsl:param name="xpath_dita" required="yes"/>
- <xsl:param name="xpath_value_dita" required="yes"/>
- <xsl:param name="xpath" required="yes"/>
- <xsl:param name="featureID_name" required="yes"/>
- <xsl:param name="RelatedFeatureCount" required="yes"/>
- <xsl:param name="RelatedFeaturePos" required="yes"/>
- <xsl:param name="typeName" required="yes"/>
- <xsl:param name="xpath_value" required="yes"/>
- <xsl:param name="loop_xpath" required="yes"/>
- <!--<xsl:param name="loop_xpath_save" required="yes"/>-->
- <xsl:param name="xml_id" required="yes"/>
- <xsl:param name="feature_pos" required="yes"/>
- <xsl:param name="loop_xpath_real" required="yes"/>
- <xsl:param name="input_obj_with_xpath" required="yes"/>
- <xsl:param name="typeNameRealResource" required="yes"/>
- <xsl:param name="loop_path_recurs_xpath" required="yes"/>
- <xsl:param name="input_obj_fid" required="yes"/>
-
- <xsl:choose>
- <xsl:when test="$wfs_output"/>
- <xsl:otherwise><xsl:message terminate="yes">Not required param wfs_output - nazwa temp sciagniecia z api xml forsowana przez pierwsze sciagniecie - to set by next parraler step in ant build </xsl:message></xsl:otherwise>
- </xsl:choose>
- <!-- template do przetworzenia dity w celu wykrycia:
- <RelatedFeature xpath="ID_BILLING_OWNER" typeName="p5_default_db:BILLING_OWNER">
- <ph>Nadawca:</ph><br/>
- <ph xpath="name1"/><br/>
- <ph xpath="name2"/><br/>
- <ph xpath="miasto"/><br/>
- <ph xpath="nr_rach"/><br/>
- <ph xpath="BILLING_OWNER_EMAIL"/><br/>
- </RelatedFeature>
-
- i wyrzucenia z tego pierwszego zadania ANT do otrzymania niezbednego .xml w celu jego podstawienia pod dite
- w celu pozniejszego ponownego wyzwolenia tego template az do zakonczenia cyklu finalnego.
-
- Template powinien budować projekt ant do wyzwolenia z odpowiednimi parametrami dalszymi
-
- -->
- <!-- sprawdzamy czy template pasuje do zadania wyzwolenia czy xpath=xpath_dita oraz czy typeName=typeName_dita-->
- <xsl:choose>
- <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 -->
- <!-- 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'-->
- <!--<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>-->
- <!--<xsl:variable name="OGC_Filter">&Filter=<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter></xsl:variable>-->
- <!--<xsl:variable name="OGC_Filter">
- <xsl:choose>
- <xsl:when test="RelatedFilter"><xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="RelatedFilter" copy-namespaces="no"/></xsl:message>&Filter=<ogc:Filter><ogc:And><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo><xsl:for-each select="RelatedFilter"><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="@xpath"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="@xpath_value"/></ogc:Literal></ogc:PropertyIsEqualTo></xsl:for-each></ogc:And></ogc:Filter></xsl:when>
- <xsl:otherwise>&Filter=<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>-->
- <xsl:variable name="OGC_Filter">
- <xsl:call-template name="simpleTypeMakeOgcFilter_merge">
- <xsl:with-param name="simpleTypeMakeOgcFilter" select="simpleTypeMakeOgcFilter"/>
- <xsl:with-param name="RelatedFilter" select="RelatedFilter"/>
- <xsl:with-param name="xpath_dita" select="$xpath_dita"/>
- <xsl:with-param name="xpath_value_dita" select="$xpath_value_dita"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:if test="$debug > 2"><xsl:message>#410 final OGC_Filter is <xsl:value-of select="$OGC_Filter"/>;</xsl:message></xsl:if>
- <xsl:variable name="url">
- <!--<xsl:value-of select="$api_url"/>/default_db/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=<xsl:value-of select="$typeName_dita"/>&SRSNAME=EPSG:3003&featureID=<xsl:value-of select="$featureID_name_dita"/>.<xsl:value-of select="$xpath_value_dita"/>-->
- <xsl:value-of select="$api_url"/>/default_db/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=<xsl:value-of select="$typeNameRealResource"/>&SRSNAME=EPSG:3003<xsl:value-of select="$OGC_Filter"/>
- </xsl:variable>
-
- <xsl:element name="target">
- <xsl:attribute name="name" select="concat('get_related_feature_test_if_output.xml.',position(),$loop_xpath_real)"/>
- <xsl:attribute name="if" select="concat('${get_related_feature_test_if_output.xml.',position(),$loop_xpath_real,'}')"/>
- <fail message="#1243 ERROR IN PROCESSING FUNCTION TO BE FIXED!! already created $wfs_output.xml {$temp}/{$wfs_output.xml} "/>
- </xsl:element>
- <xsl:element name="target">
- <xsl:attribute name="name" select="concat('get_related_feature_test_if_vals.dita.',position(),$loop_xpath_real)"/>
- <xsl:attribute name="if" select="concat('${get_related_feature_test_if_vals.dita.',position(),$loop_xpath_real,'}')"/>
- <fail message="#1248 ERROR IN PROCESSING FUNCTION TO BE FIXED!! already created $wfs_output.dita {$temp}/{$wfs_output.dita} "/>
- </xsl:element>
-
- <xsl:element name="target">
- <xsl:attribute name="name" select="concat('get_related_feature.',position(),$loop_xpath_real)"/>
- <xsl:choose>
- <xsl:when test="$RelatedFeatureCount=$RelatedFeaturePos"/>
- <xsl:otherwise>
- <xsl:attribute name="depends" select="concat('get_related_feature.',position()-1),$loop_xpath_real"/>
- </xsl:otherwise>
- </xsl:choose>
-
- <xsl:if test="$debug > 1"><echo>
- ()()()()()()() $debug_xsl_in_filename = <xsl:value-of select="$debug_xsl_in_filename"/>
- ()()()()()()() $debug_xsl_out_filename = <xsl:value-of select="$debug_xsl_out_filename"/>
- ()()()()()()() #1084 exec curl for $typeNameRealResource=<xsl:value-of select="$typeNameRealResource"/>
- ()()()()()()() $feature_pos = <xsl:value-of select="$feature_pos"/> ; position() = <xsl:value-of select="position()"/>; $parallel_pos = <xsl:value-of select="$parallel_pos"/> ;
- ()()()()()()() 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"/>;
- ()()()()()()() $url=<xsl:value-of select="$url"/>;
- ()()()()()()() $temp = <xsl:value-of select="$temp"/> ;
- ()()()()()()() $loop_xpath_real = <xsl:value-of select="$loop_xpath_real"/>;
- ()()()()()()() $loop_xpath = <xsl:value-of select="$loop_xpath"/>;
- ()()()()()()() $wfs_output.xml = <xsl:value-of select="concat($temp,'/',$wfs_output.xml)"/>
- ()()()()()()() oczekiwany $wfs_output.dita do przetworzenia nizej ( z result-document) = <xsl:value-of select="$wfs_output.dita"/> ;
- </echo></xsl:if>
-
- <condition> <!-- sprawdzenie czy jest juz przypadkiem wytworzony output - BLAD PRZETWARZANIA -->
- <xsl:attribute name="taskname" select="concat('get_related_feature_test_if_output.xml.',position(),$loop_xpath_real)"/>
- <xsl:attribute name="property" select="concat('get_related_feature_test_if_output.xml.',position(),$loop_xpath_real)"/>
- <available>
- <xsl:attribute name="file" select="concat($temp,'/',$wfs_output.xml)"/>
- </available>
- </condition>
-
- <antcall> <!-- sprawdzenie czy jest juz przypadkiem wytworzony output - BLAD PRZETWARZANIA -->
- <xsl:attribute name="target" select="concat('get_related_feature_test_if_output.xml.',position(),$loop_xpath_real)"/>
- </antcall>
- <!--<tempfile property="out_task.dita" deleteonexit="no" destdir="temp"/>-->
- <!--<tempfile property="wfs_output" deleteonexit="no" destdir="temp" suffix=".xml" />-->
- <ant antfile="{$get_wfs}" target="GetXmlByUrlVerifyRetry" >
- <property name="output" value="{$temp}/{$wfs_output.xml}"/>
- <property name="url" value="{$url}"/>
- <property name="cookie_curl_option" value="{$cookie_curl_option}"/>
- </ant>
- <!--<xsl:element name="exec">
- <xsl:attribute name="executable" select="'curl'"/>
- <xsl:attribute name="output" select="concat($temp,'/',$wfs_output.xml)"/>
- <xsl:attribute name="errorproperty" select="'wfs_error'"/>
- <xsl:attribute name="resultproperty" select="'wfs_result'"/>
- <xsl:element name="arg">
- <!-\-<xsl:attribute name="line" select='concat("-H ","&Authorization: Basic ",$passwordBase64Basic," ",$url)'/>-\->
- <!-\-<xsl:attribute name="line">-H 'Authorization: Basic <xsl:value-of select="$passwordBase64Basic"/>' "<xsl:value-of select="$url"/>"</xsl:attribute>-\->
- <xsl:attribute name="line"> <xsl:value-of select="$cookie_curl_option"/> "<xsl:value-of select="$url"/>"</xsl:attribute>
- </xsl:element>
- <xsl:element name="arg">
- <xsl:attribute name="line">-\-connect-timeout 5</xsl:attribute>
- </xsl:element>
- <xsl:element name="arg">
- <xsl:attribute name="line">-\-max-time 240</xsl:attribute>
- </xsl:element>
- <xsl:element name="arg">
- <xsl:attribute name="line">-\-retry 5</xsl:attribute>
- </xsl:element>
- <xsl:element name="arg">
- <xsl:attribute name="line">-\-retry-max-time 1200</xsl:attribute>
- </xsl:element>
- </xsl:element>-->
-
-
-
-
- <xsl:choose>
- <xsl:when test="position()=last()">
- <xsl:comment>antcall target="build_recurse_ant.<xsl:value-of select="position()+1"/>.xml"</xsl:comment>
- </xsl:when>
- <xsl:otherwise>
- <antcall target="build_recurse_ant.{position()+1}.xml"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="$debug > 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"/>;
- $temp is <xsl:value-of select="$temp"/>;</echo></xsl:if>
- <xsl:comment> teraz podmieniamy dane z otrzymanego xmla do pliku dita aby potem zrobic polaczony plik w kolejnym wyzwoleniu ant</xsl:comment>
- <!--<delete file="{$temp}/{$wfs_output.dita}.vals.dita"/> modified to condition test - shouldnt be before! -->
- <!--<exec executable="ls">
- <arg line="-al"/>
- <arg><xsl:attribute name="line" select="concat($temp,'/',$wfs_output.xml)"/></arg>
- </exec>-->
- <condition> <!-- sprawdzenie czy jest juz przypadkiem wytworzony output - BLAD PRZETWARZANIA -->
- <xsl:attribute name="taskname" select="concat('get_related_feature_test_if_vals.dita.',position(),$loop_xpath_real)"/>
- <xsl:attribute name="property" select="concat('get_related_feature_test_if_vals.dita.',position(),$loop_xpath_real)"/>
- <available >
- <xsl:attribute name="file" select="concat($temp,'/',$wfs_output.dita)"/>
- </available>
- </condition>
- <xslt basedir="." style="{$build_recurse_ant.xsl}" in="{$temp}/{$wfs_output.dita}" destdir="./" out="{$temp}/{$wfs_output.dita}.vals.dita" >
- <factory name="net.sf.saxon.TransformerFactoryImpl">
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
- <attribute name="http://saxon.sf.net/feature/initialMode" value="after_first_ant_assing_vars"/>
- </factory>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- <param name="wfs_output" expression="{$temp}/{$wfs_output.xml}"/>
- <param name="xpath" expression="{$xpath}" /> <!-- kontrolnie - nie potrzebne -->
- <param name="xpath_value" expression="{$xpath_value}" /> <!-- kontrolnie - nie potrzebne -->
- <param name="loop_xpath" expression="{$loop_xpath}"/>
- <param name="loop_xpath_save" expression="{$loop_xpath_save}"/>
- <param name="typeName" expression="{$typeName}"/><!-- kontrolnie - nie potrzebne -->
- <param name="uuid" expression="{$uuid}"/>
- <param name="basedir" expression="{$basedir}"/>
- <param name="recurse_ant_basedir" expression="{$recurse_ant_basedir}"/>
- <param name="recurse_ant_basedir.temp" expression="{$recurse_ant_basedir.temp}"/>
- <param name="recurse_ant" expression="{$recurse_ant}"/>
- <param name="build_recurse_ant.xsl" expression="{$build_recurse_ant.xsl}"/>
- <param name="passwordBase64Basic" expression="{$passwordBase64Basic}"/>
- <param name="feature_pos" expression="{$feature_pos}"/> <!-- aby wsadzic nr wezla do $wfs_output.dita.vals.dita -->
- <param name="temp" expression="{$temp}"/>
- <param name="builds_to_ant.xsl" expression="{$builds_to_ant.xsl}"/>
- <param name="cookie_curl_option" expression="{$cookie_curl_option}"/>
- <param name="api_url" expression="{$api_url}"/>
- <param name="loop_path_recurs" expression="{$loop_path_recurs}"/>
- <param name="ignore_maxOccurs_0" expression="{$ignore_maxOccurs_0}"/>
- <param name="xpath_query" expression="{$xpath_query}"/>
- <param name="xpath_query.xsl" expression="{$xpath_query.xsl}"/>
- <param name="empty.xml" expression="{$empty.xml}"/>
- <param name="simpleSchema_dir" expression="{$simpleSchema_dir}"/>
- <param name="default_db_xml_cache.public" expression="{$default_db_xml_cache.public}"/>
- <param name="ant-launcher.jar" expression="{$ant-launcher.jar}"/>
- <param name="loop_path_recurs_xpath" expression="{$loop_path_recurs_xpath}"/>
- <param name="build_check_java_process_count.xml" expression="{$build_check_java_process_count.xml}"/>
- <param name="parallel_java_process_max" expression="{$parallel_java_process_max}"/>
- <param name="debug_xsl_in_filename" expression="{$temp}/{$wfs_output.dita}"/>
- <param name="debug_xsl_out_filename" expression="{$temp}/{$wfs_output.dita}.vals.dita"/>
- <param name="parallel_pos">
- <xsl:attribute name="expression" select="'${parallel_pos}'"/>
- </param>
- <param name="process_locks" expression="{$process_locks}"/>
- <param name="get_wfs" expression="{$get_wfs}"/>
- <param name="recurse_ant_basedir.recurse_cache" expression="{$recurse_ant_basedir.recurse_cache}"/>
- <param name="build_recurse_ant_cache_control.xsl" expression="{$build_recurse_ant_cache_control.xsl}"/>
- <param name="typeNameRoot" expression="{$typeNameRoot}"/>
- <param name="external_schema_table.path" expression="{$external_schema_table.path}"/>
- <param name="default_db.instance.xml" expression="{$default_db.instance.xml}"/>
- <param name="detect_resource_type.local" expression="${detect_resource_type.local}"/>
- <param expression="${detect_objects_parent_relations.local}">
- <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'"/>
- </param>
- <param name="vrtfNamespaces.xml" expression="${vrtfNamespaces.xml}"/>
- <param name="default_db_targetNamespace_detect_string" expression="${default_db_targetNamespace_detect_string}"/>
- <param name="zasob_id_db_targetNamespace_detect_string" expression="${zasob_id_db_targetNamespace_detect_string}"/>
- </xslt>
- </xsl:element>
- <!-- zapisujemy wynik naszego biezacego przetwarzania dita element nizej do kolejnego przejechania z ant wyniku dla podstawienia danych -->
- <!-- blad - result jest po tym template -->
- <xsl:if test="$debug > 2"><xsl:message> +++++ #276 $feature_pos=<xsl:value-of select="$feature_pos"/>; $xml_id=<xsl:value-of select="$xml_id"/>;
- +++++ $temp is <xsl:value-of select="$temp"/> ;
- +++++ writing $wfs_output.dita to <xsl:value-of select="$wfs_output.dita"/>;
- +++++ $temp/$wfs_output.dita = <xsl:value-of select="concat($temp,'/',$wfs_output.dita)"/>
- </xsl:message></xsl:if>
- <!-- ten plik moze byc raz bo zawiera tylko mape do przeksztalcenia danego wezla -->
- <xsl:result-document href="{$temp}/{$wfs_output.dita}">
- <xsl:comment>current $feature_pos=<xsl:value-of select="$feature_pos"/>; $loop_xpath=<xsl:value-of select="$loop_xpath"/>;</xsl:comment>
- <!--<xsl:copy-of select="."/>-->
- <xsl:element name="{name()}">
- <xsl:copy-of select="@*"/>
- <xsl:attribute name="feature_pos" select="$feature_pos"/>
- <xsl:copy-of select="./*" exclude-result-prefixes="#all" copy-namespaces="no"/>
- </xsl:element>
- </xsl:result-document>
- <!--<xsl:choose>
- <xsl:when test="$feature_pos=1"><xsl:message>#327 propably first unaviable (<xsl:value-of select="$wfs_output.dita"/>) - writing</xsl:message>
- <xsl:result-document href="{$wfs_output.dita}">
- <xsl:comment>current $loop_xpath=<xsl:value-of select="$loop_xpath"/>;</xsl:comment>
- <xsl:copy-of select="."/></xsl:result-document>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>#227.1 probably exists file:<xsl:value-of select="$wfs_output.dita"/>; - bypassing </xsl:message>
- </xsl:otherwise>
- </xsl:choose>-->
- </xsl:when>
- <xsl:otherwise>
- <error>
- <xsl:attribute name="xpath" select="$xpath"/>
- <xsl:attribute name="xpath_dita" select="$xpath_dita"/>
- <xsl:attribute name="xpath_value" select="$xpath_value"/>
- <xsl:attribute name="xpath_value_dita" select="$xpath_value_dita"/>
- <xsl:attribute name="typeName" select="$typeName"/>
- <xsl:attribute name="typeName_dita" select="$typeName_dita"/>
- <xsl:attribute name="featureID_name" select="$featureID_name"/>
- <xsl:attribute name="featureID_name_dita" select="$featureID_name_dita"/>
- <echo message="OUTPUT__START"/>
- <echo>
- 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"/>)
- </echo>
- <echo message="OUTPUT__END"/>
- </error>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
-
-
- <xsl:template name="simpleTypeMakeOgcFilter_merge"><!-- do zrobienia polaczonego filtru OGC -->
- <xsl:param name="simpleTypeMakeOgcFilter" required="yes"/>
- <xsl:param name="xpath_dita" required="yes"/>
- <xsl:param name="xpath_value_dita" required="yes"/>
- <xsl:param name="RelatedFilter"/>
- <xsl:if test="$debug > 2"><xsl:message>#1754 name="simpleTypeMakeOgcFilter_merge"
- $simpleTypeMakeOgcFilter = <xsl:copy-of select="$simpleTypeMakeOgcFilter"></xsl:copy-of>
- $xpath_dita = <xsl:copy-of select="$xpath_dita"/>
- $xpath_value_dita = <xsl:copy-of select="$xpath_value_dita"/>
- #EOF
- </xsl:message>
- </xsl:if>
- <!--&Filter=<ogc:Filter><ogc:And><xsl:choose><xsl:when test="$RelatedFilter"><xsl:if test="$debug > 2"><xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="$RelatedFilter" copy-namespaces="no"/></xsl:message></xsl:if><ogc:And><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo><xsl:for-each select="$RelatedFilter"><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="@xpath"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="@xpath_value"/></ogc:Literal></ogc:PropertyIsEqualTo></xsl:for-each></ogc:And></xsl:when><xsl:otherwise><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo></xsl:otherwise></xsl:choose><xsl:if test="$simpleTypeMakeOgcFilter"><ogc:Or><xsl:if test="count($simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo) > 1"><ogc:Or></xsl:if><xsl:for-each select="$simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo"><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="ogc:PropertyName/text()"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="ogc:Literal/text()"/></ogc:Literal></ogc:PropertyIsEqualTo></xsl:for-each></ogc:Or><xsl:if test="count($simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo) > 1"></ogc:Or></xsl:if></xsl:if></ogc:And></ogc:Filter>-->
- <!-- &Filter=<ogc:Filter><ogc:And><xsl:choose>
- <xsl:when test="$RelatedFilter"><xsl:if test="$debug > 2">
- <xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="$RelatedFilter" copy-namespaces="no"/></xsl:message>
- </xsl:if><ogc:And><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo><xsl:for-each select="$RelatedFilter"><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="@xpath"/></ogc:PropertyName><ogc:Literal><xsl:value-of select="@xpath_value"/></ogc:Literal></ogc:PropertyIsEqualTo></xsl:for-each></ogc:And></xsl:when><xsl:otherwise><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName><ogc:Literal>
- <xsl:value-of select="$xpath_value_dita"/></ogc:Literal></ogc:PropertyIsEqualTo></xsl:otherwise></xsl:choose><xsl:if test="$simpleTypeMakeOgcFilter"><ogc:Or><xsl:if test="count($simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo) > 1"><ogc:Or></xsl:if>
- <xsl:for-each select="$simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo"><ogc:PropertyIsEqualTo><ogc:PropertyName><xsl:value-of select="ogc:PropertyName/text()"/></ogc:PropertyName><ogc:Literal>
- <xsl:value-of select="ogc:Literal/text()"/></ogc:Literal></ogc:PropertyIsEqualTo></xsl:for-each></ogc:Or><xsl:if test="count($simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo) > 1">
- </ogc:Or></xsl:if></xsl:if></ogc:And></ogc:Filter>
- -->
- <!--<RelatedFilter xpath="PARENT_ID" xpath_value=""/>-->
- <xsl:value-of select="'&Filter=<ogc:Filter>'"/>
- <xsl:variable name="Filter">
- <And>
- <xsl:for-each select="$RelatedFilter">
- <ogc:PropertyIsEqualTo>
- <ogc:PropertyName><xsl:value-of select="@xpath"/></ogc:PropertyName>
- <ogc:Literal><xsl:value-of select="@xpath_value"/></ogc:Literal>
- </ogc:PropertyIsEqualTo>
- </xsl:for-each>
- <ogc:PropertyIsEqualTo>
- <ogc:PropertyName><xsl:value-of select="$xpath_dita"/></ogc:PropertyName>
- <ogc:Literal><xsl:value-of select="$xpath_value_dita"/></ogc:Literal>
- </ogc:PropertyIsEqualTo>
- <And>
- <xsl:for-each select="$simpleTypeMakeOgcFilter/*">
- <xsl:copy-of select="."/>
- </xsl:for-each>
- </And>
- </And>
- </xsl:variable>
- <xsl:apply-templates select="$Filter" mode="simpleTypeMakeOgcFilter_merge_apply"/>
- <xsl:value-of select="'</ogc:Filter>'"/>
- </xsl:template>
-
- <xsl:template match="And" mode="simpleTypeMakeOgcFilter_merge_apply">
- <xsl:choose>
- <xsl:when test="child::node()">
- <xsl:value-of select="'<ogc:And>'"/>
- <xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_apply"/>
- <xsl:value-of select="'</ogc:And>'"/>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="*" mode="simpleTypeMakeOgcFilter_merge_apply" xpath-default-namespace="http://www.opengis.net/ogc">
- <xsl:value-of select="concat('<',name(),'>')"/>
- <xsl:apply-templates mode="simpleTypeMakeOgcFilter_merge_apply"/>
- <xsl:value-of select="concat('</',name(),'>')"/>
- </xsl:template>
-
- <xsl:template match="text()" mode="simpleTypeMakeOgcFilter_merge_apply">
- <xsl:value-of select="."/>
- </xsl:template>
-
- <!-- second step from local ant leaf -->
- <!-- wyzwalane przez http://saxon.sf.net/feature/initialMode w template match="RelatedFeature" mode ant_target ,
- ktore jest wyzwalane w match="*" bez mode , ktore jest inicjowane przez niniejszy template w kolejnym wyzwoleniu
- dostajemy na input {$temp}/{$wfs_output.dita} a na output {$temp}/{$wfs_output.dita}.vals.dita - co powinno zawierac podstawione zmienne z @xpath
- nazwy z match="*" not(mode):
- name="wfs_output.xml" select="concat($wfs_output,'.',position(),'.',$feature_pos,'.xml')
- name="wfs_output.dita" select="concat($wfs_output,'.',position(),'.',$feature_pos,'.dita.xml')
- -->
- <xsl:template match="RelatedFeature" mode="after_first_ant_assing_vars">
- <xsl:param name="loop_xpath" select="$loop_xpath"/>
- <RelatedFeatureRoot>
- <xsl:if test="$debug > 2"><xsl:message>
- {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} #1348 after_first_ant_assing_vars @feature_pos=<xsl:value-of select="@feature_pos"/> >$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"/>;
- {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} $debug_xsl_in_filename= <xsl:value-of select="$debug_xsl_in_filename"/>
- {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} $debug_xsl_out_filename= <xsl:value-of select="$debug_xsl_out_filename"/>
- {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} try to open $wfs_output=doc(<xsl:value-of select="$wfs_output"/>); </xsl:message></xsl:if>
- <!-- first assign xpath to features from -->
- <xsl:variable name="wfs_output_nodes" select="doc($wfs_output)"/>
- <xsl:variable name="current_RelatedFeature" select="*"/>
- <xsl:variable name="xml_id" select="@xml_id"/>
- <xsl:variable name="feature_pos_parent" select="@feature_pos"/>
- <!--<input_obj_with_xpath_debug>
- <xsl:copy-of select="$wfs_output_nodes"/>
- </input_obj_with_xpath_debug>-->
- <xsl:if test="$debug > 2"><xsl:message>
- {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} #354 count($wfs_output_nodes//gml:featureMember) <xsl:value-of select="count($wfs_output_nodes//gml:featureMember)"/></xsl:message></xsl:if>
- <!-- tutaj jest blad przetwarzania ze wrzuca po rekordzie do kolumny - trzeba przetworzyc dla kazdego feature member -->
- <xsl:for-each select="$wfs_output_nodes//gml:featureMember">
- <xsl:if test="$debug > 2"><xsl:message>
- {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} #1466 foreach from $wfs_output=<xsl:value-of select="$wfs_output"/>
- {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} @fid=<xsl:value-of select="*/@fid"/>; position()=<xsl:value-of select="position()"/>; </xsl:message></xsl:if>
- <xsl:variable name="input_obj_with_xpath">
- <xsl:apply-templates mode="after_first_ant_assing_xpath" select="node()/*"/> <!-- zeby nie wstawial do xpath nazwy feature - IN7_DZIENNIK_KORESP/ID itp -->
- </xsl:variable>
- <xsl:variable name="input_obj_fid" select="*"/> <!-- dla wykrycia @fid -->
- <!--<input_obj_with_xpath_debug>
- <xsl:attribute name="xpath" select="$xpath"/>
- <!-\-<xsl:attribute name="xpath_dita" select="$xpath_dita"/>-\->
- <xsl:attribute name="xpath_value" select="$xpath_value"/>
- <!-\-<xsl:attribute name="xpath_value_dita" select="$xpath_value_dita"/>-\->
- <xsl:attribute name="typeName" select="$typeName"/>
- <!-\-<xsl:attribute name="typeName_dita" select="$typeName_dita"/>-\->
- <!-\-<xsl:attribute name="featureID_name" select="$featureID_name"/>-\->
- <!-\-<xsl:attribute name="featureID_name_dita" select="$featureID_name_dita"/>-\->
- <xsl:copy-of select="$input_obj_with_xpath"/>
- </input_obj_with_xpath_debug>-->
- <!--<input_node_debug>
- <xsl:copy-of select="."/>
- </input_node_debug>-->
- <!-- DEBUG CACHE instances creation/testing moment 2017-07-06 -->
- <!--<xsl:result-document href="{$temp}/{$loop_xpath}/fid_{$input_obj_fid/@fid}">
- <DEBUG_CACHE>
- <xsl:copy-of select="$input_obj_fid/@fid"/>
- </DEBUG_CACHE>
- </xsl:result-document>-->
- <xsl:apply-templates mode="after_first_ant_assing_vars_childs" select="$current_RelatedFeature">
- <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
- <xsl:with-param name="xml_id_parent" select="$xml_id"/>
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
- <xsl:with-param name="feature_pos" select="position()"/><!-- wiecej features z relacji dokladamy pozycje -->
- <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 -->
- <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
- </xsl:apply-templates>
- <!-- cache tasks ? -->
- </xsl:for-each>
- <xsl:if test="$debug > 2"><xsl:message>
- {+}{+}{+}{+}{+}{+}{+}{+}{+}{+} #1499 EOF foreach from #1466 from $wfs_output=<xsl:value-of select="$wfs_output"/></xsl:message></xsl:if>
- </RelatedFeatureRoot>
- </xsl:template>
-
- <xsl:template match="wfs:FeatureCollection|gml:featureMember" mode="after_first_ant_assing_xpath">
- <xsl:apply-templates mode="after_first_ant_assing_xpath"/>
- </xsl:template>
-
-
- <xsl:template mode="after_first_ant_assing_xpath" match="*">
- <xsl:param name="curr_xpath"/>
- <xsl:param name="loop_xpath" select="$loop_xpath"/>
- <xsl:choose>
- <xsl:when test="name()=$typeName">
- <xsl:apply-templates mode="after_first_ant_assing_xpath">
- <xsl:with-param name="curr_xpath" select="$curr_xpath"/>
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="curr_xpath_tmpl">
- <xsl:choose>
- <xsl:when test="$curr_xpath=''">
- <xsl:value-of select="local-name()"/> <!-- bylo local-name() - trzeba dorzucic xpath przechodzacy aby budowal sie w kwestii -->
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($curr_xpath,'/',local-name())"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!--<xsl:variable name="curr_xpath_tmpl" select="'asdf'"/>-->
- <xsl:element name="{name()}">
- <xsl:attribute name="xpath" select="$curr_xpath_tmpl"/>
- <xsl:for-each select="@*">
- <xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute>
- </xsl:for-each>
- <xsl:value-of select="text()"/>
- <xsl:apply-templates mode="after_first_ant_assing_xpath">
- <xsl:with-param name="curr_xpath" select="$curr_xpath_tmpl"/>
- </xsl:apply-templates>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="text()" mode="after_first_ant_assing_xpath"/>
-
-
- <xsl:template match="simpleTypeMakeOgcFilter" mode="after_first_ant_assing_vars_childs">
- <xsl:if test="$debug > 2"><xsl:message>#621 bypassing simpleTypeMakeOgcFilter in after_first_ant_assing_vars_childs</xsl:message></xsl:if>
- </xsl:template>
-
-
- <!-- przetwarzanie kolejne w celu podstawienia wartosci i wystawienia build dla kolejnych wezlow - problem z obsluga rownorzednie zagniezdzonych wezlow poprzez inne wezly -->
- <xsl:template match="*" mode="after_first_ant_assing_vars_childs">
- <xsl:param name="xml_id_parent" required="yes"/>
- <xsl:param name="loop_xpath" required="yes"/>
- <xsl:param name="input_obj_with_xpath" required="yes"/>
- <xsl:param name="feature_pos" required="yes"/>
- <xsl:param name="feature_pos_parent" required="yes"/>
- <xsl:param name="input_obj_fid" required="no"/>
- <xsl:for-each select=".">
- <xsl:choose>
- <!--<xsl:when test="node()='topic'">asdad</xsl:when>-->
- <!--<xsl:when test="name()='RelatedFeature'">
- <xsl:for-each select="data/apiname[@base='PROCES_INCLUDE']">
- <xsl:apply-templates mode="PROCES_INCLUDE">
- <xsl:with-param name="ID_PROCES" select="text()"/>
- </xsl:apply-templates>
- </xsl:for-each>
- </xsl:when>-->
- <!--<xsl:when test="name()='data-about'">
- <xsl:for-each select="data/apiname[@base='PROCES_INCLUDE']">
- <xsl:apply-templates mode="PROCES_INCLUDE">
- <xsl:with-param name="ID_PROCES" select="text()"/>
- </xsl:apply-templates>
- </xsl:for-each>
- </xsl:when>-->
- <xsl:when test="1=2"/>
- <xsl:otherwise>
- <xsl:element name="{name()}">
- <xsl:if test="$input_obj_fid">
- <!--<xsl:attribute name="input_obj_fid_name" select="$input_obj_fid/name()"/>-->
- <xsl:attribute name="fid" select="$input_obj_fid/@fid"/>
- </xsl:if>
- <!--<xsl:copy-of select="namespace::node()"/>-->
- <xsl:for-each select="@*">
- <xsl:choose>
- <xsl:when test="name()='xpath'">
- <!--<xsl:attribute name="xpath_parsed" select="."/>-->
- <!--1:<xsl:value-of select="$parent_obj//node()[@system_cache__appinfo:xpath=$xpath]/text()"/>-->
- <!--<xsl:value-of select="$parent_obj//node()[local-name()=$xpath]/text()"/>-->
- <!--V:<xsl:value-of select="$xpath"/>-->
- </xsl:when>
- <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:choose>
- <xsl:when test="@xpath">
- <!--<xsl:variable name="escaped_html_to_xml">
- <xsl:call-template name="system_cache__appinfo:escaped_html_to_xml">
- <xsl:with-param name="html" select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/text()"/>
- </xsl:call-template>
- </xsl:variable>-->
- <!--<xsl:variable name="enter_to_ph">
- <xsl:apply-templates mode="enter_to_ph" select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]">
- <xsl:with-param name="count" select="count($input_obj_with_xpath/node()[local-name()=current()/@xpath])"/>
- <xsl:with-param name="element" select="name()"/>
- <!-\-<xsl:with-param name="xpath_token_filter" select="@xpath_token_filter"/>-\-><!-\- mozliwosc wybrania pierwszego wyrazu np ' ' -\->
- <!-\-<xsl:with-param name="xpath_token" select="@xpath_token"/>-\-><!-\- mozliwosc wybrania pierwszego wyrazu np 1 -\->
- </xsl:apply-templates>
- </xsl:variable>-->
- <xsl:variable name="enter_to_ph">
- <xsl:choose>
- <xsl:when test="@xpath_token_filter and @xpath_token ">
- <!-- implementacja filtra dla czegos oddzielonego parametrem -->
- <xsl:variable name="xpath_token_filter" select="tokenize($input_obj_with_xpath/node()[local-name()=current()/@xpath],@xpath_token_filter)"/>
- <xsl:for-each select=" tokenize(@xpath_token,' ')">
- <xsl:variable name="xpath_token" select="number(.)"/>
- <xsl:copy-of select="$xpath_token_filter[$xpath_token]"></xsl:copy-of>
- </xsl:for-each>
- </xsl:when>
- <xsl:when test="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/*">
- <xsl:copy-of select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/*"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]/text()"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:copy-of select="$enter_to_ph"/>
- </xsl:when>
- </xsl:choose>
- <!--<xsl:comment>#1938 value of text()</xsl:comment>-->
- <xsl:value-of select="text()"/>
- <xsl:apply-templates mode="after_first_ant_assing_vars_childs">
- <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
- <xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
- <xsl:with-param name="feature_pos" select="$feature_pos"/>
- <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/>
- <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
- </xsl:apply-templates>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="RelatedFeature" mode="after_first_ant_assing_vars_childs">
- <xsl:if test="$debug > 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>
- </xsl:template> <!-- to disable ignored maxOccurs=0 -->
- <xsl:template match="RelatedFeature[not(@system_cache__appinfo:maxOccurs='0') or not($ignore_maxOccurs_0)]" mode="after_first_ant_assing_vars_childs">
- <xsl:param name="input_obj_with_xpath" required="yes"/>
- <xsl:param name="xml_id_parent" required="yes"/>
- <xsl:param name="loop_xpath" select="$loop_xpath"/>
- <xsl:param name="feature_pos" required="yes"/>
- <xsl:param name="feature_pos_parent" required="yes"/>
- <xsl:param name="input_obj_fid" required="yes"/>
- <xsl:if test="$debug > 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>
- <!-- jest okazja do zrobienia bilda aby sciagnal rzeczy nizej -->
- <xsl:variable name="featureID_name" select="substring-after(@typeName,':')"/>
- <xsl:variable name="xml_id" select="@xml_id"/>
- <xsl:variable name="loop_xpath" select="concat($loop_xpath,'/',$xml_id,'.',$feature_pos)"/> <!-- loop path too long ,'.',$featureID_name -->
- <!--<xsl:variable name="loop_xpath_save" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>--> <!-- tutaj zapisal sie build z wezla z parent -->
- <!--<debug_358_RelatedFeature>
- <xsl:copy-of select="$input_obj_with_xpath"/>
- </debug_358_RelatedFeature>-->
- <!--<xsl:variable name="feature_pos">
- <xsl:choose>
- <xsl:when test="$feature_pos=1"/>
- <xsl:otherwise><xsl:value-of select="$feature_pos"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>-->
- <xsl:variable name="test_xpath_query">
- <xsl:call-template name="test_xpath_query">
- <xsl:with-param name="featureID_name_dita" select="$featureID_name"/>
- <xsl:with-param name="ignore_maxOccurs_0" select="$ignore_maxOccurs_0"/>
- <xsl:with-param name="system_cache__appinfo:maxOccurs" select="@system_cache__appinfo:maxOccurs"/>
- <xsl:with-param name="xpath_query" select="$xpath_query"/>
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="$test_xpath_query='1'">
- <xsl:if test="$debug > 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>
- <xsl:if test="$debug > 2"><xsl:message>[][][][][]\/\/\/\/\/\/\/\/\/\/\/ #1541 WRITING RelatedFeature to <xsl:value-of select="concat($temp,'/',$loop_xpath,'/build.xml')"/> ; \/\/\/\/\/\/\/\/\/\/[][][][][][][][] </xsl:message></xsl:if>
- <xsl:choose>
- <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 -->
- <xsl:message terminate="yes">[][][][][]\/\/\/\/\/\/\/\/\/\/\/ ERROR ERROR previous file exists - SOME ERROR IN LEAF PROCESSING OCCURED! </xsl:message>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="$debug > 2"><xsl:message>[][][][][]\/\/\/\/\/\/\/\/\/\/\/ OK no previous file exists ;-) </xsl:message></xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:result-document href="{$temp}/{$loop_xpath}/build.xml">
- <xsl:apply-templates select=".">
- <xsl:with-param name="typeName" select="@typeName"/>
- <xsl:with-param name="xpath" select="@xpath"/>
- <xsl:with-param name="xpath_value" select="@xpath_value"/>
- <!--<xsl:with-param name="loop_xpath_save" select="$loop_xpath"/>-->
- <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
- <xsl:with-param name="wfs_output" select="concat($uuid,'.',$loop_xpath)" />
- <xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>
- <xsl:with-param name="feature_pos" select="$feature_pos"/>
- <xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>
- <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/>
- <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
- <!--<xsl:with-param name="wfs_output.xml" />-->
- </xsl:apply-templates>
- </xsl:result-document>
- <xsl:element name="RelatedFeature">
- <xsl:copy-of select="@*"/>
- <xsl:attribute name="featureID_name" select="$featureID_name"/>
- <xsl:attribute name="loop_xpath" select="$loop_xpath"/>
- <xsl:attribute name="feature_pos" select="$feature_pos"/>
- <xsl:attribute name="feature_pos_parent" select="$feature_pos_parent"/>
- <xsl:attribute name="fid" select="$input_obj_fid/@fid"/>
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="$debug > 2"><xsl:message terminate="no">#389b
- #
- #
- #
- 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
- #
- #</xsl:message></xsl:if>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
-
- <xsl:template match="RelatedFeatureLoop" mode="after_first_ant_assing_vars_childs">
- <xsl:if test="$debug > 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>
- </xsl:template>
- <xsl:template match="RelatedFeatureLoop[not(@system_cache__appinfo:maxOccurs='0') or not($ignore_maxOccurs_0)]" mode="after_first_ant_assing_vars_childs">
- <xsl:param name="input_obj_with_xpath" required="yes"/>
- <xsl:param name="xml_id_parent" required="yes"/>
- <xsl:param name="loop_xpath" select="$loop_xpath"/>
- <xsl:param name="feature_pos" required="yes"/>
- <xsl:param name="feature_pos_parent" required="yes"/>
- <xsl:param name="input_obj_fid" required="yes"/>
- <xsl:if test="$debug > 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>
- <!-- jest okazja do zrobienia bilda aby sciagnal rzeczy nizej -->
- <xsl:variable name="featureID_name" select="substring-after(@typeName,':')"/>
- <xsl:variable name="xml_id" select="@xml_id"/>
- <xsl:variable name="loop_xpath" select="concat($loop_xpath,'/',$xml_id,'.',$feature_pos)"/><!-- limit path ,'.',$featureID_name -->
-
- <!--<xsl:variable name="loop_xpath_save" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>--> <!-- tutaj zapisal sie build z wezla z parent -->
- <!--<debug_358_RelatedFeature>
- <xsl:copy-of select="$input_obj_with_xpath"/>
- </debug_358_RelatedFeature>-->
- <!--<xsl:variable name="feature_pos">
- <xsl:choose>
- <xsl:when test="$feature_pos=1"/>
- <xsl:otherwise><xsl:value-of select="$feature_pos"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>-->
-
- <xsl:variable name="loop_path_recurs">
- <xsl:choose>
- <xsl:when test=" string-length($loop_path_recurs) <1">
- <xsl:value-of select="concat('/',$loop_xpath)"/> <!-- bylo $feature_pos , concat('/',@xml_id,'.',$uuid,'.',$feature_pos_parent,'.',$feature_pos) -->
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="concat($loop_path_recurs,'/',$loop_xpath)"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="$debug > 2"><xsl:message>
- \/\/\/\/\/\/\/\/\/\/\/ #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
- \/\/\/\/\/\/\/\/\/\/\/ $debug_xsl_in_filename= <xsl:value-of select="$debug_xsl_in_filename"/>
- \/\/\/\/\/\/\/\/\/\/\/ $debug_xsl_out_filename= <xsl:value-of select="$debug_xsl_out_filename"/>
- \/\/\/\/\/\/\/\/\/\/\/ @fid=<xsl:value-of select="*/@fid"/>; position()=<xsl:value-of select="position()"/>; $input_obj_fid/@fid = <xsl:value-of select="$input_obj_fid/@fid"/> ;
- \/\/\/\/\/\/\/\/\/\/\/ to <xsl:value-of select="concat($temp,'/',$loop_xpath,'/build_root.xml')"/></xsl:message></xsl:if>
- <xsl:variable name="test_xpath_query">
- <xsl:call-template name="test_xpath_query">
- <xsl:with-param name="featureID_name_dita" select="$featureID_name"/>
- <xsl:with-param name="ignore_maxOccurs_0" select="$ignore_maxOccurs_0"/>
- <xsl:with-param name="system_cache__appinfo:maxOccurs" select="@system_cache__appinfo:maxOccurs"/>
- <xsl:with-param name="xpath_query" select="$xpath_query"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$test_xpath_query='1'">
- <xsl:choose>
- <xsl:when test=" doc-available(concat($temp,'/',$loop_xpath,'/build_root.xml'))">
- <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>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="$debug > 2"><xsl:message>\/\/\/\/\/\/\/\/\/\/\/ 1615 WRITING RelatedFeatureLoop to <xsl:value-of select="concat($temp,'/',$loop_xpath,'/build_root.xml')"/> ; \/\/\/\/\/\/\/\/\/\/ </xsl:message></xsl:if>
- <xsl:result-document href="{$temp}/{$loop_xpath}/build_root.xml" >
- <xsl:apply-templates select=".">
- <xsl:with-param name="typeName" select="@typeName"/>
- <xsl:with-param name="xpath" select="@xpath"/>
- <xsl:with-param name="xpath_value" select="@xpath_value"/>
- <!--<xsl:with-param name="loop_xpath_save" select="$loop_xpath"/>-->
- <xsl:with-param name="input_obj_with_xpath" select="$input_obj_with_xpath"/>
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
- <xsl:with-param name="wfs_output" select="concat($uuid,'.',$loop_xpath)" /><!-- Not used TODO disable -->
- <xsl:with-param name="xml_id_parent" select="$xml_id_parent"/>
- <xsl:with-param name="feature_pos" select="$feature_pos"/>
- <xsl:with-param name="loop_path_recurs" select="$loop_path_recurs"/>
- <xsl:with-param name="feature_pos_parent" select="$feature_pos_parent"/>
- <xsl:with-param name="input_obj_fid" select="$input_obj_fid"/>
- <!--<xsl:with-param name="wfs_output.xml" />-->
- </xsl:apply-templates>
- </xsl:result-document>
- <xsl:element name="RelatedFeatureLoop">
- <xsl:copy-of select="@*"/>
- <xsl:attribute name="featureID_name" select="$featureID_name"/>
- <xsl:attribute name="loop_xpath" select="$loop_xpath"/>
- <xsl:attribute name="loop_path_recurs" select="$loop_path_recurs"/>
- <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 -->
- <xsl:attribute name="fid" select="$input_obj_fid/@fid"/>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="$debug > 2"><xsl:message terminate="no">#1263
- #
- #
- #
- 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
- #
- #</xsl:message></xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="text()" mode="after_first_ant_assing_vars_childs"/>
- <xsl:template match="comment()" mode="after_first_ant_assing_vars_childs"/>
- <!-- pozbieranie do kupy wszystkich xmli i zlozenie dity -->
-
-
-
-
- <xsl:template name="test_xpath_query">
- <!-- to verify if retrieve some node based on user requested tree limit filter -->
- <xsl:param name="ignore_maxOccurs_0" required="yes"/>
- <xsl:param name="xpath_query" required="yes"/>
- <xsl:param name="featureID_name_dita" required="yes"/>
- <xsl:param name="system_cache__appinfo:maxOccurs" required="yes"/>
- <xsl:if test="$debug > 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>
- <xsl:if test="$ignore_maxOccurs_0"><xsl:if test="$debug > 2"><xsl:message terminate="no">#1344 test igrnore is true()=<xsl:value-of select="$ignore_maxOccurs_0"/>;</xsl:message></xsl:if></xsl:if>
- <xsl:variable name="TestMaxOccurs">
- <xsl:choose>
- <xsl:when test="$system_cache__appinfo:maxOccurs='0' and $ignore_maxOccurs_0"></xsl:when>
- <xsl:otherwise>1</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="$TestMaxOccurs"/>
- </xsl:template>
-
- </xsl:stylesheet>
|