| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629 |
- <?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"
- 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="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="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="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"/><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"/>
-
-
- <!-- 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:param name="simpleSchema_dir" required="yes"/>
- <xsl:param name="default_db_xml_cache.public" required="yes"/><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="1"/> <!-- 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:choose>
- <xsl:when test="name()='RelatedFeature'">
- <xsl:variable name="RelatedFeatureCount" select="last()"/>
- <xsl:variable name="RelatedFeaturePos" select="position()"/>
- <xsl:variable name="featureID_name" select="substring-after($typeName,':')"/>
- <xsl:message>#58 bylo $loop_xpath=<xsl:value-of select="$loop_xpath"/>; $basedir=<xsl:value-of select="$basedir"/>; </xsl:message>
- <xsl:variable name="loop_xpath_real" select="$loop_xpath"/>
- <xsl:variable name="loop_xpath">
- <xsl:choose>
- <xsl:when test="$loop_xpath='root'">
- <xsl:value-of select="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="concat($uuid,'.',$loop_xpath)"/>
- <!--<xsl:variable name="wfs_output.xml" select="concat($wfs_output,'.',position(),'.xml')"/>-->
- <xsl:variable name="wfs_output.xml" select="concat($wfs_output,'.',position(),'.',$feature_pos,'.xml')"/>
- <xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.',position(),'.',$feature_pos,'.dita.xml')"/>
- <!--<xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.',position(),'.','.dita.xml')"/>-->
- <!-- dane z oczekiwanego template .dita -->
- <xsl:variable name="xpath_dita">
- <xsl:choose>
- <xsl:when test=" string-length($xpath) >0">
- <xsl:value-of select="$xpath"/>
- <xsl:message>#121 narzucam $xpath=(<xsl:value-of select="$xpath"/>) z wyzwolenia build.xml </xsl:message>
- </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:message>#67.1 $input_obj_with_xpath: <xsl:copy-of select="$input_obj_with_xpath"/> </xsl:message>
- <!--<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:message>#67.0 $xpath_value=(<xsl:value-of select="$xpath_value"/>); narzucone pewnie z wyzwolenia build.xml</xsl:message>
- <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:message>#71 wstawiam projekt $feature_pos=<xsl:value-of select="$feature_pos"/>; $loop_xpath=<xsl:value-of select="$loop_xpath"/>; </xsl:message>
- <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>
- <echo> ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>; projekt <xsl:value-of select="$loop_xpath_real"/>; </echo>
- <!--<xsl:variable name="typeName" select='replace($typeName,""","")'/>--><!-- 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}"/><xsl:comment>
- 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"/>
- #221
- $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"/>;
- </xsl:comment>
-
- <!-- BEGIN test if get xpath_query -->
- <!--<target name="get_related_feature_run_child_ant__test_xpath_query_{$loop_xpath_real}">
- <echo>testuje czy sciagac node poprzez $xpath_query.xsl to <xsl:value-of select="concat('${builds_to_ant_file_test_xpath_query.xml',$loop_xpath_real,@xml_id,'}')"/></echo>
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat('builds_to_ant_test_featureID_name_dita',$loop_xpath_real,@xml_id)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('${uuid}.builds_to_ant-loop_test_featureID_name_dita',@xml_id,'-')"/>
- </xsl:element>
-
- <xsl:element name="echoxml">
- <xsl:attribute name="file" select="concat('${builds_to_ant_test_featureID_name_dita',$loop_xpath_real,@xml_id,'}')"/>
- <xsl:element name="{$featureID_name_dita}">empty</xsl:element>
- </xsl:element>
-
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat('builds_to_ant_test_featureID_name_dita_out.xml',$loop_xpath_real,@xml_id)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('${uuid}.builds_to_ant-loop_test_featureID_name_dita_out',@xml_id,'-')"/>
- </xsl:element>
-
- <xsl:element name="xslt">
- <xsl:attribute name="basedir" select="'./'"/>
- <xsl:attribute name="style" select="$xpath_query.xsl"/>
- <xsl:attribute name="in" select="concat('${builds_to_ant_test_featureID_name_dita',$loop_xpath_real,@xml_id,'}')"/>
- <xsl:attribute name="destdir" select="'./'"/>
- <xsl:attribute name="out" select="concat('${builds_to_ant_test_featureID_name_dita_out.xml',$loop_xpath_real,@xml_id,'}')"/>
- <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:element name="loadfile">
- <xsl:attribute name="property" select="concat('builds_to_ant_test_275.xml',$loop_xpath_real,@xml_id)"/>
- <xsl:attribute name="srcfile" select="concat('${builds_to_ant_test_featureID_name_dita_out.xml',$loop_xpath_real,@xml_id,'}')"/>
- </xsl:element>
- <xsl:element name="condition">
- <xsl:attribute name="taskname" select="concat('get_related_feature_run_child_ant__test_xpath_query_if_',$loop_xpath_real)"/>
- <xsl:attribute name="property" select="concat('builds_to_ant_test_280.xml',$loop_xpath_real,@xml_id)"/>
- <xsl:element name="contains">
- <xsl:attribute name="string" select="concat('${builds_to_ant_test_275.xml',$loop_xpath_real,@xml_id,'}')"/>
- <xsl:attribute name="substring" select="'OK'"/>
- </xsl:element>
- </xsl:element>
- <echo>#287 contains ERROR/OK: ${builds_to_ant_test_275.xml<xsl:value-of select="concat($loop_xpath_real,@xml_id)"/>} </echo>
- </target>
-
- <target depends="get_related_feature_run_child_ant__test_xpath_query_{$loop_xpath_real}">
- <xsl:attribute name="if" select="concat('${builds_to_ant_test_280.xml',$loop_xpath_real,@xml_id,'}')"/>
- <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant__test_xpath_query_if_',$loop_xpath_real)"/>
- <antcall target="get_related_feature_run_child_ant{$loop_xpath_real}"/>
- </target>-->
- <!-- EOF test if get xpath_query -->
-
-
-
- <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
- <echo> #302 waliduje xpath_query dla $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>; </echo>
- <target name="get_related_feature_run_child_ant_check{$loop_xpath_real}">
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml')"/>
- <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_',$featureID_name_dita)"/>
- </xsl:element>
- <xsl:element name="echoxml">
- <xsl:attribute name="file" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita.xml}')"/>
- <xsl:element name="{$featureID_name_dita}"><xsl:attribute name="position" select="position()"/></xsl:element>
- </xsl:element>
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml')"/>
- <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)"/>
- </xsl:element>
- <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}')"/>
- <xsl:attribute name="destdir" select="'./'"/>
- <xsl:attribute name="out" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml}')"/>
- <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:element name="loadfile">
- <xsl:attribute name="property" select="concat($temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile.xml')"/>
- <xsl:attribute name="srcfile" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_out.xml}')"/>
- </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')"/>
- <xsl:element name="contains">
- <xsl:attribute name="string" select="concat('${',$temp,'-',$wfs_output.xml,'__test_featureID_name_dita_loadfile.xml}')"/>
- <xsl:attribute name="substring" select="'OK'"/>
- </xsl:element>
- </condition>
- </target>
- <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}')"/>
- <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: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:message>#142 ustalamy $loop_xpath_child=<xsl:value-of select="$loop_xpath_child"/></xsl:message>
- <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 -->
- <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" select="$loop_path_recurs"/>-->
- </xsl:apply-templates>
- </xsl:element>
- <!-- na koniec przetwarzania danego zaglebienia uruchamiamy calosc ponownie do kolejnego zaglebienia -->
-
- <!-- task do polaczenia zaglebien -->
-
- <!-- jak nie ma zaglebien to generujemy pdf i dajemy uzytkownikowi linka -->
- </project>
- </xsl:when>
- <xsl:when test="name()='RelatedFeatureLoop'">
- <xsl:message>#255 RelatedFeatureLoop - try to execute child ant in loop_path=xml_id(<xsl:value-of select="@xml_id"/>)</xsl:message>
- <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'">
- <xsl:value-of select="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"/></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,'.',position(),'.',$feature_pos,'.xml')"/>
- <xsl:variable name="wfs_output.dita" select="concat($wfs_output,'.',position(),'.',$feature_pos,'.dita.xml')"/>
- <xsl:variable name="xpath_dita" select="@xpath"/>
- <xsl:variable name="xpath_value_dita">
- <xsl:choose>
- <xsl:when test="@xpath_value">
- <xsl:message>#265.1 $input_obj_with_xpath: <xsl:copy-of select="$input_obj_with_xpath"/> </xsl:message>
- <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
- $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"/>;
- </xsl:comment>
-
-
-
-
- <project basedir="{$recurse_ant_basedir.temp}{$loop_path_recurs}" name="get_related_feature{$loop_xpath_real}_{$loop_path_recurs}" default="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 -->
- <!-- 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>
- <echo> ANT Uruchamiam $feature_pos=<xsl:value-of select="$feature_pos"/>; projekt <xsl:value-of select="$loop_xpath_real"/>; </echo>
- <!--<xsl:variable name="typeName" select='replace($typeName,""","")'/>--><!-- 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}"/>
-
- <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:comment>
- 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"/>
- </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:message>#142 ustalamy $loop_xpath_child=<xsl:value-of select="$loop_xpath_child"/>; maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; </xsl:message>
-
-
- <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
- <echo> #592 waliduje xpath_query dla $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>; </echo>
- <target>
- <xsl:attribute name="name" select="concat('get_related_feature_run_child_ant_if_query_test',$loop_xpath_real,'_',$loop_path_recurs)"/>
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test',$loop_xpath_real,'_',$loop_path_recurs,'_temp')"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($recurse_ant_basedir.temp,$loop_path_recurs)"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('__test_featureID_name_dita_',$featureID_name_dita)"/>
- </xsl:element>
- <xsl:element name="echoxml">
- <xsl:attribute name="file" select="concat('${get_related_feature_run_child_ant_xpath_test',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
- <xsl:element name="{$featureID_name_dita}"><xsl:attribute name="position" select="position()"/></xsl:element>
- </xsl:element>
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test_out',$loop_xpath_real,'_',$loop_path_recurs,'_temp')"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="concat($recurse_ant_basedir.temp,$loop_path_recurs)"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('__test_featureID_name_dita_out_',$featureID_name_dita)"/>
- </xsl:element>
- <xsl:element name="xslt">
- <xsl:attribute name="basedir" select="concat($recurse_ant_basedir.temp,$loop_path_recurs)"/>
- <xsl:attribute name="style" select="$xpath_query.xsl"/>
- <xsl:attribute name="in" select="concat('${get_related_feature_run_child_ant_xpath_test',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
- <xsl:attribute name="destdir" select="concat($recurse_ant_basedir.temp,$loop_path_recurs)"/>
- <xsl:attribute name="out" select="concat('${get_related_feature_run_child_ant_xpath_test_out',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
- <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:element name="loadfile">
- <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test_loadfile',$loop_xpath_real,'_',$loop_path_recurs,'_temp')"/>
- <xsl:attribute name="srcfile" select="concat('${get_related_feature_run_child_ant_xpath_test_out',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
- </xsl:element>
- <echo>#633 test xpath_query.xsl ${<xsl:value-of select="concat('get_related_feature_run_child_ant_xpath_test_loadfile',$loop_xpath_real,'_',$loop_path_recurs,'_temp')"/>} ;</echo>
- <condition >
- <xsl:attribute name="taskname" select="concat('get_related_feature_run_child_ant_if_query_',$loop_xpath_real,'_',$loop_path_recurs)"/>
- <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant_xpath_test_loadfile_check',$loop_xpath_real,'_',$loop_path_recurs,'_temp')"/>
- <xsl:element name="contains">
- <xsl:attribute name="string" select="concat('${get_related_feature_run_child_ant_xpath_test_loadfile',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
- <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_real,'_',$loop_path_recurs)"/>
- <xsl:attribute name="depends" select="concat('get_related_feature_run_child_ant_if_query_test',$loop_xpath_real,'_',$loop_path_recurs)"/>
- <xsl:attribute name="if" select="concat('${get_related_feature_run_child_ant_xpath_test_loadfile_check',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
- <antcall target="get_related_feature_run_child_ant{$loop_xpath_real}_{$loop_path_recurs}"/>
- </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_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_real,'_',$loop_path_recurs,'_temp')" />
- <xsl:attribute name="destdir" select="concat($recurse_ant_basedir.temp,$loop_path_recurs)"/>
- <xsl:attribute name="prefix" select="'test_if_exec_child_ant-'"/>
- <xsl:attribute name="suffix" select="'.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<xsl:value-of select="$OGC_Filter"/>
- </xsl:variable>
- <xsl:element name="exec">
- <xsl:attribute name="executable" select="'curl'"/>
- <xsl:attribute name="output" select="concat('${get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')"/>
- <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>
- <xsl:element name="loadfile">
- <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_msg')"/>
- <xsl:attribute name="srcFile" select="concat('${get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_temp}')" />
- </xsl:element>
- <echo> $msg ${<xsl:value-of select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_msg')"/>} </echo>
- <xsl:element name="condition">
- <xsl:attribute name="property" select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_test')"/>
- <xsl:attribute name="taskname" select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs)"/>
- <xsl:element name="contains">
- <xsl:attribute name="string" select="concat('${get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_msg}')"/>
- <xsl:attribute name="substring" select="'featureMember'"/>
- </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_real,'_',$loop_path_recurs)"/>
- <xsl:attribute name="depends" select="concat('get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_check')"/>
- <xsl:attribute name="if" select="concat('${get_related_feature_run_child_ant',$loop_xpath_real,'_',$loop_path_recurs,'_test}')"/>
-
- <ant antfile="{$recurse_ant_basedir}/build.xml" target="xml_recursed_from_tr_map"/>
- </xsl:element>
- <!-- na koniec przetwarzania danego zaglebienia uruchamiamy calosc ponownie do kolejnego zaglebienia -->
- <!-- task do polaczenia zaglebien -->
- <!-- jak nie ma zaglebien to generujemy pdf i dajemy uzytkownikowi linka -->
- </project>
- </xsl:when>
- <xsl:otherwise>
- <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"/>
-
- <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
- <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:element name="tempfile">
- <xsl:attribute name="property" select="concat('builds_to_ant__test_query__featureID_name_dita.xml',$loop_xpath_real,@xml_id)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('${uuid}.builds_to_ant-loop_test_featureID_name_dita',@xml_id,'-')"/>
- </xsl:element>
- <xsl:element name="echoxml">
- <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_xpath_real,@xml_id,'}')"/>
- <xsl:element name="{$featureID_name_dita}"><xsl:attribute name="position" select="position()"/></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_xpath_real,@xml_id)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('${uuid}.builds_to_ant-loop_test_featureID_name_dita_out',@xml_id,'-')"/>
- </xsl:element>
- <xsl:element name="xslt">
- <xsl:attribute name="basedir" select="$temp"/>
- <xsl:attribute name="style" select="$xpath_query.xsl"/>
- <xsl:attribute name="in" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_xpath_real,@xml_id,'}')"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="out" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_xpath_real,@xml_id,'}')"/>
- <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>
-
- <!-- wygenerujemy liste ant -->
- <echo> #235 @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; ant szukam fileset id=builds_to_ant w <xsl:value-of select="concat($uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.*.xml')"/> </echo>
- <fileset id="builds_to_ant{$loop_xpath_real}{@xml_id}" dir="{$temp}" includes="{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.*.xml" />
- <property name="builds_to_ant{$loop_xpath_real}{@xml_id}" refid="builds_to_ant{$loop_xpath_real}{@xml_id}"/>
- <!--<tempfile property="builds_to_ant.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.builds_to_ant-"/>-->
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat('builds_to_ant.xml',$loop_xpath_real,@xml_id)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('${uuid}.builds_to_ant-',@xml_id,'-')"/>
- </xsl:element>
- <!--<tempfile property="builds_to_ant_file.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.build_to_ant_file-"/>-->
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat('builds_to_ant_file.xml',$loop_xpath_real,@xml_id)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('${uuid}.build_to_ant_file-',@xml_id,'-')"/>
- </xsl:element>
- <echo>#235 ant do: builds_to_ant.xml=${builds_to_ant_file.xml} mode="place_subant" match="RelatedFeature" </echo>
- <!--<echoxml file="'${builds_to_ant.xml}'"><builds_to_ant>${builds_to_ant}</builds_to_ant></echoxml>-->
- <xsl:element name="echoxml">
- <xsl:attribute name="file" select="concat('${builds_to_ant.xml',$loop_xpath_real,@xml_id,'}')"/>
- <builds_to_ant>${builds_to_ant<xsl:value-of select="concat($loop_xpath_real,@xml_id)"/>}</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_xpath_real,@xml_id,'}')"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="out" select="concat('${builds_to_ant_file.xml',$loop_xpath_real,@xml_id,'}')"/>
- <factory name="net.sf.saxon.TransformerFactoryImpl">
- <attribute name="http://saxon.sf.net/feature/xinclude-aware" value="true"/>
- <!--<attribute name="http://saxon.sf.net/feature/initialMode"
- value="after_first_ant_assing_vars"/>-->
- </factory>
- <param name="temp" expression="{$temp}"/>
- <param name="loop_xpath_real" expression="{$loop_xpath_real}{@xml_id}"/>
- <param name="xpath_query_test.xml">
- <xsl:attribute name="expression" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_xpath_real,@xml_id,'}')"/>
- </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"/>
- <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}"/>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- </xsl:element>
- <!--<ant antfile="{$temp}/{$uuid}.build_{$loop_xpath}_x2f_.{@xml_id}.{ substring-after(@typeName,':') }.1.xml" dir="."/>-->
- <xsl:element name="ant">
- <xsl:attribute name="antfile" select="concat('${builds_to_ant_file.xml',$loop_xpath_real,@xml_id,'}')"/>
- </xsl:element>
- <!--<ant antfile="{$temp}/${builds_to_ant_file.xml}" dir="."/>-->
- </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" required="yes"/>-->
- <!-- wygenerujemy liste ant -->
-
- <xsl:comment>
- #590 LOOP BEGIN ; @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; </xsl:comment>
- <echo> #523 RelatedFeatureLoop @maxOccurs=<xsl:value-of select="@system_cache__appinfo:maxOccurs"/>; ant bede odpalac w podkatalogu:@xml_id=(<xsl:value-of select="@xml_id"/>)
- <xsl:value-of select="concat($temp,'/',@xml_id,'/',$uuid,'.build_',$loop_xpath_real,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.1.xml')"/> </echo>
- <xsl:message>#591 todo executing by exec instead of ant without inheritAll because it's looping!!! </xsl:message>
-
-
- <!-- dajemy wpis o walidacji danego feature pod katem xpath_query -->
- <echo>#684 dajemy wpis o walidacji danego feature pod katem xpath_query $featureID_name_dita=<xsl:value-of select="$featureID_name_dita"/>; </echo>
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat('builds_to_ant__test_query__featureID_name_dita.xml',$loop_xpath_real,@xml_id)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('${uuid}.builds_to_ant-loop_test_featureID_name_dita',@xml_id,'-')"/>
- </xsl:element>
- <xsl:element name="echoxml">
- <xsl:attribute name="file" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_xpath_real,@xml_id,'}')"/>
- <xsl:element name="{$featureID_name_dita}"><xsl:attribute name="position" select="position()"/></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_xpath_real,@xml_id)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('${uuid}.builds_to_ant-loop_test_featureID_name_dita_out',@xml_id,'-')"/>
- </xsl:element>
- <xsl:element name="xslt">
- <xsl:attribute name="basedir" select="$temp"/>
- <xsl:attribute name="style" select="$xpath_query.xsl"/>
- <xsl:attribute name="in" select="concat('${builds_to_ant__test_query__featureID_name_dita.xml',$loop_xpath_real,@xml_id,'}')"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="out" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_xpath_real,@xml_id,'}')"/>
- <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>
-
- <!-- Lista do wyzwolenia dzieci w podkalagach na bazie params-->
- <echo> #596 ant szukam fileset id=builds_to_ant w <xsl:value-of select="concat($uuid,'.build_',$loop_xpath,'_x2f_.',@xml_id,'.',substring-after(@typeName,':'),'.*.xml')"/> </echo>
- <dirset id="builds_to_ant{$loop_xpath_real}{@xml_id}" dir="{$temp}" includes="{@xml_id}.{$uuid}.*" />
- <property name="builds_to_ant{$loop_xpath_real}{@xml_id}" refid="builds_to_ant{$loop_xpath_real}{@xml_id}"/>
- <!--<tempfile property="builds_to_ant.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.builds_to_ant-"/>-->
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat('builds_to_ant.xml',$loop_xpath_real,@xml_id)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('${uuid}.builds_to_ant-loop-',@xml_id,'-')"/>
- </xsl:element>
- <!--<tempfile property="builds_to_ant_file.xml" deleteonexit="no" destdir="temp" suffix=".xml" prefix="${uuid}.build_to_ant_file-"/>-->
- <xsl:element name="tempfile">
- <xsl:attribute name="property" select="concat('builds_to_ant_file.xml',$loop_xpath_real,@xml_id)"/>
- <xsl:attribute name="deleteonexit" select="'no'"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="suffix" select="'.xml'"/>
- <xsl:attribute name="prefix" select="concat('${uuid}.build_to_ant_file-loop-',@xml_id,'-')"/>
- </xsl:element>
- <echo>#615 ant do: builds_to_ant.xml=${builds_to_ant_file.xml} mode="place_subant" match="RelatedFeature" </echo>
- <!--<echoxml file="'${builds_to_ant.xml}'"><builds_to_ant>${builds_to_ant}</builds_to_ant></echoxml>-->
- <xsl:element name="echoxml">
- <xsl:attribute name="file" select="concat('${builds_to_ant.xml',$loop_xpath_real,@xml_id,'}')"/>
- <builds_to_ant>${builds_to_ant<xsl:value-of select="concat($loop_xpath_real,@xml_id)"/>}</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_xpath_real,@xml_id,'}')"/>
- <xsl:attribute name="destdir" select="$temp"/>
- <xsl:attribute name="out" select="concat('${builds_to_ant_file.xml',$loop_xpath_real,@xml_id,'}')"/>
- <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}{@xml_id}"/>
- <param name="xpath_query_test.xml">
- <xsl:attribute name="expression" select="concat('${builds_to_ant__test_query__featureID_name_dita_out.xml',$loop_xpath_real,@xml_id,'}')"/>
- </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"/>
- <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}"/>
- <classpath location="/opt/local/share/java/saxon9he.jar"/>
- </xsl:element>
-
- <xsl:element name="ant">
- <xsl:attribute name="antfile" select="concat('${builds_to_ant_file.xml',$loop_xpath_real,@xml_id,'}')"/>
- </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>
- </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" 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" 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:message>#341 znalazlem dla=<xsl:value-of select="."/>; ; <xsl:value-of select="$input_obj_with_xpath/node()[@xpath=current()]"/></xsl:message>
- <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:message>#345 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: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: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:message>#410 final OGC_Filter is <xsl:value-of select="$OGC_Filter"/>;</xsl:message>
- <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.',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>
-
-
- <echo>#1084 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"/>;</echo>
-
- <!--<tempfile property="out_task.dita" deleteonexit="no" destdir="temp"/>-->
- <!--<tempfile property="wfs_output" deleteonexit="no" destdir="temp" suffix=".xml" />-->
- <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>
- <echo message="ERROR__START"/>
- <xsl:element name="echo">
- <xsl:attribute name="message">${wfs_error}</xsl:attribute>
- </xsl:element>
- <echo message="ERROR__END"/>
- <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>
- <echo> related .dita.xml template is: $wfs_output.dita=<xsl:value-of select="$wfs_output.dita"/>; do przetwarzania na podstawie: $wfs_output.xml=<xsl:value-of select="$wfs_output.xml"/>;
- $temp is <xsl:value-of select="$temp"/>;</echo>
- <xsl:comment> teraz podmieniamy dane z otrzymanego xmla do pliku dita aby potem zrobic polaczony plik w kolejnym wyzwoleniu ant</xsl:comment>
- <delete file="{$temp}/{$wfs_output.dita}.vals.dita"/>
- <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}"/></xslt>
- </xsl:element>
- <!-- zapisujemy wynik naszego biezacego przetwarzania dita element nizej do kolejnego przejechania z ant wyniku dla podstawienia danych -->
- <!-- blad - result jest po tym template -->
- <xsl:message>#276 $feature_pos=<xsl:value-of select="$feature_pos"/>; $xml_id=<xsl:value-of select="$xml_id"/>; writing $wfs_output.dita to <xsl:value-of select="$wfs_output.dita"/>;</xsl:message>
- <!-- ten plik moze byc raz bo zawiera tylko mape do przeksztalcenia danego wezla -->
- <xsl:result-document href="{$wfs_output.dita}">
- <xsl:comment>current $feature_pos=<xsl:value-of select="$feature_pos"/>; $loop_xpath=<xsl:value-of select="$loop_xpath"/>;</xsl:comment>
- <!--<xsl:copy-of select="."/>-->
- <xsl:element name="{name()}">
- <xsl:copy-of select="@*"/>
- <xsl:attribute name="feature_pos" select="$feature_pos"/>
- <xsl:copy-of select="./*" exclude-result-prefixes="#all" copy-namespaces="no"/>
- </xsl:element>
- </xsl:result-document>
- <!--<xsl:choose>
- <xsl:when test="$feature_pos=1"><xsl:message>#327 propably first unaviable (<xsl:value-of select="$wfs_output.dita"/>) - writing</xsl:message>
- <xsl:result-document href="{$wfs_output.dita}">
- <xsl:comment>current $loop_xpath=<xsl:value-of select="$loop_xpath"/>;</xsl:comment>
- <xsl:copy-of select="."/></xsl:result-document>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>#227.1 probably exists file:<xsl:value-of select="$wfs_output.dita"/>; - bypassing </xsl:message>
- </xsl:otherwise>
- </xsl:choose>-->
- </xsl:when>
- <xsl:otherwise>
- <error>
- <xsl:attribute name="xpath" select="$xpath"/>
- <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"/>&Filter=<ogc:Filter><ogc:And><xsl:choose><xsl:when test="$RelatedFilter"><xsl:message>#406 we are enabling RelatedFilter <xsl:copy-of select="$RelatedFilter" copy-namespaces="no"/></xsl:message><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"><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><xsl:if test="count($simpleTypeMakeOgcFilter/ogc:Or/ogc:PropertyIsEqualTo) > 1"></ogc:Or></xsl:if></xsl:if></ogc:And></ogc:Filter></xsl:template>
-
- <!-- second step from local ant leaf -->
- <xsl:template match="RelatedFeature" mode="after_first_ant_assing_vars">
- <xsl:param name="loop_xpath" select="$loop_xpath"/>
- <RelatedFeatureRoot>
- <xsl:message>#228 @xml_id=<xsl:value-of select="@xml_id"/>; templ match RelatedFeature mode after_first_ant_assing_vars dla @typeName=<xsl:value-of select="@typeName"/>; try to open $wfs_output=doc(<xsl:value-of select="$wfs_output"/>); </xsl:message>
- <!-- 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"/>
- <!--<input_obj_with_xpath_debug>
- <xsl:copy-of select="$wfs_output_nodes"/>
- </input_obj_with_xpath_debug>-->
- <xsl:message>#354 count($wfs_output_nodes//gml:featureMember) <xsl:value-of select="count($wfs_output_nodes//gml:featureMember)"/></xsl:message>
- <!-- 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: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>
- <!--<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>-->
- <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:apply-templates>
- </xsl:for-each>
- </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:message>#621 bypassing simpleTypeMakeOgcFilter in after_first_ant_assing_vars_childs</xsl:message>
- </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: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: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($enter_to_ph,@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:otherwise>
- <xsl:copy-of select="$enter_to_ph"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:copy-of select="$enter_to_ph"/>
- </xsl:when>
- </xsl:choose>
- <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: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: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: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>
- <!-- 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,'_x2f_.',$xml_id,'.',$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:message>#389 jest okazja do zrobienia bilda $feature_pos=<xsl:value-of select="$feature_pos"/> $xml_id_parent=<xsl:value-of select="$xml_id_parent"/>; $xml_id=<xsl:value-of select="$xml_id"/>; result-document=<xsl:value-of select="concat($uuid,'.build_',$loop_xpath,'.xml')"/> match=RelatedFeature mode=after_first_ant_assing_vars_childs </xsl:message>
- <xsl:result-document href="{$temp}/{$uuid}.build_{$loop_xpath}.{$feature_pos}.xml">
- <xsl:apply-templates select=".">
- <xsl:with-param name="typeName" select="@typeName"/>
- <xsl:with-param name="xpath" select="@xpath"/>
- <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="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:element>
- </xsl:when>
- <xsl:otherwise>
- <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:otherwise>
- </xsl:choose>
-
- </xsl:template>
-
-
- <xsl:template match="RelatedFeatureLoop" 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: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>
- <!-- 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,'_x2f_.',$xml_id,'.',$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:message>#832 RelatedFeatureLoop 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:variable name="loop_path_recurs">
- <xsl:choose>
- <xsl:when test=" string-length($loop_path_recurs) <1">
- <xsl:value-of select="concat('/',@xml_id,'.',$uuid,'.',$feature_pos)"/>
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="concat($loop_path_recurs,'/',@xml_id,'.',$uuid,'.',$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:result-document href="{$temp}/{@xml_id}.{$uuid}.{$feature_pos}/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)" />
- <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="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:element>
- </xsl:when>
- <xsl:otherwise>
- <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: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 match="*" mode="enter_to_ph">
- <xsl:param name="count"/>
- <xsl:param name="element"/>
- <xsl:variable name="current" select="."/>
- <xsl:variable name="surround_with">
- <xsl:choose>
- <xsl:when test="$element='p'"><xsl:value-of select="'codeblock'"/></xsl:when>
- <xsl:when test="$element='bodydiv'"><xsl:value-of select="'p'"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="'codeblock'"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test=" contains( text(),' ')">
- <xsl:for-each select="tokenize( text(),' ')">
- <xsl:element name="{$surround_with}"><!-- to jest przetwarzane jak jest tekst lamany -->
- <xsl:value-of select="."/>
- </xsl:element>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$count >1">
- <codeblock>
- <!--<xsl:attribute name="DDxpath" select="@xpath"/>-->
- <!--DN(<xsl:value-of select="$element"/>)-->
- <!--count:<xsl:value-of select="$count"/>-->
- <xsl:copy-of select=" text()"/>
- </codeblock>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="enter_to_ph_text">
- <xsl:with-param name="element" select="$element"/>
- </xsl:apply-templates>
- <!--<xsl:copy-of select=" text()"/>-->
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- dodanie enterow dla tabel w ktorych wyrazy sa dluzsze niz 10 znakow -->
- <xsl:template match="text()" mode="enter_to_ph_text">
- <xsl:param name="element" required="yes"/>
- <xsl:choose>
- <xsl:when test="$element='entry'">
- <xsl:for-each select="tokenize(.,' ')">
- <xsl:value-of select="' '"/>
- <xsl:variable name="phrase" select="."/>
- <xsl:for-each select="1 to string-length(.)">
- <xsl:if test="position() mod 12 = 0"><xsl:value-of select="' -'"/></xsl:if>
- <xsl:value-of select="substring($phrase,position(),1)"/>
- </xsl:for-each>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
- <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: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 test="$ignore_maxOccurs_0"><xsl:message terminate="no">#1344 test igrnore is true()=<xsl:value-of select="$ignore_maxOccurs_0"/>;</xsl:message></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>
|