| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?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"
- exclude-result-prefixes="xs"
- version="2.0">
-
- <xsl:output indent="yes"/>
- <xsl:strip-space elements="*"/>
-
- <xsl:template match="procesy5_config">
- <xsl:apply-templates/>
- </xsl:template>
-
- <xsl:template match="procesy5_config.folders.server">
- <xsl:variable name="procesy5_config.folders.server">
- <xsl:apply-templates/>
- </xsl:variable>
- <!--<xsl:copy-of select="$procesy5_config.folders.server"></xsl:copy-of>-->
- <xsl:apply-templates select="$procesy5_config.folders.server" mode="from_tokenize"/>
- </xsl:template>
-
- <xsl:template match="*"/>
-
- <xsl:template match="text()">
- <xsl:for-each select="tokenize(.,'\[')">
- <lev1><xsl:attribute name="pos" select="position()"/>
- <xsl:for-each select="tokenize(.,'\]')">
- <lev2><xsl:attribute name="pos" select="position()"/>
- <xsl:for-each select="tokenize(.,'\n')">
- <levbr><xsl:attribute name="pos" select="position()"/>
- <xsl:for-each select=" tokenize(.,'=')">
- <lev3><xsl:attribute name="pos" select="position()"/>
- <xsl:value-of select="."/>
- </lev3>
- </xsl:for-each>
- </levbr>
- </xsl:for-each>
- </lev2>
- </xsl:for-each>
- </lev1>
- </xsl:for-each>
- </xsl:template>
-
-
- <xsl:template mode="from_tokenize" match="lev1[@pos='1']"/>
- <xsl:template mode="from_tokenize" match="lev1">
- <xsl:element name="{lev2[@pos='1']/levbr[@pos='1']/lev3[@pos='1']/text()}">
- <xsl:for-each select="lev2[ number(@pos) > 1]">
- <xsl:for-each select="levbr[number(@pos) >1]">
- <xsl:for-each select="lev3">
- <xsl:if test="@pos div 2 mod 1 and not(contains(.,';'))">
- <xsl:element name="{text()}">
- <xsl:value-of select=" replace( normalize-space(../lev3[@pos= number(current()/@pos)+1]),'[";]','')"/>
- </xsl:element>
- </xsl:if>
- </xsl:for-each>
- </xsl:for-each>
- </xsl:for-each>
- </xsl:element>
-
- </xsl:template>
-
-
-
-
-
- </xsl:stylesheet>
|