|
|
@@ -1,129 +1,144 @@
|
|
|
-<?xml version="1.0" encoding="UTF-8"?>
|
|
|
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
- xmlns:default_db__x3A__IN7_DZIENNIK_KORESP="https://biuro.biall-net.pl/wfs/default_db/table/IN7_DZIENNIK_KORESP.xsd"
|
|
|
- xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
|
|
|
- xmlns:exsl="http://exslt.org/common"
|
|
|
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
|
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
- exclude-result-prefixes="xs"
|
|
|
- version="2.0">
|
|
|
-
|
|
|
- <xsl:output indent="yes" />
|
|
|
- <xsl:strip-space elements="*"/>
|
|
|
-
|
|
|
- <!--<xsl:param name="dita_task_template_file" required="yes"/>-->
|
|
|
-
|
|
|
- <!--<xsl:variable name="dita_task_template_file">
|
|
|
- <test>
|
|
|
- <var>test</var>
|
|
|
- </test>
|
|
|
- </xsl:variable>-->
|
|
|
-
|
|
|
- <!--<xsl:variable name="main_template" select="doc('IN7_DZIENNIK_KORESP.dita/main.dita')"/>-->
|
|
|
-
|
|
|
- <xsl:template match="root">
|
|
|
- <xsl:variable name="dita_task_template_file" select="topic"/>
|
|
|
- <xsl:apply-templates>
|
|
|
- <xsl:with-param name="dita_task_template_file" select="$dita_task_template_file"/>
|
|
|
- </xsl:apply-templates>
|
|
|
- </xsl:template>
|
|
|
-
|
|
|
-
|
|
|
- <!-- todo add prefix default_db__x3A__IN7_DZIENNIK_KORESP: -->
|
|
|
- <xsl:template match="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP" >
|
|
|
- <xsl:param name="dita_task_template_file"/>
|
|
|
-
|
|
|
- <xsl:variable name="input_obj_with_xpath">
|
|
|
- <xsl:apply-templates mode="system_cache__appinfo:add_xpath_path_to_elements" select=".">
|
|
|
- <xsl:with-param name="system_cache__appinfo:curr_xpath" select="name()"/>
|
|
|
- </xsl:apply-templates>
|
|
|
- </xsl:variable>
|
|
|
- <xsl:variable name="template_with_fit_vars">
|
|
|
- <xsl:apply-templates mode="Procesy5_dita_assingn_values_x_path" select="$dita_task_template_file"> <!-- exslt:node-set($-->
|
|
|
- <xsl:with-param name="parent_obj" select="$input_obj_with_xpath"/>
|
|
|
- </xsl:apply-templates>
|
|
|
- <!--<xsl:copy-of select="$dita_task_template_file"/>-->
|
|
|
- </xsl:variable>
|
|
|
- <!--<out>
|
|
|
- TODO przerobic input - dodac @path,
|
|
|
- przejechac template i podstawic zmienne
|
|
|
- wyzwolic XSL-FO dla template
|
|
|
- Wyrzucic na output tak aby to obsluzylo cos co kuma WSDL
|
|
|
- <template_with_fit_vars>
|
|
|
- <xsl:copy-of select="$template_with_fit_vars"/>
|
|
|
- </template_with_fit_vars>
|
|
|
- <!-\-<template_with_fit_vars_xpath_check>
|
|
|
- <xsl:copy-of select="$template_with_fit_vars//var"/>
|
|
|
- </template_with_fit_vars_xpath_check>-\->
|
|
|
-
|
|
|
- <input_obj_with_xpath>
|
|
|
- <xsl:copy-of select="$input_obj_with_xpath"/>
|
|
|
- </input_obj_with_xpath>
|
|
|
- </out>-->
|
|
|
- <!--<xsl:result-document href="TO_PRINT_with_flat_values.dita">
|
|
|
- <xsl:copy-of select="$template_with_fit_vars"/>
|
|
|
- </xsl:result-document>-->
|
|
|
- <xsl:copy-of select="$template_with_fit_vars"/>
|
|
|
- </xsl:template>
|
|
|
-
|
|
|
- <xsl:template match="*">
|
|
|
- <!--Nie przeszlo!
|
|
|
- <xsl:value-of select="name()" />-->
|
|
|
- </xsl:template>
|
|
|
-
|
|
|
- <xsl:template mode="system_cache__appinfo:add_xpath_path_to_elements" match="*">
|
|
|
- <xsl:param name="system_cache__appinfo:curr_xpath"/>
|
|
|
- <xsl:variable name="system_cache__appinfo:curr_xpath_tmpl">
|
|
|
- <xsl:choose>
|
|
|
- <xsl:when test="$system_cache__appinfo:curr_xpath=''">
|
|
|
- <xsl:value-of select="name()"/>
|
|
|
- </xsl:when>
|
|
|
- <xsl:otherwise>
|
|
|
- <xsl:value-of select="concat($system_cache__appinfo:curr_xpath,'/',name())"/>
|
|
|
- </xsl:otherwise>
|
|
|
- </xsl:choose>
|
|
|
- </xsl:variable>
|
|
|
- <!--<xsl:variable name="curr_xpath_tmpl" select="'asdf'"/>-->
|
|
|
- <xsl:element name="{name()}">
|
|
|
- <xsl:attribute name="xpath"><xsl:value-of select="$system_cache__appinfo:curr_xpath_tmpl"/></xsl:attribute>
|
|
|
- <xsl:for-each select="@*">
|
|
|
- <xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute>
|
|
|
- </xsl:for-each>
|
|
|
- <xsl:value-of select="text()"/>
|
|
|
- <xsl:apply-templates mode="system_cache__appinfo:add_xpath_path_to_elements">
|
|
|
- <xsl:with-param name="system_cache__appinfo:curr_xpath" select="$system_cache__appinfo:curr_xpath_tmpl"/>
|
|
|
- </xsl:apply-templates>
|
|
|
- </xsl:element>
|
|
|
- </xsl:template>
|
|
|
-
|
|
|
- <xsl:template mode="Procesy5_dita_assingn_values_x_path" match="*"><!-- testowe do przeniesienia do glow.repo - do podstawienia wartosci z elementow w druku DITA -->
|
|
|
- <xsl:param name="parent_obj" /><!-- glowny obiekt z ktorego beda brane wartosci do podstawiania -->
|
|
|
- <xsl:for-each select=".">
|
|
|
- <xsl:element name="{name()}">
|
|
|
- <xsl:copy-of select="namespace::node()"/>
|
|
|
- <xsl:value-of select="text()"/>
|
|
|
- <xsl:for-each select="@*">
|
|
|
- <xsl:choose>
|
|
|
- <xsl:when test="name()='xpath'">
|
|
|
- <xsl:variable name="xpath" select="."/>
|
|
|
- <!--<xsl:attribute name="xpath_parsed" select="."/>-->
|
|
|
- <!--1:<xsl:value-of select="$parent_obj//node()[@system_cache__appinfo:xpath=$xpath]/text()"/>-->
|
|
|
- <!--<xsl:value-of select="$parent_obj//node()[local-name()=$xpath]/text()"/>-->
|
|
|
- <!--V:<xsl:value-of select="$xpath"/>-->
|
|
|
- <xsl:copy-of select="$parent_obj//node()[name()=$xpath]/text()"/>
|
|
|
- </xsl:when>
|
|
|
- <xsl:otherwise><xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute></xsl:otherwise>
|
|
|
- </xsl:choose>
|
|
|
- </xsl:for-each>
|
|
|
-
|
|
|
- <xsl:apply-templates mode="Procesy5_dita_assingn_values_x_path">
|
|
|
- <xsl:with-param name="parent_obj" select="$parent_obj"/>
|
|
|
- </xsl:apply-templates>
|
|
|
- </xsl:element>
|
|
|
- </xsl:for-each>
|
|
|
- </xsl:template>
|
|
|
-
|
|
|
- <xsl:template match="text()" mode="Procesy5_dita_assingn_values_x_path"/>
|
|
|
- <xsl:template match="text()" mode="system_cache__appinfo:add_xpath_path_to_elements"/>
|
|
|
-
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
+ xmlns:default_db__x3A__IN7_DZIENNIK_KORESP="https://biuro.biall-net.pl/wfs/default_db/table/IN7_DZIENNIK_KORESP.xsd"
|
|
|
+ xmlns:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
|
|
|
+ xmlns:exsl="http://exslt.org/common"
|
|
|
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
|
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
+ exclude-result-prefixes="xs"
|
|
|
+ version="2.0">
|
|
|
+
|
|
|
+ <xsl:output indent="yes" />
|
|
|
+ <xsl:strip-space elements="*"/>
|
|
|
+
|
|
|
+ <xsl:include href="../../WPS_Functions/DownloadProcesToDita/PROCES_INCLUDE.xsl"/>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:param name="dita_task_template_file_param" select="'main.dita'"/>
|
|
|
+ <xsl:variable name="dita_task_template_file" select="doc($dita_task_template_file_param)"/>
|
|
|
+
|
|
|
+ <!--<xsl:variable name="dita_task_template_file">
|
|
|
+ <test>
|
|
|
+ <var>test</var>
|
|
|
+ </test>
|
|
|
+ </xsl:variable>-->
|
|
|
+
|
|
|
+ <!--<xsl:variable name="main_template" select="doc('IN7_DZIENNIK_KORESP.dita/main.dita')"/>-->
|
|
|
+
|
|
|
+ <!--<xsl:template match="root">
|
|
|
+ <xsl:variable name="dita_task_template_file" select="topic"/>
|
|
|
+ <xsl:apply-templates>
|
|
|
+ <xsl:with-param name="dita_task_template_file" select="$dita_task_template_file.xml"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:template>-->
|
|
|
+
|
|
|
+
|
|
|
+ <!-- todo add prefix default_db__x3A__IN7_DZIENNIK_KORESP: -->
|
|
|
+ <xsl:template match="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP" >
|
|
|
+ <!--<xsl:param name="dita_task_template_file"/>-->
|
|
|
+
|
|
|
+ <xsl:variable name="input_obj_with_xpath">
|
|
|
+ <xsl:apply-templates mode="system_cache__appinfo:add_xpath_path_to_elements" select=".">
|
|
|
+ <xsl:with-param name="system_cache__appinfo:curr_xpath" select="name()"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:variable>
|
|
|
+ <xsl:variable name="template_with_fit_vars">
|
|
|
+ <xsl:apply-templates mode="Procesy5_dita_assingn_values_x_path" select="$dita_task_template_file"> <!-- exslt:node-set($-->
|
|
|
+ <xsl:with-param name="parent_obj" select="$input_obj_with_xpath"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ <!--<xsl:copy-of select="$dita_task_template_file"/>-->
|
|
|
+ </xsl:variable>
|
|
|
+ <!--<out>
|
|
|
+ TODO przerobic input - dodac @path,
|
|
|
+ przejechac template i podstawic zmienne
|
|
|
+ wyzwolic XSL-FO dla template
|
|
|
+ Wyrzucic na output tak aby to obsluzylo cos co kuma WSDL
|
|
|
+ <template_with_fit_vars>
|
|
|
+ <xsl:copy-of select="$template_with_fit_vars"/>
|
|
|
+ </template_with_fit_vars>
|
|
|
+ <!-\-<template_with_fit_vars_xpath_check>
|
|
|
+ <xsl:copy-of select="$template_with_fit_vars//var"/>
|
|
|
+ </template_with_fit_vars_xpath_check>-\->
|
|
|
+
|
|
|
+ <input_obj_with_xpath>
|
|
|
+ <xsl:copy-of select="$input_obj_with_xpath"/>
|
|
|
+ </input_obj_with_xpath>
|
|
|
+ </out>-->
|
|
|
+ <!--<xsl:result-document href="TO_PRINT_with_flat_values.dita">
|
|
|
+ <xsl:copy-of select="$template_with_fit_vars"/>
|
|
|
+ </xsl:result-document>-->
|
|
|
+ <xsl:copy-of select="$template_with_fit_vars"/>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template match="*">
|
|
|
+ <!--Nie przeszlo!
|
|
|
+ <xsl:value-of select="name()" />-->
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template mode="system_cache__appinfo:add_xpath_path_to_elements" match="*">
|
|
|
+ <xsl:param name="system_cache__appinfo:curr_xpath"/>
|
|
|
+ <xsl:variable name="system_cache__appinfo:curr_xpath_tmpl">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="$system_cache__appinfo:curr_xpath=''">
|
|
|
+ <xsl:value-of select="name()"/>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:value-of select="concat($system_cache__appinfo:curr_xpath,'/',name())"/>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:variable>
|
|
|
+ <!--<xsl:variable name="curr_xpath_tmpl" select="'asdf'"/>-->
|
|
|
+ <xsl:element name="{name()}">
|
|
|
+ <xsl:attribute name="xpath"><xsl:value-of select="$system_cache__appinfo:curr_xpath_tmpl"/></xsl:attribute>
|
|
|
+ <xsl:for-each select="@*">
|
|
|
+ <xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute>
|
|
|
+ </xsl:for-each>
|
|
|
+ <xsl:value-of select="text()"/>
|
|
|
+ <xsl:apply-templates mode="system_cache__appinfo:add_xpath_path_to_elements">
|
|
|
+ <xsl:with-param name="system_cache__appinfo:curr_xpath" select="$system_cache__appinfo:curr_xpath_tmpl"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:element>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template mode="Procesy5_dita_assingn_values_x_path" match="*"><!-- testowe do przeniesienia do glow.repo - do podstawienia wartosci z elementow w druku DITA -->
|
|
|
+ <xsl:param name="parent_obj" /><!-- glowny obiekt z ktorego beda brane wartosci do podstawiania -->
|
|
|
+ <xsl:for-each select=".">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="name()='data-about'">
|
|
|
+ <xsl:for-each select="data/apiname[@base='PROCES_INCLUDE']">
|
|
|
+ <xsl:apply-templates mode="PROCES_INCLUDE">
|
|
|
+ <xsl:with-param name="ID_PROCES" select="text()"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:for-each>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise>
|
|
|
+ <xsl:element name="{name()}">
|
|
|
+ <xsl:copy-of select="namespace::node()"/>
|
|
|
+ <xsl:for-each select="@*">
|
|
|
+ <xsl:choose>
|
|
|
+ <xsl:when test="name()='xpath'">
|
|
|
+ <xsl:variable name="xpath" select="."/>
|
|
|
+ <!--<xsl:attribute name="xpath_parsed" select="."/>-->
|
|
|
+ <!--1:<xsl:value-of select="$parent_obj//node()[@system_cache__appinfo:xpath=$xpath]/text()"/>-->
|
|
|
+ <!--<xsl:value-of select="$parent_obj//node()[local-name()=$xpath]/text()"/>-->
|
|
|
+ <!--V:<xsl:value-of select="$xpath"/>-->
|
|
|
+ <xsl:copy-of select="$parent_obj//node()[name()=$xpath]/text()"/>
|
|
|
+ </xsl:when>
|
|
|
+ <xsl:otherwise><xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute></xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:for-each>
|
|
|
+ <xsl:value-of select="text()"/>
|
|
|
+ <xsl:apply-templates mode="Procesy5_dita_assingn_values_x_path">
|
|
|
+ <xsl:with-param name="parent_obj" select="$parent_obj"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:element>
|
|
|
+ </xsl:otherwise>
|
|
|
+ </xsl:choose>
|
|
|
+ </xsl:for-each>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template match="text()" mode="Procesy5_dita_assingn_values_x_path"/>
|
|
|
+ <xsl:template match="text()" mode="system_cache__appinfo:add_xpath_path_to_elements"/>
|
|
|
+
|
|
|
</xsl:stylesheet>
|