|
|
@@ -0,0 +1,68 @@
|
|
|
+<?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"/>
|
|
|
+
|
|
|
+ <!-- template do zlaczenia wszystkich xmli z danymi z dita
|
|
|
+ description="z plikow temp/$uuid.* buduje $out_task.dita " -->
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:template match="RelatedFeature">
|
|
|
+ <!-- podstawamy dane z xml na podstawie path -->
|
|
|
+ <xsl:param name="loop_xpath" select="'root'"/>
|
|
|
+ <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_',$featureID_name)"/>
|
|
|
+ <xsl:message>#26 odpalam loop_xpath=<xsl:value-of select="$loop_xpath"/>;</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('temp/',$uuid,'.',$loop_xpath,'.',$RelatedFeaturePos,'.dita.xml.vals.dita'))"/>
|
|
|
+
|
|
|
+ <xsl:apply-templates mode="RelatedFeature" select="$dita_fragment/RelatedFeatureRoot/*">
|
|
|
+ <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+ <xsl:template mode="RelatedFeature" match="RelatedFeature">
|
|
|
+ <xsl:param name="loop_xpath" required="yes"/>
|
|
|
+ <xsl:apply-templates select=".">
|
|
|
+ <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </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 mode="RelatedFeature">
|
|
|
+ <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
|
|
|
+ </xsl:apply-templates>
|
|
|
+ </xsl:element>
|
|
|
+ </xsl:template>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <xsl:template match="*">
|
|
|
+ <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:stylesheet>
|