|
@@ -7,6 +7,7 @@
|
|
|
xmlns:p5ant-interface-resp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface-resp.xsd"
|
|
xmlns:p5ant-interface-resp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface-resp.xsd"
|
|
|
xmlns:p5ant="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache.public/ant/ant.xsd"
|
|
xmlns:p5ant="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache.public/ant/ant.xsd"
|
|
|
xmlns:object_merge_ant_object="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_merge_ant_object.xsd"
|
|
xmlns:object_merge_ant_object="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_merge_ant_object.xsd"
|
|
|
|
|
+ xmlns:p5dkp="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/dita_kosztorys_projektowy/p5dkp.xsd"
|
|
|
exclude-result-prefixes="xs"
|
|
exclude-result-prefixes="xs"
|
|
|
version="2.0">
|
|
version="2.0">
|
|
|
|
|
|
|
@@ -107,5 +108,332 @@
|
|
|
</xsl:function>
|
|
</xsl:function>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ <xsl:function name="p5dkp:ditafiles.file_from_fullpath.rel">
|
|
|
|
|
+ <xsl:param name="fullpath"/>
|
|
|
|
|
+ <xsl:variable name="out">
|
|
|
|
|
+ <xsl:for-each select="tokenize($fullpath,'/')">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="position() = 1">
|
|
|
|
|
+ <xsl:value-of select="concat(.,'/')"/>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:when test="position() = last()">
|
|
|
|
|
+ <xsl:value-of select="concat(.,'/')"/>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise>
|
|
|
|
|
+ <xsl:value-of select="concat(.,'/')"/>
|
|
|
|
|
+ </xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:value-of select="p5dg:filepath.clean($out)"/>
|
|
|
|
|
+ </xsl:function>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:function name="p5dkp:ditafiles.file_from_fullpath">
|
|
|
|
|
+ <xsl:param name="fullpath"/>
|
|
|
|
|
+ <xsl:variable name="path_len" select="count(tokenize($fullpath,'/'))"/>
|
|
|
|
|
+ <xsl:variable name="out">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="$path_len > 0">
|
|
|
|
|
+ <xsl:for-each select="tokenize($fullpath,'/')">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="position() = last()">
|
|
|
|
|
+ <xsl:value-of select="."/>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise>
|
|
|
|
|
+ <xsl:value-of select="$fullpath"/>
|
|
|
|
|
+ </xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:value-of select="$out"/>
|
|
|
|
|
+ </xsl:function>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:function name="p5dkp:ditafiles.dir_from_fullpath">
|
|
|
|
|
+ <xsl:param name="fullpath"/>
|
|
|
|
|
+ <!--<xsl:message>#98 <xsl:value-of select="$fullpath"/></xsl:message>-->
|
|
|
|
|
+ <xsl:variable name="path_len" select="count(tokenize($fullpath,'/'))"/>
|
|
|
|
|
+ <xsl:variable name="out">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="$path_len > 0">
|
|
|
|
|
+ <xsl:for-each select="tokenize($fullpath,'/')">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="position() = 1">
|
|
|
|
|
+ <xsl:value-of select="concat(.,'/')"/>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:when test="position() < $path_len and not(position() = last())">
|
|
|
|
|
+ <xsl:value-of select="concat(.,'/')"/>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:value-of select="$out"/>
|
|
|
|
|
+ </xsl:function>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:function name="p5dkp:ditafiles.func.merge_path.string.file">
|
|
|
|
|
+ <xsl:param name="map.path1"/>
|
|
|
|
|
+ <xsl:param name="href1"/>
|
|
|
|
|
+ <xsl:param name="map.path2"/>
|
|
|
|
|
+ <xsl:param name="href2"/>
|
|
|
|
|
+ <xsl:value-of select="concat(p5dkp:ditafiles.func.merge_path.string($map.path1,$href1,$map.path2,$href2),'/',$href1)"/>
|
|
|
|
|
+ </xsl:function>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:function name="p5dkp:ditafiles.func.merge_path.string">
|
|
|
|
|
+ <xsl:param name="map.path1"/>
|
|
|
|
|
+ <xsl:param name="href1"/>
|
|
|
|
|
+ <xsl:param name="map.path2"/>
|
|
|
|
|
+ <xsl:param name="href2"/>
|
|
|
|
|
+ <xsl:variable name="p5dkp:ditafiles.func.merge_path">
|
|
|
|
|
+ <p5dkp:ditafiles.func.merge_path>
|
|
|
|
|
+ <xsl:copy-of select="p5dkp:ditafiles.func.merge_path($map.path1,$href1,$map.path2,$href2)" copy-namespaces="no"/>
|
|
|
|
|
+ </p5dkp:ditafiles.func.merge_path>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:variable name="merge_path">
|
|
|
|
|
+ <xsl:for-each select="$p5dkp:ditafiles.func.merge_path//result/path">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="position() = last() and string-length(@path) > 0">
|
|
|
|
|
+ <xsl:value-of select="@path"/>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise><xsl:value-of select="concat(@path,'/')"/></xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:value-of select="$merge_path"/>
|
|
|
|
|
+ </xsl:function>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:function name="p5dkp:ditafiles.func.merge_path.string">
|
|
|
|
|
+ <xsl:param name="map.path1"/>
|
|
|
|
|
+ <xsl:param name="map.path2"/>
|
|
|
|
|
+ <xsl:variable name="p5dkp:ditafiles.func.merge_path">
|
|
|
|
|
+ <p5dkp:ditafiles.func.merge_path>
|
|
|
|
|
+ <xsl:copy-of select="p5dkp:ditafiles.func.merge_path($map.path1,'/FAKEFILE1.FAKE',$map.path2,'/FAKEFILE2.FAKE')" copy-namespaces="no"/>
|
|
|
|
|
+ </p5dkp:ditafiles.func.merge_path>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:variable name="merge_path">
|
|
|
|
|
+ <xsl:for-each select="$p5dkp:ditafiles.func.merge_path//result/path">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="position() = last()">
|
|
|
|
|
+ <xsl:value-of select="@path"/>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise><xsl:value-of select="concat(@path,'/')"/></xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:value-of select="$merge_path"/>
|
|
|
|
|
+ </xsl:function>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:function name="p5dkp:ditafiles.func.merge_path">
|
|
|
|
|
+ <xsl:param name="map.path2"/>
|
|
|
|
|
+ <xsl:param name="href2"/>
|
|
|
|
|
+ <xsl:param name="map.path1"/>
|
|
|
|
|
+ <xsl:param name="href1"/>
|
|
|
|
|
+ <xsl:variable name="map1" select="p5dg:filepath.clean(concat($map.path1,'/',$href1))"/>
|
|
|
|
|
+ <xsl:variable name="map2" select="p5dg:filepath.clean(concat($map.path2,'/',$href2))"/>
|
|
|
|
|
+ <xsl:message>[EEE]#148DDDD $map.path1 = "<xsl:value-of select="$map.path1"/>" ; "<xsl:value-of select="$href1"/>" $map.path2 = "<xsl:value-of select="$map.path2"/>" ; "<xsl:value-of select="$href2"/>" , count(<xsl:value-of select="count($map.path2)"/>); (<xsl:value-of select="count($href2)"/>)</xsl:message>
|
|
|
|
|
+ <xsl:message>[EEE]#148DDDD-B $map1=<xsl:value-of select="$map1"/>; $map2=<xsl:value-of select="$map2"/>;</xsl:message>
|
|
|
|
|
+ <xsl:variable name="p5dkp:ditafiles.func.merge_path">
|
|
|
|
|
+ <p5dkp:ditafiles.func.merge_path>
|
|
|
|
|
+ <xsl:variable name="map2.len" select="count(tokenize($map2,'/'))"/>
|
|
|
|
|
+ <xsl:attribute name="p5dg:filepath.clean.1" select="$map1"/>
|
|
|
|
|
+ <xsl:attribute name="p5dg:filepath.clean.2" select="$map2"/>
|
|
|
|
|
+ <xsl:attribute name="map.path1" select="$map.path1"/>
|
|
|
|
|
+ <xsl:attribute name="href1" select="$href1"/>
|
|
|
|
|
+ <xsl:attribute name="map.path2" select="$map.path2"/>
|
|
|
|
|
+ <xsl:attribute name="href2" select="$href2"/>
|
|
|
|
|
+ <xsl:for-each select="tokenize($map1,'/')">
|
|
|
|
|
+ <xsl:variable name="pos1" select="position()"/>
|
|
|
|
|
+ <xsl:variable name="text1" select="."/>
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="position() > $map2.len">
|
|
|
|
|
+ <path1 pos="{xs:integer($pos1)}">
|
|
|
|
|
+ <xsl:attribute name="mismatch" select="."/>
|
|
|
|
|
+ </path1>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise>
|
|
|
|
|
+ <path1 pos="{xs:integer($pos1)}">
|
|
|
|
|
+ <!--<xsl:message>#148 $map.path1 = "<xsl:value-of select="$map.path1"/>" ; "<xsl:value-of select="$href1"/>" $map.path2 = "<xsl:value-of select="$map.path2"/>" ; "<xsl:value-of select="$href2"/>" , count(<xsl:value-of select="count($map.path2)"/>); (<xsl:value-of select="count($href2)"/>)</xsl:message>-->
|
|
|
|
|
+ <xsl:for-each select="tokenize($map2,'/')">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="position() = $pos1">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test=". = $text1">
|
|
|
|
|
+ <xsl:attribute name="same" select="$text1"/>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise>
|
|
|
|
|
+ <xsl:attribute name="mismatch" select="$text1"/>
|
|
|
|
|
+ </xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ </path1>
|
|
|
|
|
+ </xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ </p5dkp:ditafiles.func.merge_path>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:variable name="p5dkp:ditafiles.func.merge_path2">
|
|
|
|
|
+ <p5dkp:ditafiles.func.merge_path2>
|
|
|
|
|
+ <xsl:variable name="map1.len" select="count(tokenize($map1,'/'))"/>
|
|
|
|
|
+ <xsl:for-each select="tokenize($map2,'/')">
|
|
|
|
|
+ <xsl:variable name="pos2" select="position()"/>
|
|
|
|
|
+ <xsl:variable name="text2" select="."/>
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="position() > $map1.len">
|
|
|
|
|
+ <path2 pos="{xs:integer($pos2)}">
|
|
|
|
|
+ <xsl:attribute name="mismatch" select="."/>
|
|
|
|
|
+ </path2>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise>
|
|
|
|
|
+ <path2 pos="{xs:integer($pos2)}">
|
|
|
|
|
+ <xsl:for-each select="tokenize($map1,'/')">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="position() = $pos2">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test=". = $text2">
|
|
|
|
|
+ <xsl:attribute name="same" select="$text2"/>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise>
|
|
|
|
|
+ <xsl:attribute name="mismatch" select="$text2"/>
|
|
|
|
|
+ </xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ </path2>
|
|
|
|
|
+ </xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+
|
|
|
|
|
+ </p5dkp:ditafiles.func.merge_path2>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:copy-of select="$p5dkp:ditafiles.func.merge_path" copy-namespaces="no"/>
|
|
|
|
|
+ <xsl:copy-of select="$p5dkp:ditafiles.func.merge_path2" copy-namespaces="no"/>
|
|
|
|
|
+ <xsl:variable name="min.mismatch" > <!-- select="min($p5dkp:ditafiles.func.merge_path//path1[@mismatch]/number(@pos)) cast as xs:integer " -->
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="$p5dkp:ditafiles.func.merge_path//path1[@mismatch]/@pos">
|
|
|
|
|
+ <xsl:value-of select="min($p5dkp:ditafiles.func.merge_path//path1[@mismatch]/number(@pos)) cast as xs:integer "/>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise>
|
|
|
|
|
+ <xsl:value-of select="0"/>
|
|
|
|
|
+ <xsl:message terminate="no">###273 same path?! situation path1= <xsl:copy-of select="$p5dkp:ditafiles.func.merge_path//path1"></xsl:copy-of></xsl:message>
|
|
|
|
|
+ </xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:variable name="max.mismatch" >
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="not($p5dkp:ditafiles.func.merge_path//path1[@mismatch]/@pos)">
|
|
|
|
|
+ <xsl:value-of select="0"/>
|
|
|
|
|
+ <xsl:message>#282 same path?! WARNING </xsl:message>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <!--<xsl:when test="max(($p5dkp:ditafiles.func.merge_path//path1[@mismatch]/number(@pos)) ) cast as xs:integer > max($p5dkp:ditafiles.func.merge_path2//path2[@mismatch]/number(@pos)) cast as xs:integer ">
|
|
|
|
|
+ <xsl:value-of select="max(($p5dkp:ditafiles.func.merge_path//path1[@mismatch]/number(@pos)) ) cast as xs:integer "/>
|
|
|
|
|
+ </xsl:when>-->
|
|
|
|
|
+ <xsl:otherwise >
|
|
|
|
|
+ <xsl:value-of select="max(($p5dkp:ditafiles.func.merge_path//path1[@mismatch]/number(@pos)) ) cast as xs:integer "/>
|
|
|
|
|
+ </xsl:otherwise>
|
|
|
|
|
+ <!--<xsl:otherwise>
|
|
|
|
|
+ <xsl:value-of select="max($p5dkp:ditafiles.func.merge_path2//path2[@mismatch]/number(@pos)) cast as xs:integer "/>
|
|
|
|
|
+ </xsl:otherwise>-->
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:variable name="max.mismatch.2" >
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="not($p5dkp:ditafiles.func.merge_path2//path2[@mismatch]/@pos)">
|
|
|
|
|
+ <xsl:value-of select="0"/>
|
|
|
|
|
+ <xsl:message>#282 same path?! WARNING </xsl:message>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <!--<xsl:when test="max(($p5dkp:ditafiles.func.merge_path//path1[@mismatch]/number(@pos)) ) cast as xs:integer > max($p5dkp:ditafiles.func.merge_path2//path2[@mismatch]/number(@pos)) cast as xs:integer ">
|
|
|
|
|
+ <xsl:value-of select="max(($p5dkp:ditafiles.func.merge_path//path1[@mismatch]/number(@pos)) ) cast as xs:integer "/>
|
|
|
|
|
+ </xsl:when>-->
|
|
|
|
|
+ <xsl:otherwise >
|
|
|
|
|
+ <xsl:value-of select="max(($p5dkp:ditafiles.func.merge_path2//path2[@mismatch]/number(@pos)) ) cast as xs:integer "/>
|
|
|
|
|
+ </xsl:otherwise>
|
|
|
|
|
+ <!--<xsl:otherwise>
|
|
|
|
|
+ <xsl:value-of select="max($p5dkp:ditafiles.func.merge_path2//path2[@mismatch]/number(@pos)) cast as xs:integer "/>
|
|
|
|
|
+ </xsl:otherwise>-->
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:variable name="map.path1.len">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="count(tokenize($map1,'/')) > 0 " >
|
|
|
|
|
+ <xsl:value-of select="count(tokenize($map1,'/')) cast as xs:string"/>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise><xsl:value-of select="0"/></xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:variable name="map.path2.len">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="count(tokenize($map2,'/')) > 0 " >
|
|
|
|
|
+ <xsl:value-of select="count(tokenize($map2,'/')) cast as xs:string"/>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise><xsl:value-of select="0"/></xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:variable name="max.path.len" >
|
|
|
|
|
+ <xsl:for-each select="($map.path1.len,$map.path2.len)">
|
|
|
|
|
+ <xsl:sort select="." order="descending" data-type="number"/>
|
|
|
|
|
+ <xsl:if test="position() = 1"><xsl:value-of select=". cast as xs:integer"/></xsl:if>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <result>
|
|
|
|
|
+ <xsl:attribute name="min.mismatch" select="$min.mismatch" />
|
|
|
|
|
+ <xsl:attribute name="max.mismatch" select="$max.mismatch" />
|
|
|
|
|
+ <xsl:attribute name="max.mismatch.2" select="$max.mismatch.2" />
|
|
|
|
|
+ <xsl:attribute name="map.path1.len" select="$map.path1.len"/>
|
|
|
|
|
+ <xsl:attribute name="map.path2.len" select="$map.path2.len"/>
|
|
|
|
|
+ <xsl:attribute name="max.path.len" select="$max.path.len"/>
|
|
|
|
|
+ <!--<xsl:message>#max.path.len = <xsl:value-of select="$max.path.len"/> ; $map.path1.len = <xsl:value-of select="$map.path1.len"/>; $map.path2.len = <xsl:value-of select="$map.path2.len"/>; </xsl:message>-->
|
|
|
|
|
+ <xsl:variable name="source.file.tune">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="string-length($href1) > 0">
|
|
|
|
|
+ <xsl:value-of select="1"/>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise>
|
|
|
|
|
+ <xsl:value-of select="1"/>
|
|
|
|
|
+ </xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+ </xsl:variable>
|
|
|
|
|
+ <xsl:for-each select="$min.mismatch to ( xs:integer($max.mismatch ) - xs:integer($source.file.tune))"> <!-- - 1 -->
|
|
|
|
|
+ <path>
|
|
|
|
|
+ <xsl:attribute name="pos" select="position()"/>
|
|
|
|
|
+ <xsl:attribute name="path" select="'..'"/>
|
|
|
|
|
+ <xsl:attribute name="ind" select="."/>
|
|
|
|
|
+ </path>
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+
|
|
|
|
|
+ <xsl:for-each select="$min.mismatch to ( xs:integer($max.mismatch.2 ))">
|
|
|
|
|
+ <xsl:choose>
|
|
|
|
|
+ <xsl:when test="$p5dkp:ditafiles.func.merge_path2//path2[ matches(concat('III',@pos,'III'),xs:string(concat('III',current(),'III'))) ]/@mismatch">
|
|
|
|
|
+ <path>
|
|
|
|
|
+ <xsl:attribute name="pos" select="position()"/>
|
|
|
|
|
+ <xsl:attribute name="path" select="$p5dkp:ditafiles.func.merge_path2//path2[ matches(concat('III',@pos,'III'),xs:string(concat('III',current(),'III'))) ]/@mismatch" />
|
|
|
|
|
+ <xsl:attribute name="ind" select="."/>
|
|
|
|
|
+ <!--<xsl:attribute name="path22" select="$p5dkp:ditafiles.func.merge_path2//path2[@pos=$min.mismatch.pos]/@mismatch"/>
|
|
|
|
|
+ <xsl:attribute name="path22" select="$p5dkp:ditafiles.func.merge_path2//path2[@pos=$min.mismatch.pos]/@mismatch"/>-->
|
|
|
|
|
+ </path>
|
|
|
|
|
+ </xsl:when>
|
|
|
|
|
+ <xsl:otherwise>
|
|
|
|
|
+ <else>
|
|
|
|
|
+ <xsl:attribute name="pos" select="position()"/>
|
|
|
|
|
+ <xsl:attribute name="path" select="$p5dkp:ditafiles.func.merge_path2//path2[ @pos = current() ]/@mismatch" />
|
|
|
|
|
+ <xsl:attribute name="ind" select="."/>
|
|
|
|
|
+ </else>
|
|
|
|
|
+ </xsl:otherwise>
|
|
|
|
|
+ </xsl:choose>
|
|
|
|
|
+
|
|
|
|
|
+ </xsl:for-each>
|
|
|
|
|
+ <!--<xsl:for-each select="$p5dkp:ditafiles.func.merge_path//path[number(@pos) < $min.mismatch]">
|
|
|
|
|
+
|
|
|
|
|
+ </xsl:for-each>-->
|
|
|
|
|
+ </result>
|
|
|
|
|
+ </xsl:function>
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|
|
</xsl:stylesheet>
|