| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- <?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:p5up5b="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/upgrade_procesy5_bocian.xsd"
- xmlns:wsbpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
- xmlns:p5suis="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/system_ui_info_speech/system_ui_info_speech.xsd"
- xmlns:p5dg="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/documentation_generator/documentation_generator.xsd"
- xmlns:p5ant="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache.public/ant/ant.xsd"
- exclude-result-prefixes="xs"
- version="2.0">
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
-
- <xsl:include href="p5dg.p5ant.include.structure.ant.build.target.mysqldump.xsl"/>
- <xsl:include href="p5dg.p5ant.include.structure.ant.build.target.php.xsl"/>
- <xsl:include href="p5dg.p5ant.include.structure.ant.build.target.sql.xsl"/>
-
- <xsl:param name="local.prefix" select="'p5up5b.local'"/>
- <xsl:param name="remote.prefix" select="'p5up5b.remote'"/>
- <xsl:param name="controller.prefix" select="'p5up5b.controller'"/>
- <xsl:variable name="p5up5b.properties.match" select="concat('(',$local.prefix,'\.[0-9]*\..*)|(',$remote.prefix,'\.[0-9]*\..*)|(',$controller.prefix,'\.[0-9]*\..*)')"/>
-
- <xsl:template match="properties" mode="wsbpel:p5up5b.ws-bpel_executable.xml.sort_tasks.xml">
- <wsbpel:p5up5b.ws-bpel_executable.xml.sort_tasks.xml>
- <xsl:apply-templates mode="#current"></xsl:apply-templates>
- </wsbpel:p5up5b.ws-bpel_executable.xml.sort_tasks.xml>
- </xsl:template>
- <xsl:template match="property" mode="wsbpel:p5up5b.ws-bpel_executable.xml.sort_tasks.xml">
- <xsl:choose>
- <xsl:when test=" matches(@name,$p5up5b.properties.match)">
- <xsl:element name="target">
- <xsl:attribute name="id" select="generate-id()"/>
- <xsl:copy-of select="@*"/>
- <xsl:choose>
- <xsl:when test=" substring-after(@name,$local.prefix)">
- <xsl:attribute name="p5up5b:task_side" select="'local'"/>
- <xsl:attribute name="p5up5b:prefix" select="$local.prefix"/>
- <xsl:attribute name="p5up5b:task_name" select="p5up5b:task_name(@name,$local.prefix)"/>
- <xsl:attribute name="p5up5b:task_name.param" select="p5up5b:task_name.param(@name,$local.prefix)"/>
- <xsl:attribute name="p5up5b:task_name.param.attr" select="p5up5b:task_name.param.attr(@name,$local.prefix)"/>
- <xsl:attribute name="p5up5b:pos" select="p5up5b:task_number(@name,$local.prefix)"/>
- <xsl:attribute name="p5up5b:task_type" select="p5up5b:task_type(@name,$local.prefix)"/>
- <xsl:attribute name="p5up5b:task_type.pos" select="p5up5b:task_type.pos(@name,$local.prefix)"/>
- </xsl:when>
- <xsl:when test=" substring-after(@name,$remote.prefix)">
- <xsl:attribute name="p5up5b:task_side" select="'remote'"/>
- <xsl:attribute name="p5up5b:prefix" select="$remote.prefix"/>
- <xsl:attribute name="p5up5b:task_name" select="p5up5b:task_name(@name,$remote.prefix)"/>
- <xsl:attribute name="p5up5b:task_name.param" select="p5up5b:task_name.param(@name,$remote.prefix)"/>
- <xsl:attribute name="p5up5b:task_name.param.attr" select="p5up5b:task_name.param.attr(@name,$remote.prefix)"/>
- <xsl:attribute name="p5up5b:pos" select="p5up5b:task_number(@name,$remote.prefix)"/>
- <xsl:attribute name="p5up5b:task_type" select="p5up5b:task_type(@name,$remote.prefix)"/>
- <xsl:attribute name="p5up5b:task_type.pos" select="p5up5b:task_type.pos(@name,$remote.prefix)"/>
- </xsl:when>
- <xsl:when test=" substring-after(@name,$controller.prefix)">
- <xsl:attribute name="p5up5b:task_side" select="'controller'"/>
- <xsl:attribute name="p5up5b:prefix" select="$controller.prefix"/>
- <xsl:attribute name="p5up5b:task_name" select="p5up5b:task_name(@name,$controller.prefix)"/>
- <xsl:attribute name="p5up5b:task_name.param" select="p5up5b:task_name.param(@name,$controller.prefix)"/>
- <xsl:attribute name="p5up5b:task_name.param.attr" select="p5up5b:task_name.param.attr(@name,$controller.prefix)"/>
- <xsl:attribute name="p5up5b:pos" select="p5up5b:task_number(@name,$controller.prefix)"/>
- <xsl:attribute name="p5up5b:task_type" select="p5up5b:task_type(@name,$controller.prefix)"/>
- <xsl:attribute name="p5up5b:task_type.pos" select="p5up5b:task_type.pos(@name,$controller.prefix)"/>
- </xsl:when>
- </xsl:choose>
- <!--<xsl:for-each select=" tokenize( @name , '\.')">
- <xsl:attribute name="pos_{position()}" select="."/>
- </xsl:for-each>-->
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
-
- <xsl:function name="p5up5b:task_number">
- <xsl:param name="p5up5b:property.name"/>
- <xsl:param name="p5up5b:property.prefix"/>
- <xsl:value-of select="tokenize(substring-after($p5up5b:property.name,$p5up5b:property.prefix),'\.')[2]"/>
- </xsl:function>
- <xsl:function name="p5up5b:task_type">
- <xsl:param name="p5up5b:property.name"/>
- <xsl:param name="p5up5b:property.prefix"/>
- <xsl:value-of select="tokenize(substring-after($p5up5b:property.name,$p5up5b:property.prefix),'\.')[3]"/>
- </xsl:function>
-
-
- <xsl:function name="p5up5b:task_type.pos">
- <xsl:param name="p5up5b:property.name"/>
- <xsl:param name="p5up5b:property.prefix"/>
- <xsl:value-of select="tokenize(substring-after($p5up5b:property.name,$p5up5b:property.prefix),'\.')[4]"/>
- </xsl:function>
-
-
- <xsl:function name="p5up5b:task_name">
- <xsl:param name="p5up5b:property.name"/>
- <xsl:param name="p5up5b:property.prefix"/>
- <xsl:value-of select="$p5up5b:property.prefix"/><xsl:text>.</xsl:text>
- <xsl:value-of select="tokenize(substring-after($p5up5b:property.name,$p5up5b:property.prefix),'\.')[2]"/>
- <xsl:text>.</xsl:text>
- <xsl:value-of select="tokenize(substring-after($p5up5b:property.name,$p5up5b:property.prefix),'\.')[3]"/>
- <xsl:text>.</xsl:text>
- <xsl:value-of select="tokenize(substring-after($p5up5b:property.name,$p5up5b:property.prefix),'\.')[4]"/>
- </xsl:function>
-
- <xsl:function name="p5up5b:task_name.param">
- <xsl:param name="p5up5b:property.name"/>
- <xsl:param name="p5up5b:property.prefix"/>
- <xsl:value-of select="tokenize(substring-after($p5up5b:property.name,$p5up5b:property.prefix),'\.')[5]"/>
- </xsl:function>
-
- <xsl:function name="p5up5b:task_name.param.attr">
- <xsl:param name="p5up5b:property.name"/>
- <xsl:param name="p5up5b:property.prefix"/>
- <xsl:value-of select="tokenize(substring-after($p5up5b:property.name,$p5up5b:property.prefix),'\.')[6]"/>
- </xsl:function>
-
- <xsl:template match="wsbpel:p5up5b.ws-bpel_executable.xml.sort_tasks.xml" mode="wsbpel:p5up5b.ws-bpel_executable.xml">
- <wsbpel:p5up5b.ws-bpel_executable.xml>
- <xsl:for-each-group select="*" group-by="@p5up5b:task_name">
- <xsl:apply-templates mode="p5dg:p5ant.include.structure.ant.build.target" select=".">
- <xsl:sort select="@p5up5b:pos"/>
- <xsl:sort select="@p5up5b:task_type.pos"/>
- </xsl:apply-templates>
- </xsl:for-each-group>
- </wsbpel:p5up5b.ws-bpel_executable.xml>
- </xsl:template>
-
-
-
-
-
-
-
-
-
- <xsl:template match="@p5up5b:sort|@p5up5b:group" mode="p5up5b:sort"/>
-
- <xsl:template match="@*" mode="p5up5b:sort">
- <xsl:copy-of select="."/>
- </xsl:template>
-
- <xsl:template mode="p5up5b:sort" match="*">
- <xsl:copy copy-namespaces="no">
- <xsl:apply-templates mode="#current" select="@*"/>
-
-
- <xsl:for-each-group select="p5up5b:to_merge_element" group-by="@p5up5b:group">
- <xsl:sort select="number(@p5up5b:sort)"/>
- <xsl:variable name="current.node" select="current-group()/*"/>
- <xsl:for-each-group select="." group-by="@p5up5b:sort">
- <xsl:sort select="number(@p5up5b:sort)"/>
- <xsl:for-each select="*">
- <xsl:sort select="number(@p5up5b:sort)"/>
- <xsl:copy copy-namespaces="no">
- <xsl:variable name="attr.name">
- <xsl:for-each select="@*">
- <xsl:if test="not(contains(name(),'p5up5b:'))"><xsl:value-of select="name()"/></xsl:if>
- </xsl:for-each>
- </xsl:variable> <!-- [ not(contains(name(),'p5up5b:'))] -->
- <xsl:attribute name="{$attr.name}">
- <xsl:for-each select="$current.node/@*">
- <xsl:sort select="number(../../@p5up5b:sort)"/>
- <xsl:choose>
- <xsl:when test="not(contains(name(),'p5up5b:'))">
- <xsl:value-of select="."/>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </xsl:attribute>
- </xsl:copy>
- </xsl:for-each>
- </xsl:for-each-group>
- </xsl:for-each-group>
-
- <xsl:apply-templates mode="#current">
- <xsl:sort select="number(@p5up5b:sort)"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template mode="p5up5b:sort" match="p5up5b:text">
- <xsl:value-of select="text()"/>
- </xsl:template>
- <xsl:template mode="p5up5b:sort" match="p5up5b:to_merge_element"/>
-
-
-
-
- <xsl:function name="p5up5b:getproperty">
- <xsl:param name="root.node"/>
- <xsl:param name="p5up5b:prefix"/>
- <xsl:param name="p5up5b:searched_name"/>
- <xsl:variable name="matches" select="concat($p5up5b:prefix,'\..*',$p5up5b:searched_name)"/>
- <xsl:value-of select="$root.node//property[matches(@name, $matches)]/@value"/>
- </xsl:function>
-
-
-
- <xsl:template match="target" mode="wsbpel:p5up5b.ws-bpel_executable.xml">
- <xsl:comment>#91 unknown type task <xsl:value-of select="@p5up5b:task_type"/></xsl:comment>
- <xsl:message>#91 unknown type task <xsl:value-of select="@p5up5b:task_type"/></xsl:message>
- </xsl:template>
-
- <xsl:template match="property" mode="wsbpel:p5up5b.ws-bpel_executable.xml">
- <xsl:copy-of select="."/>
- </xsl:template>
-
-
- </xsl:stylesheet>
|