|
|
@@ -1,162 +0,0 @@
|
|
|
-<?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:xlink="http://www.w3.org/1999/xlink"
|
|
|
- xmlns:p5_default_db="https://biuro.biall-net.pl/wfs/default_db"
|
|
|
- xmlns:wfs="http://www.opengis.net/wfs"
|
|
|
- exclude-result-prefixes="xs"
|
|
|
- version="2.0">
|
|
|
-
|
|
|
-
|
|
|
- <xsl:output indent="yes" />
|
|
|
- <xsl:strip-space elements="*"/>
|
|
|
-
|
|
|
- <xsl:param name="uuid" required="yes"/>
|
|
|
- <xsl:param name="basedir" required="yes"/>
|
|
|
- <xsl:param name="temp" required="yes"/>
|
|
|
-
|
|
|
- <!-- template do zlaczenia wszystkich xmli z danymi z dita
|
|
|
- description="z plikow temp/$uuid.* buduje $out_task.dita " -->
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <xsl:template name="get_childs_rows">
|
|
|
- <xsl:param name="element-filename" required="yes"/> <!-- prezes1.root_x2f_.d1e1.CRM_PROCES_x2f_.d1e46.CRM_WSKAZNIK_x2f_.d1e51.CRM_LISTA_ZASOBOW.1. -->
|
|
|
- <xsl:param name="path2collection" select="concat($temp,'/')"/> <!-- $basedir,'/' -->
|
|
|
- <xsl:variable name="path">
|
|
|
- <xsl:value-of select="concat($path2collection,'?select=',$element-filename,'*.dita.xml.vals.dita')"/> <!-- $element-filename,'-->
|
|
|
- </xsl:variable>
|
|
|
- <xsl:message>#30 otwieram kolekcje $path=<xsl:value-of select="$path"/>; </xsl:message>
|
|
|
-
|
|
|
- <!--<xsl:variable name="docs" select="collection($path)"/>-->
|
|
|
- <!--<xsl:variable name="docs" select="collection($path)"/>-->
|
|
|
- <!--<xsl:for-each select="$docs">
|
|
|
- <xsl:message>#35 test - cos jest <xsl:value-of select="name()"/></xsl:message>
|
|
|
- <xsl:copy-of select="."/>
|
|
|
- </xsl:for-each>-->
|
|
|
- <xsl:copy-of select="collection($path)"/>
|
|
|
-
|
|
|
- </xsl:template>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <xsl:template match="*" mode="root">
|
|
|
- <xsl:param name="loop_xpath"/>
|
|
|
- <xsl:element name="{name()}">
|
|
|
- <xsl:copy-of select="@*"/>
|
|
|
- <xsl:apply-templates>
|
|
|
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
- </xsl:apply-templates>
|
|
|
- </xsl:element>
|
|
|
- </xsl:template>
|
|
|
-
|
|
|
-
|
|
|
- <xsl:template match="RelatedFeature">
|
|
|
- <!-- podstawamy dane z xml na podstawie path -->
|
|
|
- <xsl:param name="loop_xpath" select="'root'"/>
|
|
|
- <xsl:param name="feature_pos_child" select="1"/> <!-- pierwsze wyzwolenie narzuca 1 - kolejne sa z related -->
|
|
|
- <xsl:variable name="xml_id" select="@xml_id"/>
|
|
|
- <xsl:variable name="RelatedFeaturePos" select="position()"/>
|
|
|
- <xsl:variable name="featureID_name" select="substring-after(@typeName,':')"/>
|
|
|
-
|
|
|
- <xsl:variable name="loop_xpath" select="concat($loop_xpath,'_x2f_.',$xml_id,'.',$featureID_name)"/>
|
|
|
-
|
|
|
- <xsl:message>#26 odpalam $feature_pos_child=<xsl:value-of select="$feature_pos_child"/>; loop_xpath=<xsl:value-of select="$loop_xpath"/>.dita.xml.vals.dita;</xsl:message>
|
|
|
- <!--<debug26>
|
|
|
- Will try to put file=<xsl:value-of select="concat($uuid,'.',$loop_xpath,$featureID_name,'.',$RelatedFeaturePos,'.dita.xml.vals.dita')"/>;
|
|
|
- </debug26>-->
|
|
|
- <!--<xsl:variable name="dita_fragment" select="doc(concat($basedir,'/temp/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.dita.xml.vals.dita'))"/>-->
|
|
|
-
|
|
|
- <xsl:variable name="dita_fragment">
|
|
|
- <xsl:choose>
|
|
|
- <xsl:when test=" doc-available(concat($basedir,'/',$temp,'/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.',$feature_pos_child,'.dita.xml.vals.dita'))">
|
|
|
- <xsl:copy-of select="doc(concat($basedir,'/',$temp,'/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.',$feature_pos_child,'.dita.xml.vals.dita'))"/>
|
|
|
- </xsl:when>
|
|
|
- <xsl:otherwise>
|
|
|
- <xsl:comment>#78 INFO no Related leaf xml file <xsl:value-of select="concat($basedir,'/temp/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.',$feature_pos_child,'.dita.xml.vals.dita')"/>;</xsl:comment>
|
|
|
- <xsl:message>#78 INFO no Related leaf xml file <xsl:value-of select="concat($basedir,'/temp/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.',$feature_pos_child,'.dita.xml.vals.dita')"/></xsl:message>
|
|
|
- </xsl:otherwise>
|
|
|
- </xsl:choose>
|
|
|
- </xsl:variable>
|
|
|
- <!--<xsl:variable name="dita_fragment" select="doc(concat($basedir,'/temp/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.',$feature_pos_child,'.dita.xml.vals.dita'))"/>-->
|
|
|
- <!--<xsl:variable name="dita_fragment">
|
|
|
- <xsl:call-template name="get_childs_rows">
|
|
|
- <xsl:with-param name="element-filename" select="concat($uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.')"/>
|
|
|
- </xsl:call-template>
|
|
|
- </xsl:variable>-->
|
|
|
-
|
|
|
- <!--<debug_RelatedFeature>
|
|
|
- <xsl:copy-of select="$dita_fragment"/>
|
|
|
- </debug_RelatedFeature>-->
|
|
|
-
|
|
|
- <xsl:for-each select="$dita_fragment">
|
|
|
- <xsl:apply-templates mode="RelatedFeature" select="$dita_fragment/RelatedFeatureRoot/*">
|
|
|
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
- </xsl:apply-templates>
|
|
|
- </xsl:for-each>
|
|
|
- </xsl:template>
|
|
|
-
|
|
|
- <xsl:template mode="RelatedFeature" match="*">
|
|
|
- <xsl:param name="loop_xpath" required="yes"/>
|
|
|
- <!--<xsl:element name="{name()}">-->
|
|
|
- <!--<xsl:copy-of select="@*"/>-->
|
|
|
- <!--<xsl:apply-templates select="@*"/>-->
|
|
|
- <xsl:message>#94 ustalam $feature_pos_child=<xsl:value-of select="position()"/>; dla <xsl:value-of select="name()"/></xsl:message>
|
|
|
- <xsl:apply-templates mode="RelatedFeatureChild" select=".">
|
|
|
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
- <xsl:with-param name="feature_pos_child" select="position()"/>
|
|
|
- </xsl:apply-templates>
|
|
|
- <!--</xsl:element>-->
|
|
|
- </xsl:template>
|
|
|
-
|
|
|
- <xsl:template mode="RelatedFeatureChild" match="*">
|
|
|
- <xsl:param name="loop_xpath" required="yes"/>
|
|
|
- <xsl:param name="feature_pos_child" required="yes"/>
|
|
|
- <xsl:element name="{name()}">
|
|
|
- <!--<xsl:copy-of select="@*"/>-->
|
|
|
- <xsl:apply-templates select="@*"/>
|
|
|
- <xsl:apply-templates mode="RelatedFeatureChild">
|
|
|
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
- <xsl:with-param name="feature_pos_child" select="$feature_pos_child"/>
|
|
|
- </xsl:apply-templates>
|
|
|
- </xsl:element>
|
|
|
- </xsl:template>
|
|
|
-
|
|
|
- <xsl:template mode="RelatedFeatureChild" match="RelatedFeature">
|
|
|
- <xsl:param name="loop_xpath" required="yes"/>
|
|
|
- <xsl:param name="feature_pos_child" required="yes"/>
|
|
|
- <xsl:apply-templates select=".">
|
|
|
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
- <xsl:with-param name="feature_pos_child" select="$feature_pos_child"/>
|
|
|
- </xsl:apply-templates>
|
|
|
- </xsl:template>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <xsl:template match="*" >
|
|
|
- <xsl:param name="loop_xpath"/>
|
|
|
- <xsl:param name="feature_pos_child" required="yes"/>
|
|
|
- <xsl:element name="{name()}">
|
|
|
- <xsl:copy-of select="@*"/>
|
|
|
- <xsl:apply-templates>
|
|
|
- <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
- <xsl:with-param name="feature_pos_child" select="$feature_pos_child"/>
|
|
|
- </xsl:apply-templates>
|
|
|
- </xsl:element>
|
|
|
- </xsl:template>
|
|
|
-
|
|
|
-
|
|
|
- <xsl:template match="@*">
|
|
|
- <xsl:copy-of select="."/>
|
|
|
- </xsl:template>
|
|
|
- <xsl:template match="@xml_id"/>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-</xsl:stylesheet>
|