| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- <?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:include href="p5dkp.keyscope.xsl"/>-->
-
- <xsl:template mode="p5dkp:map.keys" match="@class"/>
-
-
- <xsl:template mode="p5dkp:map.keys" match="@*">
- <xsl:param name="keyscope"/>
- <xsl:copy-of select="."/>
- </xsl:template>
-
- <xsl:template mode="p5dkp:map.keys" match="@keys">
- <xsl:param name="keyscope"/>
- <!--<xsl:copy-of select="."/>-->
- <xsl:copy-of select="."/>
- <xsl:variable name="current" select="."/>
- <xsl:attribute name="keys.keyscope">
- <xsl:for-each select="$keyscope/keyscope/key">
- <xsl:choose>
- <xsl:when test="string-length(current()) = 0">
- <xsl:value-of select="$current"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(current(),'.',$current)"/>
- </xsl:otherwise>
- </xsl:choose>
-
- <xsl:if test="not(position() = last())"><xsl:text> </xsl:text></xsl:if>
- </xsl:for-each>
- </xsl:attribute>
- </xsl:template>
-
-
- <xsl:template mode="p5dkp:map.keys.eval" match="@*"/>
-
-
- <!-- <map.keys.keyscope>
- <keys map.keys.eval="event.KIKE_wydarzenia_2008__2018"/>
- <keys map.keys.eval="event.2008__2018_wydarzen"/>
- </map.keys.keyscope>
- <map.keys.eval>
- <keys map.keys.eval="w_2008_roku_za_o_enie_kike_przez_arkadiusz_binder.dita"/>
- <keys map.keys.eval="event.KIKE_wydarzenia_2008__2018.w_2008_roku_za_o_enie_kike_przez_arkadiusz_binder.dita"/>
- <keys map.keys.eval="event.2008__2018_wydarzen.w_2008_roku_za_o_enie_kike_przez_arkadiusz_binder.dita"/>
- </map.keys.eval>
- event.KIKE_wydarzenia_2008__2018 - event.2008__2018_wydarzen - w_2008_roku_za_o_enie_kike_przez_arkadiusz_binder.dita
- event.KIKE_wydarzenia_2008__2018.event.2008__2018_wydarzen.w_2008_roku_za_o_enie_kike_przez_arkadiusz_binder.dita
-
- =
- #1 + #2 + @keys
- -->
-
-
- <xsl:template name="p5dkp:map.keys.eval"><!-- to force create map.keys.eval elements -->
- <xsl:param name="keyscope"/>
- <xsl:param name="keys.attr" required="no"/>
- <map.keys.eval>
- <xsl:for-each select="$keyscope/keyscope/key">
- <xsl:choose>
- <xsl:when test="string-length(current()) = 0 and string-length($keys.attr) = 0"/>
- <xsl:when test="string-length(current()) = 0">
- <keys>
- <xsl:attribute name="map.keys.eval" select="$keys.attr"/>
- </keys>
- </xsl:when>
- <xsl:otherwise>
- <keys>
- <xsl:choose>
- <xsl:when test="string-length($keys.attr) = 0">
- <xsl:attribute name="map.keys.eval" select="."/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="map.keys.eval" select="concat(current(),'.',$keys.attr)"/>
- </xsl:otherwise>
- </xsl:choose>
- </keys>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:comment>#83 </xsl:comment>
- <xsl:choose>
- <xsl:when test="$keyscope//key[ string-length(@map.keys.eval) > 0 ] or string-length($keys.attr) > 0">
- <keys>
- <xsl:attribute name="map.keys.eval">
- <xsl:for-each select="$keyscope/keyscope/key">
- <xsl:choose>
- <xsl:when test="position() = last()">
- <xsl:if test="string-length(current()) > 0"><xsl:value-of select="."/></xsl:if>
- <xsl:choose>
- <xsl:when test="string-length($keys.attr)"><xsl:text>.</xsl:text><xsl:value-of select="$keys.attr"/></xsl:when>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="string-length(current()) > 0"><xsl:value-of select="."/><xsl:text>.</xsl:text></xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:attribute>
- </keys>
- </xsl:when>
- </xsl:choose>
- </map.keys.eval>
- </xsl:template>
-
-
- <xsl:template mode="p5dkp:map.keys.eval" match="@keys">
- <xsl:param name="keyscope"/>
- <xsl:call-template name="p5dkp:map.keys.eval">
- <xsl:with-param name="keys.attr" select="."/>
- <xsl:with-param name="keyscope" select="$keyscope"/>
- </xsl:call-template>
- <!--<xsl:variable name="current" select="."/>
- <map.keys.eval>
- <xsl:for-each select="$keyscope/keyscope/key">
- <keys>
- <xsl:choose>
- <xsl:when test="string-length(current()) = 0">
- <xsl:attribute name="map.keys.eval" select="$current"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="map.keys.eval" select="concat(current(),'.',$current)"/>
- </xsl:otherwise>
- </xsl:choose>
- </keys>
- </xsl:for-each>
- </map.keys.eval>-->
- </xsl:template>
-
- <xsl:template name="p5dkp:map.keys.keyscope">
- <xsl:param name="keyscope"/>
- <map.keys.keyscope>
- <xsl:for-each select="$keyscope/keyscope/key">
- <xsl:choose>
- <xsl:when test="string-length(.) > 0 ">
- <keys > <!-- todo xml:id="{.}" -->
- <xsl:attribute name="map.keys.eval" select="."/>
- </keys>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </map.keys.keyscope>
- </xsl:template>
-
- <xsl:template mode="p5dkp:map.keys" match="*">
- <xsl:param name="map.path"/>
- <xsl:param name="keyscope" required="yes"/>
- <xsl:param name="audience"/>
- <!--<xsl:param name="p5dkp:map.keys.files" required="yes"/>-->
- <xsl:copy>
- <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 mode="p5dkp:map.keys" select="@*">
- <xsl:with-param name="keyscope" select="$keyscope"/>
- </xsl:apply-templates>
-
- <xsl:if test="$map.path"><xsl:attribute name="map.path" select="$map.path"/></xsl:if>
- <xsl:apply-templates mode="p5dkp:map.keys.eval" select="@*">
- <xsl:with-param name="keyscope" select="$keyscope"/>
- </xsl:apply-templates>
- <!--<xsl:copy-of select="$keyscope"/>-->
-
-
- <!--<xsl:apply-templates mode="p5suis:p5suis.p5suis.say_to_queue.copy_file" select="."/>-->
- <xsl:choose>
- <xsl:when test="$audience">
- <!-- BYPASS output loop from dkp5.ditafiles. -->
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="#current">
- <xsl:with-param name="map.path" select="$map.path"/>
- <xsl:with-param name="keyscope" select="$keyscope"/>
- <xsl:with-param name="audience" select="$audience"/>
- <!--<xsl:with-param name="p5dkp:map.keys.files" select="$p5dkp:map.keys.files"/>-->
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:copy>
- </xsl:template>
-
-
-
- </xsl:stylesheet>
|