Sfoglia il codice sorgente

Poprawka merge dla przypadku related.dita

a.binder 9 anni fa
parent
commit
7a07d07806

+ 2 - 2
SE/schema/default_db_xml_cache.public/build_recurse_ant.xsl

@@ -1832,8 +1832,8 @@
         <!-- first assign xpath to features from  -->
         <!-- first assign xpath to features from  -->
             <xsl:variable name="wfs_output_nodes" select="doc($wfs_output)"/>
             <xsl:variable name="wfs_output_nodes" select="doc($wfs_output)"/>
         <xsl:variable name="current_RelatedFeature" select="*"/>
         <xsl:variable name="current_RelatedFeature" select="*"/>
-       <xsl:variable name="xml_id" select="@xml_id"/>
-       <xsl:variable name="feature_pos_parent" select="@feature_pos"/>
+        <xsl:variable name="xml_id" select="@xml_id"/>
+        <xsl:variable name="feature_pos_parent" select="@feature_pos"/>
         <!--<input_obj_with_xpath_debug>
         <!--<input_obj_with_xpath_debug>
             <xsl:copy-of select="$wfs_output_nodes"/>
             <xsl:copy-of select="$wfs_output_nodes"/>
         </input_obj_with_xpath_debug>-->
         </input_obj_with_xpath_debug>-->

+ 11 - 4
SE/schema/default_db_xml_cache.public/build_recurse_ant_merge_dita_from_temp.xsl

@@ -541,13 +541,20 @@
         <!--<xsl:element name="{name()}">-->
         <!--<xsl:element name="{name()}">-->
             <!--<xsl:copy-of select="@*"/>-->
             <!--<xsl:copy-of select="@*"/>-->
             <!--<xsl:apply-templates 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:comment>#94 ustalam @xml_id:<xsl:value-of select="@xml_id"/>; $feature_pos_child=<xsl:value-of select="position()"/>; dla <xsl:value-of select="name()"/>; ../name() <xsl:value-of select="../name()"/>
-                count RelatedFeature prev:<xsl:value-of select="count(parent::node()[name='RelatedFeature' ])"/> <!--  and position()&lt; current()/position() -->
+            <xsl:variable name="position" select="position()"/>
+            <xsl:variable name="position_related" >
+                <xsl:choose>
+                    <xsl:when test="@feature_pos_parent"><xsl:value-of select="@feature_pos_parent"/></xsl:when>
+                    <xsl:otherwise><xsl:value-of select="position()"/></xsl:otherwise>
+                </xsl:choose>
+            </xsl:variable>
+            <xsl:message>#94 ustalam @feature_pos_parent:<xsl:value-of select="@feature_pos_parent"/>; @feature_pos:<xsl:value-of select="@feature_pos"/>; $position_related=<xsl:value-of select="$position_related"/>; $feature_pos_child(position())=<xsl:value-of select="position()"/>; dla <xsl:value-of select="../name()"/>/<xsl:value-of select="name()"/></xsl:message>
+            <xsl:comment>#94 ustalam @feature_pos_parent:<xsl:value-of select="@feature_pos_parent"/>; @feature_pos:<xsl:value-of select="@feature_pos"/>; @xml_id:<xsl:value-of select="@xml_id"/>; name():<xsl:value-of select="name()"/>; $feature_pos_child(position())=<xsl:value-of select="position()"/>; dla <xsl:value-of select="../name()"/>/<xsl:value-of select="name()"/>; $position_related = <xsl:value-of select="$position_related"/>; count RelatedFeature prev:<xsl:value-of select="count(parent::node()[name()='RelatedFeature' and position() &lt;= $position ])"/> <!--  and position()&lt; current()/position() -->
             </xsl:comment>
             </xsl:comment>
+            <!--<xsl:if test="not($position_related = position() )"><xsl:message terminate="no">#555 Not correct <xsl:value-of select="../name()"/>/<xsl:value-of select="name()"/>; </xsl:message></xsl:if>-->
             <xsl:apply-templates mode="RelatedFeatureChild" select=".">
             <xsl:apply-templates mode="RelatedFeatureChild" select=".">
                 <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
                 <xsl:with-param name="loop_xpath" select="$loop_xpath"/>
-                <xsl:with-param name="feature_pos_child" select="position()"/>
+                <xsl:with-param name="feature_pos_child" select="$position_related"/> <!-- przed 2017-05-24 bylo position() -->
                 <!--<xsl:with-param name="dita_with_id" select="$dita_with_id"/>-->
                 <!--<xsl:with-param name="dita_with_id" select="$dita_with_id"/>-->
                 <xsl:with-param name="dita.map" select="$dita.map"/>
                 <xsl:with-param name="dita.map" select="$dita.map"/>
                 <xsl:with-param name="path" select="$path"/>
                 <xsl:with-param name="path" select="$path"/>