a.binder 9 years ago
parent
commit
541a45d320

+ 49 - 2
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/IN7_DZIENNIK_KORESP.dita

@@ -35,8 +35,55 @@
   
  
     <p>Tresc: </p>
-    <p xpath="K_ZAWARTOSC_HTML">
-    </p>
+    <bodydiv xpath="K_ZAWARTOSC_HTML"/>
+    <RelatedFeature xpath="ID" xpath_value="../L_APPOITMENT_USER" typeName="p5_default_db:ADMIN_USERS"><!-- oznacza to refa z w $var=ID_BILLING_OWNER jest FeatureID=BILLING_OWNER.$var do sciagniecia z p5_default_db:BILLING_OWNER -->
+      <p><simpletable frame="all" relcolwidth="1.0* 1.0*" id="simpletable_b2r_ldr_cz">
+        <strow>
+          <stentry>Referent odpowiedzialny za dokument</stentry>
+          <stentry xpath="ADM_NAME"/>
+        </strow>
+        <strow>
+          <stentry>Kontakty</stentry>
+          <stentry><ph xpath="EMAIL_LOCAL_ACCOUNT_ADDRESS"/><ph> </ph><ph xpath="ADM_PHONE"/></stentry>
+        </strow>
+      </simpletable>
+      </p>
+    </RelatedFeature>
+    <RelatedFeature xpath="ID" xpath_value="../ID_PROJECT" typeName="p5_default_db:IN7_MK_BAZA_DYSTRYBUCJI">
+        <RelatedFeature xpath="ID" xpath_value="../L_APPOITMENT_USER" typeName="p5_default_db:ADMIN_USERS"><!-- oznacza to refa z w $var=ID_BILLING_OWNER jest FeatureID=BILLING_OWNER.$var do sciagniecia z p5_default_db:BILLING_OWNER -->
+          <p><simpletable frame="all" relcolwidth="1.0* 1.0*" id="simpletable_b2r_ldr_cz">
+            <strow>
+              <stentry>Referent odpowiedzialny za sprawę</stentry>
+              <stentry xpath="ADM_NAME"/>
+            </strow>
+            <strow>
+              <stentry>Kontakty</stentry>
+              <stentry><ph xpath="EMAIL_LOCAL_ACCOUNT_ADDRESS"/><ph> </ph><ph xpath="ADM_PHONE"/></stentry>
+            </strow>
+          </simpletable>
+          </p>
+        </RelatedFeature>
+    </RelatedFeature>
+    
+    <p> Miejsca na podpisy<simpletable frame="all" relcolwidth="1.0* 1.0*"
+      id="simpletable_ejm_j2r_cz">
+      <strow>
+        <stentry/> 
+        <stentry>Podpis(*)</stentry>
+      </strow>
+      <strow>
+        <stentry/>
+        <stentry>
+          <codeblock>
+            
+            
+            
+            
+          </codeblock>
+        </stentry>
+      </strow>
+    </simpletable></p>
+    
     <p><b>Powiazane elementy (inne dokumenty w sprawie)</b></p>
     <p>
       <table>

+ 1 - 2
SE/schema/ant-url_action/default_db.in7_dziennik_koresp/test-druk/build.xml

@@ -202,9 +202,8 @@
         </condition>
     </target>
     
-    <target name="check_dita" depends="set_dita,dita_fail,dita_ok" if="${test_if_dita}">
+    <target name="check_dita" depends="set_dita,dita_fail,dita_ok">
         <echo> testujemy czy jest dita</echo>
-        
     </target>
     
     <target name="dita_fail" unless="${test_if_dita}">

+ 38 - 5
SE/schema/default_db_xml_cache.public/build_recurse_ant.xsl

@@ -626,6 +626,7 @@
                                 <xsl:variable name="enter_to_ph">
                                     <xsl:apply-templates mode="enter_to_ph" select="$input_obj_with_xpath/node()[local-name()=current()/@xpath]">
                                         <xsl:with-param name="count" select="count($input_obj_with_xpath/node()[local-name()=current()/@xpath])"/>
+                                        <xsl:with-param name="element" select="name()"/>
                                     </xsl:apply-templates>
                                 </xsl:variable>
                                 <xsl:copy-of select="$enter_to_ph"/>
@@ -699,27 +700,59 @@
     
     <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;')">
-                    <codeblock><xsl:value-of select="."/></codeblock>
+                    <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>
-<!--                            count:<xsl:value-of select="$count"/>
--->                            <xsl:copy-of select=" text()"/>
+                                <!--<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:copy-of select=" text()"/>
+                        <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>