a.binder před 5 roky
rodič
revize
9f3db26337

+ 101 - 27
SE/schema/default_db_xml_cache.public/default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_IPN21.xsl

@@ -172,41 +172,115 @@
         
     <xsl:template mode="system_cache__dita:IPN21_powiazania_row" match="personalInfo">
         
-        <simpletable frame="all"  id="simpletable_fcy_cjx_24b">
-            <xsl:attribute name="relcolwidth">
-                <xsl:for-each select="item[value and not(@name = 'Dodatkowe informacje')]">
-                    <xsl:text>1*</xsl:text>
-                    <xsl:if test="position()&lt;last()"><xsl:text> </xsl:text></xsl:if>
-                </xsl:for-each>
-            </xsl:attribute>
-            <sthead>
+        <table frame="all" id="table_wvz_gmx_root">
+            <xsl:variable name="cols" select="count(item[value and not(@name = 'Dodatkowe informacje')])"/>
+            
+            <tgroup cols="{$cols}">
+                
                 <xsl:for-each select="item[value and not(@name = 'Dodatkowe informacje')]">
-                    <stentry>
-                        <xsl:value-of select="text()"/>
-                    </stentry>
-                </xsl:for-each>       
-            </sthead>
-            <strow>
-                <xsl:for-each select="item[value and not(@name = 'Dodatkowe informacje')]/value[1]">
-                    <stentry>
-                        <xsl:value-of select="text()"/>
-                    </stentry>
+                    <colspec colname="c{position()}" colnum="{position()}" colwidth="1*"/>
                 </xsl:for-each>
-            </strow>
+                
+                <thead>
+                    <row>
+                        <xsl:for-each select="item[value and not(@name = 'Dodatkowe informacje')]">
+                            <entry>
+                                <xsl:value-of select="@name"/>
+                            </entry>
+                        </xsl:for-each>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                    <xsl:for-each select="item[value and not(@name = 'Dodatkowe informacje')]/value[1]">
+                        <entry>
+                            <xsl:value-of select="text()"/>
+                        </entry>
+                    </xsl:for-each>
+                    </row>
+                    <xsl:choose>
+                        <xsl:when test="item[value and @name = 'Dodatkowe informacje']/value">
+                            <xsl:for-each select="item[value and @name = 'Dodatkowe informacje']/value">
+                                <row>
+                                    <entry namest="c1" nameend="c{$cols}">
+                                        <xsl:value-of select="text()"/>
+                                    </entry>
+                                </row>
+                            </xsl:for-each>
+                        </xsl:when>
+                    </xsl:choose>
+                    
+                </tbody>
+            </tgroup>
             
-            <strow>
-                <xsl:for-each select="item[value and not(@name = 'Dodatkowe informacje')]/value[1]">
-                    <stentry>
-                        <xsl:value-of select="text()"/>
-                    </stentry>
-                </xsl:for-each>
-            </strow>
             
-        </simpletable>
+           
+            
+        </table>
         <xsl:comment>#197 todo back keys of referenced</xsl:comment>
     </xsl:template>
         
     
+    
+    <xsl:template mode="system_cache__dita:IPN21_powiazania_row" match="table">
+        
+        <table frame="all" id="table_wvz_gmx__{count(preceding-sibling::table)}">
+            <xsl:variable name="cols" select="count(thead/tr/th)"/>
+            <xsl:variable name="cols_extra" select="count(thead/tr/th[p[text() = 'Źródło informacji']])"/>
+            <xsl:variable name="cols_real" select="$cols - $cols_extra"/>
+            <xsl:comment>#230 cols_extra=<xsl:value-of select="$cols_extra"/>;</xsl:comment>
+            <tgroup cols="{$cols_real}">
+                
+                <!--<xsl:for-each select="thead/tr/th[not(p[text() = 'Źródło informacji'])]">-->
+                <xsl:for-each select="thead/tr/th">
+                    <xsl:if test="position() &lt;= $cols_real">
+                        <colspec colname="c{position()}" colnum="{position()}" colwidth="1*"/>    
+                    </xsl:if>
+                    
+                </xsl:for-each>
+                
+                <thead>
+                    <row>
+                        <xsl:for-each select="thead/tr/th">
+                            <xsl:if test="position() &lt;= $cols_real">
+                                <entry>
+                                    <xsl:value-of select="p[1]"/>
+                                </entry>
+                            </xsl:if>
+                        </xsl:for-each>
+                    </row>
+                </thead>
+                <tbody>
+                    <row>
+                        <xsl:for-each select="tbody/tr/td[p]">
+                            <xsl:if test="position() &lt;= $cols_real">
+                                <entry>
+                                    <xsl:value-of select="p[1]"/>
+                                </entry>    
+                            </xsl:if>
+                        </xsl:for-each>
+                    </row>
+                    <xsl:choose>
+                        <xsl:when test="tbody/tr/th[p[text() = 'Źródło informacji']]">
+                            <xsl:for-each select="thead/tr/td[p]">
+                                <xsl:if test="position() = $cols">
+                                    <row>
+                                        <entry namest="c1" nameend="c{$cols}">
+                                            <xsl:value-of select="p"/>
+                                        </entry>
+                                    </row>
+                                </xsl:if>
+                            </xsl:for-each>
+                        </xsl:when>
+                    </xsl:choose>
+                    
+                </tbody>
+            </tgroup>
+        </table>
+        <xsl:comment>#197 todo back keys of referenced</xsl:comment>
+    </xsl:template>
+    
+    
     <xsl:template mode="system_cache__dita:IPN21_powiazania_row" match="text()|comment()"/>