| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284 |
- <?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:p5pckg="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/procesy5_package.xsd"
- exclude-result-prefixes="xs" version="2.0">
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
-
-
- <xsl:template mode="p5pckg:superedit-INSTALL_SES_PROCESY_A.php.analyze.xml"
- match="p5pckg.superedit-INSTALL_SES_PROCESY_A.php.xml"
- xpath-default-namespace="http://biuro.biall-net.pl/xmlschema_procesy5/WPS_Functions/procesy5_package.xsd">
- <p5pckg:superedit-INSTALL_SES_PROCESY_A.php.analyze.xml>
- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(text(), '\\/\*')">
- <comment_in>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(current(), '\\/\*')">
- <xsl:attribute name="pos" select="position()"/>
- <comment_out>
- <xsl:variable name="context.prev" select="."/>
-
-
-
-
-
-
-
-
- <xsl:for-each select="tokenize(current(),'static')">
- <static>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="'static'"/>
- <xsl:if test="contains($context.prev,'static')">
- <xsl:attribute name="val.used" select="'static'"/>
- </xsl:if>
- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(current(),'function')">
- <function>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="'function'"/>
- <xsl:if test="contains($context.prev,'function')">
- <xsl:attribute name="val.used" select="'function'"/>
- </xsl:if>
-
-
- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(current(), '\{')">
- <lt>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="'{'"/>
- <xsl:if test="contains($context.prev,'{')">
- <xsl:attribute name="val.used" select="'{'"/>
- </xsl:if>
- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(current(), '}')">
- <rt>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="'}'"/>
- <xsl:if test="contains($context.prev,'}')">
- <xsl:attribute name="val.used" select="'}'"/>
- </xsl:if>
- <xsl:variable name="context.prev" select="."/>
-
-
- <!-- <xsl:for-each select="tokenize(current(), '\n')">
- <nl>
- <xsl:attribute name="val" select="'\n'"/>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:variable name="escaped" select="'(//.*)'"/>
- <xsl:choose>
-
- <xsl:when test="matches( current(),$escaped)">
- <xsl:comment><xsl:value-of select="current()"/></xsl:comment>
- </xsl:when>
- <xsl:otherwise>-->
- <!--<xsl:variable name="context.prev" select="."/>-->
- <xsl:for-each select="tokenize(current(),'\(')">
- <lb>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="'('"/>
- <xsl:if test="contains($context.prev,'(')">
- <xsl:attribute name="val.used" select="'('"/>
- </xsl:if>
- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(current(),'\)')">
- <rb>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="')'"/>
- <xsl:if test="contains($context.prev,')')">
- <xsl:attribute name="val.used" select="')'"/>
- </xsl:if>
- <xsl:variable name="escape" select="';'"/>
- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(current(),$escape)">
- <command>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="$escape"/>
- <xsl:if test="contains($context.prev,$escape)">
- <xsl:attribute name="val.used" select="$escape"/>
- </xsl:if>
- <xsl:variable name="escape" select="'='"/>
- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(current(),$escape)">
- <equal>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="$escape"/>
- <xsl:if test="contains($context.prev,$escape)">
- <xsl:attribute name="val.used" select="$escape"/>
- </xsl:if>
- <xsl:variable name="escape" select="'\$'"/>
- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(current(),$escape)">
- <dollar>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="$escape"/>
- <xsl:if test="contains($context.prev,$escape)">
- <xsl:attribute name="val.used" select="$escape"/>
- </xsl:if>
- <xsl:value-of select="."/>
- </dollar>
- </xsl:for-each>
- </equal>
- </xsl:for-each>
-
- </command>
- </xsl:for-each>
-
-
- </rb>
- </xsl:for-each>
- </lb>
- </xsl:for-each>
-
-
- <!-- </xsl:otherwise>
- </xsl:choose>
- </nl>
- </xsl:for-each>-->
- </rt>
- </xsl:for-each>
- </lt>
- </xsl:for-each>
- </function>
- </xsl:for-each>
- </static>
- </xsl:for-each>
-
-
-
- </comment_out>
- </xsl:for-each>
- </comment_in>
- </xsl:for-each>
- </p5pckg:superedit-INSTALL_SES_PROCESY_A.php.analyze.xml>
- </xsl:template>
-
-
- <!-- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(current(),'=')">
- <equal>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="'='"/>
- <xsl:if test="contains($context.prev,'=')">
- <xsl:attribute name="val.used" select="'='"/>
- </xsl:if>
- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(current(),'\[')">
- <lqb>
- <xsl:if test="contains($context.prev,'[')">
- <xsl:attribute name="val.used" select="'['"/>
- </xsl:if>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="'['"/>
- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(current(),'\]')">
- <rqb>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="']'"/>
- <xsl:if test="contains($context.prev,']')">
- <xsl:attribute name="val.used" select="']'"/>
- </xsl:if>
- <xsl:variable name="esape"><xsl:text>'</xsl:text></xsl:variable>
- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(current(),$esape)">
- <apo>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="$esape"/>
- <xsl:if test="contains($context.prev,$esape)">
- <xsl:attribute name="val.used" select="$esape"/>
- </xsl:if>
- <xsl:variable name="esape"><xsl:text>"</xsl:text></xsl:variable>
- <xsl:variable name="context.prev" select="."/>
- <xsl:for-each select="tokenize(current(),$esape)">
- <quot>
- <xsl:if test="contains($context.prev,$esape)">
- <xsl:attribute name="val.used" select="$esape"/>
- </xsl:if>
- <xsl:attribute name="pos" select="position()"/>
- <xsl:attribute name="val" select="$esape"/>
- <xsl:value-of select="."/>
- </quot>
- </xsl:for-each>
- </apo>
- </xsl:for-each>
- </rqb>
- </xsl:for-each>
- </lqb>
- </xsl:for-each>
- </equal>
- </xsl:for-each>
- -->
- <!--
- <xsl:template mode="p5pckg:superedit-INSTALL_SES_PROCESY_A.php.analyze.xml"
- match="nl[matches('(\\/\\/.*)', text())]">
- <comment>
- <xsl:value-of select="text()"/>
- </comment>
- </xsl:template>
- <xsl:template mode="p5pckg:superedit-INSTALL_SES_PROCESY_A.php.analyze.xml" match="nl">
- <rest>
- <xsl:value-of select="text()"/>
- </rest>
- </xsl:template>-->
-
-
- <xsl:template mode="p5pckg:superedit-INSTALL_SES_PROCESY_A.php.analyze-flat.xml" match="p5pckg:superedit-INSTALL_SES_PROCESY_A.php.analyze.xml">
- <p5pckg:superedit-INSTALL_SES_PROCESY_A.php.analyze-flat.xml>
- <xsl:for-each select=".//*">
- <xsl:copy>
- <xsl:attribute name="p5pckg:pos.anal" select="position()"/>
- <xsl:copy-of select="@*"/>
- <xsl:copy-of select="text()"/>
- </xsl:copy>
- </xsl:for-each>
- </p5pckg:superedit-INSTALL_SES_PROCESY_A.php.analyze-flat.xml>
- </xsl:template>
-
- <xsl:template mode="p5pckg:superedit-INSTALL_SES_PROCESY_A.php.analyze-functions-modules.xml" match="p5pckg:superedit-INSTALL_SES_PROCESY_A.php.analyze.xml">
- <p5pckg:superedit-INSTALL_SES_PROCESY_A.php.analyze-functions-modules.xml>
- <xsl:for-each select=".//function[@val.used and .//text()]">
- <p5pckg:function>
- <xsl:attribute name="name" select="(.//text())[1]"/>
-
-
- <xsl:for-each select=".//command[@val.used ]">
-
- <xsl:choose>
- <xsl:when test=".//dollar[ contains( text(),'port install')]">
- <p5pckg:port1>
- <xsl:attribute name="install" select="equal[@pos=2 ]/substring-after(dollar[@pos=1]/text(),'install')"/>
- </p5pckg:port1>
- </xsl:when>
- <xsl:when test=".//dollar[ contains( text(),'port install')]">
- <p5pckg:port2>
- <xsl:attribute name="install" select="equal[@pos=2]/substring-after(dollar/text(),'install')"/>
- </p5pckg:port2>
- </xsl:when>
- <xsl:when test=".//dollar[@pos=2][ contains( text(),'rsh')]">
- <p5pckg:command>
- <xsl:attribute name="rsh" select="equal[@pos=2]/dollar/text()"/>
- </p5pckg:command>
- </xsl:when>
- </xsl:choose>
-
-
- </xsl:for-each>
-
-
-
- </p5pckg:function>
- </xsl:for-each>
-
- </p5pckg:superedit-INSTALL_SES_PROCESY_A.php.analyze-functions-modules.xml>
-
- </xsl:template>
-
-
-
-
-
-
- </xsl:stylesheet>
|