| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?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.comment="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.comment.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"
- exclude-result-prefixes="xs"
- version="2.0">
- <xsl:output indent="yes"/>
- <xsl:param name="p5dkp.comment:xsd" required="yes"/>
- <xsl:strip-space elements="*"/>
-
- <!-- do statystyk suyis -->
-
- <xsl:template match="p5dkp:map.keys.xml" mode="p5dkp:comment.xml #default">
- <p5dkp.comment:comment.xml xsi:noNamespaceSchemaLocation="{$p5dkp.comment:xsd}">
- <xsl:variable name="elementy">
- <elementy>
- <xsl:apply-templates mode="p5dkp:comment.xml" select=".//*"/>
- </elementy>
- </xsl:variable>
-
- <!--<DEBUG>
- <xsl:copy-of select="$elementy"/>
- </DEBUG>-->
- <xsl:for-each-group select="$elementy/elementy/*" group-by="name()">
- <xsl:element name="{name()}">
- <xsl:attribute name="p5suis:group.name" select="name()"/>
- <xsl:attribute name="p5suis:group-desc" select="'child::local-name()'"/>
- <xsl:attribute name="p5suis:group.by" select="'child::local-name()'"/>
- <xsl:for-each select="current-group()/*">
- <xsl:element name="{name()}">
- <xsl:copy-of select=".//@*"/>
- </xsl:element>
- </xsl:for-each>
- </xsl:element>
- </xsl:for-each-group>
- </p5dkp.comment:comment.xml>
- </xsl:template>
-
- <xsl:template match="*" mode="p5dkp:comment.xml"/>
- <xsl:template mode="p5dkp:comment.xml" match="keydef">
- <!-- p5suis:group.name="worker" p5suis:group.by="child::local-name()" p5suis:group-desc="child::local-name()" -->
- <xsl:variable name="keys">
- <xsl:choose>
- <xsl:when test=" string-length(map.keys.eval/keys[last()]/@map.keys.eval) > ( string-length(@keys) + 2 ) "> <!-- + 2 bo kropka -->
- <xsl:message>#28 @map.keys.eval
- keys = <xsl:value-of select="@keys"/>
- last = <xsl:value-of select="map.keys.eval/keys[ last()]/@map.keys.eval"/>
- second <xsl:value-of select="map.keys.eval/keys[ 2]/@map.keys.eval"/>
- </xsl:message>
- <xsl:value-of select="map.keys.eval/keys[last()]/@map.keys.eval"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@keys"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
-
- <xsl:call-template name="p5dkp:structurize">
- <xsl:with-param name="keys" select="$keys"/>
- <xsl:with-param name="keys.keyscope" select="@keys.keyscope"/>
- <xsl:with-param name="keyword" select="topicmeta/keywords/keyword/text()"/>
- <xsl:with-param name="keyref" select="@keyref"/>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template match="text()|comment()" mode="p5suis:p5suis.p5suis.say_to_queue.copy_file"/>
-
-
- <xsl:template name="p5dkp:structurize">
- <xsl:param name="keys" required="yes"/>
- <xsl:param name="pos" select="1"/>
- <xsl:param name="keys.keyscope"/>
- <xsl:param name="keyword"/>
- <xsl:param name="keyref"/>
- <xsl:for-each select="tokenize($keys,'\.')[$pos]">
- <xsl:variable name="name">
- <xsl:choose>
- <xsl:when test="string(number(.)) != 'NaN'">
- <xsl:value-of select="concat('_',.)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:element name="{$name}">
- <xsl:copy-of select="$keys.keyscope"/>
- <xsl:copy-of select="$keyref"/>
- <xsl:copy-of select="$keyword"/>
- <xsl:call-template name="p5dkp:structurize">
- <xsl:with-param name="pos" select="$pos + 1"/>
- <xsl:with-param name="keys" select="$keys"/>
- </xsl:call-template>
- </xsl:element>
- </xsl:for-each>
-
-
- </xsl:template>
-
-
-
- </xsl:stylesheet>
|