a.binder 9 лет назад
Родитель
Сommit
a0ea933997

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

@@ -720,6 +720,7 @@
                 </project>
             </xsl:when>
             <xsl:otherwise>
+                <xsl:comment>#723 child nodes</xsl:comment>
                 <xsl:apply-templates mode="child_nodes"/>
             </xsl:otherwise>
         </xsl:choose>
@@ -728,6 +729,7 @@
     <!-- trzeba przetwarzac child_nodes do pierwszego napotkania RelatedFeature -->
     <xsl:template mode="child_nodes" match="*">
         <xsl:copy-of select="."/>
+        <xsl:comment>#732 eof copy . (mode=child_nodes match=*)</xsl:comment>
     </xsl:template>
     
     <!--<xsl:template mode="child_nodes" match="simpleTypeMakeOgcFilter">

+ 1 - 1
SE/schema/default_db_xml_cache.public/builds_to_ant.xsl

@@ -63,7 +63,7 @@
                         <xsl:message> $xpath_query_test NOT OK - bypassed by xpath_query filter </xsl:message>
                         <echo> $xpath_query_test NOT OK - bypassed by xpath_query filter </echo>
                     </xsl:when>
-                    <xsl:when test="1=1"> <!-- $last_slash='temp' -->
+                    <xsl:when test="1=2"> <!-- $last_slash='temp' -->
                         <xsl:message> FIRST LEVEL ANT is executed in PARALLEL </xsl:message>
                         <echo>
                             #

+ 94 - 0
SE/schema/default_db_xml_cache.public/dita_enter_to_ph.xsl

@@ -0,0 +1,94 @@
+<?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:system_cache__appinfo="http://biuro.biall-net.pl/xmlschema_procesy5/default_db_xml_cache/appinfo.xsd"
+    exclude-result-prefixes="xs"
+    version="2.0">
+    
+    
+    
+    <xsl:template match="*" mode="PROCES_TO_DITA_STRIP_HTML"/>
+    <xsl:template match="text()" mode="PROCES_TO_DITA_STRIP_HTML">
+        <xsl:param name="limit"/>
+        <xsl:variable name="parse_content">
+            <xsl:choose>
+                <xsl:when test=".='&#xD;'"/>
+                <xsl:otherwise><xsl:call-template name="system_cache__appinfo:escaped_html_to_xml" exclude-result-prefixes="#all" extension-element-prefixes="">
+                    <xsl:with-param name="html" select="."/>
+                </xsl:call-template></xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        <xsl:apply-templates select="$parse_content" mode="CONVERT_HTML_TO_DITA_CONTENT"/>
+    </xsl:template>
+    
+    <xsl:template match="text()" mode="PROCES_TO_DITA_STRIP_HTML_TITLE">
+        <xsl:param name="limit"/>
+        <xsl:variable name="parse_title">
+            <xsl:choose>
+                <xsl:when test=".='&#xD;'"/>
+                <xsl:otherwise><xsl:call-template name="system_cache__appinfo:escaped_html_to_xml" exclude-result-prefixes="#all" extension-element-prefixes="">
+                    <xsl:with-param name="html" select="."/>
+                </xsl:call-template></xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        <xsl:copy-of select="$parse_title"/>
+    </xsl:template>
+    
+    <xsl:template match="*" mode="enter_to_ph">
+        <xsl:param name="count"/>
+        <xsl:param name="element"/>
+        <xsl:variable name="current" select="."/>
+        <xsl:variable name="surround_with">
+            <xsl:choose>
+                <xsl:when test="$element='p'"><xsl:value-of select="'codeblock'"/></xsl:when>
+                <xsl:when test="$element='bodydiv'"><xsl:value-of select="'p'"/></xsl:when>
+                <xsl:otherwise><xsl:value-of select="'codeblock'"/></xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+        <xsl:choose>
+            <xsl:when test=" contains(  text(),'&#13;')">
+                <xsl:for-each select="tokenize(  text(),'&#13;')">
+                    <xsl:element name="{$surround_with}"><!-- to jest przetwarzane jak jest tekst lamany -->
+                        <xsl:value-of select="."/>
+                    </xsl:element>
+                </xsl:for-each>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:choose>
+                    <xsl:when test="$count &gt;1">
+                        <codeblock>
+                            <!--<xsl:attribute name="DDxpath" select="@xpath"/>-->
+                            <!--DN(<xsl:value-of select="$element"/>)-->
+                            <!--count:<xsl:value-of select="$count"/>-->
+                            <xsl:copy-of select=" text()"/>
+                        </codeblock>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:apply-templates mode="enter_to_ph_text">
+                            <xsl:with-param name="element" select="$element"/>
+                        </xsl:apply-templates>
+                        <!--<xsl:copy-of select=" text()"/>-->
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+    <!-- dodanie enterow dla tabel w ktorych wyrazy sa dluzsze niz 10 znakow  -->
+    <xsl:template match="text()" mode="enter_to_ph_text">
+        <xsl:param name="element" required="yes"/>
+        <xsl:choose>
+            <xsl:when test="$element='entry'">
+                <xsl:for-each select="tokenize(.,' ')">
+                    <xsl:value-of select="' '"/>
+                    <xsl:variable name="phrase" select="."/>
+                    <xsl:for-each select="1 to string-length(.)">
+                        <xsl:if test="position() mod 12 = 0"><xsl:value-of select="' -'"/></xsl:if>
+                        <xsl:value-of select="substring($phrase,position(),1)"/>
+                    </xsl:for-each>
+                </xsl:for-each>
+            </xsl:when>
+            <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+    
+</xsl:stylesheet>

+ 44 - 5
SE/schema/default_db_xml_cache.public/recurse_ant_to_html.xsl

@@ -16,11 +16,50 @@
 
 
     <xsl:template mode="child" match="*">
-        <table>
-            <tr><td><xsl:value-of select="name()"/></td></tr>
-            <tr><td><xsl:value-of select="text()"/></td></tr>
-            <tr><td><xsl:apply-templates mode="child"></xsl:apply-templates></td></tr>    
-        </table>
+        <xsl:choose>
+            <xsl:when test="./*">
+                <table border="1">
+                    <tr><td>
+                        <table border="1">
+                            <tr>
+                                <xsl:for-each select="*[ not( child::node()/*) and  string-length(text()) &gt;0]">
+                                    <td><xsl:value-of select="name()"/></td>
+                                </xsl:for-each>
+                            </tr>
+                            <tr>
+                                <xsl:for-each select="*[ not( child::node()/*) and  string-length(text()) &gt;0]">
+                                    <td><xsl:value-of select="."/></td>
+                                </xsl:for-each>
+                            </tr>
+                        </table>
+                    </td></tr>
+                    
+                    <tr><td><xsl:apply-templates mode="child"/></td></tr>    
+                </table>
+            </xsl:when>
+            <xsl:otherwise>
+                <!--<table>
+                    <tr><td>
+                        <table>
+                            <tr>
+                                <xsl:for-each select=".[ not( child::node()/*)]">
+                                    <td><xsl:value-of select="name()"/></td>
+                                </xsl:for-each>
+                            </tr>
+                            <tr>
+                                <xsl:for-each select=".[ not( child::node()/*)]">
+                                    <td><xsl:value-of select="."/></td>
+                                </xsl:for-each>
+                            </tr>
+                        </table>
+                    </td></tr>
+                  
+                </table>-->
+            </xsl:otherwise>
+        </xsl:choose>
+        
     </xsl:template>
+    
+
 
 </xsl:stylesheet>