| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <?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:p5dg="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/documentation_generator/documentation_generator.xsd"
- xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
- xmlns:SystemObjects__x3A__File="https://biuro.biall-net.pl/wfs/default_db/SystemObjects/File.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:object_merge_ant_object="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/object_merge_ant_object.xsd"
- exclude-result-prefixes="xs"
- version="2.0">
-
-
-
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
- <!--<xsl:import-schema schema-location="repository/p5dg.documentation.files.antstructure-resp.xsd" namespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/ant_interface/ant_interface-resp.xsd"/>-->
-
- <xsl:function name="p5dg:filepath.clean">
- <xsl:param name="p5dg:filepath"/>
- <xsl:variable name="clean" select="replace($p5dg:filepath,'//','/')"/>
- <xsl:variable name="out">
- <xsl:for-each select="tokenize($clean,'/')">
- <xsl:choose>
- <!--<xsl:when test="position() = 1 and string-length(.) > 0">
- <xsl:value-of select="concat('/',.)"/>
- </xsl:when>-->
- <xsl:when test="position() = last() and string-length(.) = 0">
- <xsl:value-of select="."/>
- </xsl:when>
- <xsl:otherwise >
- <xsl:value-of select="concat('/',.)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:variable>
-
- <xsl:value-of select="replace($out,'//','/')"/>
- </xsl:function>
-
- <xsl:function name="p5dg:filepath.dir">
- <xsl:param name="p5dg:filepath"/>
- <xsl:variable name="out">
- <xsl:for-each select="tokenize($p5dg:filepath,'/')[ position() < count(tokenize($p5dg:filepath,'/'))]">
- <xsl:choose>
- <xsl:when test="position() = last()">
- <xsl:value-of select="."/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(.,'/')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:variable>
- <xsl:value-of select="$out"/>
- </xsl:function>
-
- <xsl:function name="p5dg:filepath.dir">
- <xsl:param name="p5dg:filepath"/>
- <xsl:param name="p5dg.documentation.files.index.root_dir"/>
- <xsl:value-of select="p5dg:filepath.clean(p5dg:filepath.dir.task($p5dg:filepath,$p5dg.documentation.files.index.root_dir))"/>
- </xsl:function>
-
- <xsl:function name="p5dg:filepath.dir.task">
- <xsl:param name="p5dg:filepath"/>
- <xsl:param name="p5dg.documentation.files.index.root_dir"/>
- <xsl:variable name="out">
- <xsl:value-of select="$p5dg.documentation.files.index.root_dir"/><xsl:value-of select="'/'"/>
- <xsl:for-each select="tokenize($p5dg:filepath,'/')[ position() < count(tokenize($p5dg:filepath,'/'))]">
- <xsl:choose>
- <xsl:when test="position() = last()">
- <xsl:value-of select="."/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(.,'/')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:variable>
- <xsl:value-of select="$out"/>
- </xsl:function>
-
- <xsl:function name="p5dg:filename">
- <xsl:param name="p5dg:filepath"/>
- <xsl:value-of select="tokenize($p5dg:filepath,'/')[ position() = count(tokenize($p5dg:filepath,'/'))]"/>
- </xsl:function>
-
- <xsl:function name="p5dg:filename.noext">
- <xsl:param name="p5dg:filepath"/>
- <xsl:variable name="out">
- <xsl:for-each select="tokenize(p5dg:filename($p5dg:filepath),'\.')">
- <xsl:choose>
- <xsl:when test="position()=1 and position()=last()">
- <xsl:value-of select="."/>
- </xsl:when>
- <xsl:when test="position()=last()"></xsl:when>
- <xsl:when test="position()=(last() -1 )">
- <xsl:value-of select="."/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/><xsl:text>.</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:variable>
- <xsl:copy-of select="$out"/>
- </xsl:function>
-
-
-
- </xsl:stylesheet>
|