| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?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:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
- exclude-result-prefixes="xs system_cache__appinfo"
- version="2.0">
-
- <xsl:param name="DEFAULTS__SERVER_ADDRESS" select="'biuro.biall-net.pl/SE/version-git/'"/><!-- parametr do wyrzucenia w defaults - do umozliwienia szybkiego wchodzenia do systemu powiazania szkolenia -->
-
-
- <xsl:param name="CRM_PROCES.xml" required="yes"/>
- <!--<xsl:import href="../../default_db.instance.xml/"/>-->
- <xsl:include href="escaped_html_to_xml.xsl"/>
-
-
-
- <xsl:template match="text()" mode="PROCES_INCLUDE">
- <xsl:param name="ID_PROCES" required="yes"/><!-- to be set to retrieve process tree -->
- parsed PROCES:<xsl:value-of select="$ID_PROCES"/>; proces to include is <xsl:value-of select="."/>;
-
- <xsl:apply-templates mode="PROCES_TO_DITA" select="$CRM_PROCES.xml/data/items/item[ID=$ID_PROCES]"/>
- <xsl:apply-templates mode="CRM_PROCES_STEP" select="$CRM_PROCES.xml/data/items/item[PARENT_ID=$ID_PROCES]">
- <xsl:sort select="SORT_PRIO"/>
- </xsl:apply-templates>
-
- </xsl:template>
-
- <xsl:template mode="CRM_PROCES_STEP" match="node()">
- <!-- CRM_PROCES_STEP dla ID <xsl:value-of select="ID"/> ;-->
- <xsl:variable name="ID" select="ID"/>
- <ul>
- <xsl:for-each select=".">
- <xsl:sort select="SORT_PRIO"/>
-
- <li>
- <xsl:apply-templates mode="PROCES_TO_DITA">
- <xsl:with-param name="ID" select="$ID"/>
- </xsl:apply-templates>
-
- <!-- Try to goto item/PARENT_ID=<xsl:value-of select="current()/ID"/>-->
- <xsl:apply-templates mode="CRM_PROCES_STEP" select="$CRM_PROCES.xml/data/items/item[PARENT_ID=$ID and A_STATUS!='DELETED']"/>
- </li>
-
- </xsl:for-each>
- </ul>
-
- </xsl:template>
-
- <xsl:template mode="PROCES_TO_DITA" match="ID">
- <xref href="https://{$DEFAULTS__SERVER_ADDRESS}/procesy5.php?task=CRM_PROCES&filtr_id={current()}&filtr_ids=%2B&filtr_ob=%2B&filtr_img=%2B" format="html" scope="external"><xsl:value-of select="."/></xref>
- </xsl:template>
- <xsl:template mode="PROCES_TO_DITA" match="DESC">
- <xsl:param name="ID"/>
- <term><!--ID: <xsl:apply-templates mode="PROCES_TO_DITA_STRIP_HTML" select="../ID/text()"/><xsl:value-of select="' '"/>--> <xsl:apply-templates mode="PROCES_TO_DITA_STRIP_HTML"/></term>
- </xsl:template>
- <xsl:template mode="PROCES_TO_DITA" match="OPIS">
- OPIS: <xsl:apply-templates mode="PROCES_TO_DITA_STRIP_HTML"/>
- </xsl:template>
-
- <xsl:template mode="PROCES_TO_DITA" match="*"/>
-
-
-
- <xsl:template match="*" mode="PROCES_TO_DITA_STRIP_HTML"/>
- <xsl:template match="text()" mode="PROCES_TO_DITA_STRIP_HTML">
- <xsl:param name="limit"/>
- <xsl:variable name="parse_content">
- <xsl:choose>
- <xsl:when test=".='
'"/>
- <xsl:otherwise><xsl:call-template name="system_cache__appinfo:escaped_html_to_xml" exclude-result-prefixes="#all" extension-element-prefixes="">
- <xsl:with-param name="html" select="."/>
- </xsl:call-template></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:apply-templates select="$parse_content" mode="CONVERT_HTML_TO_DITA_CONTENT"/>
- </xsl:template>
-
- <xsl:template match="text()" mode="PROCES_TO_DITA_STRIP_HTML_TITLE">
- <xsl:param name="limit"/>
- <xsl:variable name="parse_title">
- <xsl:choose>
- <xsl:when test=".='
'"/>
- <xsl:otherwise><xsl:call-template name="system_cache__appinfo:escaped_html_to_xml" exclude-result-prefixes="#all" extension-element-prefixes="">
- <xsl:with-param name="html" select="."/>
- </xsl:call-template></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:copy-of select="$parse_title"/>
- </xsl:template>
-
-
- <xsl:template match="text()" mode="CONVERT_HTML_TO_DITA_CONTENT">
- <p><xsl:copy-of select="."/></p>
- </xsl:template>
-
- <xsl:template match="br" mode="CONVERT_HTML_TO_DITA_CONTENT">
- <xsl:param name="ph_used"/>
- <xsl:choose>
- <xsl:when test="$ph_used">
- <p/>
- <xsl:apply-templates mode="CONVERT_HTML_TO_DITA_CONTENT"/>
- </xsl:when>
- <xsl:otherwise>
- <p/><xsl:apply-templates mode="CONVERT_HTML_TO_DITA_CONTENT">
- <xsl:with-param name="ph_used" select="true()"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
-
-
- </xsl:stylesheet>
|