| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237 |
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:p5bws="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/WPS_Functions.xsd"
- xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
- xmlns:p5dkp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:p5suis="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:p5xsda="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/xsd_asserts/p5xsda.xsd"
- xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/"
- xmlns:system_cache__dita="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/dita.xsd"
- exclude-result-prefixes="xs ditaarch"
- version="2.0">
-
- <xsl:import href="p5dkp.keyscope.xsl"/>
- <!--<xsl:import href="p5dkp.map.keys.files.xsl"/>-->
- <xsl:import href="p5dkp.map.keys.xsl"/>
- <xsl:import href="p5dkp.true.path.xsl"/>
-
- <xsl:import href="p5dkp.fix-glossgroup.xsl"/>
- <xsl:import href="p5dkp.fix-topic.xsl"/>
- <xsl:import href="p5dkp.ditamap_to_reltable.xsl"/>
- <xsl:output indent="yes" method="xml" standalone="yes" exclude-result-prefixes="ditaarch"/>
- <!--<xsl:output indent="yes" method="xml" standalone="no" doctype-public="-//OASIS//DTD DITA Glossary Group//EN" doctype-system="glossgroup.dtd"/>-->
- <xsl:strip-space elements="*"/>
-
-
-
- <xsl:param name="basedir"/>
- <xsl:param name="debug"/>
- <xsl:param name="p5dkp:xsd" required="yes"/>
- <xsl:param name="dita_root_path" required="yes"/> <!-- select="'/Users/a.binder/procesy5-dita-templates-druki/6927.Projekt_Badawczo_Roz_Procesy5_Stratego/PrzebiegProjektu/Budzet_Adam_Arek/'" -->
- <xsl:param name="dita_out_dir" required="yes" /> <!-- select="'/Users/a.binder/procesy5-dita-templates-druki/6927.Projekt_Badawczo_Roz_Procesy5_Stratego/PrzebiegProjektu/Budzet_Adam_Arek/generated_operat/'" -->
- <!--<xsl:param name="zadania_z_google.xml" select="'/Users/a.binder/procesy5-dita-templates-druki/6927.Projekt_Badawczo_Roz_Procesy5_Stratego/PrzebiegProjektu/Budzet_Adam_Arek/zadania_z_googledocs/zadania_z_google.xml'"/>-->
- <xsl:param name="p5dkp.zadania_z_google.xml.ditamap"/>
- <xsl:param name="p5dkp.repository"/>
- <xsl:param name="p5dkp.MATRYCA_PROJEKTU_BUDZET_ETAP_ROLA_PRACOWNIK.szablony"/>
- <xsl:param name="p5dkp:to_reltable.force" />
-
- <xsl:param name="system_cache__dita:props.disable"/><!-- to filter content in development progress - like devel_level_1 devel_level_2-->
- <!--<xsl:param name="procesy5-dita-templates-druki.symlink" select="'/Users/a.binder/procesy5-dita-templates-druki.symlink'"/>-->
- <!--<xsl:param name="procesy5-dita-templates-druki" select="'/Users/a.binder/procesy5-dita-templates-druki'"/>-->
- <xsl:function name="p5dkp:href.no.component">
- <xsl:param name="href"/>
- <xsl:choose>
- <xsl:when test="contains($href,'#')">
- <xsl:value-of select="substring-before($href,'#')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$href"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:function>
-
-
-
-
-
-
-
- <xsl:template match="map" mode="p5dkp:map.keys.xml">
- <xsl:variable name="keyscope" select="p5dkp:keyscope.init()"/>
- <p5dkp:map.keys.xml xsi:schemaLocation="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd {$p5dkp:xsd}">
- <xsl:apply-templates mode="p5dkp:map.keys">
- <xsl:with-param name="map.path" select="$dita_root_path"/>
- <xsl:with-param name="keyscope" select="$keyscope"/>
- </xsl:apply-templates>
- <xsl:message>#37 trying to open <xsl:value-of select="$p5dkp.zadania_z_google.xml.ditamap"/></xsl:message>
- <xsl:choose>
- <xsl:when test=" doc-available($p5dkp.zadania_z_google.xml.ditamap)">
- <xsl:message>#40 parsing $p5dkp.zadania_z_google.xml.ditamap = <xsl:value-of select="$p5dkp.zadania_z_google.xml.ditamap"/>; </xsl:message>
- <xsl:apply-templates mode="p5dkp:map.keys" select="doc($p5dkp.zadania_z_google.xml.ditamap)">
- <xsl:with-param name="map.path" select="$dita_root_path"/>
- <xsl:with-param name="keyscope" select="$keyscope"/>
- </xsl:apply-templates>
- </xsl:when>
- </xsl:choose>
- </p5dkp:map.keys.xml>
- </xsl:template>
-
-
-
-
-
-
- <!--
- <xsl:template match="*" mode="p5suis:p5suis.p5suis.say_to_queue.copy_file"/>
- <xsl:template mode="p5suis:p5suis.p5suis.say_to_queue.copy_file" match="keydef[contains(@keys,'worker')]">
- <p5suis:analyze>
-
- </p5suis:analyze>
- </xsl:template>
-
- <xsl:template match="text()|comment()" mode="p5suis:p5suis.p5suis.say_to_queue.copy_file"/>
-
- -->
-
- <xsl:template mode="p5dkp:map.keys" match="topicref[@href ]"> <!-- @format='ditamap' and and not( contains(@href,'operat_koszt_w_b_r.ditamap')) -->
- <xsl:param name="map.path" required="yes"/>
- <xsl:param name="keyscope" required="yes"/>
-
-
- <xsl:variable name="p5dkp:true.path" select="p5dkp:true.path(concat($map.path,'/',p5dkp:href.no.component(@href)))"/>
-
- <xsl:copy>
- <!--<xsl:copy-of select="@*"/>-->
- <xsl:variable name="keyscope">
- <xsl:call-template name="p5dkp:keyscope">
- <xsl:with-param name="keyscope" select="$keyscope"/>
- <xsl:with-param name="keyscope.attr" select="@keyscope"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:apply-templates select="@*" mode="p5dkp:map.keys">
- <xsl:with-param name="keyscope" select="$keyscope"/>
- </xsl:apply-templates>
- <xsl:attribute name="map.path" select="$map.path"/>
-
- <xsl:apply-templates mode="p5dkp:map.keys.eval" select="@*">
- <xsl:with-param name="keyscope" select="$keyscope"/>
- </xsl:apply-templates>
-
- <!--<DEBUG1107>-->
- <xsl:apply-templates mode="#current">
- <xsl:with-param name="map.path" select="$map.path"/>
- <xsl:with-param name="keyscope" select="$keyscope"/>
-
- </xsl:apply-templates>
- <!--</DEBUG1107>-->
-
- <xsl:variable name="path.tokens" select="tokenize(@href,'/')[ count( tokenize( current()/@href,'/' )) ]"/>
- <xsl:variable name="path" select=" substring-before(@href,$path.tokens)"/>
-
-
- <xsl:message>#50 path.tokens is <xsl:value-of select="$path.tokens"/>; $path = <xsl:value-of select="$path"/></xsl:message>
- <xsl:message>Openning <xsl:value-of select="$dita_root_path"/>/<xsl:value-of select="$path"/>/<xsl:value-of select="@href"/> ;</xsl:message>
- <xsl:message>Openning2 <xsl:value-of select="$map.path"/>/<xsl:value-of select="@href"/> ;</xsl:message>
- <xsl:message>#158 $system_cache__dita:props.disable = <xsl:value-of select="$system_cache__dita:props.disable"/></xsl:message>
- <xsl:variable name="system_cache__dita:props.disable.test">
- <xsl:for-each select="tokenize(@props,' ')">
- <xsl:if test="contains($system_cache__dita:props.disable,.)">
- <system_cache__dita:props.disable.test>DISABLED by @prop = <xsl:value-of select="."/></system_cache__dita:props.disable.test>
- </xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="string-length($system_cache__dita:props.disable) > 0 and $system_cache__dita:props.disable.test/*">
- <xsl:message>#159 TEMPORARY DISABLED <xsl:value-of select="@href"/> by $system_cache__dita:props.disable = <xsl:value-of select="$system_cache__dita:props.disable"/> ; $system_cache__dita:props.disable.test = <xsl:copy-of select="$system_cache__dita:props.disable.test" copy-namespaces="no"/></xsl:message>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <!--<xsl:when test="contains(@href,'p5dkp.zadania_z_google.xml.ditamap')">
- <xsl:message>#151 bypasing self generated file p5dkp.zadania_z_google.xml.ditamap = <xsl:value-of select="$p5dkp.zadania_z_google.xml.ditamap"/> ;</xsl:message>
- </xsl:when>-->
- <xsl:when test="@format='ditamap'">
- <xsl:choose>
- <xsl:when test="contains(p5dkp:href.no.component(@href),'.reltable.ditamap')">
- <xsl:message>#197777 contains reltable.ditamap=<xsl:value-of select="@href"/>;;</xsl:message>
- </xsl:when>
-
- <xsl:when test="string-length(string($p5dkp:to_reltable.force)) > 0">
- <xsl:message>#179 fixing to mode="p5dkp:to_reltable" for file src <xsl:value-of select="concat($map.path,'/',p5dkp:href.no.component(@href))"/> ; </xsl:message>
-
- <xsl:apply-templates mode="p5dkp:to_reltable" select="doc(concat($map.path,'/',p5dkp:href.no.component(@href)))">
-
- <xsl:with-param name="map.path" select="$map.path"/>
- <xsl:with-param name="keyscope" select="$keyscope"/>
-
- <xsl:with-param name="href" select="p5dkp:href.no.component(@href)"/>
- </xsl:apply-templates>
- </xsl:when>
- </xsl:choose>
- <xsl:apply-templates mode="#current" select="doc(concat($map.path,'/',p5dkp:href.no.component(@href)))"> <!-- doc(concat($path,'/',@href)) -->
- <xsl:with-param name="map.path" select="concat($map.path,'/',$path)"/>
- <xsl:with-param name="keyscope" select="$keyscope"/>
-
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <!-- zajrzyjmy jednak do topicow zeby poszukac tresci do analizy co jest w srodku -->
- <xsl:apply-templates mode="#current" select="doc(concat($map.path,'/',p5dkp:href.no.component(@href)))"> <!-- doc(concat($path,'/',@href)) -->
- <!--<xsl:with-param name="map.path" select="concat($map.path,'/',$path)"/>-->
- <xsl:with-param name="keyscope" select="$keyscope"/>
-
- </xsl:apply-templates>
-
-
-
- <p5dkp:true.path>
- <xsl:copy-of select="$p5dkp:true.path"/>
- <xsl:message>#172 $p5dkp:true.path = <xsl:copy-of select="$p5dkp:true.path" copy-namespaces="no"/></xsl:message>
- </p5dkp:true.path>
- <xsl:choose>
- <xsl:when test="contains($p5dkp:true.path,$p5dkp.MATRYCA_PROJEKTU_BUDZET_ETAP_ROLA_PRACOWNIK.szablony)">
- <xsl:message>#171 igroring contains(concat($map.path,'/',@href),$p5dkp.MATRYCA_PROJEKTU_BUDZET_ETAP_ROLA_PRACOWNIK.szablony) for <xsl:value-of select="concat($map.path,'/',@href)"/></xsl:message>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="p5dkp:fix-topic" select="doc(concat($map.path,'/',p5dkp:href.no.component(@href)))"> <!-- doc(concat($path,'/',@href)) -->
- <xsl:with-param name="map.path" select="$map.path"/>
- <xsl:with-param name="keyscope" select="$keyscope"/>
- <xsl:with-param name="keyscope.attr" select="@keyscope"/>
- <xsl:with-param name="keydef" select="keydef"/>
- <xsl:with-param name="href" select="p5dkp:href.no.component(@href)"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="p5dkp:fix-glossgroup">
- <xsl:with-param name="file.href" select="concat($map.path,'/',p5dkp:href.no.component(@href))"/>
- <xsl:with-param name="map.path" select="$map.path"/>
- <xsl:with-param name="keyscope" select="$keyscope"/>
- <xsl:with-param name="keyscope.attr" select="@keyscope"/>
- <xsl:with-param name="keydef" select="keydef"/>
- <xsl:with-param name="href" select="p5dkp:href.no.component(@href)"/>
- </xsl:call-template>
-
- </xsl:otherwise>
-
- </xsl:choose>
- </xsl:copy>
-
-
- </xsl:template>
-
-
-
-
-
-
-
-
-
- </xsl:stylesheet>
|